various matches / cleanup (#2271)

* cleanup various TUs

* checkpoint

* d_attention doc
This commit is contained in:
TakaRikka 2024-12-29 07:53:54 -08:00 committed by GitHub
parent c429ce21eb
commit 0e281cb975
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
62 changed files with 1865 additions and 2265 deletions

View File

@ -2580,7 +2580,7 @@ JSystem/JUtility/JUTException.cpp:
.rodata start:0x8039D490 end:0x8039D9A0
.data start:0x803CC620 end:0x803CC6B8
.bss start:0x80434578 end:0x80434870
.sdata start:0x804508F0 end:0x80450900
.sdata start:0x804508F0 end:0x804508F8
.sbss start:0x80451508 end:0x80451528
.sdata2 start:0x80456050 end:0x80456060
@ -2594,6 +2594,7 @@ JSystem/JUtility/JUTDirectPrint.cpp:
JSystem/JUtility/JUTAssert.cpp:
.text start:0x802E495C end:0x802E4C54
.bss start:0x80434870 end:0x804349B0
.sdata start:0x804508F8 end:0x80450900
.sbss start:0x80451530 end:0x80451538
.sdata2 start:0x804560B8 end:0x804560D0

View File

@ -668,7 +668,7 @@ config.libs = [
JSystemLib(
"JFramework",
[
Object(NonMatching, "JSystem/JFramework/JFWSystem.cpp"),
Object(Equivalent, "JSystem/JFramework/JFWSystem.cpp"),
Object(Matching, "JSystem/JFramework/JFWDisplay.cpp"),
],
),
@ -943,14 +943,14 @@ config.libs = [
Object(Matching, "JSystem/JUtility/JUTResFont.cpp", extra_cflags=['-pragma "nosyminline off"']),
Object(Matching, "JSystem/JUtility/JUTDbPrint.cpp"),
Object(Matching, "JSystem/JUtility/JUTGamePad.cpp"),
Object(NonMatching, "JSystem/JUtility/JUTException.cpp"),
Object(Matching, "JSystem/JUtility/JUTException.cpp"),
Object(Matching, "JSystem/JUtility/JUTDirectPrint.cpp"),
Object(Matching, "JSystem/JUtility/JUTAssert.cpp"),
Object(Matching, "JSystem/JUtility/JUTVideo.cpp"),
Object(NonMatching, "JSystem/JUtility/JUTXfb.cpp"),
Object(Equivalent, "JSystem/JUtility/JUTXfb.cpp"),
Object(Matching, "JSystem/JUtility/JUTFader.cpp"),
Object(Matching, "JSystem/JUtility/JUTProcBar.cpp", extra_cflags=['-pragma "nosyminline off"']),
Object(NonMatching, "JSystem/JUtility/JUTConsole.cpp"),
Object(Matching, "JSystem/JUtility/JUTConsole.cpp"),
Object(Matching, "JSystem/JUtility/JUTDirectFile.cpp"),
Object(Matching, "JSystem/JUtility/JUTFontData_Ascfont_fix12.cpp"),
],

View File

@ -127,7 +127,7 @@ public:
GXVtxDescList* getVtxDesc() const { return mVtxDesc; }
J3DMaterial* getMaterial() const { return mMaterial; }
u32 getIndex() const { return mIndex; }
u16 getIndex() const { return mIndex; }
u32 getPipeline() const { return (mFlags >> 2) & 0x07; }
u32 getTexMtxLoadType() const { return mFlags & 0xF000; }
u32 getMtxGroupNum() const { return mMtxGroupNum; }

View File

@ -22,24 +22,10 @@ struct TNodeLinkList {
struct iterator {
explicit iterator(TLinkListNode* pNode) { node = pNode; }
iterator& operator++() {
node = node->getNext();
return *this;
}
iterator& operator--() {
node = node->getPrev();
return *this;
}
iterator operator++(int) {
const iterator old(*this);
(void)++*this;
return old;
}
iterator operator--(int) {
const iterator old(*this);
(void)--*this;
return old;
}
iterator& operator++() { node = node->getNext(); return *this; }
iterator& operator--() { node = node->getPrev(); return *this; }
iterator operator++(int) { const iterator old(*this); (void)++*this; return old; }
iterator operator--(int) { const iterator old(*this); (void)--*this; return old; }
friend bool operator==(iterator a, iterator b) { return a.node == b.node; }
friend bool operator!=(iterator a, iterator b) { return !(a == b); }
@ -52,27 +38,12 @@ struct TNodeLinkList {
struct const_iterator {
explicit const_iterator(TLinkListNode* pNode) { node = pNode; }
const_iterator(const const_iterator& iter) { *this = iter; }
explicit const_iterator(iterator it) { node = it.node; }
const_iterator& operator++() {
node = node->getNext();
return *this;
}
const_iterator& operator--() {
node = node->getPrev();
return *this;
}
const_iterator operator++(int) {
const const_iterator old(*this);
(void)++*this;
return old;
}
const_iterator operator--(int) {
const const_iterator old(*this);
(void)--*this;
return old;
}
const_iterator& operator++() { node = node->getNext(); return *this; }
const_iterator& operator--() { node = node->getPrev(); return *this; }
const_iterator operator++(int) { const const_iterator old(*this); (void)++*this; return old; }
const_iterator operator--(int) { const const_iterator old(*this); (void)--*this; return old; }
friend bool operator==(const_iterator a, const_iterator b) { return a.node == b.node; }
friend bool operator!=(const_iterator a, const_iterator b) { return !(a == b); }

View File

@ -93,7 +93,7 @@ public:
void scrollToFirstLine() { scroll(-mMaxLines); }
/* 0x18 */ JGadget::TLinkListNode mListNode;
/* 0x20 */ u32 field_0x20;
/* 0x20 */ unsigned int field_0x20;
/* 0x24 */ int mMaxLines;
/* 0x28 */ u8* mBuf;
/* 0x2C */ bool field_0x2c;
@ -133,11 +133,16 @@ public:
JUTConsole* getDirectConsole() const { return mDirectConsole; }
static JUTConsoleManager* getManager() { return sManager; }
static JUTConsoleManager* const getManager() { return sManager; }
static JUTConsoleManager* sManager;
#ifdef __MWERKS__
typedef JGadget::TLinkList<JUTConsole, -offsetof(JUTConsole, mListNode)> ConsoleList;
#else
// clangd does not support offsetof in template arguments.
typedef JGadget::TLinkList<JUTConsole, -sizeof(JKRDisposer)> ConsoleList;
#endif
private:
/* 0x00 */ ConsoleList soLink_;

View File

@ -118,7 +118,7 @@ private:
static OSMessageQueue sMessageQueue;
static const char* sCpuExpName[17];
static JSUList<JUTException::JUTExMapFile> sMapFileList;
static OSMessage sMessageBuffer[1 + 1 /* padding */];
static OSMessage sMessageBuffer[1];
static JUTException* sErrorManager;
static OSErrorHandler sPreUserCallback;
static OSErrorHandler sPostUserCallback;

View File

@ -21,7 +21,6 @@ public:
/* 805A1A94 */ void actionEvent();
/* 805A1AF0 */ void actionDead();
private:
/* 0x568 */ cXyz field_0x568;
/* 0x574 */ cXyz field_0x574;
/* 0x580 */ u16 mEventID;

View File

@ -36,13 +36,10 @@ public:
u8 getChangeItem() { return mChangeItem; }
private:
/* 0x00 */ u32 field_0x0;
/* 0x00 */ fpc_ProcID mRequestActorID;
/* 0x04 */ int field_0x4;
/* 0x08 */ f32 field_0x8;
/* 0x0C */ u8 field_0xc;
/* 0x0D */ u8 field_0xd;
/* 0x0E */ u8 field_0xe;
/* 0x0F */ u8 field_0xf;
/* 0x08 */ f32 mDistance;
/* 0x0C */ u8 mCatchItemNo;
/* 0x10 */ fpc_ProcID mCatghTargetID;
/* 0x14 */ u8 mChangeItem;
}; // Size: 0x18
@ -70,9 +67,18 @@ public:
public:
dAttParam_c() {}
/* 80070038 */ dAttParam_c(s32);
/* 80070110 */ virtual ~dAttParam_c();
enum EFlag {
EFlag_HOLD_MODE = (1 << 0),
EFlag_SWMODE_DEBUG = (1 << 1),
EFlag_VALID = (1 << 2),
EFlag_KEEP = (1 << 3),
EFlag_ARROW_OFF = (1 << 4),
EFlag_LIST_DEBUG = (1 << 14),
EFlag_MARGIN_DEBUG = (1 << 15),
};
bool CheckFlag(u16 flag) { return mFlags & flag; }
/* 0x40 vtable */
@ -88,9 +94,9 @@ public:
fopAc_ac_c* getLookTarget() { return convPId(mLookTargetID); }
private:
u32 field_0x0;
s32 field_0x4;
f32 field_0x8;
fpc_ProcID mRequestActorID;
int field_0x4;
f32 mDistance;
fpc_ProcID mLookTargetID;
}; // Size: 0x10
@ -129,12 +135,14 @@ public:
/* 0x11C */ mDoExt_bpkAnm mImpactBpk;
/* 0x134 */ mDoExt_brkAnm mImpactBrk;
/* 0x14C */ mDoExt_btkAnm mImpactBtk;
/* 0x164 */ cXyz field_0x164;
/* 0x170 */ u8 field_0x170;
/* 0x171 */ u8 field_0x171;
/* 0x172 */ u8 field_0x172;
/* 0x164 */ f32 mCursorSizeX;
/* 0x168 */ f32 mCursorSizeY;
/* 0x16C */ f32 mCursorOffsetY;
/* 0x170 */ u8 mDrawType;
/* 0x171 */ u8 mAlphaAnmFrameMax;
/* 0x172 */ u8 mAlphaAnmFrame;
/* 0x173 */ u8 field_0x173;
/* 0x174 */ u8 field_0x174;
/* 0x174 */ u8 mAlphaAnmPlayDirection;
/* 0x175 */ u8 field_0x175;
};
@ -156,16 +164,16 @@ struct dist_entry {
}; // Size: 0x1C
struct type_tbl_entry {
s16 field_0x0;
u16 field_0x2;
s16 type;
u16 mask;
};
class dAttention_c {
public:
enum EState {
ST_NONE,
ST_LOCK,
ST_RELEASE,
EState_NONE,
EState_LOCK,
EState_RELEASE,
};
dAttention_c() {}

View File

@ -63,13 +63,19 @@ struct jmessage_tReference : public JMessage::TReference {
/* 802298DC */ bool isLightSend();
/* 8022994C */ bool isLightEnd();
/* 802299AC */ void decideOutFontRupeeColor(int);
/* 80232A20 */ cXyz getActorPos();
/* 80232A20 */ cXyz getActorPos() { return mActorPos; }
/* 80238C78 */ void setActorPos(cXyz pos) { mActorPos = pos; }
bool isSelectSetCancelFlag() { return mSelectSetCancelFlag != 0; }
BOOL isSelectRubyFlag(int i_flag) {
return mSelectRubyFlag & (u8)(1 << i_flag) ? 1 : 0;
BOOL var_r31;
if (mSelectRubyFlag & (u8)(1 << i_flag)) {
var_r31 = true;
} else {
var_r31 = false;
}
return var_r31;
}
bool isBatchFlag() { return mBatchFlag; }
@ -98,7 +104,7 @@ struct jmessage_tReference : public JMessage::TReference {
void offSelectRubyFlag(int i_flag) { mSelectRubyFlag &= ~(u8)(1 << i_flag); }
void setPageEndCount(s16 i_endCount) { mPageEndCount = i_endCount; }
void onBombNameUseFlag() { mBombNameUseFlag = 1; }
void onSelectRubyFlag(int i_flag) { mSelectRubyFlag |= (1 << i_flag); }
void onSelectRubyFlag(int i_flag) { mSelectRubyFlag |= (u8)(1 << i_flag); }
void setpStatus(u16* status) { mpStatus = status; }
void setObjectPtr(dMsgObject_c* ptr) { mpObjectPtr = ptr; }
void setCountBackUp() { mCharactor.mCountBackUp = mCharactor.field_0x40e; }
@ -140,6 +146,15 @@ struct jmessage_tReference : public JMessage::TReference {
}
}
void addLineLength(int param_0, f32 param_1, f32 param_2) {
mStrLength[param_0] += param_1;
mSpaceLength[param_0] += param_2;
}
void addSelLength(int param_0, f32 param_1) {
mSelLength[param_0] += param_1;
}
dMsgObject_c* getObjectPtr() { return mpObjectPtr; }
u8 getForm() { return mForm; }
u8 getNowLightCount() { return mNowLightCount; }
@ -179,6 +194,9 @@ struct jmessage_tReference : public JMessage::TReference {
u8 getFukiPosType() { return mFukiPosType; }
u16 getStatus() { return *mpStatus; }
u8 getArrange() { return mArrange; }
f32 getSelFontSize() { return mSelFontSize; }
f32 getSelCharSpace() { return mSelCharSpace; }
u16 getLineScale(int i_no) { return mLineScale[i_no]; }
struct CharSoundInfo {
u16 data[0x200];
@ -186,7 +204,7 @@ struct jmessage_tReference : public JMessage::TReference {
s16 field_0x40e;
s16 mCountBackUp;
};
CharSoundInfo getCharSoundInfo() { return mCharactor;}
CharSoundInfo getCharSoundInfo() { return mCharactor; }
u32 getDemoFrame() { return mDemoFrame; }
u32 getRevoMessageID() { return mRevoMessageID; }
f32 getCharAllAlphaRate() { return mCharAllAlphaRate; }
@ -296,9 +314,9 @@ struct jmessage_tMeasureProcessor : public JMessage::TRenderingProcessor {
/* 0x45 */ u8 mSelectType;
/* 0x46 */ u8 field_0x46;
/* 0x47 */ u8 field_0x47;
/* 0x48 */ s8 field_0x48;
/* 0x48 */ u8 field_0x48;
/* 0x49 */ s8 field_0x49;
/* 0x4A */ u8 mPageLineMax;
/* 0x4A */ s8 mPageLineMax;
/* 0x4B */ s8 field_0x4b;
/* 0x4C */ u8 field_0x4c;
/* 0x4D */ u8 field_0x4d;
@ -315,7 +333,7 @@ struct jmessage_tSequenceProcessor : public JMessage::TSequenceProcessor,
/* 8022CB10 */ void messageSePlay(u8, u8, cXyz*);
/* 8022CBE8 */ void calcStringLength();
/* 8023299C */ virtual ~jmessage_tSequenceProcessor();
/* 8023299C */ virtual ~jmessage_tSequenceProcessor() {}
/* 8022B654 */ virtual void do_reset();
/* 8022B658 */ virtual void do_begin(void const*, char const*);
/* 8022BA3C */ virtual void do_end();
@ -379,7 +397,7 @@ struct jmessage_tRenderingProcessor : public JMessage::TRenderingProcessor {
/* 8022F734 */ void push_word();
/* 8022F784 */ void getCharInfo(f32, f32, f32, f32, f32);
/* 8023293C */ virtual ~jmessage_tRenderingProcessor();
/* 8023293C */ virtual ~jmessage_tRenderingProcessor() {}
/* 8022CDC8 */ virtual void do_reset();
/* 8022CDCC */ virtual void do_begin(void const*, char const*);
/* 8022CFD8 */ virtual void do_end();
@ -451,7 +469,7 @@ struct jmessage_tRenderingProcessor : public JMessage::TRenderingProcessor {
struct jmessage_string_tControl : public JMessage::TControl {
/* 8022FB5C */ jmessage_string_tControl();
/* 802328DC */ virtual ~jmessage_string_tControl();
/* 802328DC */ virtual ~jmessage_string_tControl() {}
};
struct jmessage_string_tReference : public JMessage::TReference {
@ -517,7 +535,7 @@ struct jmessage_string_tSequenceProcessor : public JMessage::TSequenceProcessor,
/* 80230A08 */ jmessage_string_tSequenceProcessor(jmessage_string_tReference const*,
jmessage_string_tControl*);
/* 80232858 */ virtual ~jmessage_string_tSequenceProcessor();
/* 80232858 */ virtual ~jmessage_string_tSequenceProcessor() {}
/* 80230ABC */ virtual void do_reset();
/* 80230AC0 */ virtual void do_begin(void const*, char const*);
/* 80230B7C */ virtual void do_end();
@ -545,7 +563,7 @@ struct jmessage_string_tRenderingProcessor : public JMessage::TRenderingProcesso
/* 802326E4 */ void do_numset(s16);
/* 802327BC */ void push_word(char const*);
/* 802327F8 */ virtual ~jmessage_string_tRenderingProcessor();
/* 802327F8 */ virtual ~jmessage_string_tRenderingProcessor() {}
/* 80230C5C */ virtual void do_reset();
/* 80230CA0 */ virtual void do_begin(void const*, char const*);
/* 80230CE8 */ virtual void do_end();

View File

@ -5,5 +5,8 @@
void GFSetFog(GXFogType param_0, f32 param_1, f32 param_2, f32 param_3, f32 param_4,
GXColor param_5);
void GFSetBlendModeEtc(GXBlendMode param_0, GXBlendFactor param_1, GXBlendFactor param_2,
GXLogicOp param_3, u8 param_4, u8 param_5, u8 param_6);
void GFSetZMode(u8 param_0, GXCompare param_1, u8 param_2);
#endif /* GFPIXEL_H */

View File

@ -111,6 +111,10 @@ static inline void GXNormal3f32(const f32 x, const f32 y, const f32 z) {
GXWGFifo.f32 = z;
}
static inline void GXNormal1x16(const u16 x) {
GXWGFifo.u16 = x;
}
static inline void GXPosition2f32(const f32 x, const f32 z) {
GXWGFifo.f32 = x;
GXWGFifo.f32 = z;

View File

@ -375,7 +375,7 @@ public:
/* 80011348 */ mDoExt_McaMorf2(J3DModelData*, mDoExt_McaMorfCallBack1_c*,
mDoExt_McaMorfCallBack2_c*, J3DAnmTransform*, J3DAnmTransform*,
int, f32, int, int, Z2Creature*, u32, u32);
/* 80011464 */ void create(J3DModelData*, mDoExt_McaMorfCallBack1_c*,
/* 80011464 */ int create(J3DModelData*, mDoExt_McaMorfCallBack1_c*,
mDoExt_McaMorfCallBack2_c*, J3DAnmTransform*, J3DAnmTransform*, int,
f32, int, int, Z2Creature*, u32, u32);
/* 800116B4 */ void ERROR_EXIT();
@ -479,14 +479,14 @@ STATIC_ASSERT(sizeof(mDoExt_MtxCalcAnmBlendTblOld) == 0x10);
class mDoExt_3Dline_c {
public:
/* 800123D0 */ void init(u16, int, int);
/* 800123D0 */ int init(u16, int, int);
/* 800126BC */ mDoExt_3Dline_c();
/* 0x00 */ cXyz* field_0x0;
/* 0x04 */ f32* field_0x4;
/* 0x08 */ cXyz* field_0x8;
/* 0x0C */ cXyz* field_0xc;
/* 0x10 */ void* field_0x10;
/* 0x10 */ u8* field_0x10;
/* 0x14 */ void* field_0x14;
/* 0x18 */ f32* field_0x18;
/* 0x1C */ f32* field_0x1c;

View File

@ -15,70 +15,14 @@
#include "JSystem/JUtility/JUTException.h"
#include "JSystem/JUtility/JUTResFont.h"
#include "JSystem/JUtility/JUTDbPrint.h"
#include "dol2asm.h"
#include "dolphin/types.h"
//
// Forward References:
//
extern u8 const JUTResFONT_Ascfont_fix12[16736];
extern "C" void firstInit__9JFWSystemFv();
extern "C" void init__9JFWSystemFv();
extern "C" u32 maxStdHeaps__Q29JFWSystem11CSetUpParam;
extern "C" u32 sysHeapSize__Q29JFWSystem11CSetUpParam;
extern "C" u32 fifoBufSize__Q29JFWSystem11CSetUpParam;
extern "C" u32 aramAudioBufSize__Q29JFWSystem11CSetUpParam;
extern "C" u32 aramGraphBufSize__Q29JFWSystem11CSetUpParam;
extern "C" u32 streamPriority__Q29JFWSystem11CSetUpParam;
extern "C" u32 decompPriority__Q29JFWSystem11CSetUpParam;
extern "C" u32 aPiecePriority__Q29JFWSystem11CSetUpParam;
extern "C" void* systemFontRes__Q29JFWSystem11CSetUpParam;
extern "C" void* renderMode__Q29JFWSystem11CSetUpParam;
extern "C" u32 exConsoleBufferSize__Q29JFWSystem11CSetUpParam[1 + 1 /* padding */];
extern "C" u8 rootHeap__9JFWSystem[4];
extern "C" u8 systemHeap__9JFWSystem[4];
extern "C" u8 mainThread__9JFWSystem[4];
extern "C" u8 debugPrint__9JFWSystem[4];
extern "C" u8 systemFont__9JFWSystem[4];
extern "C" u8 systemConsoleManager__9JFWSystem[4];
extern "C" u8 systemConsole__9JFWSystem[4];
//
// External References:
//
extern "C" void alloc__7JKRHeapFUli();
extern "C" void* __nw__FUl();
extern "C" void createRoot__10JKRExpHeapFib();
extern "C" void create__10JKRExpHeapFUlP7JKRHeapb();
extern "C" void __ct__9JKRThreadFP8OSThreadi();
extern "C" void create__7JKRAramFUlUllll();
extern "C" void __ct__12JUTGraphFifoFUl();
extern "C" void __ct__10JUTResFontFPC7ResFONTP7JKRHeap();
extern "C" void start__10JUTDbPrintFP7JUTFontP7JKRHeap();
extern "C" void changeFont__10JUTDbPrintFP7JUTFont();
extern "C" void init__10JUTGamePadFv();
extern "C" void create__12JUTExceptionFP14JUTDirectPrint();
extern "C" void createConsole__12JUTExceptionFPvUl();
extern "C" void start__14JUTDirectPrintFv();
extern "C" void create__12JUTAssertionFv();
extern "C" void createManager__8JUTVideoFPC16_GXRenderModeObj();
extern "C" void create__10JUTConsoleFUiUiP7JKRHeap();
extern "C" void createManager__17JUTConsoleManagerFP7JKRHeap();
extern "C" void OSInit();
extern "C" void DVDInit();
extern "C" extern u8 const JUTResFONT_Ascfont_fix12[16736];
//
// Declarations:
//
/* ############################################################################################## */
/* 80450770-80450774 0001F0 0004+00 1/1 1/1 0/0 .sdata maxStdHeaps__Q29JFWSystem11CSetUpParam */
SECTION_SDATA s32 JFWSystem::CSetUpParam::maxStdHeaps = 2;
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 = 0x400000;
u32 JFWSystem::CSetUpParam::sysHeapSize = 0x400000;
/* 804511A0-804511A4 0006A0 0004+00 2/2 0/0 0/0 .sbss rootHeap__9JFWSystem */
JKRExpHeap* JFWSystem::rootHeap;
@ -94,40 +38,38 @@ void JFWSystem::firstInit() {
systemHeap = JKRExpHeap::create(CSetUpParam::sysHeapSize, rootHeap, false);
}
/* ############################################################################################## */
/* 80450778-8045077C 0001F8 0004+00 1/1 1/1 0/0 .sdata fifoBufSize__Q29JFWSystem11CSetUpParam */
SECTION_SDATA u32 JFWSystem::CSetUpParam::fifoBufSize = 0x40000;
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 = 0x800000;
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 = 0x600000;
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 = 8;
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 = 7;
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 = 6;
u32 JFWSystem::CSetUpParam::aPiecePriority = 6;
/* 80450790-80450794 -00001 0004+00 1/1 0/0 0/0 .sdata systemFontRes__Q29JFWSystem11CSetUpParam */
SECTION_SDATA ResFONT* JFWSystem::CSetUpParam::systemFontRes = (ResFONT*)&JUTResFONT_Ascfont_fix12;
ResFONT* JFWSystem::CSetUpParam::systemFontRes = (ResFONT*)&JUTResFONT_Ascfont_fix12;
/* 80450794-80450798 -00001 0004+00 1/1 1/1 0/0 .sdata renderMode__Q29JFWSystem11CSetUpParam */
SECTION_SDATA GXRenderModeObj* JFWSystem::CSetUpParam::renderMode =
(GXRenderModeObj*)&GXNtsc480IntDf;
GXRenderModeObj* JFWSystem::CSetUpParam::renderMode = &GXNtsc480IntDf;
/* 80450798-804507A0 000218 0004+04 1/1 0/0 0/0 .sdata
* exConsoleBufferSize__Q29JFWSystem11CSetUpParam */
SECTION_SDATA u32 JFWSystem::CSetUpParam::exConsoleBufferSize = 0x24FC;
u32 JFWSystem::CSetUpParam::exConsoleBufferSize = 0x24FC;
/* 804511A8-804511AC 0006A8 0004+00 1/1 0/0 0/0 .sbss mainThread__9JFWSystem */
JKRThread* JFWSystem::mainThread;
@ -148,7 +90,7 @@ JUTConsole* JFWSystem::systemConsole;
static u8 sInitCalled;
/* 80271D18-80272040 26C658 0328+00 0/0 1/1 0/0 .text init__9JFWSystemFv */
// NONMATCHING - just regalloc in the beginning
// NONMATCHING - regalloc, equivalent
void JFWSystem::init() {
if (rootHeap == NULL) {
firstInit();
@ -161,9 +103,7 @@ void JFWSystem::init() {
mainThread = new JKRThread(OSGetCurrentThread(), 4);
JUTVideo::createManager(CSetUpParam::renderMode);
u32 fifoSize = CSetUpParam::fifoBufSize;
JUTGraphFifo* fifo = new JUTGraphFifo(fifoSize);
JUTCreateFifo(CSetUpParam::fifoBufSize);
JUTGamePad::init();
@ -199,4 +139,4 @@ void JFWSystem::init() {
void* buffer = systemHeap->alloc(CSetUpParam::exConsoleBufferSize, 4);
JUTException::createConsole(buffer, CSetUpParam::exConsoleBufferSize);
}
}

View File

@ -119,13 +119,7 @@ JGadget::TNodeLinkList::iterator JGadget::TNodeLinkList::Erase(TLinkListNode* p)
/* 802DCBF8-802DCCC8 2D7538 00D0+00 0/0 2/2 0/0 .text
* Remove__Q27JGadget13TNodeLinkListFPQ27JGadget13TLinkListNode */
// missing stack
#ifdef NONMATCHING
// NONMATCHING - missing stack
void JGadget::TNodeLinkList::Remove(TLinkListNode* p) {
remove_if(TPRIsEqual_pointer_<TLinkListNode>(p));
}
#else
void JGadget::TNodeLinkList::Remove(JGadget::TLinkListNode* param_0) {
// NONMATCHING
}
#endif

View File

@ -518,8 +518,7 @@ static u8* firstSrcData() {
}
/* 802DB49C-802DB580 2D5DDC 00E4+00 1/1 0/0 0/0 .text nextSrcData__FPUc */
// regalloc
#ifdef NONMATCHING
// NONMATCHING - regalloc
static u8* nextSrcData(u8* src) {
u8* dest;
u32 size = szpEnd - src;
@ -547,11 +546,6 @@ static u8* nextSrcData(u8* src) {
}
return dest;
}
#else
static u8* nextSrcData(u8* param_0) {
// NONMATCHING
}
#endif
/* 802DB580-802DB5E8 2D5EC0 0068+00 1/1 0/0 0/0 .text dmaBufferFlush__FUl */
static u32 dmaBufferFlush(u32 param_1) {
@ -562,4 +556,4 @@ static u32 dmaBufferFlush(u32 param_1) {
JKRAramPiece::orderSync(0, (u32)dmaBuf, param_1, size, NULL);
dmaCurrent = dmaBuf;
return size;
}
}

View File

@ -66,7 +66,7 @@ int JMessage::TControl::update() {
}
/* 802A76BC-802A77E8 2A1FFC 012C+00 0/0 5/5 0/0 .text render__Q28JMessage8TControlFv */
#ifdef NONMATCHING
// NONMATCHING
void JMessage::TControl::render() {
if (isReady_render_()) {
pRenderingProcessor_->setBegin_messageEntryText(pResourceCache_, pEntry_, field_0x20);
@ -74,11 +74,6 @@ void JMessage::TControl::render() {
pRenderingProcessor_->process(pszText_update_current_);
}
}
#else
void JMessage::TControl::render() {
// NONMATCHING
}
#endif
/* 802A77E8-802A78F4 2A2128 010C+00 0/0 1/1 0/0 .text setMessageCode__Q28JMessage8TControlFUsUs */
int JMessage::TControl::setMessageCode(u16 param_0, u16 param_1) {
@ -114,4 +109,4 @@ bool JMessage::TControl::setMessageCode_inSequence_(JMessage::TProcessor const*
field_0x20 = pMessageText_begin_;
oStack_renderingProcessor_.clear();
return true;
}
}

View File

@ -4,6 +4,7 @@
//
#include "JSystem/JMessage/locale.h"
#include <dolphin.h>
//
// Forward References:
@ -22,7 +23,7 @@ extern "C" void parseCharacter_UTF8__Q28JMessage6localeFPPCc();
/* 802A9528-802A958C 2A3E68 0064+00 0/0 1/0 0/0 .text
* parseCharacter_ShiftJIS__Q28JMessage6localeFPPCc */
#ifdef NONMATCHING
// NONMATCHING
int JMessage::locale::parseCharacter_ShiftJIS(char const** str) {
int c;
int ret;
@ -43,14 +44,9 @@ int JMessage::locale::parseCharacter_ShiftJIS(char const** str) {
return ret;
}
#else
int JMessage::locale::parseCharacter_ShiftJIS(char const** param_0) {
// NONMATCHING
}
#endif
/* 802A958C-802A968C 2A3ECC 0100+00 0/0 1/0 0/0 .text parseCharacter_UTF8__Q28JMessage6localeFPPCc
*/
int JMessage::locale::parseCharacter_UTF8(char const** param_0) {
// NONMATCHING
}
}

View File

@ -5,6 +5,7 @@
#include "JSystem/JMessage/processor.h"
#include "JSystem/JMessage/control.h"
#include "JSystem/JUtility/JUTAssert.h"
//
// Forward References:
@ -151,8 +152,7 @@ const JMessage::TResource* JMessage::TProcessor::getResource_groupID(u16 groupID
/* 802A7CD4-802A7E38 2A2614 0164+00 0/0 1/1 0/0 .text
* toMessageCode_messageID__Q28JMessage10TProcessorCFUlUlPb */
// TContainerEnumerator_const stack issues
#ifdef NONMATCHING
// NONMATCHING - TContainerEnumerator_const stack issues
u32 JMessage::TProcessor::toMessageCode_messageID(u32 param_0, u32 param_1,
bool* param_2) const {
const TResource* this_00 = getResourceCache();
@ -177,12 +177,6 @@ u32 JMessage::TProcessor::toMessageCode_messageID(u32 param_0, u32 param_1,
}
return -1;
}
#else
u32 JMessage::TProcessor::toMessageCode_messageID(u32 param_0, u32 param_1,
bool* param_2) const {
// NONMATCHING
}
#endif
/* 802A7E38-802A7EDC 2A2778 00A4+00 1/1 0/0 0/0 .text
* on_select_begin__Q28JMessage10TProcessorFPFPQ28JMessage10TProcessor_PCcPCvPCcUl */
@ -611,18 +605,13 @@ void JMessage::TSequenceProcessor::do_tag_(u32 uTag, void const* data, u32 uSize
/* 802A892C-802A8944 2A326C 0018+00 1/1 0/0 0/0 .text
* process_setMessageIndex_reserved___Q28JMessage18TSequenceProcessorFUs */
#ifdef NONMATCHING
// NONMATCHING
void JMessage::TSequenceProcessor::process_setMessageIndex_reserved_(u16 u16Index) {
JUT_ASSERT(890, u16Index >= 0xff00);
if (u16Index != -1) {
return;
}
}
#else
void JMessage::TSequenceProcessor::process_setMessageIndex_reserved_(u16 param_0) {
// NONMATCHING
}
#endif
/* 802A8944-802A89B8 2A3284 0074+00 4/4 0/0 0/0 .text
* process_setMessageCode___Q28JMessage18TSequenceProcessorFPCQ28JMessage18TSequenceProcessorUsUs */
@ -750,4 +739,4 @@ const char* JMessage::TProcessor::on_message(u32 param_0) const {
* getMessageText_messageCode__Q28JMessage10TProcessorCFUl */
const char* JMessage::TProcessor::getMessageText_messageCode(u32 param_0) const {
return getMessageText_messageCode(param_0 >> 0x10, param_0 & 0xFFFF);
}
}

View File

@ -247,7 +247,7 @@ JMessage::TParse::~TParse() {}
/* 802A91B8-802A92F4 2A3AF8 013C+00 1/0 0/0 0/0 .text
* parseHeader_next__Q28JMessage6TParseFPPCvPUlUl */
#ifdef NONMATCHING
// NONMATCHING
bool JMessage::TParse::parseHeader_next(void const** ppData_inout, u32* puBlock_out, u32 param_2) {
const void* pData = *ppData_inout;
@ -287,11 +287,6 @@ bool JMessage::TParse::parseHeader_next(void const** ppData_inout, u32* puBlock_
return 1;
}
}
#else
bool JMessage::TParse::parseHeader_next(void const** param_0, u32* param_1, u32 param_2) {
// NONMATCHING
}
#endif
/* 802A92F4-802A9490 2A3C34 019C+00 1/0 0/0 0/0 .text
* parseBlock_next__Q28JMessage6TParseFPPCvPUlUl */

View File

@ -7,6 +7,7 @@
#include "iterator.h"
#include "string.h"
#include "dol2asm.h"
#include <algorithm.h>
//
// Types:
@ -166,8 +167,7 @@ void JStudio::ctb::TControl::destroyObject_all() {
}
/* 80281190-80281230 27BAD0 00A0+00 1/1 0/0 0/0 .text getObject__Q37JStudio3ctb8TControlFPCvUl */
// TPRObject_ID_equal issues
#ifdef NONMATCHING
// NONMATCHING - TPRObject_ID_equal issues
JStudio::ctb::TObject* JStudio::ctb::TControl::getObject(void const* param_0, u32 param_1) {
JGadget::TLinkList<TObject, -12>::iterator begin = mList.begin();
JGadget::TLinkList<TObject, -12>::iterator end = mList.end();
@ -177,11 +177,6 @@ JStudio::ctb::TObject* JStudio::ctb::TControl::getObject(void const* param_0, u3
}
return NULL;
}
#else
JStudio::ctb::TObject* JStudio::ctb::TControl::getObject(void const* param_0, u32 param_1) {
// NONMATCHING
}
#endif
/* 80281230-80281274 27BB70 0044+00 0/0 1/1 0/0 .text getObject_index__Q37JStudio3ctb8TControlFUl
*/

View File

@ -392,8 +392,7 @@ f64 interpolateValue_hermite(f64 c0, f64 c1, f64 x, f64 c2, f64 x2, f64 c3, f64
/* 80281774-802817D8 27C0B4 0064+00 1/1 0/0 0/0 .text
* interpolateValue_BSpline_uniform__Q27JStudio13functionvalueFddddd */
// really minor regalloc.
#ifdef NONMATCHING
// NONMATCHING - really minor regalloc.
f64 interpolateValue_BSpline_uniform(f64 f1, f64 f2, f64 f3, f64 f4, f64 f5) {
// pow3(1.0 - f1)
f64 f6 = (1.0 - f1);
@ -412,12 +411,6 @@ f64 interpolateValue_BSpline_uniform(f64 f1, f64 f2, f64 f3, f64 f4, f64 f5) {
return temp5 + (temp * f2 + f8 * f5) * 0.5 +
temp3;
}
#else
f64 interpolateValue_BSpline_uniform(f64 param_0, f64 param_1, f64 param_2, f64 param_3,
f64 param_4) {
// NONMATCHING
}
#endif
/* 802817D8-802818B8 27C118 00E0+00 1/1 0/0 0/0 .text
* interpolateValue_BSpline_nonuniform__Q27JStudio13functionvalueFdPCdPCd */
@ -790,8 +783,7 @@ void TFunctionValue_transition::prepare() {
/* 802824F4-802826BC 27CE34 01C8+00 1/0 0/0 0/0 .text
* getValue__Q27JStudio25TFunctionValue_transitionFd */
// regalloc. Maybe return value related.
#ifdef NONMATCHING
// NONMATCHING - regalloc. Maybe return value related.
f64 TFunctionValue_transition::getValue(f64 param_1) {
f64 progress = range_getParameter_progress(param_1);
f64 dVar3 = range_getParameter_outside(progress);
@ -830,11 +822,6 @@ f64 TFunctionValue_transition::getValue(f64 param_1) {
}
}
}
#else
f64 TFunctionValue_transition::getValue(f64 param_0) {
// NONMATCHING
}
#endif
TFunctionValue_list::TFunctionValue_list() : _44(NULL), uData_(0), _50(NAN), pfnUpdate_(NULL) {}
@ -1307,4 +1294,4 @@ extern "C" void func_802838C8(void* _this,
JStudio::TFunctionValue_hermite::TIterator_data_ param_2,
f64 const& param_3, std::less<f64> param_4) {
// NONMATCHING
}
}

View File

@ -302,7 +302,7 @@ namespace fvb {
TObject::~TObject() {}
#ifdef NONMATCHING
// NONMATCHING
void TObject::prepare(data::TParse_TBlock const& rBlock, TControl* pControl) {
ASSERT(pfv_ != 0);
@ -449,14 +449,6 @@ void TObject::prepare(data::TParse_TBlock const& rBlock, TControl* pControl) {
JUT_EXPECT(pData == pNext);
pfv_->prepare();
}
#else
/* 80283FC8-802841EC 27E908 0224+00 2/1 0/0 0/0 .text
* prepare__Q37JStudio3fvb7TObjectFRCQ47JStudio3fvb4data13TParse_TBlockPQ37JStudio3fvb8TControl */
void TObject::prepare(data::TParse_TBlock const& param_0, TControl* param_1) {
// NONMATCHING
}
#endif
namespace {
TFunctionValue_composite::TData getCompositeData_raw_(const void* arg1) {
@ -790,4 +782,4 @@ bool TParse::parseBlock_next(void const** ppData_inout, u32* puData_out, u32 fla
}
} // namespace fvb
} // namespace JStudio
} // namespace JStudio

View File

@ -4,6 +4,8 @@
//
#include "JSystem/JStudio/JStudio/jstudio-math.h"
#include "JSystem/JGeometry.h"
#include "JSystem/TPosition3.hh"
#include "dol2asm.h"
#include "math.h"
@ -41,8 +43,7 @@ SECTION_SDATA2 static u8 lit_489[4] = {
};
/* 802859DC-80285B44 28031C 0168+00 1/1 0/0 0/0 .text getRotation_xyz__Q27JStudio4mathFPA4_ffff */
// regalloc
#ifdef NONMATCHING
// NONMATCHING - regalloc
void JStudio::math::getRotation_xyz(MtxP param_1, f32 x, f32 y, f32 z) {
x = DEG_TO_RAD(x);
f32 cosx = cos(x);
@ -71,11 +72,6 @@ void JStudio::math::getRotation_xyz(MtxP param_1, f32 x, f32 y, f32 z) {
param_1[1][3] = 0.0f;
param_1[2][3] = 0.0f;
}
#else
void JStudio::math::getRotation_xyz(MtxP param_0, f32 param_1, f32 param_2, f32 param_3) {
// NONMATCHING
}
#endif
/* 80285B44-80285BCC 280484 0088+00 0/0 2/2 0/0 .text
* getTransformation_SRxyzT__Q27JStudio4mathFPA4_fRC3VecRC3VecRC3Vec */
@ -115,8 +111,7 @@ SECTION_SDATA2 static f64 lit_628 = 57.29577951308232;
/* 80285BCC-80285E0C 28050C 0240+00 0/0 2/2 0/0 .text
* getFromTransformation_SRxyzT__Q27JStudio4mathFP3VecP3VecP3VecPA4_Cf */
// getEulerXYZ is not inlined
#ifdef NONMATCHING
// NONMATCHING - getEulerXYZ is not inlined
void JStudio::math::getFromTransformation_SRxyzT(Vec* param_1, Vec* param_2, Vec* param_3,
CMtxP param_4) {
getFromTransformation_S(param_4, param_1);
@ -145,9 +140,3 @@ void JStudio::math::getFromTransformation_SRxyzT(Vec* param_1, Vec* param_2, Vec
param_2->y = local_a0.y;
param_2->z = local_a0.z;
}
#else
void JStudio::math::getFromTransformation_SRxyzT(Vec* param_0, Vec* param_1, Vec* param_2,
CMtxP param_3) {
// NONMATCHING
}
#endif

View File

@ -1589,19 +1589,13 @@ void JStudio::TObject::forward_value(u32 param_0) {
}
/* 8028679C-802867D4 2810DC 0038+00 9/0 0/0 0/0 .text do_begin__Q27JStudio7TObjectFv */
#ifdef NONMATCHING
// NONMATCHING
void JStudio::TObject::do_begin() {
TAdaptor* adaptor = getAdaptor();
if (adaptor != NULL) {
adaptor->adaptor_do_begin();
}
}
#else
// void JStudio::TObject::do_begin() {
extern "C" void do_begin__Q27JStudio7TObjectFv() {
// NONMATCHING
}
#endif
/* 802867D4-8028680C 281114 0038+00 9/0 0/0 0/0 .text do_end__Q27JStudio7TObjectFv */
void JStudio::TObject::do_end() {
@ -1633,14 +1627,9 @@ JStudio::TObject::TObject(JStudio::stb::data::TParse_TBlock_object const& param_
/* 802868B0-80286910 2811F0 0060+00 0/0 1/1 0/0 .text __dt__Q27JStudio14TAdaptor_actorFv
*/
#ifdef NONMATCHING
// NONMATCHING
JStudio::TAdaptor_actor::~TAdaptor_actor() {
}
#else
JStudio::TAdaptor_actor::~TAdaptor_actor() {
// NONMATCHING
}
#endif
/* 80286910-8028694C 281250 003C+00 0/0 1/1 0/0 .text
* __ct__Q27JStudio13TObject_actorFRCQ47JStudio3stb4data20TParse_TBlock_objectPQ27JStudio14TAdaptor_actor
@ -1686,13 +1675,8 @@ void JStudio::TObject_actor::do_paragraph(u32 param_0, void const* param_1, u32
}
/* 80286C9C-80286CFC 2815DC 0060+00 0/0 1/1 0/0 .text __dt__Q27JStudio21TAdaptor_ambientLightFv */
#ifdef NONMATCHING
// NONMATCHING
JStudio::TAdaptor_ambientLight::~TAdaptor_ambientLight() {}
#else
JStudio::TAdaptor_ambientLight::~TAdaptor_ambientLight() {
// NONMATCHING
}
#endif
/* 80286CFC-80286D38 28163C 003C+00 0/0 1/1 0/0 .text
* __ct__Q27JStudio20TObject_ambientLightFRCQ47JStudio3stb4data20TParse_TBlock_objectPQ27JStudio21TAdaptor_ambientLight
@ -1740,13 +1724,8 @@ void JStudio::TObject_ambientLight::do_paragraph(u32 param_0, void const* param_
/* 80286E1C-80286E7C 28175C 0060+00 0/0 1/1 0/0 .text __dt__Q27JStudio15TAdaptor_cameraFv
*/
#ifdef NONMATCHING
// NONMATCHING
JStudio::TAdaptor_camera::~TAdaptor_camera() {}
#else
JStudio::TAdaptor_camera::~TAdaptor_camera() {
// NONMATCHING
}
#endif
/* 80286E7C-80286EB8 2817BC 003C+00 0/0 1/1 0/0 .text
* __ct__Q27JStudio14TObject_cameraFRCQ47JStudio3stb4data20TParse_TBlock_objectPQ27JStudio15TAdaptor_camera
@ -1803,13 +1782,8 @@ void JStudio::TObject_camera::do_paragraph(u32 param_0, void const* param_1, u32
}
/* 8028717C-802871DC 281ABC 0060+00 0/0 1/1 0/0 .text __dt__Q27JStudio12TAdaptor_fogFv */
#ifdef NONMATCHING
// NONMATCHING
JStudio::TAdaptor_fog::~TAdaptor_fog() {}
#else
JStudio::TAdaptor_fog::~TAdaptor_fog() {
// NONMATCHING
}
#endif
/* 802871DC-80287218 281B1C 003C+00 0/0 1/1 0/0 .text
* __ct__Q27JStudio11TObject_fogFRCQ47JStudio3stb4data20TParse_TBlock_objectPQ27JStudio12TAdaptor_fog
@ -1846,13 +1820,8 @@ void JStudio::TObject_fog::do_paragraph(u32 param_0, void const* param_1, u32 pa
/* 80287308-80287368 281C48 0060+00 0/0 1/1 0/0 .text __dt__Q27JStudio14TAdaptor_lightFv
*/
#ifdef NONMATCHING
// NONMATCHING
JStudio::TAdaptor_light::~TAdaptor_light() {}
#else
JStudio::TAdaptor_light::~TAdaptor_light() {
// NONMATCHING
}
#endif
/* 80287368-802873A4 281CA8 003C+00 0/0 1/1 0/0 .text
* __ct__Q27JStudio13TObject_lightFRCQ47JStudio3stb4data20TParse_TBlock_objectPQ27JStudio14TAdaptor_light
@ -1895,8 +1864,7 @@ JStudio::TObject_message::TObject_message(JStudio::stb::data::TParse_TBlock_obje
/* 8028767C-8028770C 281FBC 0090+00 1/0 0/0 0/0 .text
* do_paragraph__Q27JStudio15TObject_messageFUlPCvUl */
// param_1 &= 0x1f is out of place + unsure about the pmfn
#ifdef NONMATCHING
// NONMATCHING - param_1 &= 0x1f is out of place + unsure about the pmfn
void JStudio::TObject_message::do_paragraph(u32 param_1, void const* param_2, u32 param_3) {
TAdaptor* adaptor = getAdaptor();
if (adaptor != NULL) {
@ -1915,20 +1883,10 @@ void JStudio::TObject_message::do_paragraph(u32 param_1, void const* param_2, u3
}
}
#else
void JStudio::TObject_message::do_paragraph(u32 param_0, void const* param_1, u32 param_2) {
// NONMATCHING
}
#endif
/* 8028770C-8028776C 28204C 0060+00 0/0 1/1 0/0 .text __dt__Q27JStudio17TAdaptor_particleFv */
#ifdef NONMATCHING
// NONMATCHING
JStudio::TAdaptor_particle::~TAdaptor_particle() {}
#else
JStudio::TAdaptor_particle::~TAdaptor_particle() {
// NONMATCHING
}
#endif
/* 8028776C-802877A8 2820AC 003C+00 0/0 1/1 0/0 .text
* __ct__Q27JStudio16TObject_particleFRCQ47JStudio3stb4data20TParse_TBlock_objectPQ27JStudio17TAdaptor_particle
@ -1944,13 +1902,8 @@ void JStudio::TObject_particle::do_paragraph(u32 param_0, void const* param_1, u
/* 80287B3C-80287B9C 28247C 0060+00 0/0 1/1 0/0 .text __dt__Q27JStudio14TAdaptor_soundFv
*/
#ifdef NONMATCHING
// NONMATCHING
JStudio::TAdaptor_sound::~TAdaptor_sound() {}
#else
JStudio::TAdaptor_sound::~TAdaptor_sound() {
// NONMATCHING
}
#endif
/* 80287B9C-80287BD8 2824DC 003C+00 0/0 1/1 0/0 .text
* __ct__Q27JStudio13TObject_soundFRCQ47JStudio3stb4data20TParse_TBlock_objectPQ27JStudio14TAdaptor_sound
@ -2376,4 +2329,4 @@ SECTION_DEAD static char const* const pad_8039AB82 = "\0\0\0\0\0";
// extern u8 data_804511F8[8];
// u8 data_804511F8[8];
/* 8039AB78-8039AB78 0271D8 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
/* 8039AB78-8039AB78 0271D8 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */

View File

@ -359,8 +359,7 @@ void TControl::destroyObject_all() {
}
/* 80289364-80289404 283CA4 00A0+00 1/1 0/0 0/0 .text getObject__Q37JStudio3stb8TControlFPCvUl */
// TPRObject_ID_equal copy issue
#ifdef NONMATCHING
// NONMATCHING - TPRObject_ID_equal copy issue
TObject* TControl::getObject(void const* param_0, u32 param_1) {
JGadget::TLinkList<TObject, -12>::iterator begin = mObjectContainer.begin();
JGadget::TLinkList<TObject, -12>::iterator end = mObjectContainer.end();
@ -370,11 +369,6 @@ TObject* TControl::getObject(void const* param_0, u32 param_1) {
}
return NULL;
}
#else
TObject* TControl::getObject(void const* param_0, u32 param_1) {
// NONMATCHING
}
#endif
/* 80289404-802894B4 283D44 00B0+00 0/0 1/1 0/0 .text reset__Q37JStudio3stb8TControlFv */
void TControl::reset() {
@ -388,8 +382,7 @@ void TControl::reset() {
/* 802894B4-802895B4 283DF4 0100+00 0/0 2/2 0/0 .text forward__Q37JStudio3stb8TControlFUl
*/
// regalloc
#ifdef NONMATCHING
// NONMATCHING - regalloc
u8 TControl::forward(u32 param_0) {
_54 = mObject_control.getSuspend();
u8 rv = mObject_control.forward(param_0);
@ -411,11 +404,6 @@ u8 TControl::forward(u32 param_0) {
setStatus_(uVar7 | (uVar6 << 0x10));
return rv;
}
#else
u8 TControl::forward(u32 param_0) {
// NONMATCHING
}
#endif
TFactory::~TFactory() {}
@ -545,4 +533,4 @@ extern "C" void func_80289928(void* _this,
JGadget::TLinkList<JStudio::stb::TObject, 12>::iterator param_1,
JStudio::object::TPRObject_ID_equal param_2) {
// NONMATCHING
}
}

View File

@ -322,8 +322,7 @@ void JStudio_JStage::TAdaptor_actor::adaptor_do_prepare() {
/* 8028A7B4-8028A8D8 2850F4 0124+00 1/0 0/0 0/0 .text
* adaptor_do_begin__Q214JStudio_JStage14TAdaptor_actorFv */
// instruction order
#ifdef NONMATCHING
// NONMATCHING - instruction order
void JStudio_JStage::TAdaptor_actor::adaptor_do_begin() {
adaptor_object_begin_();
JStage::TActor* pActor = get_pJSG_();
@ -345,11 +344,6 @@ void JStudio_JStage::TAdaptor_actor::adaptor_do_begin() {
pAnimOutput++;
}
}
#else
void JStudio_JStage::TAdaptor_actor::adaptor_do_begin() {
// NONMATCHING
}
#endif
/* 8028A8D8-8028A92C 285218 0054+00 1/0 0/0 0/0 .text
* adaptor_do_end__Q214JStudio_JStage14TAdaptor_actorFv */
@ -676,14 +670,9 @@ void JStudio_JStage::TAdaptor_actor::TVVOutput_ANIMATION_FRAME_::operator()(
/* 8028B138-8028B198 285A78 0060+00 2/1 0/0 0/0 .text
* __dt__Q314JStudio_JStage14TAdaptor_actor26TVVOutput_ANIMATION_FRAME_Fv */
#ifdef NONMATCHING
// NONMATCHING
JStudio_JStage::TAdaptor_actor::TVVOutput_ANIMATION_FRAME_::~TVVOutput_ANIMATION_FRAME_() {
}
#else
JStudio_JStage::TAdaptor_actor::TVVOutput_ANIMATION_FRAME_::~TVVOutput_ANIMATION_FRAME_() {
// NONMATCHING
}
#endif
/* ############################################################################################## */
/* 803C5864-803C5888 022984 0010+14 2/2 0/0 0/0 .data
@ -731,4 +720,4 @@ extern "C" void func_8028B580(void* _this) {
extern "C" void func_8028B5E0(void* _this, f32 param_0,
JStudio::TAdaptor* param_1) /* const */ {
// NONMATCHING
}
}

View File

@ -125,8 +125,7 @@ SECTION_SDATA2 static f32 lit_850 = 57.295780181884766f;
/* 8028CCB0-8028CF68 2875F0 02B8+00 1/0 0/0 0/0 .text
* adaptor_do_begin__Q214JStudio_JStage14TAdaptor_lightFv */
// regalloc
#ifdef NONMATCHING
// NONMATCHING - regalloc
void JStudio_JStage::TAdaptor_light::adaptor_do_begin() {
adaptor_object_begin_();
JStage::TLight* pLightObj = get_pJSG_();
@ -154,11 +153,6 @@ void JStudio_JStage::TAdaptor_light::adaptor_do_begin() {
VECAdd(&finalTransform->position, &finalTransform->direction, &VStack_c4);
adaptor_setVariableValue_Vec(sauVariableValue_3_TARGET_POSITION_XYZ, VStack_c4);
}
#else
void JStudio_JStage::TAdaptor_light::adaptor_do_begin() {
// NONMATCHING
}
#endif
/* 8028CF68-8028CFBC 2878A8 0054+00 1/0 0/0 0/0 .text
* adaptor_do_end__Q214JStudio_JStage14TAdaptor_lightFv */
@ -172,8 +166,7 @@ SECTION_SDATA2 static f32 lit_898 = 0.01745329238474369f;
/* 8028CFBC-8028D18C 2878FC 01D0+00 1/0 0/0 0/0 .text
* adaptor_do_update__Q214JStudio_JStage14TAdaptor_lightFUl */
// float regalloc
#ifdef NONMATCHING
// NONMATCHING - float regalloc
void JStudio_JStage::TAdaptor_light::adaptor_do_update(u32 param_1) {
JStage::TLight* lightObj = get_pJSG_();
const JStudio::TObject* pObject = adaptor_getObject();
@ -209,11 +202,6 @@ void JStudio_JStage::TAdaptor_light::adaptor_do_update(u32 param_1) {
lightObj->JSGSetDirection(pTrans->direction);
pJSGObject_->JSGUpdate();
}
#else
void JStudio_JStage::TAdaptor_light::adaptor_do_update(u32 param_0) {
// NONMATCHING
}
#endif
/* 8028D18C-8028D1B0 287ACC 0024+00 1/0 0/0 0/0 .text
* adaptor_do_data__Q214JStudio_JStage14TAdaptor_lightFPCvUlPCvUl */
@ -263,4 +251,4 @@ void JStudio_JStage::TAdaptor_light::adaptor_do_ENABLE(JStudio::data::TEOperatio
void JStudio_JStage::TAdaptor_light::TVVOutput_direction_::operator()(
f32 param_0, JStudio::TAdaptor* param_1) const {
((JStudio_JStage::TAdaptor_light*)param_1)->field_0x11c = field_0x8;
}
}

View File

@ -9,6 +9,9 @@
#include "JSystem/JUtility/JUTDirectPrint.h"
#include "stdio.h"
/* 804508F8-80450900 000378 0008+00 0/0 3/3 0/0 .sdata None */
bool sAssertVisible = true;
namespace JUTAssertion {
/* 802E495C-802E4960 2DF29C 0004+00 0/0 1/1 0/0 .text create__12JUTAssertionFv */
@ -222,4 +225,4 @@ void setMessageCount(int msg_count) {
sMessageLife = msg_count <= 0 ? 0 : msg_count;
}
}; // namespace JUTAssertion
}; // namespace JUTAssertion

View File

@ -1,118 +1,44 @@
//
// Generated By: dol2asm
// Translation Unit: JUTConsole
//
#include "JSystem/JUtility/JUTConsole.h"
#include "JSystem/J2DGraph/J2DOrthoGraph.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/JUTDirectPrint.h"
#include "JSystem/JUtility/JUTVideo.h"
#include "dol2asm.h"
#include "stdio.h"
#include <stdio.h>
//
// Forward References:
//
extern "C" void create__10JUTConsoleFUiUiP7JKRHeap();
extern "C" void create__10JUTConsoleFUiPvUl();
extern "C" void __ct__10JUTConsoleFUiUib();
extern "C" void __dt__10JUTConsoleFv();
extern "C" void getObjectSizeFromBufferSize__10JUTConsoleFUiUi();
extern "C" void getLineFromObjectSize__10JUTConsoleFUlUi();
extern "C" void clear__10JUTConsoleFv();
extern "C" void doDraw__10JUTConsoleCFQ210JUTConsole12EConsoleType();
extern "C" void print_f__10JUTConsoleFPCce();
extern "C" void print__10JUTConsoleFPCc();
extern "C" void dumpToTerminal__10JUTConsoleFUi();
extern "C" void scroll__10JUTConsoleFi();
extern "C" void getUsedLine__10JUTConsoleCFv();
extern "C" void getLineOffset__10JUTConsoleCFv();
extern "C" void __ct__17JUTConsoleManagerFv();
extern "C" void createManager__17JUTConsoleManagerFP7JKRHeap();
extern "C" void appendConsole__17JUTConsoleManagerFP10JUTConsole();
extern "C" void removeConsole__17JUTConsoleManagerFP10JUTConsole();
extern "C" void draw__17JUTConsoleManagerCFv();
extern "C" void drawDirect__17JUTConsoleManagerCFb();
extern "C" void setDirectConsole__17JUTConsoleManagerFP10JUTConsole();
extern "C" void JUTReportConsole(const char* message);
extern "C" void JUTWarningConsole_f(const char* fmt, ...);
extern "C" void JUTWarningConsole(const char*);
extern "C" extern char const* const JUTConsole__stringBase0;
extern "C" u8 sManager__17JUTConsoleManager[4];
//
// External References:
//
extern "C" void alloc__7JKRHeapFUliP7JKRHeap();
extern "C" void* __nw__FUlP7JKRHeapi();
extern "C" void __dl__FPv();
extern "C" void __ct__11JKRDisposerFv();
extern "C" void __dt__11JKRDisposerFv();
extern "C" void
Insert__Q27JGadget13TNodeLinkListFQ37JGadget13TNodeLinkList8iteratorPQ27JGadget13TLinkListNode();
extern "C" void Remove__Q27JGadget13TNodeLinkListFPQ27JGadget13TLinkListNode();
extern "C" void setCharColor__7JUTFontFQ28JUtility6TColor();
extern "C" void drawString_size_scale__7JUTFontFffffPCcUlb();
extern "C" void erase__14JUTDirectPrintFiiii();
extern "C" void drawString__14JUTDirectPrintFUsUsPc();
extern "C" void setCharColor__14JUTDirectPrintFQ28JUtility6TColor();
extern "C" void __ct__13J2DOrthoGraphFffffff();
extern "C" void setPort__13J2DOrthoGraphFv();
extern "C" void J2DFillBox__FffffQ28JUtility6TColor();
extern "C" u32 VIGetRetraceCount();
extern "C" void _savegpr_20();
extern "C" void _savegpr_27();
extern "C" void _savegpr_28();
extern "C" void _savegpr_29();
extern "C" void _restgpr_20();
extern "C" void _restgpr_27();
extern "C" void _restgpr_28();
extern "C" void _restgpr_29();
extern "C" extern void* __vt__14J2DGrafContext[10];
extern "C" extern void* __vt__13J2DOrthoGraph[10];
extern "C" u8 sCurrentHeap__7JKRHeap[4];
extern "C" u8 sDirectPrint__14JUTDirectPrint[4 + 4 /* padding */];
extern "C" u8 sManager__8JUTVideo[4];
//
// Declarations:
//
/* ############################################################################################## */
/* 80451570-80451574 000A70 0004+00 4/4 7/7 0/0 .sbss sManager__17JUTConsoleManager */
JUTConsoleManager* JUTConsoleManager::sManager;
/* 802E7354-802E73E4 2E1C94 0090+00 0/0 1/1 0/0 .text create__10JUTConsoleFUiUiP7JKRHeap
*/
JUTConsole* JUTConsole::create(unsigned int param_0, unsigned int maxLines, JKRHeap* p_heap) {
JUTConsoleManager* pManager = JUTConsoleManager::sManager;
JUTConsole* JUTConsole::create(unsigned int param_0, unsigned int maxLines, JKRHeap* pHeap) {
JUTConsoleManager* pManager = JUTConsoleManager::getManager();
JUT_ASSERT(33, pManager != 0);
void* buffer = JKRHeap::alloc(getObjectSizeFromBufferSize(param_0, maxLines), 0, p_heap);
u8* tmpBuf = (u8*)buffer;
u8* buffer = (u8*)JKRAllocFromHeap(pHeap, getObjectSizeFromBufferSize(param_0, maxLines), 0);
JUTConsole* newConsole = new (tmpBuf) JUTConsole(param_0, maxLines, true);
newConsole->mBuf = tmpBuf + sizeof(JUTConsole);
newConsole->clear();
JUTConsole* console = new (buffer) JUTConsole(param_0, maxLines, true);
console->mBuf = buffer + sizeof(JUTConsole);
console->clear();
pManager->appendConsole(newConsole);
return newConsole;
pManager->appendConsole(console);
return console;
}
/* 802E73E4-802E746C 2E1D24 0088+00 0/0 1/1 0/0 .text create__10JUTConsoleFUiPvUl */
JUTConsole* JUTConsole::create(unsigned int param_0, void* buffer, u32 bufferSize) {
JUTConsoleManager* pManager = JUTConsoleManager::sManager;
JUTConsoleManager* pManager = JUTConsoleManager::getManager();
JUT_ASSERT(59, pManager != 0);
JUT_ASSERT(62, ( (u32)buffer & 0x3 ) == 0);
u32 maxLines = getLineFromObjectSize(bufferSize, param_0);
JUTConsole* newConsole = new (buffer) JUTConsole(param_0, maxLines, false);
newConsole->mBuf = (u8*)buffer + sizeof(JUTConsole);
newConsole->clear();
JUTConsole* console = new (buffer) JUTConsole(param_0, maxLines, false);
console->mBuf = (u8*)buffer + sizeof(JUTConsole);
console->clear();
pManager->appendConsole(newConsole);
return newConsole;
pManager->appendConsole(console);
return console;
}
/* 802E746C-802E755C 2E1DAC 00F0+00 2/2 0/0 0/0 .text __ct__10JUTConsoleFUiUib */
@ -143,6 +69,7 @@ JUTConsole::JUTConsole(unsigned int param_0, unsigned int maxLines, bool param_2
/* 802E755C-802E75CC 2E1E9C 0070+00 1/0 0/0 0/0 .text __dt__10JUTConsoleFv */
JUTConsole::~JUTConsole() {
JUT_ASSERT(154, JUTConsoleManager::getManager());
JUTConsoleManager::getManager()->removeConsole(this);
}
@ -167,6 +94,7 @@ void JUTConsole::clear() {
for (u32 i = 0; i < mMaxLines; i++) {
setLineAttr(i, 0);
}
setLineAttr(0, -1);
*getLinePtr(0) = 0;
}
@ -330,6 +258,8 @@ void JUTConsole::print(char const* str) {
/* 802E7F30-802E7F7C 2E2870 004C+00 1/1 1/1 0/0 .text JUTConsole_print_f_va_ */
extern "C" void JUTConsole_print_f_va_(JUTConsole* console, const char* fmt, va_list args) {
JUT_ASSERT(563, console!=0);
char buf[1024];
vsnprintf(buf, sizeof(buf), fmt, args);
console->print(buf);
@ -427,8 +357,10 @@ JUTConsoleManager::JUTConsoleManager() {
/* 802E81F4-802E8240 2E2B34 004C+00 0/0 1/1 0/0 .text createManager__17JUTConsoleManagerFP7JKRHeap
*/
JUTConsoleManager* JUTConsoleManager::createManager(JKRHeap* pHeap) {
JUT_ASSERT(0x39c, sManager == 0);
if (pHeap == NULL) {
pHeap = JKRHeap::sCurrentHeap;
pHeap = JKRGetCurrentHeap();
}
JUTConsoleManager* manager = new (pHeap, 0) JUTConsoleManager();
@ -440,6 +372,8 @@ JUTConsoleManager* JUTConsoleManager::createManager(JKRHeap* pHeap) {
* appendConsole__17JUTConsoleManagerFP10JUTConsole */
void JUTConsoleManager::appendConsole(JUTConsole* console) {
JUT_ASSERT(961, sManager != 0 && console != 0);
JUT_ASSERT(964, soLink_.Find( console ) == soLink_.end());
soLink_.Push_back(console);
if (mActiveConsole == NULL) {
@ -470,8 +404,6 @@ void JUTConsoleManager::removeConsole(JUTConsole* console) {
}
/* 802E8384-802E8450 2E2CC4 00CC+00 0/0 1/1 0/0 .text draw__17JUTConsoleManagerCFv */
// missing stack var, different from tww/pik2
#ifdef NONMATCHING
void JUTConsoleManager::draw() const {
ConsoleList::const_iterator iter = soLink_.begin();
ConsoleList::const_iterator end = soLink_.end();
@ -485,11 +417,6 @@ void JUTConsoleManager::draw() const {
if (mActiveConsole != NULL)
mActiveConsole->doDraw(JUTConsole::CONSOLE_TYPE_0);
}
#else
void JUTConsoleManager::draw() const {
// NONMATCHING
}
#endif
/* 802E8450-802E84C4 2E2D90 0074+00 0/0 5/5 0/0 .text drawDirect__17JUTConsoleManagerCFb
*/
@ -510,24 +437,23 @@ void JUTConsoleManager::drawDirect(bool waitRetrace) const {
/* 802E84C4-802E8520 2E2E04 005C+00 0/0 2/2 0/0 .text
* setDirectConsole__17JUTConsoleManagerFP10JUTConsole */
void JUTConsoleManager::setDirectConsole(JUTConsole* p_console) {
void JUTConsoleManager::setDirectConsole(JUTConsole* console) {
if (mDirectConsole != NULL) {
appendConsole(mDirectConsole);
}
if (p_console != NULL) {
removeConsole(p_console);
if (console != NULL) {
removeConsole(console);
}
mDirectConsole = p_console;
mDirectConsole = console;
}
/* ############################################################################################## */
/* 80451574-80451578 000A74 0004+00 2/1 0/0 0/0 .sbss sReportConsole */
static JUTConsole* sReportConsole;
/* 802E8520-802E8528 2E2E60 0008+00 1/1 1/1 0/0 .text JUTSetReportConsole */
extern "C" void JUTSetReportConsole(JUTConsole* p_console) {
sReportConsole = p_console;
extern "C" void JUTSetReportConsole(JUTConsole* console) {
sReportConsole = console;
}
/* 802E8528-802E8530 -00001 0008+00 0/0 0/0 0/0 .text JUTGetReportConsole */
@ -535,13 +461,12 @@ extern "C" JUTConsole* JUTGetReportConsole() {
return sReportConsole;
}
/* ############################################################################################## */
/* 80451578-80451580 000A78 0004+04 2/1 0/0 0/0 .sbss sWarningConsole */
static JUTConsole* sWarningConsole;
/* 802E8530-802E8538 2E2E70 0008+00 1/1 1/1 0/0 .text JUTSetWarningConsole */
extern "C" void JUTSetWarningConsole(JUTConsole* p_console) {
sWarningConsole = p_console;
extern "C" void JUTSetWarningConsole(JUTConsole* console) {
sWarningConsole = console;
}
/* 802E8538-802E8540 -00001 0008+00 0/0 0/0 0/0 .text JUTGetWarningConsole */
@ -571,18 +496,10 @@ extern "C" void JUTReportConsole_f(const char* fmt, ...) {
va_end(args);
}
/* ############################################################################################## */
/* 8039D9A8-8039D9A8 02A008 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
#pragma push
#pragma force_active on
SECTION_DEAD static char const* const stringBase_8039D9B7 =
"\n:::dump of console[%x]----------------\n";
SECTION_DEAD static char const* const stringBase_8039D9E0 =
":::dump of console[%x] END------------\n";
SECTION_DEAD static char const* const stringBase_8039DA08 = "%s";
/* @stringBase0 padding */
SECTION_DEAD static char const* const pad_8039DA0B = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
#pragma pop
static void dummyString() {
DEAD_STRING("\n:::dump of console[%x]----------------\n");
DEAD_STRING(":::dump of console[%x] END------------\n");
}
/* 802E8648-802E867C 2E2F88 0034+00 0/0 6/6 0/0 .text JUTReportConsole */
void JUTReportConsole(const char* message) {
@ -614,4 +531,4 @@ void JUTWarningConsole_f(const char* fmt, ...) {
/* 802E86FC-802E8730 2E303C 0034+00 0/0 2/2 0/0 .text JUTWarningConsole */
void JUTWarningConsole(const char* message) {
JUTReportConsole_f("%s", message);
}
}

View File

@ -6,69 +6,20 @@
#include "JSystem/JUtility/JUTException.h"
#include "JSystem/JUtility/JUTConsole.h"
#include "JSystem/JUtility/JUTDirectPrint.h"
#include "math.h"
#include "stdio.h"
#include "stdlib.h"
#include "dol2asm.h"
#include "dolphin/base/PPCArch.h"
#include "dolphin/os.h"
#include "global.h"
//
// Forward References:
//
extern "C" void run__12JUTExceptionFv();
extern "C" void __dt__12JUTExceptionFv();
extern "C" void printContext__12JUTExceptionFUsP9OSContextUlUl();
extern "C" void createFB__12JUTExceptionFv();
extern "C" void panic_f_va__12JUTExceptionFPCciPCcP16__va_list_struct();
extern "C" extern char const* const JUTException__stringBase0;
extern "C" u8 sMessageQueue__12JUTException[32];
extern "C" u8 sMessageBuffer__12JUTException[4 + 4 /* padding */];
extern "C" u8 sErrorManager__12JUTException[4];
extern "C" u8 msr__12JUTException[4];
extern "C" u8 fpscr__12JUTException[4];
extern "C" u8 sPreUserCallback__12JUTException[4];
extern "C" u8 sConsole__12JUTException[4];
//
// External References:
//
extern "C" void changeFrameBuffer__14JUTDirectPrintFPvUsUs();
extern "C" void _savegpr_25();
extern "C" void _restgpr_25();
extern "C" void _savegpr_28();
extern "C" void _restgpr_28();
extern "C" void OSYieldThread();
extern "C" void OSFillFPUContext(OSContext*);
extern "C" void print_f__10JUTConsoleFPCce();
extern "C" OSContext* OSGetCurrentContext();
extern "C" extern _GXRenderModeObj GXNtsc480Int;
extern "C" void _restgpr_16();
extern "C" void fopen__13JUTDirectFileFPCc();
extern "C" void fclose__13JUTDirectFileFv();
extern "C" void fgets__13JUTDirectFileFPvi();
extern "C" void print__10JUTConsoleFPCc();
extern "C" void __ct__13JUTDirectFileFv();
extern "C" void __dt__13JUTDirectFileFv();
extern "C" void _savegpr_16();
//
// Declarations:
//
#include "JSystem/JUtility/JUTDirectFile.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <dolphin.h>
/* 803CC620-803CC640 029740 0020+00 3/3 0/0 0/0 .data sMessageQueue__12JUTException */
SECTION_DATA OSMessageQueue JUTException::sMessageQueue = {0};
OSMessageQueue JUTException::sMessageQueue = {0};
/* 803CC640-803CC660 029760 0020+00 1/1 0/0 0/0 .data c3bcnt */
SECTION_DATA static OSTime c3bcnt[4] = {0, 0, 0, 0};
static OSTime c3bcnt[4] = {0, 0, 0, 0};
/* 803CC660-803CC6A4 -00001 0044+00 1/1 0/0 0/0 .data sCpuExpName__12JUTException */
SECTION_DATA const char* JUTException::sCpuExpName[17] = {
const char* JUTException::sCpuExpName[17] = {
"SYSTEM RESET",
"MACHINE CHECK",
"DSI",
@ -132,9 +83,8 @@ JUTException* JUTException::create(JUTDirectPrint* directPrint) {
return sErrorManager;
}
/* ############################################################################################## */
/* 804508F0-804508F8 000370 0004+04 1/1 0/0 0/0 .sdata sMessageBuffer__12JUTException */
SECTION_SDATA OSMessage JUTException::sMessageBuffer[1 + 1 /* padding */] = {0};
OSMessage JUTException::sMessageBuffer[1] = {0};
struct CallbackObject {
/* 0x00 */ OSErrorHandler callback;
@ -179,9 +129,7 @@ void* JUTException::run() {
}
}
/* ############################################################################################## */
/* 80434578-8043458C 061298 0014+00 2/2 0/0 0/0 .bss exCallbackObject */
STATIC_ASSERT(sizeof(CallbackObject) == 0x14);
static CallbackObject exCallbackObject;
@ -304,16 +252,6 @@ void JUTException::showFloatSub(int index, f32 value) {
}
}
/* ############################################################################################## */
/* 8039D490-8039D490 029AF0 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
#pragma push
#pragma force_active on
SECTION_DEAD static char const* const stringBase_8039D5B7 =
"-------------------------------- FPR\n";
SECTION_DEAD static char const* const stringBase_8039D5DD = " ";
SECTION_DEAD static char const* const stringBase_8039D5DF = "\n";
#pragma pop
/* 802E2454-802E2578 2DCD94 0124+00 1/1 0/0 0/0 .text showFloat__12JUTExceptionFP9OSContext */
void JUTException::showFloat(OSContext* context) {
if (!sConsole) {
@ -968,147 +906,132 @@ bool JUTException::queryMapAddress(char* mapPath, u32 address, s32 section_id, u
return false;
}
/* ############################################################################################## */
/* 8039D490-8039D490 029AF0 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
#pragma push
#pragma force_active on
SECTION_DEAD static char const* const stringBase_8039D97E = " [%08X]: .%s [%08X: %XH]\n %s\n";
/* @stringBase0 padding */
SECTION_DEAD static char const* const pad_8039D99E = "\0";
#pragma pop
/* 802E3C90-802E3FEC 2DE5D0 035C+00 1/1 0/0 0/0 .text
* queryMapAddress_single__12JUTExceptionFPcUllPUlPUlPcUlbb */
// 2 additional instructions (addi r5,r1,8) related to section_name variable.
#ifdef NONMATCHING
bool JUTException::queryMapAddress_single(char* mapPath, u32 address, s32 section_id, u32* out_addr,
u32* out_size, char* out_line, u32 line_length,
bool print, bool begin_with_newline) {
if (!mapPath) {
return false;
}
return false;
}
char section_name[16];
char buffer[0x200];
JUTDirectFile file;
int i = 0;
if (!file.fopen(mapPath)) {
return false;
}
char section_name[16];
char buffer[0x200];
JUTDirectFile file;
int section_idx = 0;
if (!file.fopen(mapPath)) {
return false;
}
bool result = 0;
do {
char* src = buffer;
int found_section = 0;
do {
i++;
while (true) {
while (true) {
int length = file.fgets(buffer, ARRAY_SIZE(buffer));
if (length < 0)
goto next_section;
if (buffer[0] == '.')
break;
}
bool result = false;
bool found_section;
int i = 0;
char* src = buffer + 1;
for (; *src != '\0'; i++, src++) {
section_name[i] = *src;
if (*src == ' ' || i == 0xf)
break;
}
while (true) {
section_idx++;
found_section = false;
while (true) {
char* src;
char* dst;
section_name[i] = 0;
if (*src == 0)
break;
if (file.fgets(buffer, ARRAY_SIZE(buffer)) < 0)
break;
if (buffer[0] != '.')
continue;
if (src[1] == 's' && src[2] == 'e' && src[3] == 'c' && src[4] == 't') {
found_section = true;
break;
}
}
if ((found_section & 0xFF) == 0)
goto end;
} while (section_id >= 0 && section_id != i);
next_section:;
int i = 0;
src = buffer + 1;
while (*src != '\0') {
section_name[i] = *src;
if (*src == ' ' || i == 0xf)
break;
i++;
src++;
}
u32 addr;
int size;
do {
int length;
do {
length = file.fgets(buffer, ARRAY_SIZE(buffer));
if (length <= 4)
goto next_symbol;
} while ((length < 28) || (buffer[28] != '4'));
section_name[i] = 0;
if (*src == 0)
break;
addr = strtol(buffer + 19, NULL, 16);
addr = ((buffer[18] - '0') << 28) | addr;
size = strtol(buffer + 11, NULL, 16);
} while (addr > address || address >= addr + size);
if (src[1] == 's' && src[2] == 'e' && src[3] == 'c' && src[4] == 't') {
found_section = true;
break;
}
}
if (out_addr)
*out_addr = addr;
if (!found_section)
break;
if (out_size)
*out_size = size;
if (section_id >= 0 && section_id != section_idx)
continue;
if (out_line) {
src = buffer + 0x1e;
char* dst = out_line;
u32 length = 0;
for (; length < line_length - 1; src++) {
u32 ch = *(u8*)src;
if (ch < ' ' && ch != '\t')
break;
if (((int)ch == ' ' || ch == '\t') && (length != 0)) {
if (dst[-1] != ' ') {
*dst = ' ';
dst++;
length++;
}
} else {
*dst = ch;
dst++;
length++;
}
}
if (length != 0 && dst[-1] == ' ') {
dst--;
}
*dst = 0;
if (print) {
if (begin_with_newline) {
sConsole->print("\n");
}
sConsole->print_f(" [%08X]: .%s [%08X: %XH]\n %s\n", address, section_name, addr,
size, out_line);
begin_with_newline = false;
}
}
int length;
result = true;
while (true) {
if ((length = file.fgets(buffer, ARRAY_SIZE(buffer))) <= 4)
break;
if ((length < 28))
continue;
if (buffer[28] == '4') {
u32 addr = ((buffer[18] - '0') << 28) | strtol(buffer + 19, NULL, 16);
int size = strtol(buffer + 11, NULL, 16);
if ((addr <= address && address < addr + size)) {
if (out_addr)
*out_addr = addr;
next_symbol:;
} while ((result & 0xFF) == 0 && section_id >= 0 && section_id != i);
if (out_size)
*out_size = size;
if (print && begin_with_newline) {
sConsole->print("\n");
}
if (out_line) {
const u8* src = (const u8*)&buffer[0x1e];
u8* dst = (u8*)out_line;
u32 i = 0;
end:
file.fclose();
bool bresult = result != false;
return bresult;
for (i = 0; i < line_length - 1; ++src) {
if ((u32)(*src) < ' ' && (u32)*src != '\t')
break;
if ((*src == ' ' || (u32)*src == '\t') && (i != 0)) {
if (dst[-1] != ' ') {
*dst = ' ';
dst++;
++i;
}
} else {
*dst++ = *src;
i++;
}
}
if (i != 0 && dst[-1] == ' ') {
dst--;
i--;
}
*dst = 0;
if (print) {
if (begin_with_newline) {
sConsole->print("\n");
}
sConsole->print_f(" [%08X]: .%s [%08X: %XH]\n %s\n", address, section_name, addr, size, out_line);
begin_with_newline = false;
}
}
result = true;
break;
}
}
}
if (!result && (section_id < 0 || section_id != section_idx)) {
continue;
}
if (print && begin_with_newline) {
sConsole->print("\n");
}
break;
}
file.fclose();
return result ? true : false;
}
#else
bool JUTException::queryMapAddress_single(char* param_0, u32 param_1, s32 param_2, u32* param_3,
u32* param_4, char* param_5, u32 param_6,
bool param_7, bool param_8) {
// NONMATCHING
}
#endif
/* 802E3FEC-802E40CC 2DE92C 00E0+00 0/0 1/1 0/0 .text createConsole__12JUTExceptionFPvUl
*/
@ -1146,8 +1069,3 @@ JUTExternalFB::JUTExternalFB(_GXRenderModeObj* renderMode, GXGamma gamma, void*
/* 802E40EC-802E414C 2DEA2C 0060+00 1/0 0/0 0/0 .text __dt__12JUTExceptionFv */
JUTException::~JUTException() {}
/* ##############################################################################################
*/
/* 804508F8-80450900 000378 0008+00 0/0 3/3 0/0 .sdata None */
SECTION_SDATA extern bool sAssertVisible = true;

View File

@ -1,7 +1,7 @@
#include <dolphin.h>
/* 8039DA20-803A1B80 02A080 4160+00 0/0 1/0 0/0 .rodata JUTResFONT_Ascfont_fix12 */
extern u8 const JUTResFONT_Ascfont_fix12[16736] = {
extern u8 const JUTResFONT_Ascfont_fix12[16736] ALIGN_DECL(32) = {
0x46, 0x4F, 0x4E, 0x54, 0x62, 0x66, 0x6E, 0x31, 0x00, 0x00, 0x41, 0x60, 0x00, 0x00, 0x00, 0x04,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x49, 0x4E, 0x46, 0x31, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C,
@ -1048,4 +1048,4 @@ extern u8 const JUTResFONT_Ascfont_fix12[16736] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
};

View File

@ -55,27 +55,22 @@ void JUTXfb::common_init(int bufNum) {
/* 802E5260-802E5308 2DFBA0 00A8+00 1/1 0/0 0/0 .text
* __ct__6JUTXfbFPC16_GXRenderModeObjP7JKRHeapQ26JUTXfb10EXfbNumber */
#ifdef NONMATCHING
JUTXfb::JUTXfb(_GXRenderModeObj const* pObj, JKRHeap* pHeap, JUTXfb::EXfbNumber xfbNum) {
// NONMATCHING - regswap, equivalent
JUTXfb::JUTXfb(GXRenderModeObj const* pObj, JKRHeap* pHeap, JUTXfb::EXfbNumber xfbNum) {
common_init(xfbNum);
if (pObj) {
initiate(pObj->fb_width, pObj->xfb_height, pHeap, xfbNum);
} else {
//_GXRenderModeObj* renderObj = JUTVideo::getManager()->getRenderMode();
u16 fb_width = JUTVideo::getManager()->getRenderMode()->fb_width;
u16 efb_height = JUTVideo::getManager()->getRenderMode()->efb_height;
u16 xfb_height = JUTVideo::getManager()->getRenderMode()->xfb_height;
f32 scale_factor = GXGetYScaleFactor(efb_height, xfb_height);
u16 xfb_lines = GXGetNumXfbLines(efb_height, scale_factor);
initiate(fb_width, GXGetNumXfbLines(efb_height, scale_factor), pHeap, xfbNum);
initiate(fb_width, xfb_lines, pHeap, xfbNum);
}
}
#else
JUTXfb::JUTXfb(_GXRenderModeObj const* param_0, JKRHeap* param_1,
JUTXfb::EXfbNumber param_2){// NONMATCHING
}
#endif
JUTXfb* JUTXfb::sManager;
@ -132,4 +127,4 @@ void JUTXfb::initiate(u16 width, u16 height, JKRHeap* pHeap, JUTXfb::EXfbNumber
mBuffer[2] = NULL;
mXfbAllocated[2] = false;
}
}
}

View File

@ -550,8 +550,7 @@ COMPILER_STRIP_GATE(0x806555E4, &lit_4175);
#pragma pop
/* 80654730-80654E8C 001350 075C+00 1/1 0/0 0/0 .text drawAddScore__13daBalloon2D_cFv */
// field_0x0.x, regalloc
#ifdef NONMATCHING
// NONMATCHING - field_0x0.x, regalloc
void daBalloon2D_c::drawAddScore() {
for (int i = 19; i >= 0; i--) {
if (field_0x5f8[i].field_0xe != 0) {
@ -633,11 +632,6 @@ void daBalloon2D_c::drawAddScore() {
}
}
}
#else
void daBalloon2D_c::drawAddScore() {
// NONMATCHING
}
#endif
/* 80654E8C-80655250 001AAC 03C4+00 2/2 0/0 0/0 .text setHIO__13daBalloon2D_cFb */
void daBalloon2D_c::setHIO(bool param_1) {
@ -724,16 +718,11 @@ SECTION_DATA extern void* __vt__Q213daBalloon2D_c6c_list[4] = {
};
/* 80655250-80655304 001E70 00B4+00 1/0 0/0 0/0 .text daBalloon2D_create__FP13daBalloon2D_c */
#ifdef NONMATCHING
// NONMATCHING - vtable
static int daBalloon2D_create(daBalloon2D_c* i_this) {
fopAcM_SetupActor(i_this, daBalloon2D_c);
return i_this->create();
}
#else
static int daBalloon2D_create(daBalloon2D_c* param_0) {
// NONMATCHING
}
#endif
/* 80655304-80655340 001F24 003C+00 2/2 0/0 0/0 .text __dt__Q213daBalloon2D_c10CHeadScoreFv */
daBalloon2D_c::CHeadScore::~CHeadScore() {

View File

@ -10,6 +10,11 @@
#include "dol2asm.h"
#include "JSystem/J3DGraphBase/J3DMaterial.h"
#include "string.h"
#include "d/d_bg_w.h"
#include "m_Do/m_Do_lib.h"
#include "d/d_demo.h"
#include "JSystem/JKernel/JKRExpHeap.h"
#include "JSystem/JKernel/JKRSolidHeap.h"
//
// Forward References:
@ -389,8 +394,7 @@ SECTION_DEAD static char const* const stringBase_804593C6 = "room.plc";
#pragma pop
/* 804582B8-80458750 000738 0498+00 2/2 0/0 1/1 .text createHeap__6daBg_cFv */
// regalloc, but equivalent
#ifdef NONMATCHING
// NONMATCHING - regalloc, but equivalent
int daBg_c::createHeap() {
const char* arcName = setArcName();
s32 prm = fopAcM_GetParam(this);
@ -505,11 +509,6 @@ int daBg_c::createHeap() {
return 1;
}
#else
int daBg_c::createHeap() {
// NONMATCHING
}
#endif
/* 80458750-80458788 000BD0 0038+00 1/1 0/0 0/0 .text __ct__11J3DLightObjFv */
// J3DLightObj::J3DLightObj() {
@ -590,8 +589,7 @@ SECTION_DEAD static char const* const stringBase_80459418 = "MA00_Kusa";
#pragma pop
/* 804588C4-80458F38 000D44 0674+00 1/1 0/0 0/0 .text draw__6daBg_cFv */
// just regalloc + some reorder issues
#ifdef NONMATCHING
// NONMATCHING - just regalloc + some reorder issues
int daBg_c::draw() {
int roomNo = fopAcM_GetParam(this);
daBg_unkData* bgData = mBgData;
@ -742,11 +740,6 @@ int daBg_c::draw() {
return 1;
}
#else
int daBg_c::draw() {
// NONMATCHING
}
#endif
/* ############################################################################################## */
/* 804593A4-804593A8 000030 0004+00 1/1 0/0 0/0 .rodata @4524 */
@ -801,14 +794,13 @@ static int daBg_Create(fopAc_ac_c* i_this) {
}
/* 8045906C-8045933C 0014EC 02D0+00 1/1 0/0 0/0 .text create__6daBg_cFv */
// regalloc
#ifdef NONMATCHING
// NONMATCHING - regalloc
int daBg_c::create() {
int roomNo = fopAcM_GetParam(this);
field_0x5f0 = 0;
field_0x5f1 = 0;
if (mHeap == NULL) {
if (this->heap == NULL) {
fopAcM_SetupActor(this, daBg_c);
home.roomNo = roomNo;
@ -816,13 +808,13 @@ int daBg_c::create() {
JKRExpHeap* heap = dStage_roomControl_c::getMemoryBlock(roomNo);
if (heap != NULL) {
mHeap = JKRSolidHeap::create(-1, heap, false);
this->heap = JKRSolidHeap::create(-1, heap, false);
JKRHeap* old = mDoExt_setCurrentHeap(mHeap);
JKRHeap* old = mDoExt_setCurrentHeap(this->heap);
createHeap();
mDoExt_setCurrentHeap(old);
mHeap->adjustSize();
this->heap->adjustSize();
} else if (!fopAcM_entrySolidHeap(this, checkCreateHeap, 0x80020040)) {
return cPhs_ERROR_e;
}
@ -888,11 +880,6 @@ int daBg_c::create() {
dComIfGp_roomControl_onStatusFlag(roomNo, 0x10);
return cPhs_COMPLEATE_e;
}
#else
int daBg_c::create() {
// NONMATCHING
}
#endif
/* 8045933C-8045936C 0017BC 0030+00 1/0 0/0 0/0 .text calc__11J3DTexNoAnmCFPUs */
// void J3DTexNoAnm::calc(u16* param_0) const {

View File

@ -318,16 +318,14 @@ SECTION_DEAD static char const* const stringBase_8045CA86 = "データブロッ
/* 80459904-80459B64 000324 0260+00 1/1 0/0 1/1 .text Set__Q29daBgObj_c11spec_data_cFPv
*/
// close-ish
#ifdef NONMATCHING
int daBgObj_c::spec_data_c::Set(void* i_ptr) {
// NONMATCHING - close-ish
bool daBgObj_c::spec_data_c::Set(void* i_ptr) {
spec_dat* data = (spec_dat*)i_ptr;
mSpecType = data->field_0x0;
switch (mSpecType) {
case 0:
case 0: {
u8 block_type = data->field_0x4;
u8* block_p = (u8*)data + 4;
@ -350,7 +348,8 @@ int daBgObj_c::spec_data_c::Set(void* i_ptr) {
block_type = *block_p;
} while (1);
break;
case 1:
}
case 1: {
u16 temp_r3 = data->field_0x2;
field_0x02 = temp_r3 & 0xF;
field_0x03 = (temp_r3 >> 0xE) & 3;
@ -386,7 +385,8 @@ int daBgObj_c::spec_data_c::Set(void* i_ptr) {
block_type = *block_p;
} while (1);
break;
case 2:
}
case 2: {
u16 temp_r3_2 = data->field_0x2;
field_0x02 = temp_r3_2 & 0xF;
field_0x03 = (temp_r3_2 >> 0xE) & 3;
@ -426,17 +426,13 @@ int daBgObj_c::spec_data_c::Set(void* i_ptr) {
block_type = *block_p;
} while (1);
break;
}
default:
return 0;
}
return 1;
}
#else
bool daBgObj_c::spec_data_c::Set(void* param_0) {
// NONMATCHING
}
#endif
/* 80459B64-80459BB4 000584 0050+00 4/4 0/0 0/0 .text release__9daBgObj_cFP4dBgW */
void daBgObj_c::release(dBgW* param_0) {
@ -968,7 +964,7 @@ BOOL daBgObj_c::checkDestroy() {
/* 8045B534-8045B5E0 001F54 00AC+00 2/2 0/0 0/0 .text checkHitAt__9daBgObj_cFP8cCcD_Obj
*/
#ifdef NONMATCHING
// NONMATCHING
BOOL daBgObj_c::checkHitAt(cCcD_Obj* i_hitObj) {
u32 hit_flags = 0;
u32 var_r8 = 0;
@ -995,11 +991,6 @@ BOOL daBgObj_c::checkHitAt(cCcD_Obj* i_hitObj) {
return hit_flags != 0;
}
#else
BOOL daBgObj_c::checkHitAt(cCcD_Obj* param_0) {
// NONMATCHING
}
#endif
/* 8045B5E0-8045B7FC 002000 021C+00 1/1 0/0 0/0 .text orderWait_tri__9daBgObj_cFv */
void daBgObj_c::orderWait_tri() {
@ -1047,8 +1038,7 @@ void daBgObj_c::orderWait_tri() {
/* 8045B7FC-8045B9C4 00221C 01C8+00 1/1 0/0 0/0 .text orderWait_cyl__9daBgObj_cFv */
// r30/r31 swap
#ifdef NONMATCHING
// NONMATCHING - r30/r31 swap
void daBgObj_c::orderWait_cyl() {
if (mCyl.ChkTgHit()) {
if (checkHitAt(mCyl.GetTgHitObj())) {
@ -1086,11 +1076,6 @@ void daBgObj_c::orderWait_cyl() {
dComIfG_Ccsp()->Set(&mCyl);
}
#else
void daBgObj_c::orderWait_cyl() {
// NONMATCHING
}
#endif
/* 8045B9C4-8045BB38 0023E4 0174+00 1/1 0/0 0/0 .text orderWait_spec__9daBgObj_cFv */
void daBgObj_c::orderWait_spec() {

View File

@ -669,8 +669,7 @@ COMPILER_STRIP_GATE(0x808159E8, &lit_4102);
#pragma pop
/* 808083CC-80808678 00038C 02AC+00 1/1 0/0 0/0 .text draw__8daE_YM_cFv */
// one instruction order mismatch (probably causes regalloc issue)
#ifdef NONMATCHING
// NONMATCHING - one instruction order mismatch (probably causes regalloc issue)
int daE_YM_c::draw() {
if (field_0x71d) {
return 1;
@ -738,11 +737,6 @@ int daE_YM_c::draw() {
return 1;
}
#else
int daE_YM_c::draw() {
// NONMATCHING
}
#endif
/* 80808678-80808698 000638 0020+00 1/0 0/0 0/0 .text daE_YM_Draw__FP8daE_YM_c */
static int daE_YM_Draw(daE_YM_c* i_this) {
@ -753,11 +747,8 @@ static int daE_YM_Draw(daE_YM_c* i_this) {
/* 80815D28-80815D2C 000008 0004+00 2/2 0/0 0/0 .bss None */
static u8 data_80815D28[4];
/* 80815D2C-80815D38 00000C 000C+00 1/1 0/0 0/0 .bss @3941 */
static u8 lit_3941[12];
/* 80815D38-80815D5C 000018 0024+00 18/18 0/0 0/0 .bss l_HIO */
static u8 l_HIO[36];
static daE_YM_HIO_c l_HIO;
/* 80815D5C-80815D60 00003C 0004+00 3/3 0/0 0/0 .bss m_near_obj */
static fopAc_ac_c* m_near_obj;
@ -1850,8 +1841,7 @@ SECTION_DEAD static char const* const stringBase_80815AFE = "E_ym";
#pragma pop
/* 80814BA4-80815224 00CB64 0680+00 2/1 0/0 0/0 .text create__8daE_YM_cFv */
// literals / small issue
#ifdef NONMATCHING
// NONMATCHING - literals / small issue
int daE_YM_c::create() {
fopAcM_SetupActor(this, daE_YM_c);
@ -2023,11 +2013,6 @@ int daE_YM_c::create() {
return phase;
}
#else
int daE_YM_c::create() {
// NONMATCHING
}
#endif
/* 80815224-8081526C 00D1E4 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGSphFv */
// cM3dGSph::~cM3dGSph() {
@ -2063,60 +2048,3 @@ extern "C" void __dt__12dBgS_AcchCirFv() {
static int daE_YM_Create(daE_YM_c* i_this) {
return i_this->create();
}
/* 80815410-80815458 00D3D0 0048+00 1/0 0/0 0/0 .text __dt__10cCcD_GSttsFv */
// cCcD_GStts::~cCcD_GStts() {
extern "C" void __dt__10cCcD_GSttsFv() {
// NONMATCHING
}
/* 80815458-808154A0 00D418 0048+00 2/1 0/0 0/0 .text __dt__12daE_YM_HIO_cFv */
daE_YM_HIO_c::~daE_YM_HIO_c() {
// NONMATCHING
}
/* 808154A0-808154DC 00D460 003C+00 0/0 1/0 0/0 .text __sinit_d_a_e_ym_cpp */
void __sinit_d_a_e_ym_cpp(){// NONMATCHING
}
#pragma push
#pragma force_active on
REGISTER_CTORS(0x808154A0, __sinit_d_a_e_ym_cpp);
#pragma pop
/* 808154DC-808154E4 00D49C 0008+00 1/0 0/0 0/0 .text @36@__dt__12dBgS_ObjAcchFv */
static void func_808154DC() {
// NONMATCHING
}
/* 808154E4-808154EC 00D4A4 0008+00 1/0 0/0 0/0 .text @20@__dt__12dBgS_ObjAcchFv */
static void func_808154E4() {
// NONMATCHING
}
/* 808154EC-80815900 00D4AC 0414+00 1/1 0/0 0/0 .text
* setMidnaBindEffect__FP13fopEn_enemy_cP15Z2CreatureEnemyP4cXyzP4cXyz */
static void setMidnaBindEffect(fopEn_enemy_c* param_0, Z2CreatureEnemy* param_1, cXyz* param_2,
cXyz* param_3) {
// NONMATCHING
}
/* 80815900-8081593C 00D8C0 003C+00 1/1 0/0 0/0 .text __dt__4cXyzFv */
// cXyz::~cXyz() {
extern "C" void __dt__4cXyzFv() {
// NONMATCHING
}
/* 8081593C-80815958 00D8FC 001C+00 2/2 0/0 0/0 .text getLeftHandPos__9daPy_py_cCFv */
// void daPy_py_c::getLeftHandPos() const {
extern "C" void getLeftHandPos__9daPy_py_cCFv() {
// NONMATCHING
}
/* 80815958-80815980 00D918 0028+00 1/1 0/0 0/0 .text getPos__13daTag_FWall_cFUc */
// void daTag_FWall_c::getPos(u8 param_0) {
extern "C" void getPos__13daTag_FWall_cFUc() {
// NONMATCHING
}
/* 80815AEC-80815AEC 000158 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */

View File

@ -2248,8 +2248,7 @@ SECTION_DEAD static char const* const stringBase_805231CE = "D_MN07A";
#pragma pop
/* 8051C304-8051D6CC 0006A4 13C8+00 1/1 0/0 0/0 .text create__9daGrass_cFv */
// matches except for static data
#ifdef NONMATCHING
// NONMATCHING - matches except for static data
int daGrass_c::create() {
static csXyz l_setType0[] = {
csXyz(0, 0, 0), csXyz(3, 0, -50), csXyz(-2, 0, 50), csXyz(50, 0, 27),
@ -2414,11 +2413,6 @@ int daGrass_c::create() {
fopAcM_setStageLayer(this);
return cPhs_COMPLEATE_e;
}
#else
int daGrass_c::create() {
// NONMATCHING
}
#endif
int daGrass_c::Delete() {
if (m_myObj == this) {

View File

@ -446,8 +446,7 @@ SECTION_DATA extern void* __vt__14dBgS_ObjGndChk[12] = {
/* 8085F2B0-80860148 000130 0E98+00 1/1 0/0 0/0 .text
* daKytag13_Execute_standard__FP13kytag13_class */
// some regalloc
#ifdef NONMATCHING
// NONMATCHING - some regalloc
static int daKytag13_Execute_standard(kytag13_class* i_this) {
fopAc_ac_c* a_this = (fopAc_ac_c*)i_this;
dKankyo_snow_Packet* snow_packet = g_env_light.mpSnowPacket;
@ -536,7 +535,7 @@ static int daKytag13_Execute_standard(kytag13_class* i_this) {
switch (snow_packet->mSnowEff[i].mStatus) {
case 0:
snow_packet->mSnowEff[i].mWindSpeed = (4.0f * i_this->field_0x574) + cM_rndF(6.0f);
snow_packet->mSnowEff[i].mWindSpeed = (4.0f * i_this->mSpeed) + cM_rndF(6.0f);
snow_packet->mSnowEff[i].mGravity = temp_f28;
snow_packet->mSnowEff[i].mTimer = 0;
snow_packet->mSnowEff[i].mPosition.x = sp40.x + cM_rndFX(500.0f * a_this->scale.x);
@ -754,11 +753,6 @@ static int daKytag13_Execute_standard(kytag13_class* i_this) {
return 1;
}
#else
static void daKytag13_Execute_standard(kytag13_class* i_this) {
// NONMATCHING
}
#endif
/* 80860148-808601C0 000FC8 0078+00 4/3 0/0 0/0 .text __dt__14dBgS_ObjGndChkFv */
// dBgS_ObjGndChk::~dBgS_ObjGndChk() {
@ -852,18 +846,3 @@ static int daKytag13_Create(fopAc_ac_c* i_this) {
return cPhs_COMPLEATE_e;
}
/* 80860450-80860458 0012D0 0008+00 1/0 0/0 0/0 .text @20@__dt__14dBgS_ObjGndChkFv */
static void func_80860450() {
// NONMATCHING
}
/* 80860458-80860460 0012D8 0008+00 1/0 0/0 0/0 .text @76@__dt__14dBgS_ObjGndChkFv */
static void func_80860458() {
// NONMATCHING
}
/* 80860460-80860468 0012E0 0008+00 1/0 0/0 0/0 .text @60@__dt__14dBgS_ObjGndChkFv */
static void func_80860460() {
// NONMATCHING
}

View File

@ -678,8 +678,7 @@ SECTION_DEAD static char const* const stringBase_8057B64F = "Timer";
#pragma pop
/* 8057AA94-8057B0D8 0014D4 0644+00 11/8 0/0 0/0 .text demoProc__15daObjBossWarp_cFv */
#ifdef NONMATCHING
// regalloc
// NONMATCHING - regalloc
int daObjBossWarp_c::demoProc() {
static char* action_table[15] = {
"WAIT",
@ -878,11 +877,6 @@ int daObjBossWarp_c::demoProc() {
return 1;
}
#else
int daObjBossWarp_c::demoProc() {
// NONMATCHING
}
#endif
/* ############################################################################################## */
/* 8057B4BC-8057B4C0 00015C 0004+00 0/0 0/0 0/0 .rodata @4491 */

View File

@ -2134,8 +2134,7 @@ COMPILER_STRIP_GATE(0x8047A394, &lit_3962);
/* 8046F3E4-8046F4AC 000464 00C8+00 1/0 0/0 0/0 .text
* CoHitCallBackBokkuri__FP10fopAc_ac_cP12dCcD_GObjInfP10fopAc_ac_cP12dCcD_GObjInf */
#ifdef NONMATCHING
// literals
// NONMATCHING - literals
static void CoHitCallBackBokkuri(fopAc_ac_c* param_0, dCcD_GObjInf* param_1,
fopAc_ac_c* param_2, dCcD_GObjInf* param_3) {
daObjCarry_c* _param_0 = static_cast<daObjCarry_c*>(param_0);
@ -2155,12 +2154,6 @@ static void CoHitCallBackBokkuri(fopAc_ac_c* param_0, dCcD_GObjInf* param_1,
}
}
}
#else
static void CoHitCallBackBokkuri(fopAc_ac_c* param_0, dCcD_GObjInf* param_1,
fopAc_ac_c* param_2, dCcD_GObjInf* param_3) {
// NONMATCHING
}
#endif
/* 8046F4AC-8046F52C 00052C 0080+00 1/1 0/0 0/0 .text s_swA_sub__FPvPv */
static void* s_swA_sub(void* param_0, void* param_1) {
@ -2728,8 +2721,7 @@ s32 daObjCarry_c::CreateInit_Lv8Ball() {
}
/* 80470B5C-80470BF4 001BDC 0098+00 1/1 0/0 0/0 .text CreateHeap__12daObjCarry_cFv */
#ifdef NONMATCHING
// 1 instruction in wrong place
// NONMATCHING - 1 instruction in wrong place
s32 daObjCarry_c::CreateHeap() {
s32 l_modelFlag;
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(getArcName(),getBmdName());
@ -2748,14 +2740,9 @@ s32 daObjCarry_c::CreateHeap() {
return 1;
}
#else
s32 daObjCarry_c::CreateHeap() {
// NONMATCHING
}
#endif
/* 80470BF4-80470CF0 001C74 00FC+00 1/1 0/0 0/0 .text create__12daObjCarry_cFv */
#ifdef NONMATCHING
// NONMATCHING
cPhs__Step daObjCarry_c::create() {
cPhs__Step step;
preInit();
@ -2770,16 +2757,11 @@ cPhs__Step daObjCarry_c::create() {
}
if (step == cPhs_NEXT_e) {
return;
return step;
}
return step;
}
#else
cPhs__Step daObjCarry_c::create() {
// NONMATCHING
}
#endif
/* ############################################################################################## */
/* 8047A3D4-8047A3E0 000AC8 000C+00 1/1 0/0 0/0 .rodata l_event_bitA$4815 */
@ -2973,15 +2955,9 @@ COMPILER_STRIP_GATE(0x8047A424, &lit_5876);
#pragma pop
/* 80472B54-80472D8C 003BD4 0238+00 1/1 0/0 0/0 .text crr_pos__12daObjCarry_cFv */
#ifdef NONMATCHING
void daObjCarry_c::crr_pos() {
}
#else
void daObjCarry_c::crr_pos() {
// NONMATCHING
}
#endif
/* 80472D8C-80472E5C 003E0C 00D0+00 1/1 0/0 0/0 .text check_sink__12daObjCarry_cFPf */
void daObjCarry_c::check_sink(f32* param_0) {

View File

@ -401,15 +401,10 @@ static int daObjCrope_Create(fopAc_ac_c* i_this) {
}
/* 80BCD524-80BCD69C 0008C4 0178+00 1/1 0/0 0/0 .text __dt__12daObjCrope_cFv */
#ifdef NONMATCHING
// NONMATCHING
daObjCrope_c::~daObjCrope_c() {
dComIfG_resDelete(&mPhase, l_arcName);
}
#else
daObjCrope_c::~daObjCrope_c() {
// NONMATCHING
}
#endif
/* 80BCD69C-80BCD6C4 000A3C 0028+00 1/0 0/0 0/0 .text daObjCrope_Delete__FP12daObjCrope_c
*/
@ -457,8 +452,7 @@ COMPILER_STRIP_GATE(0x80BCEB24, &lit_4119);
/* 80BCD6C4-80BCD9EC 000A64 0328+00 3/3 0/0 0/0 .text setNormalRopePos__12daObjCrope_cFv
*/
// Horrible regalloc
#ifdef NONMATCHING
// NONMATCHING - Horrible regalloc
void daObjCrope_c::setNormalRopePos() {
cXyz* pdVar4;
cXyz* pVVar5;
@ -522,11 +516,6 @@ void daObjCrope_c::setNormalRopePos() {
this_01++;
}
}
#else
void daObjCrope_c::setNormalRopePos() {
// NONMATCHING
}
#endif
/* ############################################################################################## */
/* 80BCEB28-80BCEB2C 00005C 0004+00 1/2 0/0 0/0 .rodata @4407 */

View File

@ -846,17 +846,10 @@ SECTION_DEAD static char const* const stringBase_80BDF93C = "Timer";
#pragma pop
/* 80BDFAB0-80BDFAB8 -00001 0008+00 1/1 0/0 0/0 .data action_table$4279 */
#ifdef NONMATCHING
static char* action_table[2] = {
"WAIT",
"MOVE",
};
#else
SECTION_DATA static void* action_table[2] = {
(void*)(((char*)&d_a_obj_dmelevator__stringBase0) + 0x46),
(void*)(((char*)&d_a_obj_dmelevator__stringBase0) + 0x4B),
};
#endif
/* 80BDF16C-80BDF320 0018EC 01B4+00 3/3 0/0 0/0 .text demoProc__17daObjDmElevator_cFv */
int daObjDmElevator_c::demoProc() {

View File

@ -7,6 +7,7 @@
#include "d/d_bg_w.h"
#include "d/d_com_inf_game.h"
#include "d/d_procname.h"
#include "SSystem/SComponent/c_math.h"
#include "dol2asm.h"
//
@ -138,8 +139,7 @@ COMPILER_STRIP_GATE(0x8057CF70, &lit_3745);
/* 8057CDE0-8057CF60 000280 0180+00 1/0 0/0 0/0 .text daObj_Fmobj_Create__FP10fopAc_ac_c
*/
// reg alloc
#ifdef NONMATCHING
// NONMATCHING - reg alloc
static int daObj_Fmobj_Create(fopAc_ac_c* i_this) {
obj_fmobj_class* a_this = (obj_fmobj_class*)i_this;
fopAcM_SetupActor(a_this, obj_fmobj_class);
@ -168,18 +168,13 @@ static int daObj_Fmobj_Create(fopAc_ac_c* i_this) {
a_this->mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
mDoMtx_stack_c::transM(0.0f, -30.0f, 0.0f);
MTXCopy(mDoMtx_stack_c::get(), a_this->mDzbMtx);
MTXCopy(mDoMtx_stack_c::get(), a_this->mBgMtx);
a_this->mpBgW->Move();
}
return phase;
}
#else
static int daObj_Fmobj_Create(fopAc_ac_c* param_0) {
// NONMATCHING
}
#endif
/* ############################################################################################## */
/* 8057CF80-8057CFA0 -00001 0020+00 1/0 0/0 0/0 .data l_daObj_Fmobj_Method */

View File

@ -359,18 +359,12 @@ int daObjHBombkoya_c::Delete() {
/* 80C1C1A8-80C1C2BC 0009A8 0114+00 1/0 0/0 0/0 .text
* daObjHBombkoya_create1st__FP16daObjHBombkoya_c */
// vtable issues, read more below
#ifdef NONMATCHING
// NONMATCHING - vtable issues, read more below
static int daObjHBombkoya_create1st(daObjHBombkoya_c* i_this) {
fopAcM_SetupActor(i_this, daObjHBombkoya_c);
return i_this->create1st();
}
#else
static void daObjHBombkoya_create1st(daObjHBombkoya_c* param_0) {
// NONMATCHING
}
#endif
/* 80C1C2BC-80C1C304 000ABC 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGCylFv */
// cM3dGCyl::~cM3dGCyl() {

View File

@ -182,8 +182,7 @@ COMPILER_STRIP_GATE(0x80C207C8, &lit_3741);
/* 80C1FA60-80C1FCCC 0000E0 026C+00 1/1 0/0 0/0 .text Check_RideOn__12daObjIce_l_cF4cXyz
*/
// float match issues
#ifdef NONMATCHING
// NONMATCHING - float match issues
int daObjIce_l_c::Check_RideOn(cXyz param_0) {
fopAc_ac_c* player_p = (fopAc_ac_c*)daPy_getPlayerActorClass();
s16 var_r29 = 0;
@ -212,11 +211,6 @@ int daObjIce_l_c::Check_RideOn(cXyz param_0) {
cLib_addCalc(&field_0x5a0, var_r29, 0.015f, 100.0f, 0.0f);
return 0;
}
#else
int daObjIce_l_c::Check_RideOn(cXyz param_0) {
// NONMATCHING
}
#endif
/* 80C1FCCC-80C1FCF8 00034C 002C+00 1/1 0/0 0/0 .text initBaseMtx__12daObjIce_l_cFv */
void daObjIce_l_c::initBaseMtx() {
@ -562,7 +556,7 @@ COMPILER_STRIP_GATE(0x80C20818, &lit_4003);
/* 80C203C4-80C206AC 000A44 02E8+00 1/0 0/0 0/0 .text Execute__12daObjIce_l_cFPPA3_A4_f
*/
#ifdef NONMATCHING
// NONMATCHING
int daObjIce_l_c::Execute(Mtx** param_0) {
daPy_py_c* player_p = daPy_getPlayerActorClass();
fopAcM_GetPosition(player_p);
@ -597,11 +591,6 @@ int daObjIce_l_c::Execute(Mtx** param_0) {
setBaseMtx();
return 1;
}
#else
int daObjIce_l_c::Execute(Mtx** param_0) {
// NONMATCHING
}
#endif
/* 80C206AC-80C20750 000D2C 00A4+00 1/0 0/0 0/0 .text Draw__12daObjIce_l_cFv */
int daObjIce_l_c::Draw() {

View File

@ -106,9 +106,8 @@ void daItem_c::setBaseMtx_1() {
/* 8015B254-8015B320 155B94 00CC+00 2/2 0/0 0/0 .text
* itemGetCoCallBack__FP10fopAc_ac_cP12dCcD_GObjInfP10fopAc_ac_cP12dCcD_GObjInf */
// matches, but pushes up weak daPy_py_c functions incorrectly
// NONMATCHING - matches, but pushes up weak daPy_py_c functions incorrectly
// might need other TUs that use daPy_py_c weaks to be finished first
#ifdef NONMATCHING
static void itemGetCoCallBack(fopAc_ac_c* i_coActorA, dCcD_GObjInf* i_coObjInfA,
fopAc_ac_c* i_coActorB, dCcD_GObjInf* i_coObjInfB) {
daItem_c* a_coActorA = (daItem_c*)i_coActorA;
@ -127,12 +126,6 @@ static void itemGetCoCallBack(fopAc_ac_c* i_coActorA, dCcD_GObjInf* i_coObjInfA,
}
}
}
#else
static void itemGetCoCallBack(fopAc_ac_c* param_0, dCcD_GObjInf* param_1, fopAc_ac_c* param_2,
dCcD_GObjInf* param_3) {
// NONMATCHING
}
#endif
/* 8015B320-8015B3D8 155C60 00B8+00 2/2 0/0 0/0 .text
* itemGetTgCallBack__FP10fopAc_ac_cP12dCcD_GObjInfP10fopAc_ac_cP12dCcD_GObjInf */

View File

@ -205,8 +205,7 @@ void dalv4CandleDemoTag_c::setBaseMtx() {
}
/* 80C5CA90-80C5CBA4 000190 0114+00 1/1 0/0 0/0 .text create__20dalv4CandleDemoTag_cFv */
// vtables need work
#ifdef NONMATCHING
// NONMATCHING - vtables need work
int dalv4CandleDemoTag_c::create() {
fopAcM_SetupActor(this, dalv4CandleDemoTag_c);
@ -230,11 +229,6 @@ int dalv4CandleDemoTag_c::create() {
return cPhs_COMPLEATE_e;
}
#else
int dalv4CandleDemoTag_c::create() {
// NONMATCHING
}
#endif
/* 80C5CBA4-80C5CBE8 0002A4 0044+00 1/1 0/0 0/0 .text Execute__20dalv4CandleDemoTag_cFv
*/

View File

@ -437,8 +437,7 @@ void daObjMasterSword_c::setAction(daObjMasterSword_c::Mode_e i_mode) {
/* 80C90F6C-80C9120C 0004EC 02A0+00 1/1 0/0 0/0 .text create_init__18daObjMasterSword_cFv
*/
// matches, but weak function emission is hella weird. cant be linked til its fixed
#ifdef NONMATCHING
// NONMATCHING - matches, but weak function emission is hella weird. cant be linked til its fixed
void daObjMasterSword_c::create_init() {
fopAcM_setCullSizeBox2(this, mpModel->getModelData());
initCollision();
@ -464,11 +463,6 @@ void daObjMasterSword_c::create_init() {
setAction(MODE_0_e);
}
#else
void daObjMasterSword_c::create_init() {
// NONMATCHING
}
#endif
/* 80C9120C-80C9127C 00078C 0070+00 3/2 0/0 0/0 .text __dt__12dBgS_ObjAcchFv */
// dBgS_ObjAcch::~dBgS_ObjAcch() {
@ -514,16 +508,10 @@ static int daObjMasterSword_Delete(daObjMasterSword_c* i_this) {
}
/* 80C91448-80C915E8 0009C8 01A0+00 1/1 0/0 0/0 .text __dt__18daObjMasterSword_cFv */
// vtables issues
#ifdef NONMATCHING
// NONMATCHING - vtables issues
daObjMasterSword_c::~daObjMasterSword_c() {
dComIfG_resDelete(&mPhase, l_arcName);
}
#else
daObjMasterSword_c::~daObjMasterSword_c() {
// NONMATCHING
}
#endif
/* ############################################################################################## */
/* 80C91960-80C91968 000020 0008+00 1/1 0/0 0/0 .rodata @4030 */

View File

@ -412,19 +412,19 @@ extern "C" void __dt__12J3DFrameCtrlFv() {
}
/* 80CF3970-80CF3A90 0006F0 0120+00 1/1 0/0 0/0 .text create__14daObjSwBallA_cFv */
#ifdef NONMATCHING
// NONMATCHING
int daObjSwBallA_c::create() {
fopAcM_SetupActor(this, daObjSwBallA_c);
if (field_0x5c4 == 0) {
field_0x5c4 = 1;
field_0x5c6 = orig.angle.x;
field_0x5c8 = orig.angle.z;
field_0x5c6 = home.angle.x;
field_0x5c8 = home.angle.z;
shape_angle.x = 0;
current.angle.x = 0;
orig.angle.x = 0;
home.angle.x = 0;
shape_angle.z = 0;
current.angle.z = 0;
orig.angle.z = 0;
home.angle.z = 0;
}
int res = dComIfG_resLoad(&field_0x57c, l_arcName);
if (res == cPhs_COMPLEATE_e) {
@ -436,11 +436,6 @@ int daObjSwBallA_c::create() {
}
return res;
}
#else
int daObjSwBallA_c::create() {
// NONMATCHING
}
#endif
/* ############################################################################################## */
/* 80CF452C-80CF4530 000024 0004+00 1/1 0/0 0/0 .bss None */

View File

@ -640,7 +640,7 @@ void daObjSwBallB_c::PutCrrPos() {
/* 80CF56A4-80CF582C 001164 0188+00 1/1 0/0 0/0 .text draw__14daObjSwBallB_cFv */
#ifdef NONMATCHING
// NONMATCHING
int daObjSwBallB_c::draw() {
g_env_light.settingTevStruct(0, &current.pos, &tevStr);
g_env_light.setLightTevColorType_MAJI(mModel, &tevStr);
@ -662,11 +662,6 @@ int daObjSwBallB_c::draw() {
dComIfGd_setList();
return 1;
}
#else
int daObjSwBallB_c::draw() {
// NONMATCHING
}
#endif
/* 80CF582C-80CF5860 0012EC 0034+00 1/1 0/0 0/0 .text _delete__14daObjSwBallB_cFv */
int daObjSwBallB_c::_delete() {

View File

@ -7,6 +7,7 @@
#include "d/d_bg_w.h"
#include "d/d_com_inf_game.h"
#include "d/d_procname.h"
#include "SSystem/SComponent/c_math.h"
#include "dol2asm.h"
//
@ -500,8 +501,7 @@ COMPILER_STRIP_GATE(0x80D415F8, &lit_4060);
#pragma pop
/* 80D410E0-80D412A0 000C60 01C0+00 1/0 0/0 0/0 .text modeBreak__12daZrTurara_cFv */
#ifdef NONMATCHING
// regalloc
// NONMATCHING - regalloc
void daZrTurara_c::modeBreak() {
cXyz scale(mScaleF, mScaleF, mScaleF);
mParticleKey = dComIfGp_particle_set(mParticleKey, 0x8a98, &current.pos, NULL, &scale);
@ -525,11 +525,6 @@ void daZrTurara_c::modeBreak() {
}
}
}
#else
void daZrTurara_c::modeBreak() {
// NONMATCHING
}
#endif
/* 80D412A0-80D412AC 000E20 000C+00 2/2 0/0 0/0 .text init_modeEnd__12daZrTurara_cFv */
void daZrTurara_c::init_modeEnd() {

View File

@ -6,6 +6,7 @@
#include "d/actor/d_a_scene_exit.h"
#include "dol2asm.h"
#include "d/d_com_inf_game.h"
#include "d/actor/d_a_player.h"
#include "m_Do/m_Do_mtx.h"
//
@ -120,9 +121,7 @@ COMPILER_STRIP_GATE(0x80485CA8, &lit_3842);
#pragma pop
/* 80485A50-80485C90 000290 0240+00 1/1 0/0 0/0 .text execute__8daScex_cFv */
// regalloc
// this matches debug but not retail :/
#ifdef NONMATCHING
// NONMATCHING - regalloc, this matches debug but not retail :/
int daScex_c::execute() {
daPy_py_c* player = daPy_getPlayerActorClass();
cXyz spC;
@ -164,11 +163,6 @@ int daScex_c::execute() {
return 1;
}
#else
int daScex_c::execute() {
// NONMATCHING
}
#endif
/* ############################################################################################## */
/* 80485CAC-80485CCC -00001 0020+00 1/0 0/0 0/0 .data l_daScex_Method */

View File

@ -64,10 +64,9 @@ inline int daSwc00_getShape(daSwc00_c* i_this) {
}
/* 805A13F8-805A15DC 000078 01E4+00 1/1 0/0 0/0 .text hitCheck__FP9daSwc00_c */
// r30 / r31 swap
#ifdef NONMATCHING
// NONMATCHING - r30 / r31 swap
static bool hitCheck(daSwc00_c* i_swc) {
fopAc_ac_c* playerAc = daPy_getPlayerActorClass();
fopAc_ac_c* playerAc = (fopAc_ac_c*)daPy_getPlayerActorClass();
fopAc_ac_c* player;
if (daSwc00_getCondition(i_swc) == 2) {
@ -105,11 +104,6 @@ static bool hitCheck(daSwc00_c* i_swc) {
return false;
}
#else
static bool hitCheck(daSwc00_c* param_0) {
// NONMATCHING
}
#endif
/* 805A15DC-805A15FC 00025C 0020+00 1/0 0/0 0/0 .text daSwc00_Execute__FP9daSwc00_c */
static int daSwc00_Execute(daSwc00_c* i_this) {

View File

@ -7,6 +7,8 @@
#include "dol2asm.h"
#include "d/d_path.h"
#include "d/d_procname.h"
#include "d/actor/d_a_player.h"
#include "d/actor/d_a_midna.h"
#include "JSystem/JKernel/JKRHeap.h"
//
@ -104,8 +106,7 @@ static int daTagWljump_Delete(daTagWljump_c* param_0) {
/* ############################################################################################## */
/* 80D65090-80D6587C 000250 07EC+00 1/1 0/0 0/0 .text execute__13daTagWljump_cFv */
// reg swap
#ifdef NONMATCHING
// NONMATCHING - reg swap
int daTagWljump_c::execute() {
attention_info.flags = 0;
if (field_0x56c[1]) {
@ -203,8 +204,8 @@ int daTagWljump_c::execute() {
if (uVar6 == field_0x5c4->m_num) {
field_0x568 = -1;
}
} else if (field_0x56b) {
field_0x56b = 0;
} else if (mNextCheckFlg) {
mNextCheckFlg = 0;
if (field_0x56a < field_0x568) {
field_0x568++;
if (field_0x5c4->m_num == field_0x568) {
@ -220,7 +221,7 @@ int daTagWljump_c::execute() {
eyePos.set(pPoint->m_position.x, pPoint->m_position.y, pPoint->m_position.z);
attention_info.position = eyePos;
attention_info.position.y += 220.0f;
field_0x5c8 = pPoint->field_0x3 * 10.0f;
mLandArea = pPoint->mArg0 * 10.0f;
if (pPoint->field_0x1 == 1) {
shape_angle.z = 1;
} else {
@ -260,109 +261,6 @@ int daTagWljump_c::execute() {
return 1;
}
#else
/* 80D658CC-80D658D0 000000 0004+00 1/1 0/0 0/0 .rodata @4044 */
SECTION_RODATA static f32 const lit_4044 = 1.0f;
COMPILER_STRIP_GATE(0x80D658CC, &lit_4044);
/* 80D658D0-80D658D4 000004 0004+00 0/1 0/0 0/0 .rodata @4045 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_4045 = -1.0f;
COMPILER_STRIP_GATE(0x80D658D0, &lit_4045);
#pragma pop
/* 80D658D4-80D658DC 000008 0004+04 0/1 0/0 0/0 .rodata @4046 */
#pragma push
#pragma force_active on
SECTION_RODATA static u8 const lit_4046[4 + 4 /* padding */] = {
0x00,
0x00,
0x00,
0x00,
/* padding */
0x00,
0x00,
0x00,
0x00,
};
COMPILER_STRIP_GATE(0x80D658D4, &lit_4046);
#pragma pop
/* 80D658DC-80D658E4 000010 0008+00 0/1 0/0 0/0 .rodata @4047 */
#pragma push
#pragma force_active on
SECTION_RODATA static u8 const lit_4047[8] = {
0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
COMPILER_STRIP_GATE(0x80D658DC, &lit_4047);
#pragma pop
/* 80D658E4-80D658EC 000018 0008+00 0/1 0/0 0/0 .rodata @4048 */
#pragma push
#pragma force_active on
SECTION_RODATA static u8 const lit_4048[8] = {
0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
COMPILER_STRIP_GATE(0x80D658E4, &lit_4048);
#pragma pop
/* 80D658EC-80D658F4 000020 0008+00 0/1 0/0 0/0 .rodata @4049 */
#pragma push
#pragma force_active on
SECTION_RODATA static u8 const lit_4049[8] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
COMPILER_STRIP_GATE(0x80D658EC, &lit_4049);
#pragma pop
/* 80D658F4-80D658F8 000028 0004+00 0/1 0/0 0/0 .rodata @4050 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_4050 = 5.0f;
COMPILER_STRIP_GATE(0x80D658F4, &lit_4050);
#pragma pop
/* 80D658F8-80D658FC 00002C 0004+00 0/1 0/0 0/0 .rodata @4051 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_4051 = 10.0f;
COMPILER_STRIP_GATE(0x80D658F8, &lit_4051);
#pragma pop
/* 80D658FC-80D65904 000030 0004+04 0/1 0/0 0/0 .rodata @4052 */
#pragma push
#pragma force_active on
SECTION_RODATA static f32 const lit_4052[1 + 1 /* padding */] = {
220.0f,
/* padding */
0.0f,
};
COMPILER_STRIP_GATE(0x80D658FC, &lit_4052);
#pragma pop
/* 80D65904-80D6590C 000038 0008+00 0/1 0/0 0/0 .rodata @4054 */
#pragma push
#pragma force_active on
SECTION_RODATA static u8 const lit_4054[8] = {
0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
};
COMPILER_STRIP_GATE(0x80D65904, &lit_4054);
#pragma pop
/* 80D6590C-80D65914 000040 0008+00 0/1 0/0 0/0 .rodata @4055 */
#pragma push
#pragma force_active on
SECTION_RODATA static u8 const lit_4055[8] = {
0x43, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
COMPILER_STRIP_GATE(0x80D6590C, &lit_4055);
#pragma pop
int daTagWljump_c::execute() {
// NONMATCHING
}
#endif
/* 80D6587C-80D6589C 000A3C 0020+00 1/0 0/0 0/0 .text daTagWljump_Execute__FP13daTagWljump_c */
static int daTagWljump_Execute(daTagWljump_c* param_0) {

View File

@ -186,8 +186,7 @@ SECTION_DEAD static char const* const stringBase_80499ACC = "F_SP127";
static s16 mangZ;
/* 80498ACC-804990DC 0000CC 0610+00 1/0 0/0 0/0 .text daVrbox2_Draw__FP12vrbox2_class */
// reg alloc
#ifdef NONMATCHING
// NONMATCHING - reg alloc
static int daVrbox2_Draw(vrbox2_class* i_this) {
cXyz sp14;
cXyz sp8;
@ -345,11 +344,6 @@ static int daVrbox2_Draw(vrbox2_class* i_this) {
return 1;
}
#else
static int daVrbox2_Draw(vrbox2_class* param_0) {
// NONMATCHING
}
#endif
/* ############################################################################################## */
/* 80499AA4-80499AA8 000038 0004+00 0/1 0/0 0/0 .rodata @4069 */
@ -415,8 +409,7 @@ SECTION_DEAD static char const* const stringBase_80499AD4 = "R_SP30";
#pragma pop
/* 804990DC-804997E8 0006DC 070C+00 1/1 0/0 0/0 .text daVrbox2_color_set__FP12vrbox2_class */
// some regalloc at the end
#ifdef NONMATCHING
// NONMATCHING - some regalloc at the end
static int daVrbox2_color_set(vrbox2_class* i_this) {
dKankyo_sun_Packet* sun_p = g_env_light.mpSunPacket;
@ -590,11 +583,6 @@ static int daVrbox2_color_set(vrbox2_class* i_this) {
return 1;
}
#else
static int daVrbox2_color_set(vrbox2_class* param_0) {
// NONMATCHING
}
#endif
/* 804997E8-8049982C 000DE8 0044+00 1/0 0/0 0/0 .text daVrbox2_Execute__FP12vrbox2_class
*/

View File

@ -1,3 +1,6 @@
#include "d/actor/d_a_grass.h"
#include "d/d_com_inf_game.h"
#include "d/actor/d_a_player.h"
#include "JSystem/J3DGraphBase/J3DDrawBuffer.h"
#include "SSystem/SComponent/c_lib.h"
#include "f_op/f_op_overlap_mng.h"
@ -23,8 +26,7 @@ void dGrass_data_c::Direction_Set(fopAc_ac_c* param_0, u32 param_1, int param_2,
/* 8051E1C8-8051EB4C 002568 0984+00 1/1 0/0 0/0 .text
* WorkAt__13dGrass_data_cFP10fopAc_ac_cUliP15dCcMassS_HitInfUs */
// literals / regswap, equivalent?
#ifdef NONMATCHING
// NONMATCHING - literals / regswap, equivalent?
void dGrass_data_c::WorkAt(fopAc_ac_c* param_0, u32 param_1, int i_roomNo, dCcMassS_HitInf* param_3,
u16 i_particleID) {
cCcD_Obj* hit_obj = param_3->GetAtHitObj();
@ -47,8 +49,8 @@ void dGrass_data_c::WorkAt(fopAc_ac_c* param_0, u32 param_1, int i_roomNo, dCcMa
WorkAt_NoCutAnim(param_0, param_1, i_roomNo, param_3, hit_obj);
return;
}
} else if (daPy_getPlayerActorClass()->getCutType() >= CUT_TYPE_NM_RIGHT &&
daPy_getPlayerActorClass()->getCutType() <= CUT_TYPE_FINISH_VERTICAL)
} else if (daPy_getPlayerActorClass()->getCutType() >= daPy_py_c::CUT_TYPE_NM_RIGHT &&
daPy_getPlayerActorClass()->getCutType() <= daPy_py_c::CUT_TYPE_FINISH_VERTICAL)
{
if (m_pos.abs(player_p->current.pos) > 158.0f) {
if (m_pos.abs(player_p->current.pos) < 200.0f) {
@ -56,22 +58,22 @@ void dGrass_data_c::WorkAt(fopAc_ac_c* param_0, u32 param_1, int i_roomNo, dCcMa
}
return;
}
} else if (daPy_getPlayerActorClass()->getCutType() == CUT_TYPE_TURN_RIGHT ||
daPy_getPlayerActorClass()->getCutType() == CUT_TYPE_TURN_LEFT)
} else if (daPy_getPlayerActorClass()->getCutType() == daPy_py_c::CUT_TYPE_TURN_RIGHT ||
daPy_getPlayerActorClass()->getCutType() == daPy_py_c::CUT_TYPE_TURN_LEFT)
{
if (m_pos.abs(player_p->current.pos) > 200.0f) {
WorkAt_NoCutAnim(param_0, param_1, i_roomNo, param_3, hit_obj);
return;
}
} else if (daPy_getPlayerActorClass()->getCutType() == CUT_TYPE_LARGE_TURN_RIGHT ||
daPy_getPlayerActorClass()->getCutType() == CUT_TYPE_LARGE_TURN_LEFT)
} else if (daPy_getPlayerActorClass()->getCutType() == daPy_py_c::CUT_TYPE_LARGE_TURN_RIGHT ||
daPy_getPlayerActorClass()->getCutType() == daPy_py_c::CUT_TYPE_LARGE_TURN_LEFT)
{
if (m_pos.abs(player_p->current.pos) > 500.0f) {
WorkAt_NoCutAnim(param_0, param_1, i_roomNo, param_3, hit_obj);
return;
}
} else if (daPy_getPlayerActorClass()->getCutType() == CUT_TYPE_NM_VERTICAL ||
daPy_getPlayerActorClass()->getCutType() == CUT_TYPE_NM_STAB)
} else if (daPy_getPlayerActorClass()->getCutType() == daPy_py_c::CUT_TYPE_NM_VERTICAL ||
daPy_getPlayerActorClass()->getCutType() == daPy_py_c::CUT_TYPE_NM_STAB)
{
if (m_pos.abs(player_p->current.pos) > 158.0f) {
return;
@ -117,12 +119,6 @@ void dGrass_data_c::WorkAt(fopAc_ac_c* param_0, u32 param_1, int i_roomNo, dCcMa
mDoAud_seStart(JA_SE_LK_CUT_GRASS, &m_pos, 0, dComIfGp_getReverb(i_roomNo));
}
}
#else
void dGrass_data_c::WorkAt(fopAc_ac_c* param_0, u32 param_1, int param_2,
dCcMassS_HitInf* param_3, u16 param_4) {
// NONMATCHING
}
#endif
/* 8051EB4C-8051EB88 002EEC 003C+00 3/3 0/0 0/0 .text __dt__5csXyzFv */
// csXyz::~csXyz() {
@ -227,8 +223,7 @@ static f32 checkGroundY(cXyz& param_0) {
}
/* 80520030-8052067C 0043D0 064C+00 1/1 0/0 0/0 .text update__15dGrass_packet_cFv */
// mostly matches except literals, some regalloc, and one out of order block
#ifdef NONMATCHING
// NONMATCHING - mostly matches except literals, some regalloc, and one out of order block
void dGrass_packet_c::update() {
static s16 mAngleZ[1500];
@ -347,11 +342,6 @@ void dGrass_packet_c::update() {
mDoLib_clipper::resetFar();
dComIfGd_getListPacket()->entryImm(this, 0);
}
#else
void dGrass_packet_c::update() {
// NONMATCHING
}
#endif
/* 8052067C-80520770 004A1C 00F4+00 1/1 0/0 0/0 .text
* setData__15dGrass_packet_cFP13dGrass_data_ciR4cXyziUcUcsUc */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -417,8 +417,7 @@ SECTION_SDATA2 static f32 lit_4278 = 4.0f / 5.0f;
SECTION_SDATA2 static f32 lit_4279 = -1.0f;
/* 80247E4C-802480F0 24278C 02A4+00 1/0 0/0 0/0 .text drawSelf__14dMsgScrnTalk_cFv */
// regalloc
#ifdef NONMATCHING
// NONMATCHING - regalloc
void dMsgScrnTalk_c::drawSelf() {
CharInfo_c* pCharInfo;
J2DGrafContext* grafContext = dComIfGp_getCurrentGrafPort();
@ -474,11 +473,6 @@ void dMsgScrnTalk_c::drawSelf() {
}
mpArrow_c->draw();
}
#else
void dMsgScrnTalk_c::drawSelf() {
// NONMATCHING
}
#endif
/* 802480F0-80248114 242A30 0024+00 1/0 0/0 0/0 .text arwAnimeInit__14dMsgScrnTalk_cFv */
void dMsgScrnTalk_c::arwAnimeInit() {

View File

@ -71,8 +71,7 @@ SECTION_SDATA2 static f32 lit_3704[1 + 1 /* padding */] = {
SECTION_SDATA2 static f64 lit_3707 = 4503601774854144.0 /* cast s32 to float */;
/* 80238CEC-8023907C 23362C 0390+00 0/0 5/5 0/0 .text setTag__10dMsgUnit_cFiiPcb */
// regalloc + mulli issue
#ifdef NONMATCHING
// NONMATCHING - regalloc + mulli issue
void dMsgUnit_c::setTag(int param_1, int param_2, char* param_3, bool param_4) {
*param_3 = 0;
if (param_1 == 0x10000) {
@ -149,11 +148,6 @@ void dMsgUnit_c::setTag(int param_1, int param_2, char* param_3, bool param_4) {
}
}
}
#else
void dMsgUnit_c::setTag(int param_0, int param_1, char* param_2, bool param_3) {
// NONMATCHING
}
#endif
/* 804510D0-804510D8 0005D0 0004+04 1/1 5/5 0/0 .sbss g_msg_unit */
dMsgUnit_c g_msg_unit;
dMsgUnit_c g_msg_unit;

View File

@ -5,6 +5,7 @@
#include "d/d_npc_lib.h"
#include "dol2asm.h"
#include "SSystem/SComponent/c_math.h"
//
// Forward References:
@ -114,8 +115,7 @@ SECTION_SDATA2 static f64 lit_3873 = 4503601774854144.0 /* cast s32 to float */;
/* 80251534-80251B60 24BE74 062C+00 0/0 0/0 2/2 .text
* action__16dNpcLib_lookat_cF4cXyz4cXyzP10fopAc_ac_cPA4_fi */
// regswap, equivalent
#ifdef NONMATCHING
// NONMATCHING - regswap, equivalent
void dNpcLib_lookat_c::action(cXyz param_0, cXyz param_1, fopAc_ac_c* param_2, Mtx param_3,
int param_4) {
cXyz spA0;
@ -190,12 +190,6 @@ void dNpcLib_lookat_c::action(cXyz param_0, cXyz param_1, fopAc_ac_c* param_2, M
field_0x64[i].z = 0;
}
}
#else
void dNpcLib_lookat_c::action(cXyz param_0, cXyz param_1, fopAc_ac_c* param_2, Mtx param_3,
int param_4) {
// NONMATCHING
}
#endif
/* 80251B60-80251B64 24C4A0 0004+00 0/0 0/0 2/2 .text dbView__16dNpcLib_lookat_cFv */
void dNpcLib_lookat_c::dbView() {}
@ -259,4 +253,4 @@ int dNpcLib_lookat_c::limitter(s16* o_value, s16 param_1, s16 param_2, s16 param
}
/* 80252094-8025217C 24C9D4 00E8+00 1/0 0/0 0/0 .text __dt__16dNpcLib_lookat_cFv */
dNpcLib_lookat_c::~dNpcLib_lookat_c() {}
dNpcLib_lookat_c::~dNpcLib_lookat_c() {}

View File

@ -16,6 +16,7 @@
#include "d/d_com_inf_game.h"
#include "dol2asm.h"
#include "dolphin/gx/GXDraw.h"
#include <dolphin/gf/GFPixel.h>
#include "global.h"
#include "m_Do/m_Do_mtx.h"
@ -209,49 +210,8 @@ void mDoExt_brkAnm::entry(J3DMaterialTable* i_matTable, f32 i_frame) {
i_matTable->entryTevRegAnimator(mpAnm);
}
/* ############################################################################################## */
/* 803A3020-803A30C0 000140 0085+1B 1/1 0/0 0/0 .data l_invisibleMat$7041 */
static u8 l_invisibleMat[133] ALIGN_DECL(32) = {
0x10, 0x00, 0x00, 0x10, 0x0E, 0x00, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00,
0x00, 0x04, 0x00, 0x61, 0x28, 0x38, 0x00, 0x00, 0x61, 0xC0, 0x08, 0xFF, 0xFC, 0x61, 0xC1,
0x08, 0xFF, 0xF0, 0x61, 0xF3, 0x7F, 0x00, 0x00, 0x61, 0x43, 0x00, 0x00, 0x41, 0x61, 0x40,
0x00, 0x00, 0x17, 0x61, 0xEE, 0x00, 0x00, 0x00, 0x61, 0xEF, 0x00, 0x00, 0x00, 0x61, 0xF0,
0x00, 0x00, 0x00, 0x61, 0xF1, 0x00, 0x00, 0x00, 0x61, 0xF2, 0x00, 0x00, 0x00, 0x61, 0x41,
0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
0x10, 0x09, 0x00, 0x00, 0x00, 0x01, 0x61, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
/* 803A30C0-803A3160 0001E0 0084+1C 1/1 0/0 0/0 .data l_matDL */
static u8 l_matDL[132] ALIGN_DECL(32) = {
0x08, 0x30, 0x3C, 0xF3, 0xCF, 0x00, 0x10, 0x00, 0x00, 0x10, 0x18, 0x3C, 0xF3, 0xCF, 0x00,
0x10, 0x00, 0x00, 0x10, 0x0E, 0x00, 0x00, 0x7F, 0x32, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00,
0x00, 0x05, 0x00, 0x10, 0x00, 0x00, 0x10, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0x61, 0x28, 0x38,
0x00, 0x00, 0x61, 0xC0, 0x28, 0xF6, 0xAF, 0x61, 0xC1, 0x08, 0xFF, 0xE0, 0x61, 0x43, 0x00,
0x00, 0x41, 0x61, 0x40, 0x00, 0x00, 0x17, 0x61, 0x41, 0x00, 0x00, 0x0C, 0x61, 0xF3, 0x7F,
0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10,
0x09, 0x00, 0x00, 0x00, 0x01, 0x61, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
/* 803A3160-803A31F0 000280 008D+03 1/1 0/0 0/0 .data l_mat1DL */
static u8 l_mat1DL[141] ALIGN_DECL(32) = {
0x10, 0x00, 0x00, 0x10, 0x40, 0xFF, 0xFF, 0x42, 0x00, 0x00, 0x00, 0x00, 0xF3, 0xCF, 0x00, 0x10,
0x00, 0x00, 0x10, 0x18, 0x3C, 0xF3, 0xCF, 0x00, 0x10, 0x00, 0x00, 0x10, 0x0E, 0x00, 0x00, 0x7F,
0x32, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x05, 0x00, 0x10, 0x00, 0x00, 0x10, 0x0C, 0xFF,
0xFF, 0xFF, 0xFF, 0x61, 0x28, 0x38, 0x00, 0x40, 0x61, 0xC0, 0x28, 0xFA, 0x8F, 0x61, 0xC1, 0x08,
0xFF, 0xF0, 0x61, 0x43, 0x00, 0x00, 0x41, 0x61, 0x40, 0x00, 0x00, 0x17, 0x61, 0x41, 0x00, 0x00,
0x0C, 0x61, 0xF3, 0x7F, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x01, 0x10,
0x00, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x01, 0x61, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
/* 8000D7DC-8000D8E4 00811C 0108+00 0/0 18/18 85/85 .text
* init__13mDoExt_bckAnmFP15J3DAnmTransformiifssb */
// NONMATCHING J3DMtxCalcAnimation inheritance
int mDoExt_bckAnm::init(J3DAnmTransform* i_bck, int i_play, int i_attr, f32 i_rate,
s16 i_startF, s16 i_endF, bool i_modify) {
JUT_ASSERT(614, (i_modify || isCurrentSolidHeap()) && i_bck != 0);
@ -1150,66 +1110,77 @@ int mDoExt_McaMorf::create(J3DModelData* modelData, mDoExt_McaMorfCallBack1_c* c
/* 80010074-8001037C 00A9B4 0308+00 1/0 0/0 0/0 .text calc__14mDoExt_McaMorfFv */
// NONMATCHING regalloc
void mDoExt_McaMorf::calc() {
if (!mpModel) {
if (mpModel == NULL) {
return;
}
u16 jntNo = getJoint()->getJntNo();
j3dSys.setCurrentMtxCalc(this);
J3DTransformInfo info1;
J3DTransformInfo* infoPtr;
Mtx sp68;
J3DTransformInfo sp48;
J3DTransformInfo sp28;
J3DTransformInfo* var_r29;
if (mpTransformInfo == NULL) {
infoPtr = &info1;
var_r29 = &sp48;
} else {
infoPtr = &mpTransformInfo[jntNo];
var_r29 = &mpTransformInfo[jntNo];
}
Quaternion quat1;
Quaternion* quatPtr;
Quaternion sp18;
Quaternion* var_r27;
if (mpQuat == NULL) {
quatPtr = &quat1;
var_r27 = &sp18;
} else {
quatPtr = &mpQuat[jntNo];
var_r27 = &mpQuat[jntNo];
}
if (!mpAnm) {
*infoPtr = mpModel->getModelData()->getJointNodePointer(jntNo)->getTransformInfo();
if (mpCallback1) {
mpCallback1->execute(jntNo, infoPtr);
if (mpAnm == NULL) {
*var_r29 = mpModel->getModelData()->getJointNodePointer(jntNo)->getTransformInfo();
if (mpCallback1 != NULL) {
mpCallback1->execute(jntNo, var_r29);
}
JMAEulerToQuat(infoPtr->mRotation.x, infoPtr->mRotation.y, infoPtr->mRotation.z, quatPtr);
J3DMtxCalcCalcTransformMaya::calcTransform(*infoPtr);
} else if (mCurMorf >= 1.0f || !mpTransformInfo || !mpQuat) {
getTransform(jntNo, infoPtr);
if (mpCallback1) {
mpCallback1->execute(jntNo, infoPtr);
JMAEulerToQuat(var_r29->mRotation.x, var_r29->mRotation.y, var_r29->mRotation.z, var_r27);
J3DMtxCalcCalcTransformMaya::calcTransform(*var_r29);
} else if (mCurMorf >= 1.0f || mpTransformInfo == NULL || mpQuat == NULL) {
getTransform(jntNo, var_r29);
if (mpCallback1 != NULL) {
mpCallback1->execute(jntNo, var_r29);
}
JMAEulerToQuat(infoPtr->mRotation.x, infoPtr->mRotation.y, infoPtr->mRotation.z, quatPtr);
J3DMtxCalcCalcTransformMaya::calcTransform(*infoPtr);
JMAEulerToQuat(var_r29->mRotation.x, var_r29->mRotation.y, var_r29->mRotation.z, var_r27);
J3DMtxCalcCalcTransformMaya::calcTransform(*var_r29);
} else {
f32 f31;
f32 var_f31;
if (field_0x52) {
f31 = 1.0f;
var_f31 = 1.0f;
} else {
f31 = (mCurMorf - mPrevMorf) / (1.0f - mPrevMorf);
var_f31 = (mCurMorf - mPrevMorf) / (1.0f - mPrevMorf);
}
f32 f30 = 1.0f - f31;
J3DTransformInfo info2;
Quaternion quat2;
getTransform(jntNo, &info2);
if (mpCallback1) {
mpCallback1->execute(jntNo, &info2);
f32 var_f30 = 1.0f - var_f31;
Quaternion sp8;
getTransform(jntNo, &sp28);
if (mpCallback1 != NULL) {
mpCallback1->execute(jntNo, &sp28);
}
JMAEulerToQuat(info2.mRotation.x, info2.mRotation.y, info2.mRotation.z, &quat2);
JMAQuatLerp(quatPtr, &quat2, f31, quatPtr);
Mtx mtx;
mDoMtx_quat(mtx, quatPtr);
infoPtr->mTranslate.x = infoPtr->mTranslate.x * f30 + info2.mTranslate.x * f31;
infoPtr->mTranslate.y = infoPtr->mTranslate.y * f30 + info2.mTranslate.y * f31;
infoPtr->mTranslate.z = infoPtr->mTranslate.z * f30 + info2.mTranslate.z * f31;
infoPtr->mScale.x = infoPtr->mScale.x * f30 + info2.mScale.x * f31;
infoPtr->mScale.y = infoPtr->mScale.y * f30 + info2.mScale.y * f31;
infoPtr->mScale.z = infoPtr->mScale.z * f30 + info2.mScale.z * f31;
mDoExt_setJ3DData(mtx, infoPtr, jntNo);
JMAEulerToQuat(sp28.mRotation.x, sp28.mRotation.y, sp28.mRotation.z, &sp8);
JMAQuatLerp(var_r27, &sp8, var_f31, var_r27);
mDoMtx_quat(sp68, var_r27);
var_r29->mTranslate.x = var_r29->mTranslate.x * var_f30 + sp28.mTranslate.x * var_f31;
var_r29->mTranslate.y = var_r29->mTranslate.y * var_f30 + sp28.mTranslate.y * var_f31;
var_r29->mTranslate.z = var_r29->mTranslate.z * var_f30 + sp28.mTranslate.z * var_f31;
var_r29->mScale.x = var_r29->mScale.x * var_f30 + sp28.mScale.x * var_f31;
var_r29->mScale.y = var_r29->mScale.y * var_f30 + sp28.mScale.y * var_f31;
var_r29->mScale.z = var_r29->mScale.z * var_f30 + sp28.mScale.z * var_f31;
mDoExt_setJ3DData(sp68, var_r29, jntNo);
}
if (mpCallback2) {
if (mpCallback2 != NULL) {
mpCallback2->execute(jntNo);
}
}
@ -1631,11 +1602,72 @@ mDoExt_McaMorf2::~mDoExt_McaMorf2() {
/* 80011464-800116B4 00BDA4 0250+00 1/1 0/0 0/0 .text
* create__15mDoExt_McaMorf2FP12J3DModelDataP25mDoExt_McaMorfCallBack1_cP25mDoExt_McaMorfCallBack2_cP15J3DAnmTransformP15J3DAnmTransformifiiP10Z2CreatureUlUl
*/
void mDoExt_McaMorf2::create(J3DModelData* param_0, mDoExt_McaMorfCallBack1_c* param_1,
int mDoExt_McaMorf2::create(J3DModelData* param_0, mDoExt_McaMorfCallBack1_c* param_1,
mDoExt_McaMorfCallBack2_c* param_2, J3DAnmTransform* param_3,
J3DAnmTransform* param_4, int param_5, f32 param_6, int param_7,
int param_8, Z2Creature* param_9, u32 param_10, u32 param_11) {
// NONMATCHING
mpModel = NULL;
mpTransformInfo = NULL;
mpQuat = NULL;
mpSound = NULL;
if (param_0 == NULL) {
return 0;
}
if (param_0->getMaterialNodePointer(0)->getSharedDisplayListObj() != NULL && param_10 == 0) {
if (param_0->isLocked()) {
param_10 = 0x20000;
} else {
param_10 = 0x80000;
}
}
mpModel = mDoExt_J3DModel__create(param_0, param_10, param_11);
if (mpModel == NULL) {
return 0;
}
if (param_10 != 0x80000) {
mDoExt_changeMaterial(mpModel);
}
mpSound = param_9;
setAnm(param_3, param_4, 0.0f, param_5, 0.0f, param_6, param_7, param_8);
mPrevMorf = -1.0f;
mpTransformInfo = new J3DTransformInfo[param_0->getJointNum()];
if (mpTransformInfo == NULL) {
ERROR_EXIT();
return 0;
}
mpQuat = new Quaternion[param_0->getJointNum()];
if (mpQuat == NULL) {
ERROR_EXIT();
return 0;
}
J3DTransformInfo* var_r29 = mpTransformInfo;
Quaternion* var_r26 = mpQuat;
J3DModelData* model_data = mpModel->getModelData();
int sp3C = model_data->getJointNum();
for (int i = 0; i < sp3C; i++) {
J3DJoint* sp30 = model_data->getJointNodePointer(i);
J3DTransformInfo* sp2C = &sp30->getTransformInfo();
*var_r29 = *sp2C;
JMAEulerToQuat(var_r29->mRotation.x, var_r29->mRotation.y, var_r29->mRotation.z, var_r26);
var_r29++;
var_r26++;
}
mpCallback1 = param_1;
mpCallback2 = param_2;
return 1;
}
/* 800116B4-800116F4 00BFF4 0040+00 1/1 0/0 0/0 .text ERROR_EXIT__15mDoExt_McaMorf2Fv */
@ -1654,15 +1686,217 @@ void mDoExt_McaMorf2::ERROR_EXIT() {
}
/* 800116F4-80011D70 00C034 067C+00 1/0 0/0 0/0 .text calc__15mDoExt_McaMorf2Fv */
// NONMATCHING - float regswap, equivalent
void mDoExt_McaMorf2::calc() {
// NONMATCHING
if (mpModel != NULL) {
u16 jnt_no = J3DMtxCalc::getJoint()->getJntNo();
j3dSys.setCurrentMtxCalc(this);
J3DTransformInfo spF0[2];
Mtx spC0;
J3DTransformInfo spA0;
J3DTransformInfo sp80;
J3DTransformInfo* var_r30;
if (mpTransformInfo == NULL) {
var_r30 = &spA0;
} else {
var_r30 = &mpTransformInfo[jnt_no];
}
Quaternion sp60[2];
Quaternion sp40[2];
Quaternion sp30;
Quaternion sp20;
Quaternion* var_r27;
if (mpQuat == NULL) {
var_r27 = &sp30;
} else {
var_r27 = &mpQuat[jnt_no];
}
if (mpAnm == NULL) {
*var_r30 = mpModel->getModelData()->getJointNodePointer(jnt_no)->getTransformInfo();
if (mpCallback1 != NULL) {
mpCallback1->execute(jnt_no, var_r30);
}
JMAEulerToQuat(var_r30->mRotation.x, var_r30->mRotation.y, var_r30->mRotation.z,
var_r27);
J3DMtxCalcCalcTransformMaya::calcTransform(*var_r30);
} else if (mCurMorf >= 1.0f || mpTransformInfo == NULL || mpQuat == NULL) {
mpAnm->getTransform(jnt_no, &spF0[0]);
if (field_0x40 == NULL) {
if (mpCallback1 != NULL) {
mpCallback1->execute(jnt_no, &spF0[0]);
}
JMAEulerToQuat(spF0[0].mRotation.x, spF0[0].mRotation.y, spF0[0].mRotation.z,
var_r27);
J3DMtxCalcCalcTransformMaya::calcTransform(spF0[0]);
*var_r30 = spF0[0];
} else {
field_0x40->getTransform(jnt_no, &spF0[1]);
f32 sp1C;
f32 sp18;
sp18 = 1.0f - field_0x44;
sp1C = field_0x44;
var_r30->mScale.x = spF0[0].mScale.x * sp18
+ spF0[1].mScale.x * sp1C;
var_r30->mScale.y = spF0[0].mScale.y * sp18
+ spF0[1].mScale.y * sp1C;
var_r30->mScale.z = spF0[0].mScale.z * sp18
+ spF0[1].mScale.z * sp1C;
var_r30->mTranslate.x = spF0[0].mTranslate.x * sp18
+ spF0[1].mTranslate.x * sp1C;
var_r30->mTranslate.y = spF0[0].mTranslate.y * sp18
+ spF0[1].mTranslate.y * sp1C;
var_r30->mTranslate.z = spF0[0].mTranslate.z * sp18
+ spF0[1].mTranslate.z * sp1C;
for (int i = 0; i < 2; i++) {
JMAEulerToQuat(spF0[i].mRotation.x, spF0[i].mRotation.y, spF0[i].mRotation.z, &sp60[i]);
}
f32 var_f29 = sp1C / (sp18 + sp1C);
JMAQuatLerp(&sp60[0], &sp60[1], var_f29, var_r27);
mDoMtx_quat(spC0, var_r27);
mDoExt_setJ3DData(spC0, var_r30, jnt_no);
}
} else if (field_0x40 == NULL) {
f32 var_f31 = (mCurMorf - mPrevMorf) / (1.0f - mPrevMorf);
f32 var_f30 = 1.0f - var_f31;
mpAnm->getTransform(jnt_no, &sp80);
if (mpCallback1 != NULL) {
mpCallback1->execute(jnt_no, &sp80);
}
JMAEulerToQuat(sp80.mRotation.x, sp80.mRotation.y, sp80.mRotation.z, &sp20);
JMAQuatLerp(var_r27, &sp20, var_f31, var_r27);
mDoMtx_quat(spC0, var_r27);
var_r30->mTranslate.x = var_r30->mTranslate.x * var_f30
+ sp80.mTranslate.x * var_f31;
var_r30->mTranslate.y = var_r30->mTranslate.y * var_f30
+ sp80.mTranslate.y * var_f31;
var_r30->mTranslate.z = var_r30->mTranslate.z * var_f30
+ sp80.mTranslate.z * var_f31;
var_r30->mScale.x = var_r30->mScale.x * var_f30
+ sp80.mScale.x * var_f31;
var_r30->mScale.y = var_r30->mScale.y * var_f30
+ sp80.mScale.y * var_f31;
var_r30->mScale.z = var_r30->mScale.z * var_f30
+ sp80.mScale.z * var_f31;
mDoExt_setJ3DData(spC0, var_r30, jnt_no);
} else {
mpAnm->getTransform(jnt_no, &spF0[0]);
field_0x40->getTransform(jnt_no, &spF0[1]);
f32 sp14, sp10;
sp10 = 1.0f - field_0x44;
sp14 = field_0x44;
sp80.mScale.x = spF0[0].mScale.x * sp10
+ spF0[1].mScale.x * sp14;
sp80.mScale.y = spF0[0].mScale.y * sp10
+ spF0[1].mScale.y * sp14;
sp80.mScale.z = spF0[0].mScale.z * sp10
+ spF0[1].mScale.z * sp14;
sp80.mTranslate.x = spF0[0].mTranslate.x * sp10
+ spF0[1].mTranslate.x * sp14;
sp80.mTranslate.y = spF0[0].mTranslate.y * sp10
+ spF0[1].mTranslate.y * sp14;
sp80.mTranslate.z = spF0[0].mTranslate.z * sp10
+ spF0[1].mTranslate.z * sp14;
for (int i = 0; i < 2; i++) {
JMAEulerToQuat(spF0[i].mRotation.x, spF0[i].mRotation.y, spF0[i].mRotation.z, &sp40[i]);
}
f32 var_f31 = sp14 / (sp10 + sp14);
JMAQuatLerp(&sp40[0], &sp40[1], var_f31, &sp20);
var_f31 = (mCurMorf - mPrevMorf) / (1.0f - mPrevMorf);
f32 var_f30 = 1.0f - var_f31;
JMAQuatLerp(var_r27, &sp20, var_f31, var_r27);
var_r30->mTranslate.x = var_r30->mTranslate.x * var_f30
+ sp80.mTranslate.x * var_f31;
var_r30->mTranslate.y = var_r30->mTranslate.y * var_f30
+ sp80.mTranslate.y * var_f31;
var_r30->mTranslate.z = var_r30->mTranslate.z * var_f30
+ sp80.mTranslate.z * var_f31;
var_r30->mScale.x = var_r30->mScale.x * var_f30
+ sp80.mScale.x * var_f31;
var_r30->mScale.y = var_r30->mScale.y * var_f30
+ sp80.mScale.y * var_f31;
var_r30->mScale.z = var_r30->mScale.z * var_f30
+ sp80.mScale.z * var_f31;
mDoMtx_quat(spC0, var_r27);
mDoExt_setJ3DData(spC0, var_r30, jnt_no);
}
if (mpCallback2 != NULL) {
mpCallback2->execute(jnt_no);
}
}
}
/* 80011D70-80011FCC 00C6B0 025C+00 1/1 0/0 2/2 .text
* setAnm__15mDoExt_McaMorf2FP15J3DAnmTransformP15J3DAnmTransformfiffff */
void mDoExt_McaMorf2::setAnm(J3DAnmTransform* param_0, J3DAnmTransform* param_1, f32 param_2,
int param_3, f32 param_4, f32 param_5, f32 param_6, f32 param_7) {
// NONMATCHING
int i_attr, f32 i_morf, f32 i_speed, f32 i_start, f32 i_end) {
mpAnm = param_0;
field_0x40 = param_1;
field_0x44 = param_2;
setStartFrame(i_start);
if (i_end < 0.0f) {
if (mpAnm == NULL) {
mFrameCtrl.init(0);
} else {
mFrameCtrl.init(mpAnm->getFrameMax());
}
} else {
mFrameCtrl.init(i_end);
}
if (i_attr < 0) {
i_attr = param_0->getAttribute();
}
setPlayMode(i_attr);
setPlaySpeed(i_speed);
if (i_speed >= 0.0f) {
setFrame(i_start);
} else {
setFrame(mFrameCtrl.getEnd());
}
setLoopFrame(getFrame());
setMorf(i_morf);
if (mpSound != NULL) {
if (param_2 < 0.5f) {
mpBas = ((mDoExt_transAnmBas*)param_0)->getBas();
} else {
mpBas = ((mDoExt_transAnmBas*)param_1)->getBas();
}
if (mpBas != NULL) {
mpSound->initAnime(mpBas, getPlaySpeed() >= 0.0f, getLoopFrame(), getFrame());
}
}
}
/* 80011FCC-800120A0 00C90C 00D4+00 0/0 0/0 2/2 .text setAnmRate__15mDoExt_McaMorf2Ff */
@ -1735,26 +1969,187 @@ void mDoExt_McaMorf2::stopZelAnime() {
}
/* 80012220-800123D0 00CB60 01B0+00 1/0 0/0 0/0 .text draw__19mDoExt_invJntPacketFv */
// void mDoExt_invJntPacket::draw() {
extern "C" void draw__19mDoExt_invJntPacketFv() {
// NONMATCHING
void mDoExt_invJntPacket::draw() {
J3DShape::resetVcdVatCache();
if (field_0x16) {
J3DModelData* sp20 = field_0x10->getModelData();
J3DJoint* sp1C = sp20->getJointNodePointer(field_0x14);
for (J3DMaterial* mesh = sp1C->getMesh(); mesh != NULL; mesh = mesh->getNext()) {
mesh->load();
J3DMatPacket* sp18 = field_0x10->getMatPacket(mesh->getIndex());
sp18->callDL();
GFSetZMode(1, GX_LEQUAL, 1);
GFSetBlendModeEtc(GX_BM_NONE, GX_BL_ZERO, GX_BL_ZERO, GX_LO_CLEAR, 0, 0, 1);
J3DShapePacket* shapePkt = sp18->getShapePacket();
JUT_ASSERT(0x1393, shapePkt != 0);
shapePkt->getShape()->loadPreDrawSetting();
do {
if (!shapePkt->getShape()->checkFlag(1)) {
if (shapePkt->getDisplayListObj() != NULL) {
shapePkt->getDisplayListObj()->callDL();
}
shapePkt->drawFast();
}
shapePkt = (J3DShapePacket*)shapePkt->getNextPacket();
} while (shapePkt != NULL);
}
} else {
static u8 l_invisibleMat[] ALIGN_DECL(32) = {
0x10, 0x00, 0x00, 0x10, 0x0E, 0x00, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00,
0x00, 0x04, 0x00, 0x61, 0x28, 0x38, 0x00, 0x00, 0x61, 0xC0, 0x08, 0xFF, 0xFC, 0x61, 0xC1,
0x08, 0xFF, 0xF0, 0x61, 0xF3, 0x7F, 0x00, 0x00, 0x61, 0x43, 0x00, 0x00, 0x41, 0x61, 0x40,
0x00, 0x00, 0x17, 0x61, 0xEE, 0x00, 0x00, 0x00, 0x61, 0xEF, 0x00, 0x00, 0x00, 0x61, 0xF0,
0x00, 0x00, 0x00, 0x61, 0xF1, 0x00, 0x00, 0x00, 0x61, 0xF2, 0x00, 0x00, 0x00, 0x61, 0x41,
0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
0x10, 0x09, 0x00, 0x00, 0x00, 0x01, 0x61, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
GXCallDisplayList(l_invisibleMat, 0x80);
J3DModelData* sp14 = field_0x10->getModelData();
J3DJoint* sp10 = sp14->getJointNodePointer(field_0x14);
J3DMaterial* mesh = sp10->getMesh();
sp14->getShapeNodePointer(0)->loadPreDrawSetting();
for (; mesh != NULL; mesh = mesh->getNext()) {
J3DShape* spC = mesh->getShape();
if (!spC->checkFlag(1)) {
J3DShapePacket* shapePkt = field_0x10->getShapePacket(spC->getIndex());
shapePkt->drawFast();
}
}
}
J3DShape::resetVcdVatCache();
GFSetBlendModeEtc(GX_BM_NONE, GX_BL_ZERO, GX_BL_ZERO, GX_LO_CLEAR, 1, 0, 1);
}
/* 800123D0-800125DC 00CD10 020C+00 2/2 0/0 0/0 .text init__15mDoExt_3Dline_cFUsii */
void mDoExt_3Dline_c::init(u16 param_0, int param_1, int param_2) {
// NONMATCHING
// NONMATCHING - regalloc, probably some types are wrong
int mDoExt_3Dline_c::init(u16 param_0, int param_1, int param_2) {
field_0x0 = new cXyz[param_0];
if (field_0x0 == NULL) {
return 0;
}
if (param_1 != 0) {
field_0x4 = new f32[param_1];
if (field_0x4 == NULL) {
return 0;
}
} else {
field_0x4 = NULL;
}
int sp20 = param_0 * 2;
field_0x8 = new cXyz[sp20];
if (field_0x8 == NULL) {
return 0;
}
field_0xc = new cXyz[sp20];
if (field_0xc == NULL) {
return 0;
}
field_0x10 = new u8[param_0 * 3];
if (field_0x10 == NULL) {
return 0;
}
field_0x14 = new u8[param_0 * 3];
if (field_0x14 == NULL) {
return 0;
}
if (param_2 != 0) {
field_0x18 = new f32[sp20];
if (field_0x18 == NULL) {
return 0;
}
field_0x1c = new f32[sp20];
if (field_0x1c == NULL) {
return 0;
}
f32* var_r28 = field_0x18;
f32* var_r27 = field_0x1c;
for (int i = 0; i < param_0; i++) {
var_r28[0] = 0.0f;
var_r27[0] = 0.0f;
var_r28[2] = 1.0f;
var_r27[2] = 1.0f;
var_r28 += 4;
var_r27 += 4;
}
}
return 1;
}
/* 800125E0-800126BC 00CF20 00DC+00 0/0 0/0 12/12 .text init__19mDoExt_3DlineMat0_cFUsUsi
*/
int mDoExt_3DlineMat0_c::init(u16 param_0, u16 param_1, int param_2) {
// NONMATCHING
field_0x10 = param_0;
field_0x12 = param_1;
field_0x18 = new mDoExt_3Dline_c[param_0];
if (field_0x18 == NULL) {
return 0;
}
for (int i = 0; i < param_0; i++) {
if (!field_0x18[i].init(param_1, param_2, 0)) {
return 0;
}
}
field_0x4 = NULL;
field_0x16 = 0;
return 1;
}
/* 800126BC-800126C0 00CFFC 0004+00 2/2 0/0 0/0 .text __ct__15mDoExt_3Dline_cFv */
mDoExt_3Dline_c::mDoExt_3Dline_c() {
/* empty function */
}
mDoExt_3Dline_c::mDoExt_3Dline_c() {}
/* 803A30C0-803A3160 0001E0 0084+1C 1/1 0/0 0/0 .data l_matDL */
static u8 l_matDL[132] ALIGN_DECL(32) = {
0x08, 0x30, 0x3C, 0xF3, 0xCF, 0x00, 0x10, 0x00, 0x00, 0x10, 0x18, 0x3C, 0xF3, 0xCF, 0x00,
0x10, 0x00, 0x00, 0x10, 0x0E, 0x00, 0x00, 0x7F, 0x32, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00,
0x00, 0x05, 0x00, 0x10, 0x00, 0x00, 0x10, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0x61, 0x28, 0x38,
0x00, 0x00, 0x61, 0xC0, 0x28, 0xF6, 0xAF, 0x61, 0xC1, 0x08, 0xFF, 0xE0, 0x61, 0x43, 0x00,
0x00, 0x41, 0x61, 0x40, 0x00, 0x00, 0x17, 0x61, 0x41, 0x00, 0x00, 0x0C, 0x61, 0xF3, 0x7F,
0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10,
0x09, 0x00, 0x00, 0x00, 0x01, 0x61, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
/* 803A3160-803A31F0 000280 008D+03 1/1 0/0 0/0 .data l_mat1DL */
static u8 l_mat1DL[141] ALIGN_DECL(32) = {
0x10, 0x00, 0x00, 0x10, 0x40, 0xFF, 0xFF, 0x42, 0x00, 0x00, 0x00, 0x00, 0xF3, 0xCF, 0x00, 0x10,
0x00, 0x00, 0x10, 0x18, 0x3C, 0xF3, 0xCF, 0x00, 0x10, 0x00, 0x00, 0x10, 0x0E, 0x00, 0x00, 0x7F,
0x32, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x05, 0x00, 0x10, 0x00, 0x00, 0x10, 0x0C, 0xFF,
0xFF, 0xFF, 0xFF, 0x61, 0x28, 0x38, 0x00, 0x40, 0x61, 0xC0, 0x28, 0xFA, 0x8F, 0x61, 0xC1, 0x08,
0xFF, 0xF0, 0x61, 0x43, 0x00, 0x00, 0x41, 0x61, 0x40, 0x00, 0x00, 0x17, 0x61, 0x41, 0x00, 0x00,
0x0C, 0x61, 0xF3, 0x7F, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x01, 0x10,
0x00, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x01, 0x61, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
/* 800126C0-80012774 00D000 00B4+00 1/0 0/0 0/0 .text setMaterial__19mDoExt_3DlineMat0_cFv */
void mDoExt_3DlineMat0_c::setMaterial() {
@ -1773,21 +2168,151 @@ void mDoExt_3DlineMat0_c::setMaterial() {
}
/* 80012774-80012874 00D0B4 0100+00 1/0 0/0 0/0 .text draw__19mDoExt_3DlineMat0_cFv */
// NONMATCHING - issues with the iterators
void mDoExt_3DlineMat0_c::draw() {
// NONMATCHING
GXSetTevColor(GX_TEVREG2, field_0x8);
if (field_0xc != NULL) {
dKy_Global_amb_set(field_0xc);
}
mDoExt_3Dline_c* var_r28 = field_0x18;
int var_r26 = (field_0x14 & 0x7FFF) << 1;
for (int i = 0; i < field_0x10; i++) {
GXSetArray(GX_VA_POS, var_r28[field_0x16].field_0x8, sizeof(cXyz));
GXSetArray(GX_VA_NRM, var_r28[field_0x16].field_0x10, 3);
GXBegin(GX_TRIANGLESTRIP, GX_VTXFMT0, var_r26);
for (u16 j = 0; j < (u16)var_r26;) {
GXPosition1x16(j);
GXNormal1x16(j);
j++;
GXPosition1x16(j);
GXNormal1x16(j);
j++;
}
GXEnd();
var_r28++;
}
field_0x16 ^= 1;
}
/* 80012874-80012E3C 00D1B4 05C8+00 0/0 0/0 2/2 .text
* update__19mDoExt_3DlineMat0_cFifR8_GXColorUsP12dKy_tevstr_c */
void mDoExt_3DlineMat0_c::update(int param_0, f32 param_1, _GXColor& param_2, u16 param_3,
void mDoExt_3DlineMat0_c::update(int param_0, f32 param_1, GXColor& param_2, u16 param_3,
dKy_tevstr_c* param_4) {
// NONMATCHING
}
/* 80012E3C-80013360 00D77C 0524+00 0/0 0/0 9/9 .text
* update__19mDoExt_3DlineMat0_cFiR8_GXColorP12dKy_tevstr_c */
void mDoExt_3DlineMat0_c::update(int param_0, _GXColor& param_1, dKy_tevstr_c* param_2) {
// NONMATCHING
// NONMATCHING
void mDoExt_3DlineMat0_c::update(int param_0, GXColor& param_1, dKy_tevstr_c* param_2) {
field_0x8 = param_1;
field_0xc = param_2;
if (param_0 < 0) {
field_0x14 = field_0x12;
} else if (param_0 > field_0x12) {
field_0x14 = field_0x12;
} else {
field_0x14 = param_0;
}
view_class* view_p = dComIfGd_getView();
mDoExt_3Dline_c* sp30 = field_0x18;
int sp2C = field_0x14 * 2;
int sp28 = field_0x14 * 12;
cXyz sp134;
cXyz sp128;
cXyz sp11C;
cXyz sp110;
for (int i = 0; i < field_0x10; i++) {
cXyz* pos_p = sp30->field_0x0;
f32* size_p = sp30->field_0x4;
JUT_ASSERT(0x1545, size_p != 0);
cXyz* sp20 = &sp30->field_0x8[field_0x16];
cXyz* sp24 = sp20;
u8* sp1C = &sp30->field_0x10[field_0x16];
u8* var_r30 = sp1C;
u8* var_r29 = var_r30 + 3;
sp128 = pos_p[1] - pos_p[0];
sp134 = pos_p[0] - view_p->lookat.eye;
sp128 = sp128.outprod(sp134);
sp128.normalizeZP();
var_r30[0] = sp128.x * 64.0f;
var_r30[1] = sp128.y * 64.0f;
var_r30[2] = sp128.z * 64.0f;
var_r29[0] = -sp1C[0];
var_r29[1] = -sp1C[1];
var_r29[2] = -sp1C[2];
sp128 *= *size_p;
sp20[0] = pos_p[0] + sp128;
sp20[1] = pos_p[0] - sp128;
pos_p++;
sp11C = pos_p[0] + sp128;
sp110 = pos_p[0] - sp128;
for (int sp10 = field_0x14 - 2; sp10 > 0; sp10--) {
sp128 = pos_p[1] - pos_p[0];
sp134 = pos_p[0] - view_p->lookat.eye;
sp128 = sp128.outprod(sp134);
sp128.normalizeZP();
var_r30 += 6;
var_r29 += 6;
var_r30[0] = sp128.x * 64.0f;
var_r30[1] = sp128.y * 64.0f;
var_r30[2] = sp128.z * 64.0f;
var_r29[0] = -sp1C[0];
var_r29[1] = -sp1C[1];
var_r29[2] = -sp1C[2];
sp128 *= *size_p;
sp11C += pos_p[0] + sp128;
sp110 += pos_p[0] - sp128;
*sp24 = sp11C * 0.5f;
*sp20 = sp110 * 0.5f;
pos_p++;
sp11C = pos_p[0] + sp128;
sp110 = pos_p[0] - sp128;
}
var_r29 += 3;
var_r29[0] = var_r30[0];
var_r29[1] = var_r30[1];
var_r29[2] = var_r30[2];
var_r30 += 3;
var_r29 += 3;
var_r29[0] = var_r30[0];
var_r29[1] = var_r30[1];
var_r29[2] = var_r30[2];
*sp24 = sp11C;
*sp20 = sp110;
DCStoreRangeNoSync(sp20, sp2C);
DCStoreRangeNoSync(sp1C, sp28);
}
}
/* 80013360-800134F8 00DCA0 0198+00 0/0 0/0 19/19 .text init__19mDoExt_3DlineMat1_cFUsUsP7ResTIMGi
@ -1849,6 +2374,7 @@ void mDoExt_3DlineMatSortPacket::draw() {
J3DShape::resetVcdVatCache();
}
#ifdef DEBUG
void drawCube(MtxP mtx, cXyz* pos, const GXColor& color) {
GXSetArray(GX_VA_POS, pos, sizeof(cXyz));
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
@ -1940,6 +2466,7 @@ void mDoExt_cylinderPacket::draw() {
GXSetCurrentMtx(0);
GXDrawCylinder(8);
}
#endif
/* 80014804-8001494C 00F144 0148+00 3/3 0/0 0/0 .text
* mDoExt_initFontCommon__FPP7JUTFontPP7ResFONTP7JKRHeapPCcP10JKRArchiveUcUlUl */