mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
Merge remote-tracking branch 'Upstream/master'
This commit is contained in:
@@ -86,7 +86,6 @@ extern "C" void _savegpr_19();
|
||||
extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_19();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" void strcpy();
|
||||
extern "C" extern u8 const j2dDefaultTexCoordInfo[32];
|
||||
extern "C" extern u8 const j2dDefaultIndTexMtxInfo[28];
|
||||
extern "C" extern u8 const j2dDefaultIndTevStageInfo[12];
|
||||
|
||||
@@ -48,7 +48,6 @@ extern "C" void _restgpr_25();
|
||||
extern "C" void _restgpr_26();
|
||||
extern "C" void _restgpr_28();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" void strlen();
|
||||
extern "C" void strtol();
|
||||
extern "C" void strtoul();
|
||||
extern "C" u8 sSystemHeap__7JKRHeap[4];
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,66 +4,16 @@
|
||||
//
|
||||
|
||||
#include "JSystem/JFramework/JFWSystem.h"
|
||||
#include "JSystem/JKernel/JKRAram.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JUtility/JUTDirectPrint.h"
|
||||
#include "JSystem/JUtility/JUTException.h"
|
||||
#include "JSystem/JUtility/JUTGamePad.h"
|
||||
#include "JSystem/JUtility/JUTGraphFifo.h"
|
||||
#include "JSystem/JUtility/JUTVideo.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct OSThread {};
|
||||
|
||||
struct JUTVideo {
|
||||
/* 802E4C54 */ void createManager(_GXRenderModeObj const*);
|
||||
};
|
||||
|
||||
struct JKRHeap {
|
||||
/* 802CE4D4 */ void alloc(u32, int);
|
||||
};
|
||||
|
||||
struct JUTResFont {
|
||||
/* 802DEF94 */ JUTResFont(ResFONT const*, JKRHeap*);
|
||||
};
|
||||
|
||||
struct JUTGraphFifo {
|
||||
/* 802DEB58 */ JUTGraphFifo(u32);
|
||||
};
|
||||
|
||||
struct JUTGamePad {
|
||||
/* 802E0898 */ void init();
|
||||
};
|
||||
|
||||
struct JUTDirectPrint {
|
||||
/* 802E4240 */ void start();
|
||||
};
|
||||
|
||||
struct JUTException {
|
||||
/* 802E1E40 */ void create(JUTDirectPrint*);
|
||||
/* 802E3FEC */ void createConsole(void*, u32);
|
||||
};
|
||||
|
||||
struct JUTDbPrint {
|
||||
/* 802E0190 */ void start(JUTFont*, JKRHeap*);
|
||||
/* 802E0204 */ void changeFont(JUTFont*);
|
||||
};
|
||||
|
||||
struct JUTAssertion {
|
||||
/* 802E495C */ void create();
|
||||
};
|
||||
|
||||
struct JKRThread {
|
||||
/* 802D16B8 */ JKRThread(OSThread*, int);
|
||||
};
|
||||
|
||||
struct JKRExpHeap {
|
||||
/* 802CEDB4 */ void createRoot(int, bool);
|
||||
/* 802CEE2C */ void create(u32, JKRHeap*, bool);
|
||||
};
|
||||
|
||||
struct JKRAram {
|
||||
/* 802D1FA4 */ void create(u32, u32, s32, s32, s32);
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
@@ -112,7 +62,6 @@ extern "C" void createManager__8JUTVideoFPC16_GXRenderModeObj();
|
||||
extern "C" void create__10JUTConsoleFUiUiP7JKRHeap();
|
||||
extern "C" void createManager__17JUTConsoleManagerFP7JKRHeap();
|
||||
extern "C" void OSInit();
|
||||
extern "C" void OSGetCurrentThread();
|
||||
extern "C" void DVDInit();
|
||||
extern "C" extern u8 const JUTResFONT_Ascfont_fix12[16736];
|
||||
extern "C" extern u8 GXNtsc480IntDf[60];
|
||||
@@ -123,82 +72,78 @@ extern "C" extern u8 GXNtsc480IntDf[60];
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80450770-80450774 0001F0 0004+00 1/1 1/1 0/0 .sdata maxStdHeaps__Q29JFWSystem11CSetUpParam */
|
||||
SECTION_SDATA u32 JFWSystem::CSetUpParam::maxStdHeaps = 0x00000002;
|
||||
SECTION_SDATA s32 JFWSystem::CSetUpParam::maxStdHeaps = 2;
|
||||
|
||||
/* 80450774-80450778 0001F4 0004+00 1/1 1/1 0/0 .sdata sysHeapSize__Q29JFWSystem11CSetUpParam */
|
||||
SECTION_SDATA u32 JFWSystem::CSetUpParam::sysHeapSize = 0x00400000;
|
||||
SECTION_SDATA u32 JFWSystem::CSetUpParam::sysHeapSize = 0x400000;
|
||||
|
||||
/* 804511A0-804511A4 0006A0 0004+00 2/2 0/0 0/0 .sbss rootHeap__9JFWSystem */
|
||||
u8 JFWSystem::rootHeap[4];
|
||||
JKRExpHeap* JFWSystem::rootHeap;
|
||||
|
||||
/* 804511A4-804511A8 0006A4 0004+00 2/2 1/1 0/0 .sbss systemHeap__9JFWSystem */
|
||||
u8 JFWSystem::systemHeap[4];
|
||||
JKRExpHeap* JFWSystem::systemHeap;
|
||||
|
||||
/* 80271CD0-80271D18 26C610 0048+00 1/1 1/1 0/0 .text firstInit__9JFWSystemFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JFWSystem::firstInit() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JFramework/JFWSystem/firstInit__9JFWSystemFv.s"
|
||||
void JFWSystem::firstInit() {
|
||||
OSInit();
|
||||
DVDInit();
|
||||
rootHeap = JKRExpHeap::createRoot(CSetUpParam::maxStdHeaps, false);
|
||||
systemHeap = JKRExpHeap::create(CSetUpParam::sysHeapSize, rootHeap, false);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80450778-8045077C 0001F8 0004+00 1/1 1/1 0/0 .sdata fifoBufSize__Q29JFWSystem11CSetUpParam */
|
||||
SECTION_SDATA u32 JFWSystem::CSetUpParam::fifoBufSize = 0x00040000;
|
||||
SECTION_SDATA u32 JFWSystem::CSetUpParam::fifoBufSize = 0x40000;
|
||||
|
||||
/* 8045077C-80450780 0001FC 0004+00 1/1 1/1 0/0 .sdata aramAudioBufSize__Q29JFWSystem11CSetUpParam
|
||||
*/
|
||||
SECTION_SDATA u32 JFWSystem::CSetUpParam::aramAudioBufSize = 0x00800000;
|
||||
SECTION_SDATA u32 JFWSystem::CSetUpParam::aramAudioBufSize = 0x800000;
|
||||
|
||||
/* 80450780-80450784 000200 0004+00 1/1 1/1 0/0 .sdata aramGraphBufSize__Q29JFWSystem11CSetUpParam
|
||||
*/
|
||||
SECTION_SDATA u32 JFWSystem::CSetUpParam::aramGraphBufSize = 0x00600000;
|
||||
SECTION_SDATA u32 JFWSystem::CSetUpParam::aramGraphBufSize = 0x600000;
|
||||
|
||||
/* 80450784-80450788 000204 0004+00 1/1 0/0 0/0 .sdata streamPriority__Q29JFWSystem11CSetUpParam
|
||||
*/
|
||||
SECTION_SDATA u32 JFWSystem::CSetUpParam::streamPriority = 0x00000008;
|
||||
SECTION_SDATA u32 JFWSystem::CSetUpParam::streamPriority = 8;
|
||||
|
||||
/* 80450788-8045078C 000208 0004+00 1/1 0/0 0/0 .sdata decompPriority__Q29JFWSystem11CSetUpParam
|
||||
*/
|
||||
SECTION_SDATA u32 JFWSystem::CSetUpParam::decompPriority = 0x00000007;
|
||||
SECTION_SDATA u32 JFWSystem::CSetUpParam::decompPriority = 7;
|
||||
|
||||
/* 8045078C-80450790 00020C 0004+00 1/1 0/0 0/0 .sdata aPiecePriority__Q29JFWSystem11CSetUpParam
|
||||
*/
|
||||
SECTION_SDATA u32 JFWSystem::CSetUpParam::aPiecePriority = 0x00000006;
|
||||
SECTION_SDATA u32 JFWSystem::CSetUpParam::aPiecePriority = 6;
|
||||
|
||||
/* 80450790-80450794 -00001 0004+00 1/1 0/0 0/0 .sdata systemFontRes__Q29JFWSystem11CSetUpParam */
|
||||
SECTION_SDATA void* JFWSystem::CSetUpParam::systemFontRes = (void*)&JUTResFONT_Ascfont_fix12;
|
||||
SECTION_SDATA ResFONT* JFWSystem::CSetUpParam::systemFontRes = (ResFONT*)&JUTResFONT_Ascfont_fix12;
|
||||
|
||||
/* 80450794-80450798 -00001 0004+00 1/1 1/1 0/0 .sdata renderMode__Q29JFWSystem11CSetUpParam */
|
||||
SECTION_SDATA void* JFWSystem::CSetUpParam::renderMode = (void*)&GXNtsc480IntDf;
|
||||
SECTION_SDATA GXRenderModeObj* JFWSystem::CSetUpParam::renderMode =
|
||||
(GXRenderModeObj*)&GXNtsc480IntDf;
|
||||
|
||||
/* 80450798-804507A0 000218 0004+04 1/1 0/0 0/0 .sdata
|
||||
* exConsoleBufferSize__Q29JFWSystem11CSetUpParam */
|
||||
SECTION_SDATA u32 JFWSystem::CSetUpParam::exConsoleBufferSize[1 + 1 /* padding */] = {
|
||||
0x000024FC,
|
||||
/* padding */
|
||||
0x00000000,
|
||||
};
|
||||
SECTION_SDATA u32 JFWSystem::CSetUpParam::exConsoleBufferSize = 0x24FC;
|
||||
|
||||
/* 804511A8-804511AC 0006A8 0004+00 1/1 0/0 0/0 .sbss mainThread__9JFWSystem */
|
||||
u8 JFWSystem::mainThread[4];
|
||||
JKRThread* JFWSystem::mainThread;
|
||||
|
||||
/* 804511AC-804511B0 0006AC 0004+00 1/1 0/0 0/0 .sbss debugPrint__9JFWSystem */
|
||||
u8 JFWSystem::debugPrint[4];
|
||||
JUTDbPrint* JFWSystem::debugPrint;
|
||||
|
||||
/* 804511B0-804511B4 0006B0 0004+00 1/1 0/0 0/0 .sbss systemFont__9JFWSystem */
|
||||
u8 JFWSystem::systemFont[4];
|
||||
JUTResFont* JFWSystem::systemFont;
|
||||
|
||||
/* 804511B4-804511B8 0006B4 0004+00 1/1 0/0 0/0 .sbss systemConsoleManager__9JFWSystem */
|
||||
u8 JFWSystem::systemConsoleManager[4];
|
||||
JUTConsoleManager* JFWSystem::systemConsoleManager;
|
||||
|
||||
/* 804511B8-804511BC 0006B8 0004+00 1/1 7/7 0/0 .sbss systemConsole__9JFWSystem */
|
||||
JUTConsole* JFWSystem::systemConsole;
|
||||
|
||||
/* 804511BC-804511C0 0006BC 0004+00 1/1 0/0 0/0 .sbss None */
|
||||
static u8 data_804511BC[4];
|
||||
static u8 data_804511BC;
|
||||
// static bool sInitCalled
|
||||
|
||||
/* 80455240-80455244 003840 0004+00 1/1 0/0 0/0 .sdata2 @2242 */
|
||||
SECTION_SDATA2 static f32 lit_2242 = 0.5f;
|
||||
@@ -210,6 +155,60 @@ SECTION_SDATA2 static f32 lit_2243 = 17.0f / 20.0f;
|
||||
SECTION_SDATA2 static f64 lit_2245 = 4503601774854144.0 /* cast s32 to float */;
|
||||
|
||||
/* 80271D18-80272040 26C658 0328+00 0/0 1/1 0/0 .text init__9JFWSystemFv */
|
||||
// just regalloc in the beginning
|
||||
#ifdef NONMATCHING
|
||||
void JFWSystem::init() {
|
||||
if (rootHeap == NULL) {
|
||||
firstInit();
|
||||
}
|
||||
sInitCalled = true;
|
||||
|
||||
JKRAram::create(CSetUpParam::aramAudioBufSize, CSetUpParam::aramGraphBufSize,
|
||||
CSetUpParam::streamPriority, CSetUpParam::decompPriority,
|
||||
CSetUpParam::aPiecePriority);
|
||||
mainThread = new JKRThread(OSGetCurrentThread(), 4);
|
||||
|
||||
JUTVideo::createManager(CSetUpParam::renderMode);
|
||||
|
||||
u32 fifoSize = CSetUpParam::fifoBufSize;
|
||||
JUTGraphFifo* fifo = new JUTGraphFifo(fifoSize);
|
||||
|
||||
JUTGamePad::init();
|
||||
|
||||
JUTDirectPrint* dbPrint = JUTDirectPrint::start();
|
||||
|
||||
JUTAssertion::create();
|
||||
|
||||
JUTException::create(dbPrint);
|
||||
|
||||
systemFont = new JUTResFont(CSetUpParam::systemFontRes, NULL);
|
||||
|
||||
debugPrint = JUTDbPrint::start(NULL, NULL);
|
||||
debugPrint->changeFont(systemFont);
|
||||
|
||||
systemConsoleManager = JUTConsoleManager::createManager(NULL);
|
||||
|
||||
systemConsole = JUTConsole::create(60, 200, NULL);
|
||||
systemConsole->setFont(systemFont);
|
||||
|
||||
if (CSetUpParam::renderMode->efb_height < 300) {
|
||||
systemConsole->setFontSize(systemFont->getWidth() * 0.85f, systemFont->getHeight() * 0.5f);
|
||||
systemConsole->setPosition(20, 25);
|
||||
} else {
|
||||
systemConsole->setFontSize(systemFont->getWidth(), systemFont->getHeight());
|
||||
systemConsole->setPosition(20, 50);
|
||||
}
|
||||
|
||||
systemConsole->setHeight(25);
|
||||
systemConsole->setVisible(false);
|
||||
systemConsole->setOutput(JUTConsole::OUTPUT_OSREPORT | JUTConsole::OUTPUT_CONSOLE);
|
||||
JUTSetReportConsole(systemConsole);
|
||||
JUTSetWarningConsole(systemConsole);
|
||||
|
||||
void* buffer = systemHeap->alloc(CSetUpParam::exConsoleBufferSize, 4);
|
||||
JUTException::createConsole(buffer, CSetUpParam::exConsoleBufferSize);
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -218,3 +217,4 @@ asm void JFWSystem::init() {
|
||||
#include "asm/JSystem/JFramework/JFWSystem/init__9JFWSystemFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
#include "JSystem/JParticle/JPAChildShape.h"
|
||||
#include "JSystem/JParticle/JPAParticle.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "dolphin/os/OS.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
//
|
||||
|
||||
#include "JSystem/JParticle/JPAExtraShape.h"
|
||||
#include "JSystem/JMath/JMATrigonometric.h"
|
||||
#include "JSystem/JParticle/JPAParticle.h"
|
||||
#include "JSystem/JParticle/JPAResource.h"
|
||||
#include "JSystem/JParticle/JPAResourceManager.h"
|
||||
#include "JSystem/JMath/JMATrigonometric.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "dolphin/os/OS.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
@@ -21,9 +21,12 @@
|
||||
void JPACalcScaleX(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
||||
JPAExtraShape* esp = work->mpRes->getEsp();
|
||||
if (work->mScaleAnm < esp->getScaleInTiming()) {
|
||||
ptcl->mParticleScaleX = ptcl->mScaleOut * (esp->getScaleIncRateX() * work->mScaleAnm + esp->getScaleInValueX());
|
||||
ptcl->mParticleScaleX =
|
||||
ptcl->mScaleOut * (esp->getScaleIncRateX() * work->mScaleAnm + esp->getScaleInValueX());
|
||||
} else if (work->mScaleAnm > esp->getScaleOutTiming()) {
|
||||
ptcl->mParticleScaleX = ptcl->mScaleOut * (esp->getScaleDecRateX() * (work->mScaleAnm - esp->getScaleOutTiming()) + 1.0f);
|
||||
ptcl->mParticleScaleX =
|
||||
ptcl->mScaleOut *
|
||||
(esp->getScaleDecRateX() * (work->mScaleAnm - esp->getScaleOutTiming()) + 1.0f);
|
||||
} else {
|
||||
ptcl->mParticleScaleX = ptcl->mScaleOut;
|
||||
}
|
||||
@@ -34,9 +37,12 @@ void JPACalcScaleX(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
||||
void JPACalcScaleY(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
||||
JPAExtraShape* esp = work->mpRes->getEsp();
|
||||
if (work->mScaleAnm < esp->getScaleInTiming()) {
|
||||
ptcl->mParticleScaleY = ptcl->mScaleOut * (esp->getScaleIncRateY() * work->mScaleAnm + esp->getScaleInValueY());
|
||||
ptcl->mParticleScaleY =
|
||||
ptcl->mScaleOut * (esp->getScaleIncRateY() * work->mScaleAnm + esp->getScaleInValueY());
|
||||
} else if (work->mScaleAnm > esp->getScaleOutTiming()) {
|
||||
ptcl->mParticleScaleY = ptcl->mScaleOut * (esp->getScaleDecRateY() * (work->mScaleAnm - esp->getScaleOutTiming()) + 1.0f);
|
||||
ptcl->mParticleScaleY =
|
||||
ptcl->mScaleOut *
|
||||
(esp->getScaleDecRateY() * (work->mScaleAnm - esp->getScaleOutTiming()) + 1.0f);
|
||||
} else {
|
||||
ptcl->mParticleScaleY = ptcl->mScaleOut;
|
||||
}
|
||||
@@ -95,7 +101,8 @@ void JPACalcAlphaAnm(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
||||
if (ptcl->mTime < esp->getAlphaInTiming()) {
|
||||
alpha = 255.0f * (esp->getAlphaInValue() + esp->getAlphaIncRate() * ptcl->mTime);
|
||||
} else if (ptcl->mTime > esp->getAlphaOutTiming()) {
|
||||
alpha = 255.0f * ((ptcl->mTime - esp->getAlphaOutTiming()) * esp->getAlphaDecRate() + esp->getAlphaBaseValue());
|
||||
alpha = 255.0f * ((ptcl->mTime - esp->getAlphaOutTiming()) * esp->getAlphaDecRate() +
|
||||
esp->getAlphaBaseValue());
|
||||
} else {
|
||||
alpha = 255.0f * esp->getAlphaBaseValue();
|
||||
}
|
||||
@@ -110,7 +117,8 @@ void JPACalcAlphaFlickAnm(JPAEmitterWorkData* work, JPABaseParticle* ptcl) {
|
||||
if (ptcl->mTime < esp->getAlphaInTiming()) {
|
||||
alpha = (esp->getAlphaInValue() + esp->getAlphaIncRate() * ptcl->mTime);
|
||||
} else if (ptcl->mTime > esp->getAlphaOutTiming()) {
|
||||
alpha = ((ptcl->mTime - esp->getAlphaOutTiming()) * esp->getAlphaDecRate() + esp->getAlphaBaseValue());
|
||||
alpha = ((ptcl->mTime - esp->getAlphaOutTiming()) * esp->getAlphaDecRate() +
|
||||
esp->getAlphaBaseValue());
|
||||
} else {
|
||||
alpha = esp->getAlphaBaseValue();
|
||||
}
|
||||
@@ -128,8 +136,12 @@ JPAExtraShape::JPAExtraShape(u8 const* data) {
|
||||
|
||||
/* 8027ADBC-8027AEBC 2756FC 0100+00 1/1 0/0 0/0 .text init__13JPAExtraShapeFv */
|
||||
void JPAExtraShape::init() {
|
||||
mAlphaIncRate = (getAlphaInTiming() != 0.0f) ? (getAlphaBaseValue() - getAlphaInValue()) / getAlphaInTiming() : 1.0f;
|
||||
mAlphaDecRate = (getAlphaOutTiming() != 1.0f) ? (getAlphaOutValue() - getAlphaBaseValue()) / (1.0f - getAlphaOutTiming()) : 1.0f;
|
||||
mAlphaIncRate = (getAlphaInTiming() != 0.0f) ?
|
||||
(getAlphaBaseValue() - getAlphaInValue()) / getAlphaInTiming() :
|
||||
1.0f;
|
||||
mAlphaDecRate = (getAlphaOutTiming() != 1.0f) ?
|
||||
(getAlphaOutValue() - getAlphaBaseValue()) / (1.0f - getAlphaOutTiming()) :
|
||||
1.0f;
|
||||
|
||||
if (getScaleInTiming() != 0.0f) {
|
||||
mScaleIncRateX = (1.0f - getScaleInValueX()) / getScaleInTiming();
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
//
|
||||
|
||||
#include "JSystem/JParticle/JPAResource.h"
|
||||
#include "JSystem/JParticle/JPAMath.h"
|
||||
#include "JSystem/JParticle/JPABaseShape.h"
|
||||
#include "JSystem/JParticle/JPAMath.h"
|
||||
#include "JSystem/JParticle/JPAParticle.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/mtx/mtx.h"
|
||||
@@ -180,7 +180,7 @@ JPAResource::JPAResource() {
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803C40C0-803C4220 0211E0 0144+1C 2/2 0/0 0/0 .data jpa_pos */
|
||||
SECTION_DATA static u8 jpa_pos[324 + 28 /* padding */] = {
|
||||
SECTION_DATA static u8 jpa_pos[324 + 28 /* padding */] ALIGN_DECL(32) = {
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
|
||||
@@ -4,57 +4,11 @@
|
||||
//
|
||||
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JUtility/JUTDbPrint.h"
|
||||
#include "JSystem/JUtility/JUTDirectPrint.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct JUtility {
|
||||
struct TColor {};
|
||||
};
|
||||
|
||||
struct JUTFont {
|
||||
/* 802DED70 */ void setCharColor(JUtility::TColor);
|
||||
/* 802DEE28 */ void drawString_size_scale(f32, f32, f32, f32, char const*, u32, bool);
|
||||
};
|
||||
|
||||
struct JUTDirectPrint {
|
||||
/* 802E46D8 */ void drawString(u16, u16, char*);
|
||||
/* 802E4798 */ void setCharColor(JUtility::TColor);
|
||||
|
||||
static u8 sDirectPrint[4 + 4 /* padding */];
|
||||
};
|
||||
|
||||
struct JUTDbPrint {
|
||||
static u8 sDebugPrint[4 + 4 /* padding */];
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void create__12JUTAssertionFv();
|
||||
extern "C" void flush_subroutine__12JUTAssertionFv();
|
||||
extern "C" void flushMessage__12JUTAssertionFv();
|
||||
extern "C" void flushMessage_dbPrint__12JUTAssertionFv();
|
||||
extern "C" void setVisible__12JUTAssertionFb();
|
||||
extern "C" void setMessageCount__12JUTAssertionFi();
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void setCharColor__7JUTFontFQ28JUtility6TColor();
|
||||
extern "C" void drawString_size_scale__7JUTFontFffffPCcUlb();
|
||||
extern "C" void drawString__14JUTDirectPrintFUsUsPc();
|
||||
extern "C" void setCharColor__14JUTDirectPrintFQ28JUtility6TColor();
|
||||
extern "C" void VIGetRetraceCount();
|
||||
extern "C" void strlen();
|
||||
extern "C" extern u8 data_804508F8[8];
|
||||
extern "C" u8 sDebugPrint__10JUTDbPrint[4 + 4 /* padding */];
|
||||
extern "C" u8 sDirectPrint__14JUTDirectPrint[4 + 4 /* padding */];
|
||||
#include "dolphin/vi/vi.h"
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
@@ -68,82 +22,67 @@ void JUTAssertion::create() {
|
||||
/* ############################################################################################## */
|
||||
/* 80451530-80451538 000A30 0004+04 2/2 0/0 0/0 .sbss
|
||||
* sMessageLife__Q212JUTAssertion23@unnamed@JUTAssert_cpp@ */
|
||||
static s32 data_80451530;
|
||||
static u32 sMessageLife;
|
||||
|
||||
/* 802E4960-802E499C 2DF2A0 003C+00 2/2 0/0 0/0 .text flush_subroutine__12JUTAssertionFv
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTAssertion::flush_subroutine() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTAssert/flush_subroutine__12JUTAssertionFv.s"
|
||||
u32 JUTAssertion::flush_subroutine() {
|
||||
if (sMessageLife == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (sMessageLife != -1) {
|
||||
sMessageLife--;
|
||||
}
|
||||
|
||||
if (sMessageLife >= 5) {
|
||||
return sMessageLife;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80434870-804348B0 061590 0040+00 2/2 0/0 0/0 .bss
|
||||
* sMessageFileLine__Q212JUTAssertion23@unnamed@JUTAssert_cpp@ */
|
||||
static u8 data_80434870[64];
|
||||
static char sMessageFileLine[64];
|
||||
|
||||
/* 804348B0-804349B0 0615D0 0100+00 2/2 0/0 0/0 .bss
|
||||
* sMessageString__Q212JUTAssertion23@unnamed@JUTAssert_cpp@ */
|
||||
static u8 data_804348B0[256];
|
||||
static char sMessageString[256];
|
||||
|
||||
/* 802E499C-802E4A54 2DF2DC 00B8+00 0/0 1/1 0/0 .text flushMessage__12JUTAssertionFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTAssertion::flushMessage() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTAssert/flushMessage__12JUTAssertionFv.s"
|
||||
void JUTAssertion::flushMessage() {
|
||||
if (flush_subroutine() && sAssertVisible == true) {
|
||||
JUTDirectPrint* manager = JUTDirectPrint::getManager();
|
||||
JUtility::TColor color = manager->getCharColor();
|
||||
manager->setCharColor(JUtility::TColor(255, 200, 200, 255));
|
||||
manager->drawString(16, 16, sMessageFileLine);
|
||||
manager->drawString(16, 24, sMessageString);
|
||||
manager->setCharColor(color);
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 804560B8-804560BC 0046B8 0004+00 1/1 0/0 0/0 .sdata2 @724 */
|
||||
SECTION_SDATA2 static f32 lit_724 = 30.0f;
|
||||
|
||||
/* 804560BC-804560C0 0046BC 0004+00 1/1 0/0 0/0 .sdata2 @725 */
|
||||
SECTION_SDATA2 static f32 lit_725 = 36.0f;
|
||||
|
||||
/* 804560C0-804560C8 0046C0 0004+04 1/1 0/0 0/0 .sdata2 @726 */
|
||||
SECTION_SDATA2 static f32 lit_726[1 + 1 /* padding */] = {
|
||||
54.0f,
|
||||
/* padding */
|
||||
0.0f,
|
||||
};
|
||||
|
||||
/* 804560C8-804560D0 0046C8 0008+00 1/1 0/0 0/0 .sdata2 @728 */
|
||||
SECTION_SDATA2 static f64 lit_728 = 4503601774854144.0 /* cast s32 to float */;
|
||||
|
||||
/* 802E4A54-802E4C34 2DF394 01E0+00 0/0 1/1 0/0 .text flushMessage_dbPrint__12JUTAssertionFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTAssertion::flushMessage_dbPrint() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTAssert/flushMessage_dbPrint__12JUTAssertionFv.s"
|
||||
void JUTAssertion::flushMessage_dbPrint() {
|
||||
if (flush_subroutine() && sAssertVisible == true && JUTDbPrint::getManager() != NULL) {
|
||||
JUTFont* font = JUTDbPrint::getManager()->getFont();
|
||||
if (font != NULL) {
|
||||
u8 tmp = ((VIGetRetraceCount() & 0x3C) << 2) | 0xF;
|
||||
font->setGX();
|
||||
font->setCharColor(JUtility::TColor(255, tmp, tmp, 255));
|
||||
font->drawString(30, 36, sMessageFileLine, true);
|
||||
font->drawString(30, 54, sMessageString, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802E4C34-802E4C3C 2DF574 0008+00 0/0 2/2 0/0 .text setVisible__12JUTAssertionFb */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTAssertion::setVisible(bool param_0) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTAssert/setVisible__12JUTAssertionFb.s"
|
||||
void JUTAssertion::setVisible(bool visible) {
|
||||
sAssertVisible = visible;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802E4C3C-802E4C54 2DF57C 0018+00 0/0 2/2 0/0 .text setMessageCount__12JUTAssertionFi
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTAssertion::setMessageCount(int param_0) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTAssert/setMessageCount__12JUTAssertionFi.s"
|
||||
void JUTAssertion::setMessageCount(int msg_count) {
|
||||
sMessageLife = msg_count <= 0 ? 0 : msg_count;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
@@ -90,7 +90,6 @@ extern "C" void _restgpr_20();
|
||||
extern "C" void _restgpr_27();
|
||||
extern "C" void _restgpr_28();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" void strlen();
|
||||
extern "C" extern void* __vt__14J2DGrafContext[10];
|
||||
extern "C" extern void* __vt__13J2DOrthoGraph[10];
|
||||
extern "C" u8 sCurrentHeap__7JKRHeap[4];
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
#include "JSystem/JUtility/JUTConsole.h"
|
||||
#include "JSystem/JUtility/JUTDirectPrint.h"
|
||||
#include "MSL_C.PPCEABI.bare.H/MSL_Common/Src/float.h"
|
||||
#include "MSL_C.PPCEABI.bare.H/MSL_Common/Src/printf.h"
|
||||
#include "Runtime.PPCEABI.H/__va_arg.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "msl_c/string.h"
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
@@ -1126,7 +1126,7 @@ void JUTException::createConsole(void* console_buffer, u32 console_buffer_size)
|
||||
sConsole->setPosition(15, 26);
|
||||
sConsole->setHeight(23);
|
||||
sConsole->setVisible(true);
|
||||
sConsole->setOutput(3);
|
||||
sConsole->setOutput(JUTConsole::OUTPUT_OSREPORT | JUTConsole::OUTPUT_CONSOLE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1146,8 +1146,6 @@ JUTException::~JUTException() {}
|
||||
/* ##############################################################################################
|
||||
*/
|
||||
/* 804508F8-80450900 000378 0008+00 0/0 3/3 0/0 .sdata None */
|
||||
SECTION_SDATA extern u8 data_804508F8[8] = {
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
SECTION_SDATA extern bool sAssertVisible = true;
|
||||
|
||||
/* 8039D490-8039D490 029AF0 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
|
||||
@@ -4,93 +4,50 @@
|
||||
//
|
||||
|
||||
#include "JSystem/JUtility/JUTGraphFifo.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct JUTGraphFifo {
|
||||
/* 802DEB58 */ JUTGraphFifo(u32);
|
||||
/* 802DEC34 */ ~JUTGraphFifo();
|
||||
|
||||
static u8 sCurrentFifo[4];
|
||||
static u8 mGpStatus[5 + 3 /* padding */];
|
||||
};
|
||||
|
||||
struct JKRHeap {
|
||||
/* 802CE4D4 */ void alloc(u32, int);
|
||||
/* 802CE548 */ void free(void*);
|
||||
|
||||
static u8 sSystemHeap[4];
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void __ct__12JUTGraphFifoFUl();
|
||||
extern "C" void __dt__12JUTGraphFifoFv();
|
||||
extern "C" u8 sCurrentFifo__12JUTGraphFifo[4];
|
||||
extern "C" u8 mGpStatus__12JUTGraphFifo[5 + 3 /* padding */];
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void alloc__7JKRHeapFUli();
|
||||
extern "C" void free__7JKRHeapFPv();
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void GXInit();
|
||||
extern "C" void GXInitFifoBase();
|
||||
extern "C" void GXInitFifoPtrs();
|
||||
extern "C" void GXSaveCPUFifo();
|
||||
extern "C" void GXGetGPStatus();
|
||||
extern "C" void _savegpr_26();
|
||||
extern "C" void _restgpr_26();
|
||||
extern "C" u8 sSystemHeap__7JKRHeap[4];
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803CC590-803CC5A0 0296B0 000C+04 2/2 0/0 0/0 .data __vt__12JUTGraphFifo */
|
||||
SECTION_DATA extern void* __vt__12JUTGraphFifo[3 + 1 /* padding */] = {
|
||||
(void*)NULL /* RTTI */,
|
||||
(void*)NULL,
|
||||
(void*)__dt__12JUTGraphFifoFv,
|
||||
/* padding */
|
||||
NULL,
|
||||
};
|
||||
|
||||
/* 804514B8-804514BC 0009B8 0004+00 1/1 0/0 0/0 .sbss None */
|
||||
static u8 data_804514B8[4];
|
||||
static bool data_804514B8;
|
||||
|
||||
/* 804514BC-804514C0 0009BC 0004+00 2/2 0/0 0/0 .sbss sCurrentFifo__12JUTGraphFifo */
|
||||
u8 JUTGraphFifo::sCurrentFifo[4];
|
||||
JUTGraphFifo* JUTGraphFifo::sCurrentFifo;
|
||||
|
||||
/* 802DEB58-802DEC34 2D9498 00DC+00 0/0 1/1 0/0 .text __ct__12JUTGraphFifoFUl */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm JUTGraphFifo::JUTGraphFifo(u32 param_0) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTGraphFifo/__ct__12JUTGraphFifoFUl.s"
|
||||
JUTGraphFifo::JUTGraphFifo(u32 size) {
|
||||
mSize = size + 0x1F & ~0x1F;
|
||||
if (data_804514B8) {
|
||||
mFifo = (GXFifoObj*)JKRAllocFromSysHeap(mSize + 0x80, 32);
|
||||
mBase = mFifo + 1;
|
||||
GXInitFifoBase(mFifo, mBase, mSize);
|
||||
GXInitFifoPtrs(mFifo, mBase, mBase);
|
||||
} else {
|
||||
mBase = JKRAllocFromSysHeap(mSize + 0xA0, 32);
|
||||
mBase = (void*)((int)mBase + 0x1F & ~0x1F);
|
||||
mFifo = GXInit(mBase, mSize);
|
||||
data_804514B8 = true;
|
||||
sCurrentFifo = this;
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 804514C0-804514C8 0009C0 0005+03 1/1 0/0 0/0 .sbss mGpStatus__12JUTGraphFifo */
|
||||
u8 JUTGraphFifo::mGpStatus[5 + 3 /* padding */];
|
||||
bool JUTGraphFifo::mGpStatus[5];
|
||||
|
||||
/* 802DEC34-802DECF8 2D9574 00C4+00 1/0 0/0 0/0 .text __dt__12JUTGraphFifoFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm JUTGraphFifo::~JUTGraphFifo() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTGraphFifo/__dt__12JUTGraphFifoFv.s"
|
||||
JUTGraphFifo::~JUTGraphFifo() {
|
||||
sCurrentFifo->save();
|
||||
|
||||
do {
|
||||
} while (isGPActive());
|
||||
|
||||
if (sCurrentFifo == this) {
|
||||
sCurrentFifo = NULL;
|
||||
}
|
||||
JKRFreeToSysHeap(mBase);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
@@ -11,47 +11,10 @@
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct JUtility {
|
||||
struct TColor {};
|
||||
};
|
||||
|
||||
struct JUTVideo {
|
||||
static u8 sManager[4];
|
||||
};
|
||||
|
||||
struct JUTProcBar {
|
||||
struct CTime {
|
||||
/* 802E7340 */ CTime();
|
||||
};
|
||||
|
||||
/* 802E5888 */ JUTProcBar();
|
||||
/* 802E599C */ ~JUTProcBar();
|
||||
/* 802E59E0 */ void create();
|
||||
/* 802E5A28 */ void destroy();
|
||||
/* 802E5A60 */ void clear();
|
||||
/* 802E5B30 */ void bar_subroutine(int, int, int, int, int, int, int, JUtility::TColor,
|
||||
JUtility::TColor);
|
||||
/* 802E5CC4 */ void adjustMeterLength(u32, f32*, f32, f32, int*);
|
||||
/* 802E5E08 */ void draw();
|
||||
/* 802E5E3C */ void drawProcessBar();
|
||||
/* 802E6FA0 */ void drawHeapBar();
|
||||
|
||||
static u8 sManager[4];
|
||||
};
|
||||
|
||||
struct JKRHeap {
|
||||
/* 802CE784 */ void getTotalFreeSize();
|
||||
|
||||
static u8 sSystemHeap[4];
|
||||
static u8 sCurrentHeap[4];
|
||||
static u8 sRootHeap[4];
|
||||
static u8 mCodeStart[4];
|
||||
static u8 mCodeEnd[4];
|
||||
static u8 mUserRamStart[4];
|
||||
static u8 mUserRamEnd[4];
|
||||
static u8 mMemorySize[4];
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
@@ -82,7 +45,6 @@ extern "C" void __dl__FPv();
|
||||
extern "C" void J2DDrawLine__FffffQ28JUtility6TColori();
|
||||
extern "C" void J2DFillBox__FffffQ28JUtility6TColor();
|
||||
extern "C" void J2DDrawFrame__FffffQ28JUtility6TColorUc();
|
||||
extern "C" void OSGetTick();
|
||||
extern "C" void __construct_array();
|
||||
extern "C" void _savegpr_21();
|
||||
extern "C" void _savegpr_25();
|
||||
@@ -118,7 +80,7 @@ asm JUTProcBar::JUTProcBar() {
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80451558-8045155C 000A58 0004+00 4/4 6/6 0/0 .sbss sManager__10JUTProcBar */
|
||||
u8 JUTProcBar::sManager[4];
|
||||
JUTProcBar* JUTProcBar::sManager;
|
||||
|
||||
/* 802E599C-802E59E0 2E02DC 0044+00 1/1 0/0 0/0 .text __dt__10JUTProcBarFv */
|
||||
#pragma push
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
//
|
||||
|
||||
extern "C" void GXSetDrawDone();
|
||||
extern "C" void GXCopyDisp(void*, BOOL);
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
@@ -156,7 +155,7 @@ void JUTVideo::preRetraceProc(u32 retrace_count) {
|
||||
s16 index = xfb->getDrawnXfbIndex();
|
||||
if (index >= 0) {
|
||||
xfb->setDisplayingXfbIndex(index);
|
||||
GXCopyDisp(xfb->getDisplayingXfb(), 1);
|
||||
GXCopyDisp(xfb->getDisplayingXfb(), GX_TRUE);
|
||||
GXFlush();
|
||||
xfb->setSDrawingFlag(2);
|
||||
frameBuffer = xfb->getDisplayingXfb();
|
||||
|
||||
Reference in New Issue
Block a user