summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTakaRikka <38417346+TakaRikka@users.noreply.github.com>2025-11-17 10:01:03 -0800
committerGitHub <noreply@github.com>2025-11-17 20:01:03 +0200
commit540217c31b88246d5c3abd57bb3fbd97cff6d31c (patch)
treecc08666dad6a7cd55539168a0d0e3f6bba188488 /include
parent4350a38fe01fa57890eade52c7c5e3789cce83ac (diff)
wii building OK / m_Do_graphic debug work (#2815)
* wii building OK + m_Do_graphic debug work * d_meter_HIO debug cleanup * wii m_Do_graphic stuff * tag_attack_item OK, mirror_chain almost * fix build * mg_fshop matching
Diffstat (limited to 'include')
-rw-r--r--include/CaptureScreen.h21
-rw-r--r--include/JSystem/JFramework/JFWDisplay.h4
-rw-r--r--include/JSystem/JKernel/JKRExpHeap.h2
-rw-r--r--include/JSystem/JKernel/JKRFileCache.h4
-rw-r--r--include/JSystem/JKernel/JKRHeap.h2
-rw-r--r--include/JSystem/JParticle/JPADrawInfo.h6
-rw-r--r--include/JSystem/JUtility/JUTGamePad.h5
-rw-r--r--include/SSystem/SComponent/c_lib.h13
-rw-r--r--include/d/actor/d_a_mg_fshop.h5
-rw-r--r--include/d/actor/d_a_obj_mirror_chain.h2
-rw-r--r--include/d/actor/d_a_tag_attack_item.h30
-rw-r--r--include/d/d_camera.h3
-rw-r--r--include/d/d_com_inf_game.h10
-rw-r--r--include/d/d_cursor_mng.h9
-rw-r--r--include/d/d_meter2_info.h5
-rw-r--r--include/d/d_meter_HIO.h104
-rw-r--r--include/d/d_particle.h7
-rw-r--r--include/d/d_procname.h2
-rw-r--r--include/f_ap/f_ap_game.h33
-rw-r--r--include/m_Do/m_Do_controller_pad.h2
-rw-r--r--include/m_Do/m_Do_ext2.h4
-rw-r--r--include/m_Do/m_Do_graphic.h154
-rw-r--r--include/m_Do/m_Do_mtx.h2
-rw-r--r--include/revolution/vi/vifuncs.h4
24 files changed, 352 insertions, 81 deletions
diff --git a/include/CaptureScreen.h b/include/CaptureScreen.h
new file mode 100644
index 0000000000..1f843da9aa
--- /dev/null
+++ b/include/CaptureScreen.h
@@ -0,0 +1,21 @@
+#ifndef CAPTURESCREEN_H
+#define CAPTURESCREEN_H
+
+#include "JSystem/JFramework/JFWDisplay.h"
+
+class CaptureScreen {
+public:
+ CaptureScreen(const JFWDisplay*);
+
+ static int getAlignedWidthBytes(int);
+ static int getBmpBufferSize(int, int);
+ void makeBmpFromEfb(void*, int, int, int, int, int, int);
+ void openBmp(int, int);
+ void closeBmp();
+ void saveBmp(void*, u32);
+
+ /* 0x0 */ const JFWDisplay* mpDisplay;
+ /* 0x4 */ int field_0x4;
+};
+
+#endif /* CAPTURESCREEN_H */
diff --git a/include/JSystem/JFramework/JFWDisplay.h b/include/JSystem/JFramework/JFWDisplay.h
index 79a115046c..9ba569b6e5 100644
--- a/include/JSystem/JFramework/JFWDisplay.h
+++ b/include/JSystem/JFramework/JFWDisplay.h
@@ -72,6 +72,10 @@ public:
static JFWDisplay* getManager() { return sManager; }
+ static JFWDisplay* createManager(JKRHeap* i_heap, JUTXfb::EXfbNumber i_xfbNum, bool param_2) {
+ return createManager(NULL, i_heap, i_xfbNum, param_2);
+ }
+
bool startFadeOut(int param_0) {
if (mFader != NULL) {
return mFader->startFadeOut(param_0);
diff --git a/include/JSystem/JKernel/JKRExpHeap.h b/include/JSystem/JKernel/JKRExpHeap.h
index 4215fd4a2c..f9f126aa23 100644
--- a/include/JSystem/JKernel/JKRExpHeap.h
+++ b/include/JSystem/JKernel/JKRExpHeap.h
@@ -28,7 +28,7 @@ public:
void newGroupId(u8 groupId) { mGroupId = groupId; }
bool isValid() const { return mMagic == 'HM'; }
- bool _isTempMemBlock() const { return (mFlags & 0x80) ? true : false; }
+ bool isTempMemBlock() const { return mFlags & 0x80; }
int getAlignment() const { return mFlags & 0x7f; }
void* getContent() const { return (void*)(this + 1); }
CMemBlock* getPrevBlock() const { return mPrev; }
diff --git a/include/JSystem/JKernel/JKRFileCache.h b/include/JSystem/JKernel/JKRFileCache.h
index 9103340cd1..c6e47d2cc2 100644
--- a/include/JSystem/JKernel/JKRFileCache.h
+++ b/include/JSystem/JKernel/JKRFileCache.h
@@ -68,4 +68,8 @@ inline JKRFileCache* JKRMountDvdDrive(const char* path, JKRHeap* heap, const cha
return JKRFileCache::mount(path, heap, param_2);
}
+inline void JKRUnmountDvdDrive(JKRFileCache* filecache) {
+ filecache->unmount();
+}
+
#endif /* JKRFILECACHE_H */
diff --git a/include/JSystem/JKernel/JKRHeap.h b/include/JSystem/JKernel/JKRHeap.h
index 474edf5757..d64a598233 100644
--- a/include/JSystem/JKernel/JKRHeap.h
+++ b/include/JSystem/JKernel/JKRHeap.h
@@ -91,7 +91,7 @@ public:
void setDebugFill(bool debugFill) { mDebugFill = debugFill; }
bool getDebugFill() const { return mDebugFill; }
void* getStartAddr() { return (void*)mStart; }
- void* getEndAddr() const { return (void*)mEnd; }
+ void* getEndAddr() { return (void*)mEnd; }
u32 getSize() const { return mSize; }
bool getErrorFlag() const { return mErrorFlag; }
void callErrorHandler(JKRHeap* heap, u32 size, int alignment) {
diff --git a/include/JSystem/JParticle/JPADrawInfo.h b/include/JSystem/JParticle/JPADrawInfo.h
index 061783af2e..0cf63754c5 100644
--- a/include/JSystem/JParticle/JPADrawInfo.h
+++ b/include/JSystem/JParticle/JPADrawInfo.h
@@ -9,12 +9,12 @@
*/
class JPADrawInfo {
public:
- JPADrawInfo(Mtx param_0, f32 fovY, f32 aspect) {
+ JPADrawInfo(const Mtx param_0, f32 fovY, f32 aspect) {
MTXCopy(param_0, mCamMtx);
C_MTXLightPerspective(mPrjMtx, fovY, aspect, 0.5f, -0.5f, 0.5f, 0.5f);
}
- JPADrawInfo(Mtx param_0, f32 top, f32 bottom, f32 left, f32 right) {
+ JPADrawInfo(const Mtx param_0, f32 top, f32 bottom, f32 left, f32 right) {
MTXCopy(param_0, mCamMtx);
C_MTXLightOrtho(mPrjMtx, top, bottom, left, right, 0.5f, 0.5f, 0.5f, 0.5f);
}
@@ -24,6 +24,8 @@ public:
void getCamMtx(Mtx dst) const { MTXCopy(mCamMtx, dst); }
void getPrjMtx(Mtx dst) const { MTXCopy(mPrjMtx, dst); }
+
+ void setPrjMtx(const Mtx src) { MTXCopy(src, mPrjMtx); }
};
#endif
diff --git a/include/JSystem/JUtility/JUTGamePad.h b/include/JSystem/JUtility/JUTGamePad.h
index bbb20c0865..b2e5403de8 100644
--- a/include/JSystem/JUtility/JUTGamePad.h
+++ b/include/JSystem/JUtility/JUTGamePad.h
@@ -110,7 +110,10 @@ public:
void stopMotor() { mRumble.stopMotor(mPortNum, false); }
void stopMotorHard() { mRumble.stopMotorHard(mPortNum); }
- static s8 getPortStatus(u32 port) { return mPadStatus[port].err; }
+ static s8 getPortStatus(EPadPort port) {
+ JUT_ASSERT(360, 0 <= port && port < 4);
+ return mPadStatus[port].err;
+ }
struct CButton {
CButton() { clear(); }
diff --git a/include/SSystem/SComponent/c_lib.h b/include/SSystem/SComponent/c_lib.h
index 99693a0305..1dcd862402 100644
--- a/include/SSystem/SComponent/c_lib.h
+++ b/include/SSystem/SComponent/c_lib.h
@@ -72,6 +72,19 @@ inline T cLib_maxLimit(T val, T max) {
}
template <typename T>
+inline T cLib_minLimit(T val, T min) {
+ T ret;
+
+ if (val < min) {
+ ret = min;
+ } else {
+ ret = val;
+ }
+
+ return (T)ret;
+}
+
+template <typename T>
T cLib_getRndValue(T min, T range) {
return (T)(min + cM_rndF((f32)range));
}
diff --git a/include/d/actor/d_a_mg_fshop.h b/include/d/actor/d_a_mg_fshop.h
index a30b855958..529b068903 100644
--- a/include/d/actor/d_a_mg_fshop.h
+++ b/include/d/actor/d_a_mg_fshop.h
@@ -36,7 +36,7 @@ struct fs_rod_s {
/* 0x4C */ int field_0x4c;
/* 0x50 */ u8 field_0x50[0x54 - 0x50];
/* 0x54 */ f32 field_0x54;
- /* 0x58 */ u8 field_0x58[0x5C - 0x58];
+ /* 0x58 */ s16 field_0x58;
};
struct fs_lure_s {
@@ -82,8 +82,9 @@ struct fs_koro2_s {
* @details
*
*/
-class fshop_class : public fopAc_ac_c {
+class fshop_class {
public:
+ /* 0x0000 */ fopAc_ac_c actor;
/* 0x0568 */ request_of_phase_process_class mPhase;
/* 0x0570 */ s16 field_0x0570;
/* 0x0572 */ s16 field_0x0572;
diff --git a/include/d/actor/d_a_obj_mirror_chain.h b/include/d/actor/d_a_obj_mirror_chain.h
index e56494fd79..69cdadb038 100644
--- a/include/d/actor/d_a_obj_mirror_chain.h
+++ b/include/d/actor/d_a_obj_mirror_chain.h
@@ -38,7 +38,7 @@ public:
/* 80C96E40 */ int createHeap();
/* 80C975EC */ void initBaseMtx();
/* 80C97618 */ void setBaseMtx();
- /* 80C976B8 */ int draw();
+ /* 80C976B8 */ inline int draw();
/* 80C97988 */ int execute();
inline ~daObjMirrorChain_c();
inline void create_init();
diff --git a/include/d/actor/d_a_tag_attack_item.h b/include/d/actor/d_a_tag_attack_item.h
index 8a25948c59..5c98b73bc6 100644
--- a/include/d/actor/d_a_tag_attack_item.h
+++ b/include/d/actor/d_a_tag_attack_item.h
@@ -1,5 +1,35 @@
#ifndef D_A_TAG_ATTACK_ITEM_H
#define D_A_TAG_ATTACK_ITEM_H
+#include "f_op/f_op_actor_mng.h"
+#include "d/d_event_lib.h"
+#include "d/d_cc_d.h"
+
+class daTagAtkItem_c : public fopAc_ac_c , public dEvLib_callback_c {
+public:
+ daTagAtkItem_c() : dEvLib_callback_c(this) {}
+
+ /* 805A2958 */ void setBaseMtx();
+ /* 805A2990 */ int Create();
+ /* 805A2A34 */ int create();
+ /* 805A2C48 */ int execute();
+ /* 805A2CA8 */ void action();
+ /* 805A2D58 */ BOOL checkHit();
+ /* 805A2F54 */ void createItem();
+ /* 805A3038 */ int _delete();
+
+ /* 805A3118 */ virtual ~daTagAtkItem_c() {}
+ /* 805A2D10 */ virtual bool eventStart();
+ /* 805A2D34 */ virtual bool eventEnd();
+
+ u8 getEvId() { return fopAcM_GetParamBit(this, 0x18, 8); }
+ u8 getNum() { return fopAcM_GetParamBit(this, 8, 8); }
+ u8 getItemBit() { return fopAcM_GetParamBit(this, 0x10, 8); }
+ u8 getItemNo() { return fopAcM_GetParamBit(this, 0, 8); }
+
+ /* 0x57C */ u8 field_0x57C[0x584 - 0x57C];
+ /* 0x584 */ dCcD_Stts mCcStts;
+ /* 0x5C0 */ dCcD_Cyl mCyl;
+};
#endif /* D_A_TAG_ATTACK_ITEM_H */
diff --git a/include/d/d_camera.h b/include/d/d_camera.h
index 42e0fbc69c..69f945eb79 100644
--- a/include/d/d_camera.h
+++ b/include/d/d_camera.h
@@ -10,6 +10,7 @@
#include "d/d_stage.h"
#include "d/actor/d_a_player.h"
#include "f_op/f_op_actor.h"
+#include "m_Do/m_Do_graphic.h"
dAttention_c* dComIfGp_getAttention();
@@ -1063,7 +1064,7 @@ public:
bool CheckFlag(u32 i_flag) { return mEventFlags & i_flag; }
- void ResetView() { setView(0.0f, 0.0f, 608.0f, 448.0f); }
+ void ResetView() { setView(0.0f, 0.0f, FB_WIDTH, FB_HEIGHT); }
void clearInfo(dCamInfo_c* i_info, s16 param_1) {
i_info->field_0x1e = param_1;
diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h
index 448495a1d8..4f8a0fc026 100644
--- a/include/d/d_com_inf_game.h
+++ b/include/d/d_com_inf_game.h
@@ -236,7 +236,7 @@ public:
/* 0x04F69 */ u8 mNeedLightDropNum;
/* 0x04F6A */ u8 field_0x4f6a[18];
/* 0x04F7C */ u8 mMesgBgm;
- /* 0x04F7D */ bool mPauseFlag;
+ /* 0x04F7D */ u8 mPauseFlag;
/* 0x04F7E */ u8 mItemLifeCountType;
/* 0x04F7F */ u8 mOxygenShowFlag;
/* 0x04F80 */ u8 mShow2D;
@@ -715,7 +715,7 @@ public:
void setDirection(u8 i_dir) { mItemInfo.mDirection = i_dir; }
- bool& isPauseFlag() { return mItemInfo.mPauseFlag; }
+ u8 isPauseFlag() { return mItemInfo.mPauseFlag; }
void offPauseFlag() { mItemInfo.mPauseFlag = false; }
void onPauseFlag() { mItemInfo.mPauseFlag = true; }
u8 getOxygenShowFlag() { return mItemInfo.mOxygenShowFlag; }
@@ -3095,7 +3095,7 @@ inline bool dComIfGp_isBottleSetFlag(u8 flag) {
return g_dComIfG_gameInfo.play.isBottleSetFlag(flag);
}
-inline bool dComIfGp_isPauseFlag() {
+inline u8 dComIfGp_isPauseFlag() {
return g_dComIfG_gameInfo.play.isPauseFlag();
}
@@ -4069,6 +4069,10 @@ inline JPABaseEmitter* dComIfGp_particle_getEmitter(u32 param_0) {
return g_dComIfG_gameInfo.play.getParticle()->getEmitter(param_0);
}
+inline void dComIfGp_particle_levelExecute(u32 param_0) {
+ g_dComIfG_gameInfo.play.getParticle()->levelExecute(param_0);
+}
+
inline u32 dComIfGp_particle_setSimpleFoot(u32 param_0, u32* param_1, cBgS_PolyInfo& param_2,
cXyz const* param_3, dKy_tevstr_c const* param_4,
int param_5, csXyz const* param_6, cXyz const* param_7,
diff --git a/include/d/d_cursor_mng.h b/include/d/d_cursor_mng.h
new file mode 100644
index 0000000000..59fcbe0ba1
--- /dev/null
+++ b/include/d/d_cursor_mng.h
@@ -0,0 +1,9 @@
+#ifndef D_CURSOR_MNG_H
+#define D_CURSOR_MNG_H
+
+#include "m_Do/m_Re_controller_pad.h"
+
+// TODO: putting this here until a more appropriate place is found
+extern u8 data_8053a730;
+
+#endif /* D_CURSOR_MNG_H */
diff --git a/include/d/d_meter2_info.h b/include/d/d_meter2_info.h
index b41fcfd51a..b7905a77a2 100644
--- a/include/d/d_meter2_info.h
+++ b/include/d/d_meter2_info.h
@@ -312,6 +312,11 @@ bool dMeter2Info_isItemOpenCheck();
bool dMeter2Info_isMapOpenCheck();
s16 dMeter2Info_getNowLifeGauge();
+#if WIDESCREEN_SUPPORT
+void dMeter2Info_onWide2D();
+void dMeter2Info_offWide2D();
+#endif
+
inline void dMeter2Info_Initialize() {
g_meter2_info.init();
}
diff --git a/include/d/d_meter_HIO.h b/include/d/d_meter_HIO.h
index b928ec7afe..d8f2a8af9e 100644
--- a/include/d/d_meter_HIO.h
+++ b/include/d/d_meter_HIO.h
@@ -3,17 +3,27 @@
#include "JSystem/JUtility/TColor.h"
#include "JSystem/JHostIO/JORReflexible.h"
+#include "JSystem/JHostIO/JORServer.h"
#include "SSystem/SComponent/c_sxyz.h"
#include "SSystem/SComponent/c_xyz.h"
#include "global.h"
+struct subJOREventCallbackListNode : public JOREventCallbackListNode {
+ subJOREventCallbackListNode() : JOREventCallbackListNode(0x81000000, 0x81000000, true) {}
+
+ virtual int JORAct(u32, const char*);
+ virtual ~subJOREventCallbackListNode() {}
+};
+
class JKRAramArchive;
-class dMeter_menuHIO_c {
+class dMeter_menuHIO_c : public JORReflexible {
public:
/* 801FE330 */ dMeter_menuHIO_c();
/* 8020123C */ virtual ~dMeter_menuHIO_c() {}
+ void genMessage(JORMContext*);
+
/* 0x0 */ // vtable
/* 0x4 */ u8 field_0x4[2];
/* 0x6 */ s16 mGameover;
@@ -21,11 +31,13 @@ public:
STATIC_ASSERT(sizeof(dMeter_menuHIO_c) == 8);
-class dMeter_drawCollectHIO_c {
+class dMeter_drawCollectHIO_c : public JORReflexible {
public:
dMeter_drawCollectHIO_c();
virtual ~dMeter_drawCollectHIO_c() {}
+ void genMessage(JORMContext*);
+
enum {
/* 0x0 */ VESSEL_HEART,
/* 0x1 */ VESSEL_DECOR
@@ -70,11 +82,13 @@ public:
/* 0x9C */ bool mButtonDebugON;
}; // Size = 0xA0
-class dMeter_drawOptionHIO_c {
+class dMeter_drawOptionHIO_c : public JORReflexible {
public:
/* 801FE4EC */ dMeter_drawOptionHIO_c();
/* 80200F98 */ virtual ~dMeter_drawOptionHIO_c() {}
+ void genMessage(JORMContext*);
+
enum OptionType {
/* 0x0 */ ATTENTION,
/* 0x1 */ RUMBLE,
@@ -106,11 +120,13 @@ public:
/* 0x6D */ u8 mBackgroundAlpha;
}; // Size: 0x70
-class dMeter_drawLetterHIO_c {
+class dMeter_drawLetterHIO_c : public JORReflexible {
public:
/* 801FE5CC */ dMeter_drawLetterHIO_c();
/* 80200F50 */ virtual ~dMeter_drawLetterHIO_c() {}
+ void genMessage(JORMContext*);
+
enum {
/* 0x0 */ WINDOW_FRAME,
/* 0x1 */ LETTER_FRAME
@@ -146,11 +162,13 @@ public:
/* 0x5F */ bool mDebugON;
}; // Size: 0x60
-class dMeter_drawFishingHIO_c {
+class dMeter_drawFishingHIO_c : public JORReflexible {
public:
/* 801FE730 */ dMeter_drawFishingHIO_c();
/* 80200F08 */ virtual ~dMeter_drawFishingHIO_c() {}
+ void genMessage(JORMContext*);
+
enum {
/* 0x0 */ HYLIAN_BASS,
/* 0x1 */ HYLIAN_LOACH,
@@ -196,11 +214,13 @@ public:
/* 0x250 */ bool mDebug;
}; // Size: 0x254
-class dMeter_drawInsectHIO_c {
+class dMeter_drawInsectHIO_c : public JORReflexible {
public:
/* 801FE8DC */ dMeter_drawInsectHIO_c();
/* 80200EC0 */ virtual ~dMeter_drawInsectHIO_c() {}
+ void genMessage(JORMContext*);
+
enum Type {
/* 0x0 */ DEFAULT,
/* 0x1 */ COLLECT,
@@ -227,11 +247,13 @@ public:
/* 0x3D */ bool mDebugON;
}; // Size: 0x40
-class dMeter_drawCalibrationHIO_c {
+class dMeter_drawCalibrationHIO_c : public JORReflexible {
public:
/* 801FE954 */ dMeter_drawCalibrationHIO_c();
/* 80200E78 */ virtual ~dMeter_drawCalibrationHIO_c() {}
+ void genMessage(JORMContext*);
+
/* 0x00 */ // vtable
/* 0x04 */ u8 field_0x4[4];
/* 0x08 */ f32 mCircleScale;
@@ -242,11 +264,13 @@ public:
/* 0x16 */ bool mDebug;
}; // Size: 0x18
-class dMeter_drawSkillHIO_c {
+class dMeter_drawSkillHIO_c : public JORReflexible {
public:
/* 801FE990 */ dMeter_drawSkillHIO_c();
/* 80200E30 */ virtual ~dMeter_drawSkillHIO_c() {}
+ void genMessage(JORMContext*);
+
enum {
/* 0x0 */ WINDOW,
/* 0x1 */ SKILL_DESC,
@@ -280,11 +304,13 @@ public:
/* 0x5B */ bool mDebug;
}; // Size: 0x5C
-class dMeter_drawEmpButtonHIO_c {
+class dMeter_drawEmpButtonHIO_c : public JORReflexible {
public:
/* 801FEAF0 */ dMeter_drawEmpButtonHIO_c();
/* 80200DA0 */ virtual ~dMeter_drawEmpButtonHIO_c() {}
+ void genMessage(JORMContext*);
+
/* 0x000 */ // vtable
/* 0x004 */ u8 field_0x4[4];
/* 0x008 */ f32 mEmpButtonPosX;
@@ -381,18 +407,14 @@ public:
/* 0x17C */ f32 mHawkeyeZoomPosY;
/* 0x180 */ f32 mHawkeyeZoomScale;
/* 0x184 */ f32 mHawkeyeZoomScale_4x3;
- /* 0x188 */ f32 mHawkeyeTextIconPosX;
- /* 0x18C */ f32 mHawkeyeZoomTextPosX;
- /* 0x190 */ f32 mHawkeyeIconPosX;
+ /* 0x188 */ f32 mHawkeyeIconPosX[3];
/* 0x194 */ f32 mHawkeyeTextIconPosY_4x3;
/* 0x198 */ f32 mHawkeyeTextPosY_4x3;
/* 0x19C */ f32 mHawkeyeIconPosY_4x3;
/* 0x1A0 */ f32 mHawkeyeTextIconPosY;
/* 0x1A4 */ f32 mHawkeyeZoomTextPosY;
/* 0x1A8 */ f32 mHawkeyeIconPosY;
- /* 0x1AC */ f32 mHawkeyeTextIconScale;
- /* 0x1B0 */ f32 mHawkeyeTextScale;
- /* 0x1B4 */ f32 mHawkeyeIconScale;
+ /* 0x1AC */ f32 mHawkeyeIconScale[3];
/* 0x1B8 */ JUtility::TColor mPointerONBlack[2];
/* 0x1C0 */ JUtility::TColor mPointerONWhite[2];
/* 0x1C8 */ JUtility::TColor mPointerOFFBlack;
@@ -432,11 +454,13 @@ public:
/* 0x25A */ bool mHawkeyeZoomDebugON;
}; // Size: 0x25C
-class dMeter_drawMiniGameHIO_c {
+class dMeter_drawMiniGameHIO_c : public JORReflexible {
public:
/* 801FEFF0 */ dMeter_drawMiniGameHIO_c();
/* 80200DE8 */ virtual ~dMeter_drawMiniGameHIO_c() {}
+ void genMessage(JORMContext*);
+
/* 0x000 */ // vtable
/* 0x004 */ u8 field_0x4[4];
/* 0x008 */ f32 field_0x8[3];
@@ -506,11 +530,13 @@ public:
/* 0x18C */ s16 mReadyFightPikariAppearFrames;
}; // Size: 0x190
-class dMeter_drawLightDropHIO_c {
+class dMeter_drawLightDropHIO_c : public JORReflexible {
public:
/* 801FF31C */ dMeter_drawLightDropHIO_c();
/* 80200D58 */ virtual ~dMeter_drawLightDropHIO_c() {}
+ void genMessage(JORMContext*);
+
/* 0x00 */ // vtable
/* 0x04 */ u8 field_0x4[4];
/* 0x08 */ f32 mVesselScale;
@@ -555,11 +581,22 @@ public:
class dMeter_drawHIO_c : public JORReflexible {
public:
/* 801FF5B8 */ dMeter_drawHIO_c();
- /* 80201128 */ virtual ~dMeter_drawHIO_c() {}
+ /* 80201128 */ virtual ~dMeter_drawHIO_c() {
+ #if DEBUG
+ field_0x8_debug = 0;
+ #endif
+ }
#ifdef DEBUG
virtual void listenPropertyEvent(const JORPropertyEvent*);
virtual void genMessage(JORMContext*);
+
+ void updateFMsgDebug();
+ #endif
+
+ #if WIDESCREEN_SUPPORT
+ void updateOnWide();
+ void updateOffWide();
#endif
/* 0x000 */ // vtable
@@ -916,11 +953,18 @@ public:
STATIC_ASSERT(sizeof(dMeter_drawHIO_c) == 3880);
-class dMeter_ringHIO_c {
+class dMeter_ringHIO_c : public JORReflexible {
public:
/* 802001AC */ dMeter_ringHIO_c();
/* 802010E0 */ virtual ~dMeter_ringHIO_c() {}
+ void genMessage(JORMContext*);
+
+ #if WIDESCREEN_SUPPORT
+ void updateOnWide();
+ void updateOffWide();
+ #endif
+
enum {
/* 0x0 */ SET_ITEM,
/* 0x1 */ DIRECT_SELECT,
@@ -1007,11 +1051,13 @@ public:
STATIC_ASSERT(sizeof(dMeter_ringHIO_c) == 344);
-class dMeter_mapIconHIO_c {
+class dMeter_mapIconHIO_c : public JORReflexible {
public:
/* 802004B4 */ dMeter_mapIconHIO_c();
/* 80201028 */ virtual ~dMeter_mapIconHIO_c() {}
+ void genMessage(JORMContext*);
+
enum {
/* 0x00 */ ICON_PORTAL,
/* 0x01 */ ICON_LINK,
@@ -1141,6 +1187,8 @@ public:
/* 802006C8 */ dMeter_fmapHIO_c();
#ifdef DEBUG
void update();
+ void createEvtCallBackObject();
+ void deleteEvtCallBackObject();
virtual void listenPropertyEvent(const JORPropertyEvent*);
virtual void genMessage(JORMContext*);
@@ -1148,11 +1196,17 @@ public:
/* 80200BCC */ virtual ~dMeter_fmapHIO_c();
/* 0x004 */ s8 field_0x4;
- /* 0x008 */ JKRAramArchive* mpArchive;
- /* 0x00C */ void* field_0xc;
- /* 0x010 */ void* field_0x10;
+ #if DEBUG
+ /* 0x008 */ subJOREventCallbackListNode* mpEvtCallBack;
+ #endif
+ /* 0x008 */ JKRAramArchive* mpArcData;
+ /* 0x00C */ void* mpArcFile;
+ /* 0x010 */ void* mpDecompBuf;
/* 0x014 */ void* field_0x14;
/* 0x018 */ void* field_0x18;
+ #if DEBUG
+ /* 0x020 */ u8 unk_0x20[4];
+ #endif
/* 0x01C */ MapBlinkAnime mMapBlink[3];
/* 0x094 */ s16 mDisplayFrameNum;
/* 0x096 */ s16 mUndisplayFrameNum;
@@ -1255,11 +1309,13 @@ public:
STATIC_ASSERT(sizeof(dMeter_fmapHIO_c) == 1188);
-class dMeter_cursorHIO_c {
+class dMeter_cursorHIO_c : public JORReflexible {
public:
/* 80200CD4 */ dMeter_cursorHIO_c();
/* 80201098 */ virtual ~dMeter_cursorHIO_c() {}
+ void genMessage(JORMContext*);
+
/* 0x04 */ s8 field_0x4;
/* 0x08 */ cXyz mSeraShopObjZoom;
/* 0x14 */ cXyz mObjZoom;
diff --git a/include/d/d_particle.h b/include/d/d_particle.h
index 956466a758..112b79cd16 100644
--- a/include/d/d_particle.h
+++ b/include/d/d_particle.h
@@ -409,6 +409,13 @@ public:
void levelAllForceOnEventMove() { field_0x210.allForceOnEventMove(); }
+ void levelExecute(u32 param_0) {
+ level_c::emitter_c* emitter = field_0x210.get(param_0);
+ if (emitter != NULL) {
+ field_0x210.execute(emitter);
+ }
+ }
+
static void onStatus(u8 status) { mStatus |= status; }
static void offStatus(u8 status) { mStatus &= ~status; }
static bool isStatus(u8 status) { return mStatus & status; }
diff --git a/include/d/d_procname.h b/include/d/d_procname.h
index 4362dc851f..cfdeaf6730 100644
--- a/include/d/d_procname.h
+++ b/include/d/d_procname.h
@@ -798,6 +798,8 @@ enum {
/* 0x315 */ PROC_TIMER,
/* 0x316 */ PROC_METER2,
/* 0x317 */ PROC_GAMEOVER,
+
+ PROC_MAX_NUM,
};
#endif /* D_PROCNAME_H */
diff --git a/include/f_ap/f_ap_game.h b/include/f_ap/f_ap_game.h
index 5827100a27..a5cb57a90d 100644
--- a/include/f_ap/f_ap_game.h
+++ b/include/f_ap/f_ap_game.h
@@ -5,22 +5,13 @@
#include "JSystem/JHostIO/JORReflexible.h"
#include "JSystem/JFramework/JFWDisplay.h"
#include "JSystem/JUtility/JUTAssert.h"
+#include "CaptureScreen.h"
#include <string.h>
void fapGm_After();
void fapGm_Create();
void fapGm_Execute();
-struct CaptureScreen {
- CaptureScreen(const JFWDisplay* i_display) {
- field_0x0 = i_display;
- field_0x4 = 0;
- }
-
- /* 0x0 */ const JFWDisplay* field_0x0;
- /* 0x4 */ int field_0x4;
-};
-
class fapGm_HIO_c : public JORReflexible {
public:
/* 80018944 */ fapGm_HIO_c();
@@ -42,6 +33,10 @@ public:
JUT_ASSERT(46, mCaptureScreen != NULL);
}
+ static u8 isCaptureScreen() {
+ return mCaptureScreenFlag;
+ }
+
static void onCpuTimer() {
m_CpuTimerOn = TRUE;
}
@@ -81,7 +76,7 @@ public:
/* 0x17 */ u8 mDisplay2D;
/* 0x18 */ u8 mDisplayParticle;
/* 0x19 */ u8 mDisplayProcessID;
- #if DEBUG
+ #if PLATFORM_WII || PLATFORM_SHIELD
/* 0x1A */ u8 mTrapFilter;
/* 0x1B */ u8 mGammaCorrection;
#endif
@@ -119,7 +114,7 @@ inline BOOL fapGmHIO_isMenu() {
return g_HIO.mDisplayPrint & 2;
}
-inline bool fapGmHIO_isPrint() {
+inline BOOL fapGmHIO_isPrint() {
return g_HIO.mDisplayPrint & 1;
}
@@ -155,6 +150,20 @@ inline void fapGmHIO_onPrint() {
g_HIO.mDisplayPrint |= (u8)0x1;
}
+inline u8 fapGmHIO_getParticle() {
+ return g_HIO.mDisplayParticle;
+}
+
+#if PLATFORM_WII || PLATFORM_SHIELD
+inline u8 fapGmHIO_getTrapFilter() {
+ return g_HIO.mTrapFilter;
+}
+
+inline u8 fapGmHIO_getGamma() {
+ return g_HIO.mGammaCorrection;
+}
+#endif
+
struct fapGm_dataMem {
enum HeapType_e {
HeapType_Error_e,
diff --git a/include/m_Do/m_Do_controller_pad.h b/include/m_Do/m_Do_controller_pad.h
index 4c77bb7888..8f8f2a2ea9 100644
--- a/include/m_Do/m_Do_controller_pad.h
+++ b/include/m_Do/m_Do_controller_pad.h
@@ -59,7 +59,7 @@ public:
static s16 getSubStickAngle(u32 pad) { return getCpadInfo(pad).mCStickAngle; }
static f32 getAnalogR(u32 pad) { return getCpadInfo(pad).mTriggerRight; }
static f32 getAnalogL(u32 pad) { return getCpadInfo(pad).mTriggerLeft; }
- static BOOL isConnect(u32 pad) { return JUTGamePad::getPortStatus(pad) == 0; }
+ static BOOL isConnect(u32 pad) { return JUTGamePad::getPortStatus((JUTGamePad::EPadPort)pad) == 0; }
static void startMotorWave(u32 pad, void* data, JUTGamePad::CRumble::ERumble rumble, u32 length) {
m_gamePad[pad]->startMotorWave(data, rumble, length);
}
diff --git a/include/m_Do/m_Do_ext2.h b/include/m_Do/m_Do_ext2.h
index 45c72fe6ef..2308717bb6 100644
--- a/include/m_Do/m_Do_ext2.h
+++ b/include/m_Do/m_Do_ext2.h
@@ -12,8 +12,8 @@ public:
void check();
void diff();
- static void easyCreate(void*, s32);
- static void easyCreate(void*, u32);
+ static FixedMemoryCheck* easyCreate(void*, s32);
+ static FixedMemoryCheck* easyCreate(void*, u32);
static void checkAll();
static void diffAll();
static void saveAll();
diff --git a/include/m_Do/m_Do_graphic.h b/include/m_Do/m_Do_graphic.h
index a0b52e4b95..44685e321f 100644
--- a/include/m_Do/m_Do_graphic.h
+++ b/include/m_Do/m_Do_graphic.h
@@ -2,13 +2,22 @@
#define M_DO_M_DO_GRAPHIC_H
#include "JSystem/JFramework/JFWDisplay.h"
-#include "dolphin/mtx.h"
+#include "m_Do/m_Do_mtx.h"
#include "global.h"
+#if WIDESCREEN_SUPPORT
+#define FB_WIDTH (640)
+#define FB_HEIGHT (456)
+#else
+#define FB_WIDTH (608)
+#define FB_HEIGHT (448)
+#endif
+
int mDoGph_Create();
void mDoGph_drawFilterQuad(s8 param_0, s8 param_1);
struct ResTIMG;
+class JKRSolidHeap;
class mDoGph_gInf_c {
public:
class bloom_c {
@@ -43,6 +52,20 @@ public:
/* 0x10 */ void* m_buffer;
};
+ #if PLATFORM_WII || PLATFORM_SHIELD
+ class csr_c {
+ public:
+ virtual ~csr_c();
+ virtual bool isPointer();
+
+ void particleExecute();
+
+ static u32 m_blurID;
+ };
+
+ static void entryBaseCsr(csr_c*);
+ #endif
+
/* 80007E44 */ static void create();
/* 80007F90 */ static void beginRender();
/* 800080D0 */ static void fadeOut(f32);
@@ -71,7 +94,7 @@ public:
static u8 isFade() { return mFade; }
static void fadeIn_f(f32 i_fadeSpeed, _GXColor& i_fadeColor) { fadeOut_f(-i_fadeSpeed, i_fadeColor); }
static void offBlure() { mBlureFlag = false; }
- static bool isBlure() { return mBlureFlag; }
+ static u8 isBlure() { return mBlureFlag; }
static void setBlureRate(u8 i_rate) { mBlureRate = i_rate; }
static u8 getBlureRate() { return mBlureRate; }
static MtxP getBlureMtx() { return mBlureMtx; }
@@ -80,11 +103,15 @@ public:
static void setTickRate(u32 rate) { JFWDisplay::getManager()->setTickRate(rate); }
static void waitBlanking(int wait) { JFWDisplay::getManager()->waitBlanking(wait); }
+ static void setBlureMtx(const Mtx m) {
+ cMtx_copy(m, mBlureMtx);
+ }
+
static f32 getWidthF() {
#if PLATFORM_WII || PLATFORM_SHIELD
return m_widthF;
#else
- return 608.0f;
+ return FB_WIDTH;
#endif
}
@@ -92,12 +119,12 @@ public:
#if PLATFORM_WII || PLATFORM_SHIELD
return m_heightF;
#else
- return 448.0f;
+ return FB_HEIGHT;
#endif
}
- static f32 getWidth() { return 608.0f; }
- static f32 getHeight() { return 448.0f; }
+ static f32 getWidth() { return FB_WIDTH; }
+ static f32 getHeight() { return FB_HEIGHT; }
static f32 getMinYF() {
#if PLATFORM_WII || PLATFORM_SHIELD
@@ -119,7 +146,7 @@ public:
#if PLATFORM_WII || PLATFORM_SHIELD
return m_maxYF;
#else
- return 448.0f;
+ return FB_HEIGHT;
#endif
}
@@ -127,15 +154,50 @@ public:
#if PLATFORM_WII || PLATFORM_SHIELD
return m_maxXF;
#else
- return 608.0f;
+ return FB_WIDTH;
+ #endif
+ }
+
+ static f32 getAspect() {
+ #if WIDESCREEN_SUPPORT
+ return m_aspect;
+ #else
+ return 1.3571428f;
+ #endif
+ }
+
+ static int getMinY() {
+ #if WIDESCREEN_SUPPORT
+ return m_minY;
+ #else
+ return 0;
+ #endif
+ }
+
+ static int getMinX() {
+ #if WIDESCREEN_SUPPORT
+ return m_minX;
+ #else
+ return 0;
+ #endif
+ }
+
+ static int getMaxY() {
+ #if WIDESCREEN_SUPPORT
+ return m_maxY;
+ #else
+ return FB_HEIGHT;
+ #endif
+ }
+
+ static int getMaxX() {
+ #if WIDESCREEN_SUPPORT
+ return m_maxX;
+ #else
+ return FB_WIDTH;
#endif
}
- static f32 getAspect() { return 1.3571428f; }
- static int getMinY() { return 0; }
- static int getMinX() { return 0; }
- static int getMaxY() { return 448; }
- static int getMaxX() { return 608; }
static ResTIMG* getFrameBufferTimg() { return mFrameBufferTimg; }
static ResTIMG* getZbufferTimg() { return mZbufferTimg; }
static void* getFrameBufferTex() { return mFrameBufferTex; }
@@ -148,9 +210,6 @@ public:
static void endRender() { JFWDisplay::getManager()->endRender(); }
static GXTexObj* getZbufferTexObj() { return &mZbufferTexObj; }
static GXTexObj* getFrameBufferTexObj() { return &mFrameBufferTexObj; }
- static f32 getInvScale() { return 1.0f; }
- static f32 getScale() { return 1.0f; }
- static void setWideZoomLightProjection(Mtx m) {}
static void setFrameRate(u16 i_rate) { JFWDisplay::getManager()->setFrameRate(i_rate); }
static int getFrameBufferSize() {
@@ -162,22 +221,30 @@ public:
return JFWDisplay::getManager()->getXfbManager()->getDisplayingXfb();
}
- // NONMATCHING - Need to define all mDoGph_gInf_c shieldD members
- static u8 isWide() {
- #if PLATFORM_WII || PLATFORM_SHIELD
- return mWide == TRUE;
+ static f32 getInvScale() {
+ #if WIDESCREEN_SUPPORT
+ return m_invScale;
#else
- return false;
+ return 1.0f;
#endif
}
- static void onWideZoom() {
- //TODO
- }
+ static f32 getScale() { return 1.0f; }
- static void offWideZoom() {
- //TODO
- }
+ #if WIDESCREEN_SUPPORT
+ static void setTvSize();
+
+ static void onWide();
+ static void offWide();
+ static u8 isWide();
+
+ static void onWideZoom();
+ static void offWideZoom();
+ static BOOL isWideZoom();
+
+ static void setWideZoomProjection(Mtx44& m);
+ static void setWideZoomLightProjection(Mtx& m);
+ #endif
static GXTexObj mFrameBufferTexObj;
static GXTexObj mZbufferTexObj;
@@ -192,28 +259,57 @@ public:
static void* mZbufferTex;
static f32 mFadeRate;
static f32 mFadeSpeed;
- static bool mBlureFlag;
+ static u8 mBlureFlag;
static u8 mBlureRate;
static u8 mFade;
static bool mAutoForcus;
- #if PLATFORM_WII || PLATFORM_SHIELD
+ #if PLATFORM_SHIELD
static JKRHeap* getHeap() {
return m_heap;
}
+ static void setHeap(JKRSolidHeap* i_heap) {
+ m_heap = (JKRHeap*)i_heap;
+ }
+
static JKRHeap* m_heap;
+ #endif
+
+ #if PLATFORM_WII || PLATFORM_SHIELD
+ static void resetDimming();
+
+ static csr_c* m_baseCsr;
+ static csr_c* m_csr;
+
static cXyz m_nowEffPos;
static cXyz m_oldEffPos;
static cXyz m_oldOldEffPos;
+ #endif
+
+ #if WIDESCREEN_SUPPORT
static u8 mWide;
+ static u8 mWideZoom;
static ResTIMG* m_fullFrameBufferTimg;
static void* m_fullFrameBufferTex;
static GXTexObj m_fullFrameBufferTexObj;
+
+ static f32 m_aspect;
+ static f32 m_scale;
+ static f32 m_invScale;
+
static f32 m_minXF;
static f32 m_minYF;
+ static int m_minX;
+ static int m_minY;
+
static f32 m_maxXF;
static f32 m_maxYF;
+ static int m_maxX;
+ static int m_maxY;
+
+ static int m_width;
+ static int m_height;
static f32 m_heightF;
static f32 m_widthF;
#endif
diff --git a/include/m_Do/m_Do_mtx.h b/include/m_Do/m_Do_mtx.h
index c82f7ae173..739a0e93ae 100644
--- a/include/m_Do/m_Do_mtx.h
+++ b/include/m_Do/m_Do_mtx.h
@@ -45,7 +45,7 @@ inline void mDoMtx_multVecArray(Mtx m, const Vec* src, Vec* dst, u32 count) {
}
inline void mDoMtx_copy(const Mtx src, Mtx dst) {
- MTXCopy(src, dst);
+ PSMTXCopy(src, dst);
}
inline void mDoMtx_trans(Mtx m, f32 x, f32 y, f32 z) {
diff --git a/include/revolution/vi/vifuncs.h b/include/revolution/vi/vifuncs.h
index 3c1647b37f..f2ed7ef6ca 100644
--- a/include/revolution/vi/vifuncs.h
+++ b/include/revolution/vi/vifuncs.h
@@ -29,6 +29,10 @@ void* VIGetCurrentFrameBuffer(void);
u32 VIGetScanMode(void);
u32 VIGetDTVStatus(void);
+void VISetTrapFilter(u8);
+void VIEnableDimming(BOOL);
+void VISetGamma(int);
+
#ifdef __cplusplus
}
#endif