d_timer / d_bright_check done (#2034)

* d_bright_check mostly fixed

* d_timer done

* remove asm
This commit is contained in:
TakaRikka
2024-01-17 03:04:43 -08:00
committed by GitHub
parent b27b6b287c
commit 772a04851c
51 changed files with 1705 additions and 6121 deletions
+20
View File
@@ -838,10 +838,26 @@ inline dTimer_c* dComIfG_getTimerPtr() {
return g_dComIfG_gameInfo.play.getTimerPtr();
}
inline void dComIfG_setTimerPtr(dTimer_c* i_ptr) {
g_dComIfG_gameInfo.play.setTimerPtr(i_ptr);
}
inline void dComIfG_setTimerType(u8 i_type) {
g_dComIfG_gameInfo.play.setTimerType(i_type);
}
inline u8 dComIfG_getTimerType() {
return g_dComIfG_gameInfo.play.getTimerType();
}
inline int dComIfG_getTimerLimitTimeMs() {
return g_dComIfG_gameInfo.play.getTimerLimitTimeMs();
}
inline void dComIfG_setTimerLimitTimeMs(int i_time) {
g_dComIfG_gameInfo.play.setTimerLimitTimeMs(i_time);
}
inline int dComIfG_setObjectRes(const char* name, u8 param_1, JKRHeap* heap) {
return g_dComIfG_gameInfo.mResControl.setObjectRes(name, param_1, heap);
}
@@ -3216,6 +3232,10 @@ inline void dComIfGp_event_setCullRate(f32 f) {
g_dComIfG_gameInfo.play.getEvent().setCullRate(f);
}
inline u8 dComIfGp_event_getMode() {
return g_dComIfG_gameInfo.play.getEvent().getMode();
}
inline int i_dComIfGp_evmng_getMyStaffId(const char* pName, fopAc_ac_c* pActor, int param_2) {
return dComIfGp_getPEvtManager()->getMyStaffId(pName, pActor, param_2);
}
+37 -14
View File
@@ -3,21 +3,44 @@
#include "d/com/d_com_inf_game.h"
// class dBrightCheck_c {
// public:
// /* 80192F10 */ dBrightCheck_c(JKRArchive*);
// /* 80192F98 */ ~dBrightCheck_c();
// /* 80193030 */ void screenSet();
// /* 801934D0 */ void _move();
// /* 80193508 */ void modeWait();
// /* 8019350C */ void modeMove();
// /* 80193594 */ void _draw();
class dMsgString_c;
// bool isEnd() { return mEnd; }
class dDlst_BrightCheck_c : public dDlst_base_c {
public:
/* 801935D0 */ virtual void draw();
/* 80193648 */ virtual ~dDlst_BrightCheck_c() {}
// void* vtable;
// /* 0x04 */ u8 field_0x4[0x15];
// /* 0x19 */ bool mEnd;
// };
/* 0x04 */ J2DScreen* Scr;
/* 0x08 */ u8 field_0x8[0xC - 0x8];
/* 0x0C */ dMsgString_c* mMsgString;
};
class dBrightCheck_c {
public:
enum Mode_e {
MODE_WAIT_e,
MODE_MOVE_e,
};
/* 80192F10 */ dBrightCheck_c(JKRArchive*);
/* 80192F98 */ virtual ~dBrightCheck_c();
// TODO: probably fake, probably going to break some other function
// need to figure out this weird vtable padding issue
virtual void dummy() = 0;
virtual void dummy2() = 0;
virtual void dummy3() = 0;
/* 80193030 */ void screenSet();
/* 801934D0 */ void _move();
/* 80193508 */ void modeWait();
/* 8019350C */ void modeMove();
/* 80193594 */ void _draw();
/* 0x04 */ JKRArchive* mArchive;
/* 0x08 */ dDlst_BrightCheck_c mBrightCheck;
/* 0x18 */ u8 mMode;
/* 0x19 */ u8 mCompleteCheck;
};
#endif /* D_D_BRIGHT_CHECK_H */
+59 -45
View File
@@ -3,7 +3,6 @@
#include "d/msg/d_msg_object.h"
#include "dolphin/os/OSTime.h"
#include "dolphin/types.h"
#include "f_op/f_op_msg.h"
class CPaneMgr;
@@ -17,11 +16,11 @@ int dTimer_getRestTimeMs();
class dDlst_TimerScrnDraw_c : public dDlst_base_c {
public:
struct dDlst_TimerScrnDraw_UnkData {
/* 0x0 */ f32 field_0x0;
/* 0x4 */ f32 field_0x4;
/* 0x8 */ u16 field_0x8;
/* 0xA */ u16 field_0xa;
struct getin_info {
/* 0x0 */ f32 bck_frame;
/* 0x4 */ f32 pikari_frame;
/* 0x8 */ s16 pos_x;
/* 0xA */ s16 pos_y;
/* 0xC */ u8 field_0xc;
/* 0xD */ u8 field_0xd;
}; // Size: 0x10
@@ -44,10 +43,10 @@ public:
/* 8025FA98 */ void setImagePos(f32, f32);
/* 8025FAC4 */ void setShowType(u8);
/* 8025FB74 */ void anime();
/* 8025FF98 */ void closeAnime();
/* 802601E4 */ void createGetIn(cXyz);
/* 8025FF98 */ BOOL closeAnime();
/* 802601E4 */ int createGetIn(cXyz);
/* 80260574 */ s32 createStart(u16);
/* 80260AA8 */ void checkStartAnimeEnd();
/* 80260AA8 */ bool checkStartAnimeEnd();
/* 80260AD4 */ void playBckAnimation(f32);
/* 80260B54 */ void drawPikari(int);
@@ -56,11 +55,25 @@ public:
void show() { mTimerVisible = 1; }
void hide() { mTimerVisible = 0; }
void setHIOType(u8 i_type) { mHIOType = i_type; }
u8 getHIOType() { return field_0x3e2; }
f32 getTimerTransY() { return mTimerTransY; }
void resetCowID() { mCowID = 0; }
bool isVisible() { return mTimerVisible; }
f32 acc(s16 param_0, s16 param_1, s16 param_2) {
return ((f32)(param_1 - param_2) * (f32)(param_1 - param_2)) / ((f32)(param_0 - param_2) * (f32)(param_0 - param_2));
}
void setTimerTrans(f32 x, f32 y) {
mTimerTransX = x;
mTimerTransY = y;
}
private:
/* 0x004 */ J2DScreen* mpScreen;
/* 0x008 */ J2DScreen* mpGetInScreen;
/* 0x00C */ void* mpGetInBck;
/* 0x00C */ J2DAnmTransform* mpGetInBck;
/* 0x010 */ CPaneMgr* mpParent;
/* 0x014 */ CPaneMgr* mpCowParent;
/* 0x018 */ CPaneMgr* mpTimeParent;
@@ -70,16 +83,14 @@ private:
/* 0x028 */ CPaneMgr* mpGetInText;
/* 0x02C */ J2DPane* mTimerText[6][2];
/* 0x05C */ J2DPane* field_0x5c[2][2];
/* 0x06C */ J2DPane* field_0x6c;
/* 0x070 */ J2DPane* field_0x70;
/* 0x074 */ J2DPane* field_0x74;
/* 0x078 */ J2DPane* field_0x78;
/* 0x06C */ J2DPicture* field_0x6c[2];
/* 0x074 */ J2DPicture* field_0x74[2];
/* 0x07C */ JKRArchive* mpArchive;
/* 0x080 */ dDlst_TimerScrnDraw_UnkData field_0x80[51];
/* 0x3B0 */ f32 field_0x3B0;
/* 0x3B4 */ f32 field_0x3B4;
/* 0x3B8 */ f32 field_0x3B8;
/* 0x3BC */ f32 field_0x3BC;
/* 0x080 */ getin_info m_getin_info[51];
/* 0x3B0 */ f32 mParentAlpha;
/* 0x3B4 */ f32 mTimerAlpha;
/* 0x3B8 */ f32 mCounterAlpha;
/* 0x3BC */ f32 mImageAlpha;
/* 0x3C0 */ f32 mTimerTransX;
/* 0x3C4 */ f32 mTimerTransY;
/* 0x3C8 */ s32 field_0x3C8;
@@ -88,23 +99,23 @@ private:
/* 0x3D4 */ int field_0x3D4;
/* 0x3D8 */ int field_0x3D8;
/* 0x3DC */ u8 mCowID;
/* 0x3DD */ u8 field_0x3DD;
/* 0x3DD */ u8 mHIOType;
/* 0x3DE */ u8 field_0x3DE;
/* 0x3DF */ u8 field_0x3DF;
/* 0x3E0 */ u8 field_0x3E0;
/* 0x3E1 */ u8 mTimerVisible;
/* 0x3E2 */ u8 mHIOType;
/* 0x3E2 */ u8 field_0x3e2;
};
class dTimer_c : public msg_class {
public:
/* 8025CA0C */ void _create();
/* 8025CF04 */ void _execute();
/* 8025CA0C */ int _create();
/* 8025CF04 */ int _execute();
/* 8025D33C */ int _draw();
/* 8025D3BC */ void _delete();
/* 8025D3BC */ int _delete();
/* 8025D524 */ int deleteCheck();
/* 8025D618 */ void start(int, s16);
/* 8025D538 */ void start(int);
/* 8025D618 */ int start(int, s16);
/* 8025D538 */ int start(int);
/* 8025D7C0 */ int stock_start(s16);
/* 8025D708 */ bool stock_start();
/* 8025D7E8 */ int stop(u8);
@@ -118,37 +129,40 @@ public:
/* 802613DC */ int createGetIn(cXyz);
s32 createStart(u16 param_0) { return mp_tm_scrn->createStart(param_0); }
void show() { mp_tm_scrn->show(); }
void hide() { mp_tm_scrn->hide(); }
void setShowType(u8 i_type) { mp_tm_scrn->setShowType(i_type); }
void setCounterPos(f32 param_0, f32 param_1) { mp_tm_scrn->setCounterPos(param_0, param_1); }
void setImagePos(f32 param_0, f32 param_1) { mp_tm_scrn->setImagePos(param_0, param_1); }
void setTimerPos(f32 param_0, f32 param_1) { mp_tm_scrn->setTimerPos(param_0, param_1); }
u8 isReadyFlag() { return mIsReady; }
u8 isReadyFlag() { return m_is_ready; }
private:
/* 0x0FC */ dDlst_TimerScrnDraw_c* mp_tm_scrn;
/* 0x100 */ JKRExpHeap* mpHeap;
/* 0x100 */ JKRExpHeap* mp_heap;
/* 0x104 */ u8 field_0x104[4];
/* 0x108 */ request_of_phase_process_class mPhase;
/* 0x110 */ OSTime mTime1;
/* 0x118 */ OSTime mTime2;
/* 0x120 */ OSTime mTime6;
/* 0x128 */ u8 field_0x128;
/* 0x130 */ OSTime mTime3;
/* 0x138 */ OSTime mTime5;
/* 0x108 */ request_of_phase_process_class m_phase;
/* 0x110 */ OSTime m_start_time;
/* 0x118 */ OSTime m_time;
/* 0x120 */ OSTime field_0x120;
/* 0x128 */ OSTime field_0x128;
/* 0x130 */ OSTime field_0x130;
/* 0x138 */ OSTime field_0x138;
/* 0x140 */ OSTime mLimitTime;
/* 0x148 */ u8 field_0x148[12];
/* 0x154 */ int mTimerMode;
/* 0x148 */ u8 field_0x148[0x150 - 0x148];
/* 0x150 */ int field_0x150;
/* 0x154 */ int m_timer_mode;
/* 0x158 */ int field_0x158;
/* 0x15C */ u8 field_0x15c[8];
/* 0x164 */ u8 mSeIdx;
/* 0x165 */ u8 field_0x165[3];
/* 0x15C */ int field_0x15c;
/* 0x160 */ int field_0x160;
/* 0x164 */ int m_se_idx;
/* 0x168 */ s16 field_0x168;
/* 0x16A */ u8 field_0x16A;
/* 0x16B */ u8 field_0x16B;
/* 0x16C */ u8 mDeleteCheck;
/* 0x16C */ u8 field_0x16D;
/* 0x16E */ u8 mIsReady;
/* 0x16C */ u8 m_mode;
/* 0x16D */ u8 field_0x16D;
/* 0x16E */ u8 m_is_ready;
};
#endif /* D_D_TIMER_H */
+11 -1
View File
@@ -150,8 +150,10 @@ public:
void setMsgKeyWaitTimer(s16 i_waitTimer) { mMsgKeyWaitTimer = i_waitTimer; }
u32 getMsgTimeMs() { return mMsgTimeMs; }
void setMsgTimeMs(u32 msgTime) { mMsgTimeMs = msgTime; }
void setTimeMs(s32 i_time) { mTimeMs = i_time; }
u32 getTimeMs() { return mTimeMs; }
u8 getNowCount() { return mNowCount; }
u8 getMaxCount() { return mMaxCount; }
void setScopeZoomPointer(u8 param_0) { mScopeZoomPointer = param_0; }
u8 getItemExplainWindowStatus() { return mItemExplainWindowStatus; }
void setItemExplainWindowStatus(u8 i_value) { mItemExplainWindowStatus = i_value; }
@@ -196,7 +198,7 @@ public:
/* 0x78 */ f32 m2DPosH;
/* 0x7C */ f32 m2DPosV;
/* 0x80 */ f32 unk128;
/* 0x84 */ u32 mTimeMs;
/* 0x84 */ s32 mTimeMs;
/* 0x88 */ u32 mMsgTimeMs;
/* 0x8C */ s32 mMeterString;
/* 0x90 */ u32 mTempBits;
@@ -593,10 +595,18 @@ inline void dMeter2Info_setMsgTimeMs(u32 msgTime) {
g_meter2_info.setMsgTimeMs(msgTime);
}
inline void dMeter2Info_setTimeMs(s32 i_time) {
g_meter2_info.setTimeMs(i_time);
}
inline u8 dMeter2Info_getNowCount() {
return g_meter2_info.getNowCount();
}
inline u8 dMeter2Info_getMaxCount() {
return g_meter2_info.getMaxCount();
}
inline void dMeter2Info_setScopeZoomPointer(u8 param_0) {
g_meter2_info.setScopeZoomPointer(param_0);
}
+24 -62
View File
@@ -438,68 +438,30 @@ public:
/* 0x000 */ // vtable
/* 0x004 */ u8 field_0x4[4];
/* 0x008 */ f32 field_0x8;
/* 0x00C */ f32 mRiverRideTargetCounterSizeY;
/* 0x010 */ f32 field_0x10;
/* 0x014 */ f32 field_0x14;
/* 0x018 */ f32 mRiverRideTargetCounterPosX;
/* 0x01C */ f32 field_0x1c;
/* 0x020 */ f32 field_0x20;
/* 0x024 */ f32 mRiverRideTargetCounterPosY;
/* 0x028 */ f32 field_0x28;
/* 0x02C */ f32 field_0x2c;
/* 0x030 */ f32 mRiverRideTargetCounterAlpha;
/* 0x034 */ f32 field_0x34;
/* 0x038 */ f32 mGoatTimerSizeX;
/* 0x03C */ f32 field_0x3c;
/* 0x040 */ f32 field_0x40;
/* 0x044 */ f32 mGoatTimerSizeY;
/* 0x048 */ f32 field_0x48;
/* 0x04C */ f32 field_0x4c;
/* 0x050 */ f32 mGoatTimerPosX;
/* 0x054 */ f32 field_0x54;
/* 0x058 */ f32 field_0x58;
/* 0x05C */ f32 mGoatTimerPosY;
/* 0x060 */ f32 field_0x60;
/* 0x064 */ f32 field_0x64;
/* 0x068 */ f32 mGoatTimerAlpha;
/* 0x06C */ f32 field_0x6c;
/* 0x070 */ f32 field_0x70;
/* 0x074 */ f32 mGoatCounterSizeX;
/* 0x078 */ f32 mRiverRideCounterSizeX;
/* 0x07C */ f32 mRiderGameCounterSizeX;
/* 0x080 */ f32 mGoatCounterSizeY;
/* 0x084 */ f32 mRiverRideCounterSizeY;
/* 0x088 */ f32 mRiderGameCounterSizeY;
/* 0x08C */ f32 mGoatCounterPosX;
/* 0x090 */ f32 mRiverRideCounterPosX;
/* 0x094 */ f32 mRiderGameCounterPosX;
/* 0x098 */ f32 mGoatCounterPosY;
/* 0x09C */ f32 mRiverRideCounterPosY;
/* 0x0A0 */ f32 mRiderGameCounterPosY;
/* 0x0A4 */ f32 mGoatCounterAlpha;
/* 0x0A8 */ f32 mRiverRideCounterAlpha;
/* 0x0AC */ f32 mRiderGameCounterAlpha;
/* 0x0B0 */ f32 mGoatIconSizeX;
/* 0x0B4 */ f32 mRiverRideTargetIconSizeX;
/* 0x0B8 */ f32 mRiderGameIconSizeX;
/* 0x0BC */ f32 mGoatIconSizeY;
/* 0x0C0 */ f32 mRiverRideTargetIconSizeY;
/* 0x0C4 */ f32 mRiderGameIconSizeY;
/* 0x0C8 */ f32 mGoatIconPosX;
/* 0x0CC */ f32 mRiverRideTargetIconPosX;
/* 0x0D0 */ f32 mRiderGameIconPosX;
/* 0x0D4 */ f32 mGoatIconPosY;
/* 0x0D8 */ f32 mRiverRideTargetIconPosY;
/* 0x0DC */ f32 mRiderGameIconPosY;
/* 0x0E0 */ f32 mGoatIconAlpha;
/* 0x0E4 */ f32 mRiverRideTargetIconAlpha;
/* 0x0E8 */ f32 mRiderGameIconAlpha;
/* 0x0EC */ f32 mGoatTimerSizeX_4x3;
/* 0x0F0 */ f32 mGoatTimerSizeY_4x3;
/* 0x0F4 */ f32 mGoatTimerPosX_4x3;
/* 0x0F8 */ f32 mGoatTimerPosY_4x3;
/* 0x0FC */ f32 mGoatIconPosX_4x3;
/* 0x008 */ f32 field_0x8[3];
/* 0x014 */ f32 field_0x14[3];
/* 0x020 */ f32 field_0x20[3];
/* 0x02C */ f32 field_0x2c[3];
/* 0x038 */ f32 mTimerSizeX[3];
/* 0x044 */ f32 mTimerSizeY[3];
/* 0x050 */ f32 mTimerPosX[3];
/* 0x05C */ f32 mTimerPosY[3];
/* 0x068 */ f32 mTimerAlpha[3];
/* 0x074 */ f32 mCounterSizeX[3];
/* 0x080 */ f32 mCounterSizeY[3];
/* 0x08C */ f32 mCounterPosX[3];
/* 0x098 */ f32 mCounterPosY[3];
/* 0x0A4 */ f32 mCounterAlpha[3];
/* 0x0B0 */ f32 mIconSizeX[3];
/* 0x0BC */ f32 mIconSizeY[3];
/* 0x0C8 */ f32 mIconPosX[3];
/* 0x0D4 */ f32 mIconPosY[3];
/* 0x0E0 */ f32 mIconAlpha[3];
/* 0x0EC */ f32 mTimerSizeX_4x3;
/* 0x0F0 */ f32 mTimerSizeY_4x3;
/* 0x0F4 */ f32 mTimerPosX_4x3;
/* 0x0F8 */ f32 mTimerPosY_4x3;
/* 0x0FC */ f32 mIconPosX_4x3;
/* 0x100 */ f32 mRiverRideIconPosX_4x3;
/* 0x104 */ f32 mRiderGameIconPosX_4x3;
/* 0x108 */ f32 mGetInTextSizeX;
+9 -13
View File
@@ -22,15 +22,10 @@ struct fopMsg_prm_class {
/* 0x18 */ int field_0x18;
}; // Size: 0x1C
struct fopMsg_prm_timer {
/* 0x00 */ int field_0x0;
/* 0x04 */ cXyz field_0x4;
/* 0x10 */ int field_0x10;
/* 0x14 */ int field_0x14;
/* 0x18 */ u32 field_0x18;
/* 0x1C */ int field_0x1c;
/* 0x20 */ u32 field_0x20;
/* 0x24 */ u8 field_0x24;
struct fopMsg_prm_timer : public fopMsg_prm_class {
/* 0x1C */ int timer_mode;
/* 0x20 */ u32 limit_ms;
/* 0x24 */ u8 type;
/* 0x25 */ u8 field_0x25;
/* 0x28 */ f32 field_0x28;
/* 0x2C */ f32 field_0x2c;
@@ -57,11 +52,12 @@ msg_class* fopMsgM_SearchByID(unsigned int param_0);
char* fopMsgM_messageGet(char* msg, u32 string_id);
s32 fop_Timer_create(s16 param_0, u8 param_1, u32 param_2, u8 param_3, u8 param_4, f32 param_5,
f32 param_6, f32 param_7, f32 param_8, fopMsgCreateFunc createFunc);
inline s32 fopMsgM_Timer_create(s16 param_0, u8 param_1, u32 param_2, u8 param_3, u8 param_4,
inline s32 fopMsgM_Timer_create(s16 i_procName, u8 i_mode, u32 i_limitMs, u8 i_type, u8 param_4,
f32 param_5, f32 param_6, f32 param_7, f32 param_8,
fopMsgCreateFunc createFunc) {
return fop_Timer_create(param_0, param_1, param_2, param_3, param_4, param_5, param_6, param_7,
param_8, createFunc);
fopMsgCreateFunc i_createFunc) {
return fop_Timer_create(i_procName, i_mode, i_limitMs, i_type, param_4, param_5, param_6,
param_7, param_8, i_createFunc);
}
#endif