diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/JSystem/J2DGraph/J2DPane.h | 6 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRExpHeap.h | 4 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRHeap.h | 24 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRSolidHeap.h | 2 | ||||
| -rw-r--r-- | include/JSystem/JKernel/JKRStdHeap.h | 2 | ||||
| -rw-r--r-- | include/d/d_com_inf_game.h | 3 | ||||
| -rw-r--r-- | include/d/d_menu_fmap.h | 34 | ||||
| -rw-r--r-- | include/d/d_menu_fmap2.h | 26 | ||||
| -rw-r--r-- | include/d/d_menu_fmapSv.h | 18 |
9 files changed, 64 insertions, 55 deletions
diff --git a/include/JSystem/J2DGraph/J2DPane.h b/include/JSystem/J2DGraph/J2DPane.h index 646c7ce3..49dacd67 100644 --- a/include/JSystem/J2DGraph/J2DPane.h +++ b/include/JSystem/J2DGraph/J2DPane.h @@ -100,9 +100,9 @@ public: mRotation = angle; calcMtx(); } - void setInfluencedAlpha(bool) {} + void setInfluencedAlpha(bool v) { mInfluencedAlpha = v; } -public: +protected: /* 0x04 */ u32 mMagic; /* 0x08 */ int mTag; /* 0x0C */ JGeometry::TBox2<f32> mBounds; @@ -118,7 +118,7 @@ public: /* 0xAB */ u8 mCullMode; /* 0xAC */ u8 mAlpha; /* 0xAD */ u8 mDrawAlpha; - /* 0xAE */ u8 mInheritAlpha; + /* 0xAE */ bool mInfluencedAlpha; /* 0xAF */ u8 mIsConnectParent; /* 0xB0 */ JSUTree<J2DPane> mPaneTree; }; diff --git a/include/JSystem/JKernel/JKRExpHeap.h b/include/JSystem/JKernel/JKRExpHeap.h index cdbc89f1..b1043ae3 100644 --- a/include/JSystem/JKernel/JKRExpHeap.h +++ b/include/JSystem/JKernel/JKRExpHeap.h @@ -62,10 +62,12 @@ 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; } + static s32 getUsedSize_(JKRExpHeap* heap) { return heap->mSize - heap->getTotalFreeSize(); } + static void* getState_(TState* state) { return getState_buf_(state); } public: /* vt[04] */ virtual u32 getHeapType(); /* override */ diff --git a/include/JSystem/JKernel/JKRHeap.h b/include/JSystem/JKernel/JKRHeap.h index d0b9d283..9323fcbe 100644 --- a/include/JSystem/JKernel/JKRHeap.h +++ b/include/JSystem/JKernel/JKRHeap.h @@ -83,18 +83,16 @@ public: /* vt[23] */ virtual void state_dump(JKRHeap::TState const& p) const; void setDebugFill(bool debugFill) { mDebugFill = debugFill; } - bool getDebugFill() const { return mDebugFill; } - void* getStartAddr() const { return (void*)mStart; } - void* getEndAddr() const { return (void*)mEnd; } - u32 getSize() const { return mSize; } + void* getStartAddr() { return (void*)mStart; } + void* getEndAddr() { return (void*)mEnd; } bool getErrorFlag() const { return mErrorFlag; } - void callErrorHandler(JKRHeap* heap, u32 size, int alignment) { + void callErrorHandler(void* heap, u32 size, int alignment) { if (mErrorHandler) { (*mErrorHandler)(heap, size, alignment); } } - JKRHeap* getParent() const { + JKRHeap* getParent() { JSUTree<JKRHeap>* parent = mChildTree.getParent(); return parent->getObject(); } @@ -102,8 +100,8 @@ public: JSUTree<JKRHeap>& getHeapTree() { return mChildTree; } void appendDisposer(JKRDisposer* disposer) { mDisposerList.append(&disposer->mLink); } void removeDisposer(JKRDisposer* disposer) { mDisposerList.remove(&disposer->mLink); } - void lock() { OSLockMutex(&mMutex); } - void unlock() { OSUnlockMutex(&mMutex); } + void lock() const { OSLockMutex(const_cast<OSMutex*>(&mMutex)); } + void unlock() const { OSUnlockMutex(const_cast<OSMutex*>(&mMutex)); } u32 getHeapSize() { return mSize; } protected: @@ -137,6 +135,7 @@ public: static JKRErrorHandler setErrorHandler(JKRErrorHandler errorHandler); + static bool isDefaultDebugFill() { return sDefaultFillFlag; } static void setDefaultDebugFill(bool status) { sDefaultFillFlag = status; } static void* getCodeStart(void) { return mCodeStart; } static void* getCodeEnd(void) { return mCodeEnd; } @@ -144,14 +143,9 @@ public: static void* getUserRamEnd(void) { return mUserRamEnd; } static u32 getMemorySize(void) { return mMemorySize; } static JKRHeap* getRootHeap() { return sRootHeap; } -#if DEBUG - static JKRHeap* getRootHeap2() { return sRootHeap2; } -#endif static JKRHeap* getSystemHeap() { return sSystemHeap; } static JKRHeap* getCurrentHeap() { return sCurrentHeap; } - static void setSystemHeap(JKRHeap* heap) { sSystemHeap = heap; } - static void setCurrentHeap(JKRHeap* heap) { sCurrentHeap = heap; } static void setState_u32ID_(TState* state, u32 id) { state->mId = id; } static void setState_uUsedSize_(TState* state, u32 usedSize) { state->mUsedSize = usedSize; } @@ -159,7 +153,6 @@ public: state->mCheckCode = checkCode; } static void* getState_buf_(TState* state) { return &state->mBuf; } - static void* getState_(TState* state) { return getState_buf_(state); } static void* mCodeStart; static void* mCodeEnd; @@ -168,9 +161,6 @@ public: static u32 mMemorySize; static JKRHeap* sRootHeap; -#if DEBUG - static JKRHeap* sRootHeap2; -#endif static JKRHeap* sSystemHeap; static JKRHeap* sCurrentHeap; diff --git a/include/JSystem/JKernel/JKRSolidHeap.h b/include/JSystem/JKernel/JKRSolidHeap.h index 9c0b6c98..ba14ff58 100644 --- a/include/JSystem/JKernel/JKRSolidHeap.h +++ b/include/JSystem/JKernel/JKRSolidHeap.h @@ -58,6 +58,8 @@ public: s32 adjustSize(void); static JKRSolidHeap* create(u32, JKRHeap*, bool); + + static void* getState_(TState* state) { return getState_buf_(state); } }; // Size: 0x80 inline JKRSolidHeap* JKRCreateSolidHeap(u32 size, JKRHeap* parent, bool errorFlag) { return JKRSolidHeap::create(size, parent, errorFlag); } diff --git a/include/JSystem/JKernel/JKRStdHeap.h b/include/JSystem/JKernel/JKRStdHeap.h index 21a5eb08..55573696 100644 --- a/include/JSystem/JKernel/JKRStdHeap.h +++ b/include/JSystem/JKernel/JKRStdHeap.h @@ -31,6 +31,8 @@ public: s32 do_getSize(void* ptr) { return OSReferentSize(ptr); }; s32 do_getTotalFreeSize() { return getFreeSize(); }; + static void* getState_(TState* state) { return getState_buf_(state); } + OSHeapHandle mHeapHandle; }; diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index e98b1db4..63fda32b 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -1245,6 +1245,7 @@ inline s32 dComIfGs_getCollectMapNum() { inline void dComIfGs_onSaveArriveGrid(int i_no) { g_dComIfG_gameInfo.save.getPlayer().getMap().onSaveArriveGrid(i_no); } + inline BOOL dComIfGs_isSaveArriveGrid(int i_no) { return g_dComIfG_gameInfo.save.getPlayer().getMap().isSaveArriveGrid(i_no); } @@ -3519,7 +3520,7 @@ inline s32 dComIfGp_event_order(u16 eventType, u16 priority, u16 flag, u16 hind, return g_dComIfG_gameInfo.play.getEvent()->order(eventType, priority, flag, hind, pActor1, pActor2, eventID, infoIdx); } -inline s32 dComIfGp_event_orderOld(u16 eventType, u16 priority, u16 flag, u16 hind, void* pActor1, void* pActor2, const char *pEventName) { +inline s32 dComIfGp_event_orderOld(u16 eventType, u16 priority, u16 flag, u16 hind, void* pActor1, void* pActor2, void* pEventName) { return g_dComIfG_gameInfo.play.getEvent()->orderOld(eventType, priority, flag, hind, pActor1, pActor2, pEventName); } diff --git a/include/d/d_menu_fmap.h b/include/d/d_menu_fmap.h index 94b0339f..0da5e0ce 100644 --- a/include/d/d_menu_fmap.h +++ b/include/d/d_menu_fmap.h @@ -144,8 +144,12 @@ public: JUT_ASSERT(VERSION_SELECT(558, 558, 569, 569), fmapSv != NULL); fmapSv->setCurHY(val); } - void lineInter0to1(f32, f32, f32) {} - void lineInter0to1ForU8(u8, u8, f32) {} + f32 lineInter0to1(f32 a, f32 b, f32 c) { + return a + (b - a) * c; + } + u8 lineInter0to1ForU8(u8 a, u8 b, f32 c) { + return a + (b - a) * c; + } void setFont(JUTFont* font, JUTFont* rfont) { mFont = font; mRFont = rfont; @@ -306,7 +310,7 @@ public: bool _open_wallPaper(); int getButtonIconMode(); -public: +private: /* 0x0004 */ u8 padding_0x4[0x18 - 0x4]; /* 0x0018 */ ResTIMG * mChkPntTxt_p; /* 0x001C */ dDlst_FMAP_c fmapDl; @@ -347,7 +351,7 @@ public: /* 0x34CC */ fopMsgM_pane_class mFmnPanes[15]; /* 0x3814 */ fopMsgM_pane_class mClgPane; /* 0x384C */ fopMsgM_pane_class mSc2xPanes[7]; - /* 0x39D4 */ fopMsgM_pane_class mR0xPanes[11]; + /* 0x39D4 */ fopMsgM_pane_class mR0xPanes[DEMO_SELECT(10, 11)]; /* 0x3C3C */ fopMsgM_pane_class mStxxPanes[49]; /* 0x46F4 */ fopMsgM_pane_class mCk1xPanes[3]; /* 0x479C */ fopMsgM_pane_class mCk2xPanes[3]; @@ -377,7 +381,7 @@ public: /* 0x4F44 */ fopMsgM_pane_class mGsPanes[7]; #endif #if VERSION == VERSION_DEMO - u8 pad [0x340 + 8]; + u8 pad [0x340 + 8 + 0x38]; #endif /* 0x50CC */ STControl* stick; /* 0x50D0 */ JUTFont* mFont; @@ -435,8 +439,8 @@ public: /* 0x517A */ u8 mFishmanTimer3; /* 0x517B */ u8 mCheckMarkTimer; /* 0x517C */ u8 mCheckMarkToggle; - /* 0x517D */ u8 field_0x517D; - /* 0x517E */ u8 field_0x517E; + /* 0x517D */ u8 mKorokMarkTimer; + /* 0x517E */ u8 mKorokMarkToggle; /* 0x517F */ bool mFishmanActive; /* 0x5180 */ u8 mSalvagePntIdx; /* 0x5181 */ u8 mButtonIconMode; @@ -448,11 +452,11 @@ public: /* 0x5187 */ u8 padding_0x5187[0x518C-0x5187]; /* 0x518C */ char* mpKtx1String; /* 0x5190 */ char* mpKtx2String; - /* 0x5194 */ JUtility::TColor mCk1Color; + /* 0x5194 */ JUtility::TColor mCk1Color1; /* 0x5198 */ JUtility::TColor mCk1Color2; - /* 0x519C */ JUtility::TColor mKr0Color; + /* 0x519C */ JUtility::TColor mKr0Color1; /* 0x51A0 */ JUtility::TColor mKr0Color2; - /* 0x51A4 */ JUtility::TColor mYs01Color; + /* 0x51A4 */ JUtility::TColor mYs01Color1; /* 0x51A8 */ JUtility::TColor mYs01Color2; #if VERSION > VERSION_JPN /* 0x51AC */ bool mMoonAlphaActive; @@ -543,12 +547,12 @@ public: /* 0x0E0 */ u8 mCheckMarkAnimFrame; /* 0x0E1 */ GXColor mCheckMarkWhite; /* 0x0E5 */ GXColor mCheckMarkBlack; - /* 0x0E9 */ u8 field_0xE9; - /* 0x0EA */ GXColor field_0xEA; - /* 0x0EE */ GXColor field_0xEE; + /* 0x0E9 */ u8 mKorokMarkAnimFrame; + /* 0x0EA */ GXColor mKorokMarkAnimWhite; + /* 0x0EE */ GXColor mKorokMarkAnimBlack; /* 0x0F2 */ u8 field_0xF2; - /* 0x0F3 */ GXColor mKorokWhite; - /* 0x0F7 */ GXColor mKorokBlack; + /* 0x0F3 */ GXColor mKorokMarkWhite; + /* 0x0F7 */ GXColor mKorokMarkBlack; /* 0x0FB */ u8 field_0xFB; /* 0x0FC */ GXColor mAreaTxtColor; /* 0x100 */ GXColor mAreaTxtColorMain; diff --git a/include/d/d_menu_fmap2.h b/include/d/d_menu_fmap2.h index d39473dd..7cf7b921 100644 --- a/include/d/d_menu_fmap2.h +++ b/include/d/d_menu_fmap2.h @@ -1,8 +1,11 @@ #ifndef D_MENU_FMAP2_H #define D_MENU_FMAP2_H +#include "JSystem/J2DGraph/J2DTextBox.h" #include "d/d_drawlist.h" #include "d/d_menu_fmapSv.h" +#include "f_op/f_op_msg_mng.h" +#include "m_Do/m_Do_hostIO.h" struct fopMsgM_pane_class; class J2DScreen; @@ -10,6 +13,7 @@ class JUTFont; struct ResTIMG; class STControl; class dDlst_2DOutFont_c; +class mDoDvdThd_mountArchive_c; class dDlst_FMAP2GS_c : public dDlst_base_c { public: @@ -35,7 +39,7 @@ public: void getCmapDatValue() {} void lineInter0to1ForU8(u8, u8, f32) {} void setAramCmapDat(aramCmapDat_c* i_ptr) { mpFmapDatPnt = i_ptr; } - void setSvPtr(dMenu_FmapSv_c*) {} + void setSvPtr(dMenu_FmapSv_c* i_ptr) { fmapSv = i_ptr; } void _create(); void screenSet(); @@ -203,9 +207,9 @@ public: fmapSv->setCmapSelNo(no); } -public: - /* 0x0004 */ void* mChkPntTxt_p; - /* 0x0008 */ void* mCmapTxtMain_p[2]; +private: + /* 0x0004 */ ResTIMG* mChkPntTxt_p; + /* 0x0008 */ ResTIMG* mCmapTxtMain_p[2]; /* 0x0010 */ dMenu_FmapSv_c* fmapSv; /* 0x0014 */ u8 padding_0x14[0x18 - 0x14]; /* 0x0018 */ mDoDvdThd_mountArchive_c* field_0x18; @@ -218,10 +222,8 @@ public: /* 0x003C */ dDlst_2DOutFont_c* outFont[2]; /* 0x0044 */ dDlst_2DOutFont_c* outFontS[2]; /* 0x004C */ fopMsgM_pane_class mClPane; - /* 0x0084 */ fopMsgM_pane_class mFc0xPanes[4]; - /* 0x0164 */ fopMsgM_pane_class mFc1xPanes[4]; - /* 0x0244 */ fopMsgM_pane_class mCc0xPanes[4]; - /* 0x0324 */ fopMsgM_pane_class mCc1xPanes[4]; + /* 0x0084 */ fopMsgM_pane_class mFcxxPanes[8]; + /* 0x0244 */ fopMsgM_pane_class mCcxxPanes[8]; /* 0x0404 */ fopMsgM_pane_class mKdmPane; /* 0x043c */ fopMsgM_pane_class field_0x43c[5]; /* 0x0554 */ fopMsgM_pane_class field_0x554[17]; @@ -437,10 +439,8 @@ public: /* 0x2824 */ JUtility::TColor color_0x2824; /* 0x2828 */ JUtility::TColor color_0x2828; /* 0x282C */ JUtility::TColor color_0x282C; - /* 0x2830 */ f32 field_0x2830; - /* 0x2834 */ f32 field_0x2834; - /* 0x2838 */ f32 field_0x2838; - /* 0x283C */ f32 field_0x283c; + /* 0x2830 */ J2DTextBox::TFontSize field_0x2830; + /* 0x2838 */ J2DTextBox::TFontSize field_0x2838; /* 0x2840 */ f32 field_0x2840; /* 0x2844 */ f32 field_0x2844; /* 0x2848 */ u16 field_0x2848[2]; @@ -460,6 +460,8 @@ public: dMf2_HIO_c(); virtual ~dMf2_HIO_c() {} + void genMessage(JORMContext* ctx) { UNUSED(ctx); } + /* 0x04 */ s8 mNo; /* 0x05 */ u8 field_0x5; /* 0x06 */ u8 field_0x6; diff --git a/include/d/d_menu_fmapSv.h b/include/d/d_menu_fmapSv.h index fd1e538e..91adbb17 100644 --- a/include/d/d_menu_fmapSv.h +++ b/include/d/d_menu_fmapSv.h @@ -39,7 +39,7 @@ public: mNum = a_pat->num; mpPnt = a_pat->pnt; } else { - JUT_ASSERT(252, FALSE); + JUT_ASSERT(DEMO_SELECT(246, 252), FALSE); } } void getAramCmapDatValue() {} @@ -53,10 +53,14 @@ public: } pnt++; } - if (i < mNum) { - return pnt; - } - return NULL; + // if (i < mNum) { + // return pnt; + // } else { + // pnt = NULL; + // } + // return pnt; + // Fakematch: Ternary is needed to match getGridNumToCmapDatPnt for demo, but doesn't match debug map size + return i < mNum ? pnt : NULL; } aramCmapDatPnt_t* getCmapDatPnt4(int i_cmapIdx) { aramCmapDatPnt_t* pnt = mpPnt; @@ -69,8 +73,10 @@ public: } if (i < mNum) { return pnt; + } else { + pnt = NULL; } - return NULL; + return pnt; } private: |
