diff options
| author | TakaRikka <takarikka@outlook.com> | 2022-06-01 03:49:32 -0700 |
|---|---|---|
| committer | TakaRikka <takarikka@outlook.com> | 2022-06-01 03:49:32 -0700 |
| commit | 3f22fa448376893fffd83815ecd4cdccb197f1a4 (patch) | |
| tree | ee4fc3c63d8d1d36d5705c7d75a6ba3c47c6549c /include | |
| parent | 36e62e0b80225b6ef6cbe6a7322397899d3a0ffd (diff) | |
m_Do / d_a_npc work
Diffstat (limited to 'include')
38 files changed, 403 insertions, 88 deletions
diff --git a/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h b/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h index f3c349f72a..db9a5184a6 100644 --- a/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h +++ b/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h @@ -114,6 +114,8 @@ private: class J3DMaterialAnm { public: + J3DMaterialAnm() { initialize(); } + /* 8032C320 */ void initialize(); /* 8032C5A4 */ void setMatColorAnm(int, J3DMatColorAnm*); /* 8032C5E4 */ void setTexMtxAnm(int, J3DTexMtxAnm*); diff --git a/include/JSystem/J3DGraphBase/J3DPacket.h b/include/JSystem/J3DGraphBase/J3DPacket.h index 14ed0fb5f4..6552c461af 100644 --- a/include/JSystem/J3DGraphBase/J3DPacket.h +++ b/include/JSystem/J3DGraphBase/J3DPacket.h @@ -64,6 +64,8 @@ public: mpFirstChild = NULL; } + void setUserArea(u32 area) { mpUserData = (void*)area; } + virtual bool entry(J3DDrawBuffer*); virtual void draw(); virtual ~J3DPacket() {} diff --git a/include/JSystem/JAudio2/JASDvdThread.h b/include/JSystem/JAudio2/JASDvdThread.h index 5496d6ec04..779461a72f 100644 --- a/include/JSystem/JAudio2/JASDvdThread.h +++ b/include/JSystem/JAudio2/JASDvdThread.h @@ -2,5 +2,14 @@ #define JASDVDTHREAD_H #include "dolphin/types.h" +#include "JSystem/JAudio2/JASTaskThread.h" + +class JASDvd { +public: + /* 8028FEFC */ static JASTaskThread* getThreadPointer(); + /* 8028FF04 */ void createThread(s32, int, u32); + + static JASTaskThread* sThread; +}; #endif /* JASDVDTHREAD_H */ diff --git a/include/JSystem/JAudio2/JASTaskThread.h b/include/JSystem/JAudio2/JASTaskThread.h index b8cecabc6a..82f9a9f2ac 100644 --- a/include/JSystem/JAudio2/JASTaskThread.h +++ b/include/JSystem/JAudio2/JASTaskThread.h @@ -2,5 +2,22 @@ #define JASTASKTHREAD_H #include "dolphin/types.h" +#include "JSystem/JKernel/JKRThread.h" + +class JASTaskThread : public JKRThread { +public: + /* 8028F6C4 */ JASTaskThread(int, int, u32); + /* 8028F9EC */ void allocCallStack(void (*)(void*), void*); + /* 8028F850 */ void allocCallStack(void (*)(void*), void const*, u32); + /* 8028FC54 */ void sendCmdMsg(void (*)(void*), void*); + /* 8028FB5C */ void sendCmdMsg(void (*)(void*), void const*, u32); + /* 8028FE88 */ void pause(bool); + + /* 8028F724 */ virtual ~JASTaskThread(); + /* 8028FD4C */ virtual void run(); + + /* 0x7C */ OSThreadQueue* mpThreadQueue; + /* 0x84 */ bool field_0x84; +}; #endif /* JASTASKTHREAD_H */ diff --git a/include/JSystem/JKernel/JKRAssertHeap.h b/include/JSystem/JKernel/JKRAssertHeap.h index e285ea9f99..58c4345d5c 100644 --- a/include/JSystem/JKernel/JKRAssertHeap.h +++ b/include/JSystem/JKernel/JKRAssertHeap.h @@ -25,7 +25,7 @@ public: /* vt[16] */ virtual s32 do_getFreeSize(void); /* override */ /* vt[17] */ virtual void* do_getMaxFreeBlock(void); /* override */ /* vt[18] */ virtual s32 do_getTotalFreeSize(void); /* override */ - /* vt[19] */ virtual u8 do_changeGroupID(u8 param_1); /* override */ + /* vt[19] */ virtual s32 do_changeGroupID(u8 param_1); /* override */ /* vt[20] */ virtual u8 do_getCurrentGroupId(void); /* override */ public: diff --git a/include/JSystem/JKernel/JKRExpHeap.h b/include/JSystem/JKernel/JKRExpHeap.h index d2e93baa53..257e0bfc4b 100644 --- a/include/JSystem/JKernel/JKRExpHeap.h +++ b/include/JSystem/JKernel/JKRExpHeap.h @@ -73,7 +73,7 @@ public: /* vt[16] */ virtual s32 do_getFreeSize(); /* override */ /* vt[17] */ virtual void* do_getMaxFreeBlock(); /* override */ /* vt[18] */ virtual s32 do_getTotalFreeSize(); /* override */ - /* vt[19] */ virtual u8 do_changeGroupID(u8 newGroupID); /* override */ + /* vt[19] */ virtual s32 do_changeGroupID(u8 newGroupID); /* override */ /* vt[20] */ virtual u8 do_getCurrentGroupId(); /* override */ /* vt[21] */ virtual void state_register(JKRHeap::TState*, u32) const; /* override */ /* vt[22] */ virtual bool state_compare(JKRHeap::TState const&, diff --git a/include/JSystem/JKernel/JKRHeap.h b/include/JSystem/JKernel/JKRHeap.h index f2194cb7a8..d0f0fc9c0d 100644 --- a/include/JSystem/JKernel/JKRHeap.h +++ b/include/JSystem/JKernel/JKRHeap.h @@ -43,7 +43,7 @@ public: s32 getFreeSize(); void* getMaxFreeBlock(); s32 getTotalFreeSize(); - u8 changeGroupID(u8 newGroupId); + s32 changeGroupID(u8 newGroupId); u32 getMaxAllocatableSize(int alignment); JKRHeap* find(void* ptr) const; @@ -73,7 +73,7 @@ public: /* vt[16] */ virtual s32 do_getFreeSize() = 0; /* vt[17] */ virtual void* do_getMaxFreeBlock() = 0; /* vt[18] */ virtual s32 do_getTotalFreeSize() = 0; - /* vt[19] */ virtual u8 do_changeGroupID(u8 newGroupID); + /* vt[19] */ virtual s32 do_changeGroupID(u8 newGroupID); /* vt[20] */ virtual u8 do_getCurrentGroupId(); /* vt[21] */ virtual void state_register(JKRHeap::TState*, unsigned long) const; /* vt[22] */ virtual bool state_compare(JKRHeap::TState const&, JKRHeap::TState const&) const; diff --git a/include/JSystem/JParticle/JPAParticle.h b/include/JSystem/JParticle/JPAParticle.h index ae0a07b8b2..2c50176b8a 100644 --- a/include/JSystem/JParticle/JPAParticle.h +++ b/include/JSystem/JParticle/JPAParticle.h @@ -287,6 +287,7 @@ public: class JPAParticleCallBack { public: + JPAParticleCallBack() {} virtual ~JPAParticleCallBack(); virtual void execute(JPABaseEmitter*, JPABaseParticle*); virtual void draw(JPABaseEmitter*, JPABaseParticle*); diff --git a/include/JSystem/JUtility/JUTReport.h b/include/JSystem/JUtility/JUTReport.h index 9fd63ad99b..f38f31706a 100644 --- a/include/JSystem/JUtility/JUTReport.h +++ b/include/JSystem/JUtility/JUTReport.h @@ -1,7 +1,7 @@ #ifndef JSYSTEM_JUTILITY_JUTREPORT_H #define JSYSTEM_JUTILITY_JUTREPORT_H -void JUTReport(int, int, const char*, ...); -void JUTReport(int, int, int, const char*, ...); +void JUTReport(int x_pos, int y_pos, const char* str, ...); +void JUTReport(int x_pos, int y_pos, int, const char* str, ...); #endif
\ No newline at end of file diff --git a/include/Z2AudioLib/Z2AudioMgr.h b/include/Z2AudioLib/Z2AudioMgr.h index 11e9446f36..9e3b540cc1 100644 --- a/include/Z2AudioLib/Z2AudioMgr.h +++ b/include/Z2AudioLib/Z2AudioMgr.h @@ -38,11 +38,7 @@ public: /* 0x04A4 */ Z2SceneMgr mSceneMgr; /* 0x04C4 */ Z2StatusMgr mStatusMgr; /* 0x04F4 */ Z2SoundObjMgr mSoundObjMgr; - - /* 0x0514 */ /* virtual */ void startSound(JAISoundID, JAISoundHandle*, - JGeometry::TVec3<f32> const*); - /* 0x0514 */ void* vtable; // remove later - + /* 0x0514 */ virtual void startSound(JAISoundID, JAISoundHandle*, JGeometry::TVec3<f32> const*); /* 0x0518 */ bool mResettingFlag; /* 0x0519 */ bool field_0x519; /* 0x051C */ JASAudioReseter mAudioReseter; diff --git a/include/Z2AudioLib/Z2WolfHowlMgr.h b/include/Z2AudioLib/Z2WolfHowlMgr.h index df241f8be4..0efc431339 100644 --- a/include/Z2AudioLib/Z2WolfHowlMgr.h +++ b/include/Z2AudioLib/Z2WolfHowlMgr.h @@ -4,18 +4,29 @@ #include "Z2AudioLib/Z2SoundObject.h" #include "dolphin/types.h" -struct Z2WolfHowlData {}; +/* + * Z2WolfHowlData + * mLineNum: Number of lines/points within the song + * mSongData: u16 array which corresponds to each line/point + * + * The high byte of each u16 line corresponds to bar type (low, middle, high) + * The low byte of each u16 line corresponds to length of note + */ +struct Z2WolfHowlData { + u8 mLineNum; + u16* mSongData; +}; class Z2WolfHowlMgr { public: Z2WolfHowlMgr(); void resetState(); - void calcVolumeMod(float); + void calcVolumeMod(f32); void getNowPitch(); void getNowInputValue(); - void calcPitchMod(float, float); - void startWolfHowlSound(float, float, bool, float); + void calcPitchMod(f32, f32); + void startWolfHowlSound(f32, f32, bool, f32); void setCorrectData(s8, Z2WolfHowlData*); void getCorrectLine(u8); void getCorrectLineNum(); @@ -29,37 +40,37 @@ private: /* 0x00 */ JAISoundHandle* field_0x00; /* 0x04 */ JAISoundHandle* field_0x04; /* 0x08 */ JAISoundHandle* field_0x08; - /* 0x0C */ Z2WolfHowlData* field_0x0c; - /* 0x10 */ void* field_0x10; - /* 0x14 */ float mNowInputValue; - /* 0x18 */ float field_0x18; - /* 0x1C */ float field_0x1c; - /* 0x20 */ float field_0x20; - /* 0x24 */ float field_0x24; - /* 0x28 */ float field_0x28; + /* 0x0C */ Z2WolfHowlData* mpCurSong; + /* 0x10 */ Z2WolfHowlData** mpSongList; + /* 0x14 */ f32 mNowInputValue; + /* 0x18 */ f32 field_0x18; + /* 0x1C */ f32 field_0x1c; + /* 0x20 */ f32 field_0x20; + /* 0x24 */ f32 field_0x24; + /* 0x28 */ f32 field_0x28; /* 0x2C */ u8 field_0x2c[4]; - /* 0x30 */ float field_0x30; - /* 0x34 */ float field_0x34; - /* 0x38 */ float field_0x38; - /* 0x3C */ float field_0x3c; - /* 0x40 */ float field_0x40; - /* 0x44 */ float field_0x44; - /* 0x48 */ float field_0x48; - /* 0x4C */ float field_0x4c; - /* 0x50 */ float field_0x50; - /* 0x54 */ float field_0x54; - /* 0x58 */ float field_0x58; - /* 0x5C */ float field_0x5c; - /* 0x60 */ float field_0x60; - /* 0x64 */ float field_0x64; - /* 0x68 */ float field_0x68; - /* 0x6C */ float field_0x6c; - /* 0x70 */ float field_0x70; - /* 0x74 */ float field_0x74; - /* 0x78 */ float field_0x78; - /* 0x7C */ float field_0x7c; - /* 0x80 */ float field_0x80; - /* 0x84 */ float field_0x84; + /* 0x30 */ f32 field_0x30; + /* 0x34 */ f32 field_0x34; + /* 0x38 */ f32 field_0x38; + /* 0x3C */ f32 field_0x3c; + /* 0x40 */ f32 field_0x40; + /* 0x44 */ f32 field_0x44; + /* 0x48 */ f32 field_0x48; + /* 0x4C */ f32 field_0x4c; + /* 0x50 */ f32 field_0x50; + /* 0x54 */ f32 field_0x54; + /* 0x58 */ f32 field_0x58; + /* 0x5C */ f32 field_0x5c; + /* 0x60 */ f32 field_0x60; + /* 0x64 */ f32 field_0x64; + /* 0x68 */ f32 field_0x68; + /* 0x6C */ f32 field_0x6c; + /* 0x70 */ f32 field_0x70; + /* 0x74 */ f32 field_0x74; + /* 0x78 */ f32 field_0x78; + /* 0x7C */ f32 field_0x7c; + /* 0x80 */ f32 field_0x80; + /* 0x84 */ f32 field_0x84; /* 0x88 */ void* mTimer; /* 0x8C */ u8 mReleaseTimer; /* 0x8D */ u8 field_0x8d; diff --git a/include/d/a/d_a_alink.h b/include/d/a/d_a_alink.h index f8921292ec..a1dc780d0f 100644 --- a/include/d/a/d_a_alink.h +++ b/include/d/a/d_a_alink.h @@ -33,6 +33,7 @@ class J2DAnmBase; class daAlink_lockCursor_c : public dDlst_base_c { public: + daAlink_lockCursor_c() {} /* 80125F14 */ BOOL create(); /* 80126358 */ void update(); /* 80126424 */ virtual void draw(); @@ -64,6 +65,7 @@ private: class daAlink_sight_c : public daPy_sightPacket_c { public: + daAlink_sight_c() {} /* 80126650 */ bool create(); /* 80126710 */ void onLockFlg(); @@ -78,6 +80,7 @@ private: class daAlink_blur_c : public J3DPacket { public: + daAlink_blur_c() {} /* 801256EC */ void initBlur(f32, int, cXyz const*, cXyz const*, cXyz const*); /* 8012589C */ void copyBlur(cXyz const*, cXyz const*, cXyz const*); /* 80125B0C */ void traceBlur(cXyz const*, cXyz const*, s16); @@ -100,9 +103,16 @@ private: class dAlink_bottleWaterPcallBack_c : public JPAParticleCallBack { public: + dAlink_bottleWaterPcallBack_c() { initialize(0.0f); } /* 80124A2C */ virtual void execute(JPABaseEmitter*, JPABaseParticle*); /* 800CFCF8 */ virtual ~dAlink_bottleWaterPcallBack_c(); + void initialize(f32 minY) { + mHitFlg = 0; + mAppearFlg = 0; + mKeepMinY = minY; + } + private: /* 0x04 */ s16 mHitFlg; /* 0x06 */ s16 mAppearFlg; @@ -127,6 +137,8 @@ STATIC_ASSERT(sizeof(daAlink_footData_c) == 0xA4); class daAlink_matAnm_c : public J3DMaterialAnm { public: + daAlink_matAnm_c() { init(); } + /* 8009D8E4 */ void init(); /* 800D0180 */ void offSetFlg(); @@ -423,9 +435,10 @@ public: class hsChainShape_c : public J3DPacket { public: + hsChainShape_c() {} /* 80107900 */ virtual void draw(); /* 800D0CDC */ virtual ~hsChainShape_c(); - }; + }; // Size: 0x10 /* 8009D87C */ bool getE3Zhint(); /* 8009D884 */ char* getAlinkArcName(); @@ -574,7 +587,7 @@ public: /* 800B21EC */ BOOL checkSlope() const; /* 800B25CC */ BOOL itemTriggerCheck(u8); /* 800B25E8 */ BOOL itemButtonCheck(u8); - /* 800B2604 */ void itemButton(); + /* 800B2604 */ BOOL itemButton(); /* 800B2634 */ void itemTrigger(); /* 800B2664 */ void spActionButton(); /* 800B2688 */ void spActionTrigger(); @@ -702,7 +715,7 @@ public: /* 800BFDB0 */ BOOL checkZoraWearAbility() const; /* 800BFDFC */ BOOL checkMagicArmorWearAbility() const; /* 800BFE48 */ J3DModelData* loadAramBmd(u16, u32); - /* 800BFF04 */ void loadAram(u16, u32); + /* 800BFF04 */ void* loadAram(u16, u32); /* 800BFF70 */ J3DAnmTevRegKey* loadAramItemBrk(u16, J3DModel*); /* 800BFFCC */ void loadAramItemBtk(u16, J3DModel*); /* 800C0028 */ void loadAramItemBtp(u16, J3DModel*); @@ -1567,21 +1580,21 @@ public: /* 80107744 */ void procBoardCutTurn(); /* 801083C8 */ void hookshotAtHitCallBack(dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*); /* 801086DC */ void resetHookshotMode(); - /* 8010871C */ void setEnemyBombHookshot(fopAc_ac_c*); - /* 80108784 */ void checkLv7BossRoom(); - /* 801087B0 */ void checkHookshotStickBG(cBgS_PolyInfo&); + /* 8010871C */ bool setEnemyBombHookshot(fopAc_ac_c*); + /* 80108784 */ bool checkLv7BossRoom(); + /* 801087B0 */ bool checkHookshotStickBG(cBgS_PolyInfo&); /* 80108828 */ void cancelHookshotCarry(); /* 80108864 */ void changeHookshotDrawModel(); - /* 801088A0 */ void checkHookshotRoofLv7Boss(); - /* 801088C8 */ void checkChaseHookshot(); - /* 80108980 */ void checkOctaIealSpecialCollect(); - /* 801089E8 */ void checkBossOctaIealRoom(); - /* 80108A18 */ void checkHookshotWait() const; + /* 801088A0 */ BOOL checkHookshotRoofLv7Boss(); + /* 801088C8 */ BOOL checkChaseHookshot(); + /* 80108980 */ BOOL checkOctaIealSpecialCollect(); + /* 801089E8 */ BOOL checkBossOctaIealRoom(); + /* 80108A18 */ BOOL checkHookshotWait() const; /* 80108A3C */ void setHookshotCatchNow(); /* 80108B34 */ void setHookshotModel(); /* 80108DB4 */ void setHookshotSight(); /* 80108EEC */ void cancelHookshotShot(); - /* 80108F64 */ void cancelHookshotMove(); + /* 80108F64 */ bool cancelHookshotMove(); /* 8010903C */ void checkHookshotReadyMaterialOffMode() const; /* 80109070 */ void setHookshotReadyMaterial(); /* 801090EC */ void initHookshotUpperAnimeSpeed(int); @@ -2269,7 +2282,7 @@ public: virtual s16 getGiantPuzzleAimAngle() const; virtual void setGoronSideMove(fopAc_ac_c*); virtual void setCargoCarry(fopAc_ac_c*); - virtual bool getHookshotTopPos(); + virtual cXyz* getHookshotTopPos(); virtual bool checkHookshotReturnMode() const; virtual bool checkHookshotShootReturnMode() const; virtual bool checkOctaIealHang() const; @@ -2427,7 +2440,12 @@ private: /* 0x0072C */ J3DAnmBase* field_0x072c; /* 0x00730 */ mDoExt_bckAnm field_0x730; /* 0x0074C */ mDoExt_bckAnm field_0x74C; - /* 0x00768 */ u8 field_0x0768[0x5C]; + /* 0x00768 */ J3DModelData* field_0x0768; + /* 0x0076C */ Z2SoundObjSimple* field_0x076c; + /* 0x00770 */ hsChainShape_c* field_0x770; + /* 0x00774 */ u8 field_0x0774[0x77C - 0x774]; + /* 0x0077C */ dBgS_ObjLinChk* mpHookshotLinChk; + /* 0x00780 */ u8 field_0x780[0x7C4 - 0x780]; /* 0x007C4 */ daPy_actorKeep_c mWolfLockAcKeep[10]; /* 0x00814 */ dCcD_Stts field_0x814; /* 0x00850 */ dCcD_Cyl field_0x850[3]; @@ -2467,7 +2485,7 @@ private: /* 0x02118 */ daPy_anmHeap_c mAnmHeap5; /* 0x0212C */ daPy_anmHeap_c mAnmHeap6; /* 0x02140 */ daPy_anmHeap_c mAnmHeap7; - /* 0x02154 */ mDoExt_bckAnm field_0x2154; + /* 0x02154 */ mDoExt_bckAnm field_0x2154; // issue here? /* 0x02170 */ u8 field_0x2170[0x18]; /* 0x02188 */ dEyeHL_c mEyeHL1; /* 0x0219C */ dEyeHL_c mEyeHL2; @@ -2644,7 +2662,7 @@ private: /* 0x03014 */ s16 mFallVoiceInit; /* 0x03016 */ u8 field_0x3016[2]; /* 0x03018 */ s16 field_0x3018; - /* 0x0301A */ s16 field_0x301a; + /* 0x0301A */ s16 mHookshotMode; /* 0x0301C */ s16 field_0x301c; /* 0x0301E */ s16 field_0x301e; /* 0x03020 */ s16 field_0x3020; @@ -2950,7 +2968,7 @@ private: /* 0x037C8 */ cXyz field_0x37c8; /* 0x037D4 */ cXyz field_0x37d4; /* 0x037E0 */ cXyz field_0x37e0; - /* 0x037EC */ cXyz field_0x37ec; + /* 0x037EC */ cXyz mHookshotTopPos; /* 0x037F8 */ cXyz field_0x37f8; /* 0x03804 */ cXyz field_0x3804; /* 0x03810 */ cXyz field_0x3810; diff --git a/include/d/a/d_a_npc.h b/include/d/a/d_a_npc.h index bbafedf42d..18b6946743 100644 --- a/include/d/a/d_a_npc.h +++ b/include/d/a/d_a_npc.h @@ -332,4 +332,190 @@ public: STATIC_ASSERT(sizeof(daNpcT_c) == 0xE40); +class daNpcF_ActorMngr_c { +private: + /* 0x0 */ u32 mActorID; + +public: + /* 801506B0 */ void initialize(); + /* 801506D8 */ void entry(unsigned int); + /* 801506BC */ void entry(fopAc_ac_c*); + /* 801506E0 */ void remove(); + /* 801506EC */ void getActorP(); + + /* 80155E40 */ virtual ~daNpcF_ActorMngr_c(); +}; + +class daNpcF_c : public fopAc_ac_c { +private: + /* 0x568 */ mDoExt_McaMorfSO* mMcaMorf; + /* 0x56C */ mDoExt_bckAnm mBckAnm; + /* 0x588 */ mDoExt_btpAnm mBtpAnm; + /* 0x5A0 */ mDoExt_btkAnm mBtkAnm; + /* 0x5B8 */ mDoExt_brkAnm mBrkAnm; + /* 0x5D0 */ dBgS_ObjAcch field_0x5d0; + /* 0x7A8 */ dCcD_Stts field_0x7a8; + /* 0x7E4 */ dBgS_AcchCir field_0x7e4; + /* 0x824 */ daNpcF_ActorMngr_c field_0x824; + /* 0x82C */ daNpcF_ActorMngr_c field_0x82c[5]; + /* 0x854 */ cXyz field_0x854[3]; + /* 0x878 */ cXyz field_0x878; + /* 0x884 */ cXyz field_0x884; + /* 0x890 */ cXyz field_0x890; + /* 0x89C */ cXyz field_0x89c; + /* 0x8A8 */ cXyz field_0x8a8; + /* 0x8B4 */ cXyz field_0x8b4; + /* 0x8C0 */ cXyz field_0x8c0; + /* 0x8CC */ cXyz field_0x8cc; + /* 0x8D8 */ cXyz field_0x8d8; + /* 0x8E4 */ cXyz field_0x8e4; + /* 0x8F0 */ csXyz field_0x8f0; + /* 0x8F6 */ csXyz field_0x8f6; + /* 0x8FC */ csXyz field_0x8fc; + /* 0x902 */ csXyz field_0x902; + /* 0x908 */ csXyz field_0x908[3]; + /* 0x91A */ csXyz field_0x91a[3]; + /* 0x92C */ int field_0x92c; + /* 0x930 */ u32 field_0x930; + /* 0x934 */ u32 field_0x934; + /* 0x938 */ u32 field_0x938; + /* 0x93C */ u32 field_0x93c[5]; + /* 0x950 */ int field_0x950; + /* 0x954 */ int field_0x954; + /* 0x958 */ int field_0x958; + /* 0x95C */ int field_0x95c; + /* 0x960 */ int field_0x960; + /* 0x964 */ int field_0x964; + /* 0x968 */ int field_0x968; + /* 0x96C */ int field_0x96c; + /* 0x970 */ f32 field_0x970; + /* 0x974 */ f32 field_0x974; + /* 0x978 */ f32 field_0x978; + /* 0x97C */ f32 field_0x97c; + /* 0x980 */ f32 field_0x980; + /* 0x984 */ f32 field_0x984[3]; + /* 0x990 */ u16 field_0x990; + /* 0x990 */ u16 field_0x992; + /* 0x990 */ u16 field_0x994; + /* 0x990 */ u16 field_0x996; + /* 0x998 */ u16 field_0x998; + /* 0x99C */ u32 field_0x99c; + /* 0x9A0 */ u32 field_0x9a0; + /* 0x9A4 */ int field_0x9a4; + /* 0x9A8 */ int field_0x9a8; + /* 0x9AC */ int field_0x9ac; + /* 0x9B0 */ u32 field_0x9b0; + /* 0x9B4 */ int mFlowNodeNo; + /* 0x9B8 */ cXyz field_0x9b8; + /* 0x9C4 */ cXyz field_0x9c4; + /* 0x9D0 */ u16 field_0x9d0; + /* 0x9D2 */ u16 field_0x9d2; + /* 0x9D4 */ u16 field_0x9d4; + /* 0x9D6 */ u16 field_0x9d6; + /* 0x9D8 */ u16 field_0x9d8; + /* 0x9DA */ u16 field_0x9da; + /* 0x9DC */ u16 field_0x9dc; + /* 0x9DE */ u16 field_0x9de; + /* 0x9E0 */ u16 field_0x9e0; + /* 0x9E2 */ u16 field_0x9e2; + /* 0x9E4 */ u16 field_0x9e4; + /* 0x9E6 */ u16 field_0x9e6; + /* 0x9E8 */ u8 field_0x9e8; + /* 0x9E9 */ u8 field_0x9e9; + /* 0x9EA */ u8 field_0x9ea; + /* 0x9EB */ u8 field_0x9eb; + /* 0x9EC */ u8 field_0x9ec; + /* 0x9ED */ u8 field_0x9ed; + /* 0x9EE */ u8 field_0x9ee; + /* 0x9EF */ u8 field_0x9ef; + /* 0x9F0 */ u8 field_0x9f0; + /* 0x9F1 */ u8 field_0x9f1; + /* 0x9F2 */ bool mHide; + /* 0x9f3 */ u8 field_0x9f3; + /* 0x9F4 */ u8 field_0x9f4; + /* 0x9F5 */ u8 field_0x9f5; + /* 0x9F6 */ u8 field_0x9f6; + /* 0x9F8 */ dMsgFlow_c field_0x9f8; + /* 0xA44 */ cBgS_GndChk field_0xa44; + /* 0xA80 */ dBgS_GndChk field_0xa80; + /* 0xAD4 */ dBgS_LinChk field_0xad4; + +public: + struct daNpcF_anmPlayData {}; + + /* 80152014 */ void execute(); + /* 801522AC */ void draw(int, int, f32, _GXColorS10*, int); + /* 80152614 */ void tgHitCallBack(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*); + /* 80152654 */ void srchAttnActor1(void*, void*); + /* 801526E8 */ void srchActor(void*, void*); + + /* 801528C8 */ void initialize(); + /* 80152B2C */ void getTrnsfrmKeyAnmP(char*, int); + /* 80152B68 */ void getTexPtrnAnmP(char*, int); + /* 80152BA4 */ void getTexSRTKeyAnmP(char*, int); + /* 80152BE0 */ void getTevRegKeyAnmP(char*, int); + /* 80152C1C */ void setMcaMorfAnm(J3DAnmTransformKey*, f32, f32, int, int, int); + /* 80152C80 */ void setBckAnm(J3DAnmTransform*, f32, int, int, int, bool); + /* 80152CC4 */ void setBtpAnm(J3DAnmTexPattern*, J3DModelData*, f32, int); + /* 80152D04 */ void setBtkAnm(J3DAnmTextureSRTKey*, J3DModelData*, f32, int); + /* 80152D44 */ void setBrkAnm(J3DAnmTevRegKey*, J3DModelData*, f32, int); + /* 80152D84 */ void setEnvTevColor(); + /* 80152DE0 */ void setRoomNo(); + /* 80152E24 */ void chkEndAnm(f32); + /* 80152EC4 */ void chkEndAnm(J3DFrameCtrl*, f32); + /* 80152F40 */ void playAllAnm(); + /* 80153150 */ void playExpressionAnm(daNpcF_c::daNpcF_anmPlayData***); + /* 80153264 */ void playMotionAnm(daNpcF_c::daNpcF_anmPlayData***); + /* 8015337C */ void setLookatMtx(int, int*, f32); + /* 80153578 */ void hitChk2(dCcD_Cyl*, int, int); + /* 80153658 */ void setDamage(int, int, int); + /* 80153718 */ void ctrlMsgAnm(int&, int&, fopAc_ac_c*, int); + /* 8015387C */ void orderEvent(int, char*, u16, u16, u8, u16); + /* 80153954 */ void changeEvent(char*, char*, u16, u16); + /* 801539F0 */ void chkActorInSight(fopAc_ac_c*, f32); + /* 80153A78 */ void chkActorInArea(fopAc_ac_c*, cXyz, cXyz, s16); + /* 80153BDC */ void chkActorInAttnArea(fopAc_ac_c*, fopAc_ac_c*, int); + /* 80153D1C */ void initTalk(int, fopAc_ac_c**); + /* 80153D84 */ void talkProc(int*, int, fopAc_ac_c**); + /* 80153EF4 */ void turn(s16, f32, int); + /* 801540A4 */ void step(s16, int, int, int); + /* 80154250 */ void setAngle(s16); + /* 80154278 */ void getDistTableIdx(int, int); + /* 801542A0 */ void getEvtAreaTagP(int, int); + /* 8015436C */ void getAttnActorP(int, void* (*)(void*, void*), f32, f32, f32, f32, s16, int, + int); + /* 80154730 */ void chkActorInSight2(fopAc_ac_c*, f32, s16); + /* 80154834 */ void chkPointInArea(cXyz, cXyz, f32, f32, f32, s16); + /* 801548F4 */ void chkPointInArea(cXyz, cXyz, cXyz, s16); + /* 8015496C */ void getAttentionPos(fopAc_ac_c*); + /* 801549E0 */ void chkFindPlayer2(int, s16); + /* 80154BD8 */ void setHitodamaPrtcl(); + + /* 80155BF4 */ virtual ~daNpcF_c(); + /* 80155BC8 */ virtual void setParam(); + /* 80155BC0 */ virtual bool main(); + /* 80155BD8 */ virtual bool ctrlBtk(); + /* 80155BBC */ virtual void adjustShapeAngle(); + /* 8015276C */ virtual void setMtx(); + /* 801527FC */ virtual void setMtx2(); + /* 80155BB8 */ virtual void setAttnPos(); + /* 80155BB4 */ virtual void setCollisions(); + /* 80155BE0 */ virtual bool setExpressionAnm(int, bool); + /* 80155EC8 */ virtual bool setExpressionBtp(int); + /* 80155BF0 */ virtual void setExpression(int, f32); + /* 80155BE8 */ virtual void setMotionAnm(int, f32); + /* 80155BEC */ virtual void setMotion(int, f32, int); + /* 80155BD0 */ virtual bool drawDbgInfo(); + /* 80155BCC */ virtual void drawOtherMdls(); + + static u8 const mCcDObjInfo[48]; + static u8 mCcDCyl[68]; + static u8 mCcDSph[64]; + static u8 mFindActorPList[400]; + static u8 mFindCount[4]; + static u8 mSrchActorName[2 + 2 /* padding */]; +}; + +STATIC_ASSERT(sizeof(daNpcF_c) == 0xB48); + #endif /* D_A_D_A_NPC_H */ diff --git a/include/d/a/d_a_player.h b/include/d/a/d_a_player.h index e731cd5086..491c90d572 100644 --- a/include/d/a/d_a_player.h +++ b/include/d/a/d_a_player.h @@ -13,6 +13,7 @@ class daPy_sightPacket_c : public dDlst_base_c { public: + daPy_sightPacket_c() {} /* 8015F1A0 */ virtual void draw(); /* 80140CDC */ virtual ~daPy_sightPacket_c(); @@ -48,6 +49,10 @@ public: enum daAlinkHEAP_TYPE {}; /* 80140DCC */ void __defctor(); + daPy_anmHeap_c() { + __defctor(); + } + daPy_anmHeap_c(u32); ~daPy_anmHeap_c(); void initData(); @@ -480,7 +485,7 @@ public: virtual void setGoronSideMove(fopAc_ac_c*); virtual void setCargoCarry(fopAc_ac_c*); virtual bool getDpdFarFlg() const; - virtual bool getHookshotTopPos(); + virtual cXyz* getHookshotTopPos(); virtual bool checkHookshotReturnMode() const; virtual bool checkHookshotShootReturnMode() const; virtual bool checkOctaIealHang() const; diff --git a/include/d/bg/d_bg_s.h b/include/d/bg/d_bg_s.h index 62219f8cf6..5d9565e561 100644 --- a/include/d/bg/d_bg_s.h +++ b/include/d/bg/d_bg_s.h @@ -91,7 +91,7 @@ public: u32 ChkGrpInf(cBgS_PolyInfo const&, u32); s32 GetRoomId(cBgS_PolyInfo const&); bool GetPolyAttackThrough(cBgS_PolyInfo const&); - bool ChkPolyHSStick(cBgS_PolyInfo const&); + u32 ChkPolyHSStick(cBgS_PolyInfo const&); void WallCorrect(dBgS_Acch*); void WallCorrectSort(dBgS_Acch*); f32 RoofChk(dBgS_RoofChk*); diff --git a/include/d/bg/d_bg_s_acch.h b/include/d/bg/d_bg_s_acch.h index e07a458783..7d14297fd1 100644 --- a/include/d/bg/d_bg_s_acch.h +++ b/include/d/bg/d_bg_s_acch.h @@ -180,6 +180,9 @@ public: }; class dBgS_LinkAcch : public dBgS_Acch { +public: + dBgS_LinkAcch() { SetLink(); } + /* 80140F30 */ virtual ~dBgS_LinkAcch(); }; diff --git a/include/d/bg/d_bg_s_gnd_chk.h b/include/d/bg/d_bg_s_gnd_chk.h index 5087082ca8..bc17ae7176 100644 --- a/include/d/bg/d_bg_s_gnd_chk.h +++ b/include/d/bg/d_bg_s_gnd_chk.h @@ -13,6 +13,7 @@ public: class dBgS_LinkGndChk : public dBgS_GndChk { public: + dBgS_LinkGndChk() { SetLink(); } /* 80140EB8 */ virtual ~dBgS_LinkGndChk(); }; diff --git a/include/d/bg/d_bg_s_grp_pass_chk.h b/include/d/bg/d_bg_s_grp_pass_chk.h index 5d426af4cc..6b9c2b8a66 100644 --- a/include/d/bg/d_bg_s_grp_pass_chk.h +++ b/include/d/bg/d_bg_s_grp_pass_chk.h @@ -8,7 +8,8 @@ class dBgS_GrpPassChk : public cBgS_GrpPassChk { public: enum { /* 0x1 */ NORMAL_GRP = 1, - /* 0x2 */ WATER_GRP + /* 0x2 */ WATER_GRP, + /* 0x3 */ FULL_GRP }; /* 80077BA0 */ dBgS_GrpPassChk(); @@ -19,6 +20,7 @@ public: void OnSpl() { mGrp |= WATER_GRP; } void OnNormalGrp() { mGrp |= NORMAL_GRP; } void OffNormalGrp() { mGrp &= ~NORMAL_GRP; } + void OffFullGrp() { mGrp &= ~FULL_GRP; } private: /* 0x4 */ u32 mGrp; diff --git a/include/d/bg/d_bg_s_roof_chk.h b/include/d/bg/d_bg_s_roof_chk.h index 78a4e64f33..0b1558fba0 100644 --- a/include/d/bg/d_bg_s_roof_chk.h +++ b/include/d/bg/d_bg_s_roof_chk.h @@ -24,8 +24,9 @@ private: /* 0x4C */ f32 mNowY; }; // Size: 0x50 -class dBgS_LinkRoofChk : dBgS_RoofChk { +class dBgS_LinkRoofChk : public dBgS_RoofChk { public: + dBgS_LinkRoofChk() { SetLink(); } /* 80140E40 */ virtual ~dBgS_LinkRoofChk(); }; diff --git a/include/d/bg/d_bg_w.h b/include/d/bg/d_bg_w.h index 02d8cf7287..d2d37fab17 100644 --- a/include/d/bg/d_bg_w.h +++ b/include/d/bg/d_bg_w.h @@ -117,7 +117,7 @@ public: virtual void GetPolyCamThrough(int) = 0; virtual void GetPolyLinkThrough(int) = 0; virtual void GetPolyArrowThrough(int) = 0; - virtual bool GetPolyHSStick(int) = 0; + virtual u32 GetPolyHSStick(int) = 0; virtual void GetPolyBoomerangThrough(int) = 0; virtual void GetPolyRopeThrough(int) = 0; virtual void GetPolyBombThrough(int) = 0; @@ -216,7 +216,7 @@ public: /* 8007B504 */ virtual void GetPolyCamThrough(int); /* 8007B52C */ virtual void GetPolyLinkThrough(int); /* 8007B550 */ virtual void GetPolyArrowThrough(int); - /* 8007B574 */ virtual bool GetPolyHSStick(int); + /* 8007B574 */ virtual u32 GetPolyHSStick(int); /* 8007B598 */ virtual void GetPolyBoomerangThrough(int); /* 8007B5BC */ virtual void GetPolyRopeThrough(int); /* 8007B5E0 */ virtual void GetPolyBombThrough(int); diff --git a/include/d/bg/d_bg_w_base.h b/include/d/bg/d_bg_w_base.h index d2797f66fc..5da858ca4f 100644 --- a/include/d/bg/d_bg_w_base.h +++ b/include/d/bg/d_bg_w_base.h @@ -57,7 +57,7 @@ public: virtual void GetPolyCamThrough(int) = 0; virtual void GetPolyLinkThrough(int) = 0; virtual void GetPolyArrowThrough(int) = 0; - virtual bool GetPolyHSStick(int) = 0; + virtual u32 GetPolyHSStick(int) = 0; virtual void GetPolyBoomerangThrough(int) = 0; virtual void GetPolyRopeThrough(int) = 0; virtual void GetPolyBombThrough(int) = 0; @@ -88,6 +88,7 @@ public: u8 GetRoomId() { return m_roomId; } bool chkStickWall() { return field_0xb & 1; } bool chkStickRoof() { return field_0xb & 2; } + bool ChkPushPullOk() const { return m_pushPull_Ok; } private: /* 0x08 */ u8 m_priority; diff --git a/include/d/bg/d_bg_w_kcol.h b/include/d/bg/d_bg_w_kcol.h index 4fd7aa108d..93a055df04 100644 --- a/include/d/bg/d_bg_w_kcol.h +++ b/include/d/bg/d_bg_w_kcol.h @@ -53,7 +53,7 @@ public: /* 80082B98 */ virtual void GetPolyCamThrough(int); /* 80082BC4 */ virtual void GetPolyLinkThrough(int); /* 80082BF0 */ virtual void GetPolyArrowThrough(int); - /* 80082C1C */ virtual void GetPolyHSStick(int); + /* 80082C1C */ virtual u32 GetPolyHSStick(int); /* 80082C48 */ virtual void GetPolyBoomerangThrough(int); /* 80082C74 */ virtual void GetPolyRopeThrough(int); /* 80082CA0 */ virtual void GetPolyBombThrough(int); diff --git a/include/d/com/d_com_inf_game.h b/include/d/com/d_com_inf_game.h index a71bec6eba..f4ea443233 100644 --- a/include/d/com/d_com_inf_game.h +++ b/include/d/com/d_com_inf_game.h @@ -1357,6 +1357,10 @@ inline void dComIfGs_setNoFile(u8 file) { g_dComIfG_gameInfo.info.setNoFile(file); } +inline void* dComIfGs_getPEventBit() { + return g_dComIfG_gameInfo.info.getEvent().getPEventBit(); +} + void dComIfGp_setItemLifeCount(f32 amount, u8 type); void dComIfGp_setItemRupeeCount(long amount); void dComIfGp_setSelectItem(int index); diff --git a/include/d/d_attention.h b/include/d/d_attention.h index faafe287d9..d288f00c3c 100644 --- a/include/d/d_attention.h +++ b/include/d/d_attention.h @@ -203,17 +203,15 @@ public: /* 8014B010 */ void getDistTable(int); dAttCatch_c& getCatghTarget() { return mCatghTarget; } - bool chkFlag(u32 flag) { return mFlags & flag; } - BOOL Lockon() { - bool chk = true; - if (!LockonTruth()) { - if (!chkFlag(0x20000000)) { - chk = false; - } + BOOL chkFlag(u32 flag) { return mFlags & flag; } + s8 Lockon() { + /* s32 chk = true; + if (!LockonTruth() && !chkFlag(0x20000000)) { + chk = false; } - return chk; + return chk; */ - // return !LockonTruth() && !chkFlag(0x20000000); + return !LockonTruth() && !chkFlag(0x20000000); } static u8 loc_type_tbl[12]; diff --git a/include/d/d_drawlist.h b/include/d/d_drawlist.h index 3dc5268fd0..eb4bf4efd6 100644 --- a/include/d/d_drawlist.h +++ b/include/d/d_drawlist.h @@ -29,6 +29,7 @@ public: class dDlst_base_c { public: + dDlst_base_c() {} virtual void draw(); }; diff --git a/include/d/d_eye_hl.h b/include/d/d_eye_hl.h index 8ec08f6b62..157988fb0e 100644 --- a/include/d/d_eye_hl.h +++ b/include/d/d_eye_hl.h @@ -26,6 +26,12 @@ public: class dEyeHL_c : public dEyeHL_mng_c { public: + dEyeHL_c() { + m_timg = NULL; + m_pre = NULL; + m_next = NULL; + } + /* 8009C964 */ void entry(J3DModelData*, char const*); /* 8009CA28 */ void remove(); /* 80140C80 */ ~dEyeHL_c(); diff --git a/include/d/kankyo/d_kankyo.h b/include/d/kankyo/d_kankyo.h index 4b10fff891..28008e68ec 100644 --- a/include/d/kankyo/d_kankyo.h +++ b/include/d/kankyo/d_kankyo.h @@ -10,6 +10,7 @@ #include "dolphin/gx/GX.h" #include "dolphin/types.h" #include "m_Do/m_Do_ext.h" +#include "Z2AudioLib/Z2EnvSeMgr.h" class cBgS_PolyInfo; @@ -485,6 +486,9 @@ public: /* 0x130C */ u8 field_0x130c; }; // Size: 0x1310 +extern dScnKy_env_light_c g_env_light; +extern Z2EnvSeMgr g_mEnvSeMgr; + STATIC_ASSERT(sizeof(dScnKy_env_light_c) == 4880); BOOL dKy_darkworld_stage_check(char const*, int); diff --git a/include/d/particle/d_particle.h b/include/d/particle/d_particle.h index ff1857407e..a154b9975d 100644 --- a/include/d/particle/d_particle.h +++ b/include/d/particle/d_particle.h @@ -13,6 +13,8 @@ public: class dPa_hermiteEcallBack_c : public dPa_levelEcallBack { public: + dPa_hermiteEcallBack_c() {} + /* 8004F6B8 */ void setOldPosP(cXyz const*, cXyz const*); /* 8004FCC8 */ virtual ~dPa_hermiteEcallBack_c(); diff --git a/include/d/save/d_save.h b/include/d/save/d_save.h index 7cccd00ae6..5cac4e2acc 100644 --- a/include/d/save/d_save.h +++ b/include/d/save/d_save.h @@ -833,6 +833,8 @@ public: void setEventReg(u16 i_reg, u8 i_no); u8 getEventReg(u16 i_reg) const; + void* getPEventBit() { return (void*)mEvent; } + private: /* 0x0 */ u8 mEvent[256]; }; // Size: 0x100 diff --git a/include/dolphin/os/OS.h b/include/dolphin/os/OS.h index 51aff6b9cf..b1ce58846a 100644 --- a/include/dolphin/os/OS.h +++ b/include/dolphin/os/OS.h @@ -224,6 +224,7 @@ u8* OSGetStackPointer(void); void OSCreateAlarm(OSAlarm* alarm); void OSCancelAlarm(OSAlarm* alarm); void OSSetAlarm(OSAlarm* alarm, OSTime time, OSAlarmHandler handler); +void OSSetPeriodicAlarm(OSAlarm*, OSTime, OSTime, OSAlarmHandler); void OSInitCond(OSCond* cond); void OSWaitCond(OSCond* cond, OSMutex* mutex); diff --git a/include/f_op/f_op_actor_mng.h b/include/f_op/f_op_actor_mng.h index 13b70893e2..df0443d5c1 100644 --- a/include/f_op/f_op_actor_mng.h +++ b/include/f_op/f_op_actor_mng.h @@ -162,6 +162,14 @@ inline void fopAcM_SetRoomNo(fopAc_ac_c* actor, s8 roomNo) { actor->mCurrent.mRoomNo = roomNo; } +inline void fopAcM_setHookCarryNow(fopAc_ac_c* actor) { + fopAcM_OnStatus(actor, 0x100000); +} + +inline void fopAcM_cancelHookCarryNow(fopAc_ac_c* actor) { + fopAcM_OffStatus(actor, 0x100000); +} + void* fopAcM_FastCreate(s16 pProcTypeID, FastCreateReqFunc param_2, void* param_3, void* pData); void fopAcM_setStageLayer(void*); int fopAcM_setRoomLayer(void*, int); diff --git a/include/m_Do/m_Do_DVDError.h b/include/m_Do/m_Do_DVDError.h index 5559ee3166..d4d162a959 100644 --- a/include/m_Do/m_Do_DVDError.h +++ b/include/m_Do/m_Do_DVDError.h @@ -2,5 +2,10 @@ #define M_DO_M_DO_DVDERROR_H #include "dolphin/types.h" +#include "JSystem/JKernel/JKRThread.h" + +void mDoDvdErr_ThdCleanup(); +static void mDoDvdErr_Watch(void*); +static void AlarmHandler(OSAlarm*, OSContext*); #endif /* M_DO_M_DO_DVDERROR_H */ diff --git a/include/m_Do/m_Do_MemCard.h b/include/m_Do/m_Do_MemCard.h index b91cb63326..f1513f7b1c 100644 --- a/include/m_Do/m_Do_MemCard.h +++ b/include/m_Do/m_Do_MemCard.h @@ -39,6 +39,8 @@ public: /* 800172D4 */ s32 checkspace(); /* 80017360 */ void setCardState(s32); + bool isCardCommNone() { return mCardCommand == CARD_NO_COMMAND; } + /* 0x0000 */ u8 mData[0x1FBC]; /* 0x1FBC */ u8 mChannel; /* 0x1FBD */ u8 mCopyToPos; @@ -59,4 +61,8 @@ static int mDoMemCd_main(void*); extern mDoMemCd_Ctrl_c g_mDoMemCd_control; +inline bool mDoMemCd_isCardCommNone() { + return g_mDoMemCd_control.isCardCommNone(); +} + #endif /* M_DO_M_DO_MEMCARD_H */ diff --git a/include/m_Do/m_Do_Reset.h b/include/m_Do/m_Do_Reset.h index 3045816bd8..5d9609065c 100644 --- a/include/m_Do/m_Do_Reset.h +++ b/include/m_Do/m_Do_Reset.h @@ -38,7 +38,7 @@ public: static u8 getProgSeqFlag() { return mResetData->mProgSeqFlag; } static u8 getWarningDispFlag() { return mResetData->mWarningDispFlag; } static BOOL isReturnToMenu() { return mResetData->mReturnToMenu; } - static bool isShutdown() { return mResetData->mShutdown; } + static BOOL isShutdown() { return mResetData->mShutdown; } static int isReset() { return mResetData->mReset; } static int get3ButtonResetPort() { return mResetData->m3ButtonResetPort; } static int is3ButtonReset() { return mResetData->m3ButtonReset; } @@ -54,4 +54,6 @@ public: static mDoRstData* mResetData; }; +extern u8 data_80450C88; + #endif /* M_DO_M_DO_RESET_H */ diff --git a/include/m_Do/m_Do_audio.h b/include/m_Do/m_Do_audio.h index c589030a83..6798ece84d 100644 --- a/include/m_Do/m_Do_audio.h +++ b/include/m_Do/m_Do_audio.h @@ -20,6 +20,7 @@ extern bool sResetFlag; class mDoAud_zelAudio_c { public: void reset(); + mDoAud_zelAudio_c() {} ~mDoAud_zelAudio_c() {} static void onInitFlag() { struct_80450BB8 = true; } @@ -28,6 +29,7 @@ public: static void onResetFlag() { sResetFlag = true; } static void offResetFlag() { sResetFlag = false; } static bool isBgmSet() { return data_80450bba; } + static void onBgmSet() { data_80450bba = true; } static void offBgmSet() { data_80450bba = false; } Z2AudioMgr mAudioMgr; diff --git a/include/m_Do/m_Do_controller_pad.h b/include/m_Do/m_Do_controller_pad.h index 31cfd81b4a..a9875b6c8e 100644 --- a/include/m_Do/m_Do_controller_pad.h +++ b/include/m_Do/m_Do_controller_pad.h @@ -6,11 +6,11 @@ #include "dolphin/types.h" #include "m_Do/m_Do_Reset.h" +// Controller Ports 1 - 4 +enum { PAD_1, PAD_2, PAD_3, PAD_4 }; + class mDoCPd_c { public: - // Controller Ports 1 - 4 - enum { PAD_0, PAD_1, PAD_2, PAD_3 }; - static void create(); static void read(); static void convert(interface_of_controller_pad*, JUTGamePad*); diff --git a/include/m_Do/m_Do_machine.h b/include/m_Do/m_Do_machine.h index 8ea5888795..669ee1aecd 100644 --- a/include/m_Do/m_Do_machine.h +++ b/include/m_Do/m_Do_machine.h @@ -14,6 +14,7 @@ bool exceptionReadPad(u32*, u32*); void exceptionRestart(); void myExceptionCallback(u16, OSContext*, u32, u32); void my_SysPrintHeap(char const*, void*, u32); +void mDoMch_HeapCheckAll(); extern GXRenderModeObj g_ntscZeldaProg; diff --git a/include/m_Do/m_Do_main.h b/include/m_Do/m_Do_main.h index 09a01987a6..6015b935fb 100644 --- a/include/m_Do/m_Do_main.h +++ b/include/m_Do/m_Do_main.h @@ -10,6 +10,20 @@ void* LOAD_COPYDATE(void*); class HeapCheck { public: + // needed for sinit + /* HeapCheck(JKRExpHeap* heap, const char* name, const char* jName) { + mName = name; + mJName = jName; + setHeap(heap); + mMaxTotalUsedSize = 0; + mMaxTotalFreeSize = 0; + field_0x14 = 0; + field_0x18 = 0; + mTargetHeapSize = 0; + mUsedCount = 0; + mTotalUsedSize = 0; + } */ + void CheckHeap1(void); s32 getUsedCount(void) const; void heapDisplay(void) const; @@ -21,19 +35,23 @@ public: void setHeapSize(u32 i_size) { mTargetHeapSize = i_size; } s32 getMaxTotalUsedSize() { return mMaxTotalUsedSize; } s32 getMaxTotalFreeSize() { return mMaxTotalFreeSize; } - char* getName() const { return mName; } + const char* getName() const { return mName; } void saveRelBase() { mUsedCount = getUsedCount(); mTotalUsedSize = mHeap->getTotalUsedSize(); } + u32 getRelUsedCount() const { return getUsedCount() - mUsedCount; } + u32 getRelTotalUsedSize() const { return mHeap->getTotalUsedSize() - mTotalUsedSize; } + private: - /* 0x00 */ char* mName; - /* 0x04 */ char* mJName; + /* 0x00 */ const char* mName; + /* 0x04 */ const char* mJName; /* 0x08 */ JKRExpHeap* mHeap; /* 0x0C */ s32 mMaxTotalUsedSize; /* 0x10 */ s32 mMaxTotalFreeSize; - /* 0x14 */ u8 unk20[8]; + /* 0x14 */ s32 field_0x14; + /* 0x18 */ s32 field_0x18; /* 0x1C */ u32 mTargetHeapSize; /* 0x20 */ u32 mUsedCount; /* 0x24 */ u32 mTotalUsedSize; @@ -47,7 +65,7 @@ struct mDoMain { static OSTime sHungUpTime; }; -extern s8 data_80450580; +extern s8 data_80450580; // Debug enabled extern bool sOSReportDisabled; extern bool data_80450B99; |
