diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2025-09-25 08:20:46 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-25 18:20:46 +0300 |
| commit | 9a2df2162b7ec4a23ad32915c61d46cf20b5003d (patch) | |
| tree | eaeff68a0e755a6014c559abff39685b3b3e9c14 /include | |
| parent | 4635fcb666d7c5f256016d733584712a55f1c130 (diff) | |
d_debug_camera mostly done (#2695)
* d_debug_camera mostly done
* update some alink demo stuff
* some misc debug stuff
Diffstat (limited to 'include')
| -rw-r--r-- | include/JSystem/JHostIO/JORMContext.h | 85 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRExpHeap.h | 2 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_angle.h | 6 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_cc_d.h | 3 | ||||
| -rw-r--r-- | include/d/actor/d_a_alink.h | 4 | ||||
| -rw-r--r-- | include/d/actor/d_a_player.h | 18 | ||||
| -rw-r--r-- | include/d/d_camera.h | 14 | ||||
| -rw-r--r-- | include/d/d_debug_camera.h | 186 | ||||
| -rw-r--r-- | include/d/d_event_data.h | 92 | ||||
| -rw-r--r-- | include/d/d_s_logo.h | 8 | ||||
| -rw-r--r-- | include/d/d_s_play.h | 2 | ||||
| -rw-r--r-- | include/d/d_stage.h | 8 | ||||
| -rw-r--r-- | include/f_ap/f_ap_game.h | 4 | ||||
| -rw-r--r-- | include/m_Do/m_Do_main.h | 18 |
14 files changed, 391 insertions, 59 deletions
diff --git a/include/JSystem/JHostIO/JORMContext.h b/include/JSystem/JHostIO/JORMContext.h index f7d68c9776..d2c01b3514 100644 --- a/include/JSystem/JHostIO/JORMContext.h +++ b/include/JSystem/JHostIO/JORMContext.h @@ -2,9 +2,9 @@ #define JORMCONTEXT_H #include <dolphin.h> -#include "JSystem/JSupport/JSUMemoryStream.h" -#include "JSystem/JHostIO/JORReflexible.h" #include <stdint.h> +#include "JSystem/JHostIO/JORReflexible.h" +#include "JSystem/JSupport/JSUMemoryStream.h" #define MCTX_MSG_RESET 0 #define MCTX_MSG_GET_ROOT_OBJ 2 @@ -30,8 +30,8 @@ #define DEFINE_GEN_CHECKBOX(T, kind) \ void genCheckBox(const char* label, T* pSrc, T mask, u32 style, JOREventListener* pListener, \ u16 posX, u16 posY, u16 width, u16 height) { \ - genCheckBoxSub(kind, label, (uintptr_t)pSrc, style, *pSrc, mask, pListener, posX, posY, width, \ - height); \ + genCheckBoxSub(kind, label, (uintptr_t)pSrc, style, *pSrc, mask, pListener, posX, posY, \ + width, height); \ } #define DEFINE_GEN_CHECKBOX_ID(T, kind) \ @@ -44,8 +44,8 @@ #define DEFINE_GEN_SLIDER(T, kind) \ void genSlider(const char* label, T* pSrc, T rangeMin, T rangeMax, u32 style, \ JOREventListener* pListener, u16 posX, u16 posY, u16 width, u16 height) { \ - genSliderSub(kind, label, (uintptr_t)pSrc, style, *pSrc, rangeMin, rangeMax, pListener, posX, \ - posY, width, height); \ + genSliderSub(kind, label, (uintptr_t)pSrc, style, *pSrc, rangeMin, rangeMax, pListener, \ + posX, posY, width, height); \ } #define DEFINE_GEN_SLIDER_ID(T, kind) \ @@ -55,39 +55,48 @@ width, height); \ } -#define DEFINE_START_COMBO_BOX(T, kind) \ - void startComboBox(const char* label, T* pSrc, u32 style, \ - JOREventListener* pListener, u16 posX, u16 posY, u16 width, u16 height) { \ - startSelectorSub('CMBX', kind, label, (uintptr_t)pSrc, style, *pSrc, pListener, posX, \ - posY, width, height); \ +#define DEFINE_START_COMBO_BOX(T, kind) \ + void startComboBox(const char* label, T* pSrc, u32 style, JOREventListener* pListener, \ + u16 posX, u16 posY, u16 width, u16 height) { \ + startSelectorSub('CMBX', kind, label, (uintptr_t)pSrc, style, *pSrc, pListener, posX, \ + posY, width, height); \ + } + +#define DEFINE_START_COMBO_BOX_ID(T, kind) \ + void startComboBoxID(const char* label, u32 id, T data, u32 style, \ + JOREventListener* pListener, u16 posX, u16 posY, u16 width, u16 height) { \ + startSelectorSub('CMBX', kind, label, id, style, data, pListener, posX, posY, width, \ + height); \ } -#define DEFINE_START_COMBO_BOX_ID(T, kind) \ - void startComboBoxID(const char* label, u32 id, T data, u32 style, \ - JOREventListener* pListener, u16 posX, u16 posY, u16 width, u16 height) { \ - startSelectorSub('CMBX', kind, label, id, style, data, pListener, posX, \ - posY, width, height); \ +#define DEFINE_UPDATE_SLIDER(T) \ + void updateSlider(u32 mode, T* pSrc, T rangeMin, T rangeMax, u32 param_5) { \ + updateSliderSub(mode, (uintptr_t)pSrc, *pSrc, rangeMin, rangeMax, param_5); \ } -#define DEFINE_UPDATE_SLIDER(T) \ - void updateSlider(u32 mode, T* pSrc, T rangeMin, T rangeMax, u32 param_5) { \ - updateSliderSub(mode, (uintptr_t)pSrc, *pSrc, rangeMin, rangeMax, param_5); \ +#define DEFINE_UPDATE_SLIDER_ID(T) \ + void updateSliderID(u32 mode, u32 id, T value, T rangeMin, T rangeMax, u32 param_5) { \ + updateSliderSub(mode, id, value, rangeMin, rangeMax, param_5); \ } -#define DEFINE_UPDATE_SLIDER_ID(T) \ - void updateSliderID(u32 mode, u32 id, T value, T rangeMin, T rangeMax, u32 param_5) { \ - updateSliderSub(mode, id, value, rangeMin, rangeMax, param_5); \ +#define DEFINE_START_RADIO_BUTTON(T, kind) \ + void startRadioButton(const char* label, T* pSrc, u32 style, JOREventListener* pListener, \ + u16 posX, u16 posY, u16 width, u16 height) { \ + startSelectorSub('RBTN', kind, label, (uintptr_t)pSrc, style, *pSrc, pListener, posX, \ + posY, width, height); \ } namespace jhostio { - enum EKind { - EKind_8B = 0x08, - EKind_16B = 0x10, - EKind_32B = 0x20, - }; +enum EKind { + EKind_8B = 0x08, + EKind_16B = 0x10, + EKind_32B = 0x20, +}; - inline u32 GetEKindSize(u32 param_0) { return param_0 & 0xFF; } +inline u32 GetEKindSize(u32 param_0) { + return param_0 & 0xFF; } +} // namespace jhostio class JORReflexible; class JORFile; @@ -156,9 +165,7 @@ public: // empty function } - void startUpdateNode(JORReflexible* obj) { - putNode(obj); - } + void startUpdateNode(JORReflexible* obj) { putNode(obj); } void genNodeSub(const char* label, JORReflexible* i_node, u32, u32); void putNode(JORReflexible* obj); @@ -230,14 +237,21 @@ public: DEFINE_START_COMBO_BOX_ID(int, JORPropertyEvent::EKind_ValueID) - void endComboBox() { - endSelectorSub(); - } + void endComboBox() { endSelectorSub(); } void genComboBoxItem(const char* label, s32 itemNo) { genSelectorItemSub(label, itemNo, 0, 0, 0, 0, 0); } + /** + * === RADIO BUTTON === + */ + DEFINE_START_RADIO_BUTTON(u8, 0x100 | jhostio::EKind_8B) + DEFINE_START_RADIO_BUTTON(s16, jhostio::EKind_16B) + DEFINE_START_RADIO_BUTTON(s32, jhostio::EKind_32B) + + void endRadioButton() { endSelectorSub(); } + void genRadioButtonItem(const char* label, s32 itemNo, u32 param_2, u16 posX, u16 posY, u16 width, u16 height) { genSelectorItemSub(label, itemNo, param_2, posX, posY, width, height); @@ -246,8 +260,7 @@ public: void updateControl(u32 mode, u32 id, u32 param_2); void updateControl(u32 mode, u32 id, const char* param_2); void updateLabel(u32 mode, u32 id, const char* param_2) { updateControl(mode, id, param_2); } - void updateSliderSub(u32 mode, u32 id, s32 value, s32 rangeMin, s32 rangeMax, - u32 param_5); + void updateSliderSub(u32 mode, u32 id, s32 value, s32 rangeMin, s32 rangeMax, u32 param_5); void updateCheckBoxSub(u32 mode, u32 id, u16 value, u16 mask, u32 param_4); void updateSelectorSub(u32 mode, u32 id, s32 value, u32 param_3); void updateEditBoxID(u32 mode, u32 id, const char* string, u32 param_3, u16 length); diff --git a/include/JSystem/JKernel/JKRExpHeap.h b/include/JSystem/JKernel/JKRExpHeap.h index 59b914dc2d..4215fd4a2c 100644 --- a/include/JSystem/JKernel/JKRExpHeap.h +++ b/include/JSystem/JKernel/JKRExpHeap.h @@ -66,7 +66,7 @@ public: s32 getUsedSize(u8 groupId) const; s32 getTotalUsedSize(void) const; - CMemBlock* getHeadUsedList() const { return mHeadUsedList; } + CMemBlock* getUsedFirst() { return mHeadUsedList; } void setAllocationMode(EAllocMode mode) { mAllocMode = mode; } diff --git a/include/SSystem/SComponent/c_angle.h b/include/SSystem/SComponent/c_angle.h index af34015ee4..b82c9a1d11 100644 --- a/include/SSystem/SComponent/c_angle.h +++ b/include/SSystem/SComponent/c_angle.h @@ -110,6 +110,12 @@ public: float Sin(void) const; float Cos(void) const; float Tan(void) const; + + operator f32() const { return mDegree; } + + cDegree operator*(float v) const { + return cDegree(mDegree * v); + } }; class cSPolar { diff --git a/include/SSystem/SComponent/c_cc_d.h b/include/SSystem/SComponent/c_cc_d.h index da25eff0cc..7694407de4 100644 --- a/include/SSystem/SComponent/c_cc_d.h +++ b/include/SSystem/SComponent/c_cc_d.h @@ -224,6 +224,7 @@ public: STATIC_ASSERT(0x10 == sizeof(cCcD_ObjCommonBase)); +#pragma push #pragma pack(1) class cCcD_ObjAt : public cCcD_ObjCommonBase { public: @@ -247,7 +248,7 @@ protected: /* 0x14 */ u8 mAtp; /* 0x15 */ u8 field_0x15[3]; }; -#pragma pack() +#pragma pop STATIC_ASSERT(0x18 == sizeof(cCcD_ObjAt)); diff --git a/include/d/actor/d_a_alink.h b/include/d/actor/d_a_alink.h index 91815f9d58..3c6ce1aef5 100644 --- a/include/d/actor/d_a_alink.h +++ b/include/d/actor/d_a_alink.h @@ -3470,7 +3470,7 @@ public: } s32 checkPlayerDemoMode() const { return mDemo.getDemoType(); } - BOOL checkSpecialDemoMode() const { return mDemo.getDemoType() == 5; } + BOOL checkSpecialDemoMode() const { return mDemo.getDemoType() == daPy_demo_c::DEMO_TYPE_SPECIAL_e; } static bool checkMidnaChargeAttack() { return dComIfGs_isEventBit(0x501); } u16 getMidnaMsgNum() const { return mMidnaMsgNum; } u32 getStartEvent() { return fopAcM_GetParam(this) >> 0x18; } @@ -4286,7 +4286,7 @@ public: /* 0x03178 */ int field_0x3178; /* 0x0317C */ int field_0x317c; /* 0x03180 */ int field_0x3180; - /* 0x03184 */ int field_0x3184; + /* 0x03184 */ int mAlinkStaffId; /* 0x03188 */ int field_0x3188; /* 0x0318C */ int field_0x318c; /* 0x03190 */ int field_0x3190; diff --git a/include/d/actor/d_a_player.h b/include/d/actor/d_a_player.h index 442224a7c3..275572e46c 100644 --- a/include/d/actor/d_a_player.h +++ b/include/d/actor/d_a_player.h @@ -243,15 +243,23 @@ public: DEMO_NEW_ANM0_e = 0x200, }; + enum { + DEMO_TYPE_TOOL_e = 1, + DEMO_TYPE_SYSTEM_e, + DEMO_TYPE_ORIGINAL_e, + DEMO_TYPE_START_e, + DEMO_TYPE_SPECIAL_e, + }; + void setDemoType(u16 pType) { mDemoType = pType; } int getDemoType() const { return mDemoType; } void setDemoMode(u32 mode) { mDemoMode = mode; } u32 getDemoMode() const { return mDemoMode; } int getParam1() const { return mParam1; } s16 getParam2() const { return mParam2; } - void setOriginalDemoType() { setDemoType(3); } - void setSpecialDemoType() { setDemoType(5); } - void setSystemDemoType() { setDemoType(2); } + void setOriginalDemoType() { setDemoType(DEMO_TYPE_ORIGINAL_e); } + void setSpecialDemoType() { setDemoType(DEMO_TYPE_SPECIAL_e); } + void setSystemDemoType() { setDemoType(DEMO_TYPE_SYSTEM_e); } void setStick(f32 stick) { mStick = stick; } void setMoveAngle(s16 angle) { mDemoMoveAngle = angle; } s16 getMoveAngle() const { return mDemoMoveAngle; } @@ -261,13 +269,13 @@ public: void setParam1(int value) { mParam1 = value; } void setParam2(int value) { mParam2 = value; } void setPos0(const cXyz* pos) { mDemoPos0 = *pos; } - void setToolDemoType() { setDemoType(1); } + void setToolDemoType() { setDemoType(DEMO_TYPE_TOOL_e); } s16 getTimer() const { return mTimer; } void decTimer() { mTimer--; } void setTimer(s16 i_timer) { mTimer = i_timer; } cXyz* getPos0() { return &mDemoPos0; } void resetDemoType() { setDemoType(0); } - void setStartDemoType() { setDemoType(4); } + void setStartDemoType() { setDemoType(DEMO_TYPE_START_e); } private: /* 0x00 */ u16 mDemoType; diff --git a/include/d/d_camera.h b/include/d/d_camera.h index b6159aafb5..42e0fbc69c 100644 --- a/include/d/d_camera.h +++ b/include/d/d_camera.h @@ -1085,6 +1085,20 @@ public: mWindowAspect = param_0 / param_1; } + f32 R() { + if (chkFlag(0x10)) { + return mUpOverride.field_0x24.R(); + } else { + return mDirection.R(); + } + } + + cXyz iCenter() { return mViewCache.mCenter; } + cXyz iEye() { return mViewCache.mEye; } + s16 iU() { return mViewCache.mDirection.U().Inv(); } + s16 iV() { return mViewCache.mDirection.V(); } + f32 iR() { return mViewCache.mDirection.R(); } + s16 U2() { if (chkFlag(0x10)) { return mViewCache.mDirection.U(); diff --git a/include/d/d_debug_camera.h b/include/d/d_debug_camera.h new file mode 100644 index 0000000000..d81d6f8723 --- /dev/null +++ b/include/d/d_debug_camera.h @@ -0,0 +1,186 @@ +#ifndef D_DEBUG_CAMERA_H +#define D_DEBUG_CAMERA_H + +#include "d/d_camera.h" +#include "JSystem/JHostIO/JORMContext.h" +#include "JSystem/JHostIO/JORFile.h" + +enum dDbgCam_KeyAction { + /* | */ dDbgCam_KeyAction_FIXEDFRM, + /* ] */ dDbgCam_KeyAction_UNITRANS, + /* > */ dDbgCam_KeyAction_BSPLINE, + /* - */ dDbgCam_KeyAction_NOACTION, +}; + +class dDbgCamera_c; + +class dDbgCamKey_c { +public: + dDbgCamKey_c() {} + ~dDbgCamKey_c(); + + /* 0x00 */ cXyz mCenter; + /* 0x0C */ cXyz mEye; + /* 0x18 */ f32 mFovy; + /* 0x1C */ f32 mBank; + struct { + /* 0x20 */ fpc_ProcID id; + /* 0x24 */ char name[8]; + } mActorInfo; + /* 0x2C */ int mAction; + /* 0x30 */ int mTimer; +}; + +class dDbgCamSetup_c : public JORReflexible { +public: + dDbgCamSetup_c(); + ~dDbgCamSetup_c() {} + + void Init(dDbgCamera_c*); + void Finish(); + f32 Translate(f32); + s16 Rotate(f32); + f32 FlatMove(f32); + f32 Turbo(f32); + + void genMessage(JORMContext*); + void listenPropertyEvent(const JORPropertyEvent*); + + f32 FovyTick() { return mFovyTick; } + f32 RotAccel() { return mRotAccel; } + f32 TransAccel() { return mTransAccel; } + int CenterMarker() { return mCenterMarker; } + f32 CenterBall() { return mCenterBall; } + f32 CenterCloss() { return mCenterCross; } + + bool CheckFlag(u16 i_flag) { return (i_flag & mFlag) ? true : false; } + + /* 0x04 */ s32 mActorSrchType; + /* 0x08 */ f32 mActorSrchRange; + /* 0x0C */ fpc_ProcID mActorID; + /* 0x10 */ dDbgCamera_c* mpDbgCam; + /* 0x14 */ f32 mMoveSpeed; + /* 0x18 */ f32 mMoveTurbo; + /* 0x1C */ f32 mMoveParallelShift; + /* 0x20 */ f32 mRotateSpeed; + /* 0x24 */ f32 mFovyTick; + /* 0x28 */ f32 mTransAccel; + /* 0x2C */ f32 mRotAccel; + /* 0x30 */ f32 mMoveMax; + /* 0x34 */ f32 mRotateMax; + /* 0x38 */ f32 mUnkMax; + /* 0x3C */ f32 mCenterCross; + /* 0x40 */ f32 mCenterBall; + /* 0x44 */ s32 mCenterMarker; + /* 0x48 */ u16 mFlag; + /* 0x4C */ cXyz mGazePoint; + /* 0x58 */ cXyz mPerspective; + /* 0x64 */ f32 mAngle; + /* 0x68 */ cXyz field_0x68; + /* 0x74 */ cXyz field_0x74; + /* 0x80 */ s8 m_childNo; + /* 0x84 */ s32 mPosX; + /* 0x88 */ s32 mPosY; +}; + +class dDbgCamera_c { +public: + dDbgCamera_c() {} + ~dDbgCamera_c() {} + + void InitlChk(); + int SetlChk(dBgS_LinChk); + + int moveTool(); + int cmdTool(); + int makeZevData(); + void printZevData(); + void WriteZevData(); + void monitor(); + bool showCenterMarker(); + bool showCameraPos(); + bool showIdlCameraPos(); + void Init(dCamera_c*); + void Finish(); + void Reset(dCamera_c*); + int Run(); + int DrawShape(); + int Report(int, int, JUtility::TColor, const char*, ...); + void OpenFile(); + void PrintFile(char*, ...); + void CloseFile(); + + char* ActionName(s32 i_action) { + static char* name[] = { + "FIXEDFRM", + "UNITRANS", + "BSPLINE", + "NOACTION", + }; + + return name[i_action]; + } + + cXyz Center() { return mRunKey.mCenter; } + void Fovy(f32 fovy) { mRunKey.mFovy = fovy; }; + void Eye(const cXyz& eye) { mRunKey.mEye = eye; }; + void Center(const cXyz& center) { mRunKey.mCenter = center; }; + f32 Fovy() { return mRunKey.mFovy; } + s16 Bank() { return cSAngle(mRunKey.mBank).Val(); } + cXyz Up() { return mUp; } + cXyz Eye() { return mRunKey.mEye; } + bool Playing() { return mIsPlaying; } + + dDbgCamKey_c PlaneKey() { + dDbgCamKey_c rt; + rt.mCenter = mpCamera->Center(); + rt.mEye = mpCamera->Eye(); + rt.mFovy = mpCamera->Fovy(); + rt.mBank = mpCamera->Bank().Degree(); + rt.mActorInfo.id = fpcM_ERROR_PROCESS_ID_e; + strcpy(rt.mActorInfo.name, "WORLD"); + rt.mAction = dDbgCam_KeyAction_NOACTION; + rt.mTimer = 20; + return rt; + } + + char ActionSymbol(s32 i_action) { return "|]>-..."[i_action]; } + + /* 0x000 */ dCamera_c* mpCamera; + /* 0x004 */ dDbgCamKey_c mRunKey; + /* 0x038 */ cXyz mUp; + /* 0x044 */ cSGlobe field_0x44; + /* 0x04C */ int mPadNo; + /* 0x050 */ int field_0x50; + /* 0x054 */ u32 field_0x54; + /* 0x058 */ int field_0x58; + /* 0x05C */ int mCmdMode; + /* 0x060 */ char mActionKey[32]; + /* 0x080 */ u8 field_0x80; + /* 0x084 */ dDbgCamKey_c mKeys[32]; + class { + public: + /* 0x000 */ int field_0x0; + /* 0x004 */ int field_0x4; + /* 0x008 */ u8 field_0x8[0x010 - 0x008]; + /* 0x010 */ cXyz field_0x10[32]; + /* 0x190 */ cXyz field_0x190[32]; + } /* 0x704 */ field_0x704; + /* 0xA14 */ u8 field_0xA14[0xB14 - 0xA14]; + /* 0xB14 */ int field_0xb14; + /* 0xB18 */ bool mIsPlaying; + /* 0xB1C */ dBgS_LinChk mLchk[2]; + /* 0xBFC */ int mLchkNum; + /* 0xC00 */ int field_0xc00; + /* 0xC04 */ int field_0xc04; + /* 0xC08 */ int field_0xc08; + /* 0xC0C */ int field_0xc0c; + /* 0xC10 */ f32 field_0xc10; + /* 0xC14 */ f32 field_0xc14; + /* 0xC18 */ int field_0xc18; + /* 0xC1C */ int field_0xc1c; + /* 0xC20 */ dDbgCamSetup_c mCamSetup; + /* 0xCAC */ JORFile mFile; +}; + +#endif diff --git a/include/d/d_event_data.h b/include/d/d_event_data.h index f67d92eda1..f07a900705 100644 --- a/include/d/d_event_data.h +++ b/include/d/d_event_data.h @@ -53,6 +53,20 @@ public: /* 0x34 */ u8 field_0x34[12]; }; // Size: 0x40 +#if DEBUG +class dEvDtData_DBG_c : public dEvDtData_c { +public: + void Init() { + mName[0] = '\0'; + mIndex = 0; + mType = 5; + mDataIndex = 0; + mNumber = 0; + mNext = -1; + } +}; +#endif + class dEvDtCut_c { public: int startCheck(); @@ -64,7 +78,6 @@ public: int getStartFlag(int idx) { return mFlags[idx]; } u32 getTagId() { return mTagID; } -private: /* 0x00 */ char mName[32]; /* 0x20 */ u32 mTagID; /* 0x24 */ u32 mIndex; @@ -75,6 +88,27 @@ private: /* 0x40 */ u8 field_0x40[0x10]; }; // Size: 0x50 +#if DEBUG +class dEvDtCut_DBG_c : public dEvDtCut_c { +public: + void Init() { + int i; + + mName[0] = '\0'; + mTagID = 0; + mIndex = 0; + + for (i = 0; i < 3; i++) { + mFlags[i] = -1; + } + + mFlagId = 0; + mDataTop = -1; + mNext = -1; + } +}; +#endif + class dEvDtStaff_c { public: enum StaffType { @@ -152,7 +186,7 @@ public: /* 0x28 */ u32 mFlagID; /* 0x2C */ int mType; /* 0x30 */ int mStartCut; - /* 0x34 */ u8 field_0x34[2]; + /* 0x34 */ s16 field_0x34; /* 0x36 */ s16 mWaitTimer; /* 0x38 */ int mCurrentCut; /* 0x3C */ s32 field_0x3c; @@ -163,6 +197,21 @@ public: STATIC_ASSERT(sizeof(dEvDtStaff_c) == 0x50); +#if DEBUG +class dEvDtStaff_DBG_c : public dEvDtStaff_c { +public: + void Init() { + mName[0] = '\0'; + mTagID = 0; + mIndex = 0; + mFlagID = 0; + mType = 13; + mStartCut = 0; + field_0x34 = 0; + } +}; +#endif + class dEvDtEvent_c { public: int finishCheck(); @@ -179,14 +228,47 @@ public: /* 0x28 */ int mPriority; /* 0x2C */ int mStaff[20]; /* 0x7C */ int mNStaff; - /* 0x80 */ u8 field_0x80[4]; + /* 0x80 */ int field_0x80; /* 0x84 */ int field_0x84; /* 0x88 */ int mFlags[3]; /* 0x94 */ bool mPlaySound; - /* 0x95 */ u8 field_0x95[0xF]; + /* 0x96 */ s16 field_0x96; + /* 0x98 */ f32 field_0x98; + /* 0x9C */ f32 field_0x9c; + /* 0xA0 */ f32 field_0xa0; /* 0xA4 */ int mEventState; - /* 0xA8 */ u8 field_0xa8[8]; + /* 0xA8 */ int field_0xa8; + /* 0xAC */ u8 field_0xac[4]; +}; // Size: 0xB0 + +#if DEBUG +class dEvDtEvent_DBG_c : public dEvDtEvent_c { +public: + void Init() { + int i; + + mName[0] = '\0'; + mIndex = 0; + mStaff[0] = 0; + mNStaff = 0; + + for (i = 0; i < 3; i++) { + mFlags[i] = -1; + } + + field_0x80 = field_0x84 = 0; + mPlaySound = false; + field_0x24 = 1; + mPriority = 0; + mEventState = 0; + field_0xa8 = 0; + field_0x96 = 0; + field_0x98 = 0.0f; + field_0x9c = 0.0f; + field_0xa0 = 0.0f; + } }; // Size: 0xB0 +#endif class dEvDtFlag_c { public: diff --git a/include/d/d_s_logo.h b/include/d/d_s_logo.h index 200a6e8370..20f1d8b1ba 100644 --- a/include/d/d_s_logo.h +++ b/include/d/d_s_logo.h @@ -73,6 +73,14 @@ public: u8 getPalLanguage(); #endif + #if DEBUG + static void onOpeningCut() { + mOpeningCut = true; + } + + static u8 mOpeningCut; + #endif + public: /* 0x1C4 */ request_of_phase_process_class field_0x1c4; /* 0x1CC */ mDoDvdThd_toMainRam_c* sceneCommand; diff --git a/include/d/d_s_play.h b/include/d/d_s_play.h index 0f961ccf84..190402d1e6 100644 --- a/include/d/d_s_play.h +++ b/include/d/d_s_play.h @@ -55,7 +55,7 @@ public: /* 0x0006 */ u8 mPresetData[10000]; /* 0x2716 */ u8 field_0x2716; /* 0x2717 */ u8 field_0x2717; - /* 0x2718 */ char mFilename[100]; + /* 0x2718 */ u8 filename_buf[100]; }; class dScnPly_c : public scene_class { diff --git a/include/d/d_stage.h b/include/d/d_stage.h index 45b7b7f88d..18949a251a 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -1170,6 +1170,14 @@ public: static u8 mNoChangeRoom; static s8 mRoomReadId; + #if DEBUG + static void onNoArcBank() { + mNoArcBank = true; + } + + static u8 mNoArcBank; + #endif + private: /* 0x0 */ u8 field_0x0[4]; }; diff --git a/include/f_ap/f_ap_game.h b/include/f_ap/f_ap_game.h index 9abf333966..f7cf3d6ca7 100644 --- a/include/f_ap/f_ap_game.h +++ b/include/f_ap/f_ap_game.h @@ -18,7 +18,7 @@ public: /* 0x0C */ f32 mLROnValue; /* 0x10 */ f32 mLROffValue; /* 0x14 */ bool mUsingHostIO; - /* 0x15 */ bool mDisplayMeter; + /* 0x15 */ u8 mDisplayMeter; /* 0x16 */ u8 mDisplayPrint; /* 0x17 */ bool mDisplay2D; /* 0x18 */ bool mDisplayParticle; @@ -58,7 +58,7 @@ inline bool fapGmHIO_isPrint() { return g_HIO.mDisplayPrint & 1; } -inline bool fapGmHIO_getMeter() { +inline u8 fapGmHIO_getMeter() { return g_HIO.mDisplayMeter; } diff --git a/include/m_Do/m_Do_main.h b/include/m_Do/m_Do_main.h index 5e4aa32663..6ece441c63 100644 --- a/include/m_Do/m_Do_main.h +++ b/include/m_Do/m_Do_main.h @@ -9,6 +9,8 @@ class JKRExpHeap; void version_check(); s32 LOAD_COPYDATE(void*); +const int HeapCheckTableNum = 8; + class HeapCheck { public: HeapCheck(JKRExpHeap* heap, const char* name, const char* jName) { @@ -26,7 +28,7 @@ public: JKRExpHeap* getHeap() { return mHeap; } void setHeap(JKRExpHeap* i_heap) { mHeap = i_heap; } void setHeapSize(u32 i_size) { mTargetHeapSize = i_size; } - s32 getMaxTotalUsedSize() { return mMaxTotalUsedSize; } + s32 getMaxTotalUsedSize() const { return mMaxTotalUsedSize; } s32 getMaxTotalFreeSize() { return mMaxTotalFreeSize; } const char* getName() const { return mName; } void saveRelBase() { @@ -34,6 +36,8 @@ public: mTotalUsedSize = mHeap->getTotalUsedSize(); } + u32 getTargetHeapSize() const { return mTargetHeapSize; } + u32 getRelUsedCount() const { return getUsedCount() - mUsedCount; } u32 getRelTotalUsedSize() const { return mHeap->getTotalUsedSize() - mTotalUsedSize; } @@ -51,13 +55,15 @@ private: }; struct mDoMain { - static char COPYDATE_STRING[18]; - static u32 memMargin; - #ifdef DEBUG +#ifdef DEBUG + static int argument; + static int e3menu_no; static u32 archiveHeapSize; static u32 gameHeapSize; - #endif - static u8 mHeapBriefType; +#endif + + static char COPYDATE_STRING[18]; + static u32 memMargin; static OSTime sPowerOnTime; static OSTime sHungUpTime; static s8 developmentMode; |
