This commit is contained in:
lepelog
2022-06-08 21:50:29 +02:00
parent fb9dd3cdee
commit 8945d46f09
16 changed files with 663 additions and 324 deletions
+1 -5
View File
@@ -72,11 +72,7 @@ struct cXyz : Vec {
/* 80267128 */ s16 atan2sX_Z() const;
/* 80267150 */ s16 atan2sY_XZ() const;
void setAll(f32 f) {
z = f;
y = f;
x = f;
}
void setAll(f32 f) { set(f, f, f); }
void setMin(const cXyz& other) {
if (x > other.x) {
+29
View File
@@ -389,6 +389,10 @@ public:
mWindow[i].setMode(mode);
}
char* getLastPlayStageName() { return mLastPlayStageName; }
u8 getGameoverStatus() { return mGameoverStatus; }
public:
/* 0x00000 */ dBgS mBgs;
/* 0x01404 */ dCcS mCcs;
@@ -651,6 +655,7 @@ void dComIfG_get_timelayer(int* layer);
int dComIfG_resDelete(request_of_phase_process_class* i_phase, char const* resName);
int dComIfG_changeOpeningScene(scene_class* scene, s16 procName);
int dComIfG_resLoad(request_of_phase_process_class* i_phase, char const* arc_name);
BOOL dComIfGs_isStageSwitch(int i_stageNo, int i_no);
inline void dComIfG_setBrightness(u8 brightness) {
g_dComIfG_gameInfo.mFadeBrightness = brightness;
@@ -2059,6 +2064,14 @@ inline void dComIfGp_evmng_cutEnd(int param_0) {
dComIfGp_getPEvtManager()->cutEnd(param_0);
}
inline int i_dComIfGp_evmng_getMyStaffId(const char* pName, fopAc_ac_c* pActor, int param_2) {
return dComIfGp_getPEvtManager()->getMyStaffId(pName, pActor, param_2);
}
inline int dComIfGp_evmng_getIsAddvance(int param_0) {
return dComIfGp_getPEvtManager()->getIsAddvance(param_0);
}
inline int* dComIfGp_evmng_getMyIntegerP(int index, char* name) {
return (int*)dComIfGp_getPEvtManager()->getMySubstanceP(index, name, dEvDtData_c::TYPE_INT);
}
@@ -2071,6 +2084,14 @@ inline f32* dComIfGp_evmng_getMyFloatP(int index, char* name) {
return (f32*)dComIfGp_getPEvtManager()->getMySubstanceP(index, name, dEvDtData_c::TYPE_FLOAT);
}
inline cXyz* dComIfGp_evmng_getMyXyzP(int index, char* name) {
return (cXyz*)dComIfGp_getPEvtManager()->getMySubstanceP(index, name, dEvDtData_c::TYPE_VEC);
}
inline int dComIfGp_evmng_getMySubstanceNum(int index, char* name) {
return dComIfGp_getPEvtManager()->getMySubstanceNum(index, name);
}
inline void dComIfGp_evmng_create() {
g_dComIfG_gameInfo.play.getEvtManager().create();
}
@@ -2253,4 +2274,12 @@ inline daAlink_c* daAlink_getAlinkActorClass() {
return (daAlink_c*)g_dComIfG_gameInfo.play.getPlayerPtr(LINK_PTR);
}
inline char* dComIfGp_getLastPlayStageName() {
return g_dComIfG_gameInfo.play.getLastPlayStageName();
}
inline u8 dComIfGp_getGameoverStatus() {
return g_dComIfG_gameInfo.play.getGameoverStatus();
}
#endif /* D_COM_D_COM_INF_GAME_H */
+35
View File
@@ -3,4 +3,39 @@
#include "dolphin/types.h"
class cXyz;
struct dDemo_c {
/* 80039678 */ void create();
/* 80039910 */ void remove();
/* 80039B6C */ void start(u8 const*, cXyz*, f32);
/* 80039CF8 */ void end();
/* 80039D4C */ void branch();
/* 80039DA4 */ void update();
/* 80039EDC */ void setBranchType(u16);
/* 80039EEC */ void setBranchId(u16, s16);
/* 80039F04 */ void reset();
static u32 getFrameNoMsg() { return m_frameNoMsg; }
static u16 m_branchId[1 + 3 /* padding */];
static u8 m_system[4];
static u8 m_control[4];
static u8 m_stage[4];
static u8 m_audio[4];
static u8 m_particle[4];
static u8 m_message[4];
static u8 m_factory[4];
static u8 m_mesgControl[4];
static u8 m_object[4];
static u8 m_data[4];
static u8 m_frame[4];
static u8 m_translation[4];
static f32 m_rotationY;
static u32 m_frameNoMsg;
static u8 m_mode[4];
static u8 m_status[4];
static u8 m_branchType[2 + 2 /* padding */];
static u8 m_branchData[4];
};
#endif /* D_D_DEMO_H */
+46
View File
@@ -1,6 +1,52 @@
#ifndef D_D_GAMEOVER_H
#define D_D_GAMEOVER_H
#include "d/msg/d_msg_class.h"
#include "dolphin/types.h"
#include "f_op/f_op_msg_mng.h"
struct dGameover_c : msg_class {
/* 8019B044 */ void _create();
/* 8019B2F4 */ void _execute();
/* 8019B384 */ void playerAnmWait_init();
/* 8019B388 */ void playerAnmWait_proc();
/* 8019B3A0 */ void dispFadeOut_init();
/* 8019B3E8 */ void dispFadeOut_proc();
/* 8019B40C */ void dispWait_init();
/* 8019B454 */ void dispWait_proc();
/* 8019B478 */ void demoFadeIn_init();
/* 8019B484 */ void demoFadeIn_proc();
/* 8019B4D8 */ void demoFadeOut_init();
/* 8019B4E4 */ void demoFadeOut_proc();
/* 8019B560 */ void saveOpen_init();
/* 8019B564 */ void saveOpen_proc();
/* 8019B5A4 */ void saveMove_init();
/* 8019B5A8 */ void saveMove_proc();
/* 8019B5F0 */ void saveClose_init();
/* 8019B5F4 */ void saveClose_proc();
/* 8019B7BC */ void deleteWait_init();
/* 8019B7C0 */ void deleteWait_proc();
/* 8019B7C4 */ void _draw();
/* 8019B864 */ void _delete();
s32 deleteCheck() { return _0x108 == 8; }
/* 0x100 */ u8 _0x100[0x118 - 0x100];
/* 0x108 */ u8 _0x108;
}; // size unknown
s32 d_GameOver_Create(u8 param_0);
void d_GameOver_Delete(unsigned int& param_0);
inline s32 d_GameOver_CheckDelete(unsigned int& id) {
if (id != UINT32_MAX) {
dGameover_c* gameover = (dGameover_c*)fopMsgM_SearchByID(id);
if (gameover != NULL) {
return gameover->deleteCheck();
} else {
return 0;
}
} else {
return 0;
}
}
#endif /* D_D_GAMEOVER_H */
+4 -4
View File
@@ -890,7 +890,7 @@ inline u32 dStage_stagInfo_GetArg0(stage_stag_info_class* p_info) {
return (p_info->field_0x0c >> 0x14) & 0xFF;
}
inline s8 dStage_sclsInfo_getSceneLayer(stage_scls_info_class* p_info) {
inline int dStage_sclsInfo_getSceneLayer(stage_scls_info_class* p_info) {
return p_info->field_0xb & 0xF;
}
@@ -898,12 +898,12 @@ inline s8 dStage_sclsInfo_getWipe(stage_scls_info_class* p_info) {
return p_info->mWipe;
}
inline s8 dStage_sclsInfo_getWipeTime(stage_scls_info_class* p_info) {
return p_info->field_0xb >> 5;
inline u32 dStage_sclsInfo_getWipeTime(stage_scls_info_class* p_info) {
return (p_info->field_0xb & 0xF0) >> 5;
}
inline int dStage_sclsInfo_getTimeH(stage_scls_info_class* p_info) {
return ((p_info->field_0xb & 0xF0) >> 4) | ((p_info->field_0xa & 0x0F) << 4);
return ((p_info->field_0xa & 0xF0) >> 4) | (p_info->field_0xb & 0x10);
}
inline u32 dStage_FileList_dt_getMiniMap(dStage_FileList_dt_c* p_fList) {
+17 -7
View File
@@ -2,6 +2,7 @@
#define D_EVENT_D_EVENT_DATA_H
#include "d/d_stage.h"
#include "d/msg/d_msg_class.h"
#include "d/save/d_save.h"
#include "dolphin/types.h"
@@ -81,6 +82,14 @@ public:
/* 0xC */ TYPE_CREATE,
};
struct StaffWork {
unsigned int _0;
msg_class* mLMsg;
unsigned int mMsgNo;
s32 mMsgSubstanceNum;
int* mMsgSubstanceP;
};
void specialProc_WaitStart(int);
void specialProc_WaitProc(int);
void specialProc();
@@ -101,7 +110,9 @@ public:
int getStartCut() { return mStartCut; }
// private:
/* 0x00 */ char mName[32];
/* 0x00 */ char mName[8];
/* 0x08 */ StaffWork mWork;
/* 0x0C */ u8 field_0x1C[0x20 - 0x1C];
/* 0x20 */ s32 mTagID;
/* 0x24 */ u32 mIndex;
/* 0x28 */ u32 mFlagID;
@@ -121,7 +132,7 @@ public:
class dEvDtEvent_c {
public:
int finishCheck();
void forceFinish();
int forceFinish();
void specialStaffProc(dEvDtStaff_c*);
int getNStaff() { return mNStaff; }
int getStaff(int idx) { return mStaff[idx]; }
@@ -136,8 +147,7 @@ public:
/* 0x7C */ int mNStaff;
/* 0x80 */ u8 field_0x80[4];
/* 0x84 */ int field_0x84;
/* 0x88 */ int field_0x88[2];
/* 0x90 */ int field_0x90;
/* 0x88 */ int field_0x88[3];
/* 0x94 */ bool mPlaySound;
/* 0x95 */ u8 field_0x95[0xF];
/* 0xA4 */ int mEventState;
@@ -147,9 +157,9 @@ public:
class dEvDtFlag_c {
public:
dEvDtFlag_c() {}
void flagCheck(int);
void flagSet(int);
bool flagMaxCheck(int);
BOOL flagCheck(int);
BOOL flagSet(int);
BOOL flagMaxCheck(int);
void init();
#define FlagMax 0x2800
+1
View File
@@ -72,6 +72,7 @@ public:
dEvDtBase_c& getBase() { return mEventList[mCurrentEventType]; }
void setFlag(int flag) { mFlags.flagSet(flag); }
int flagCheck(int flag) { return mFlags.flagCheck(flag); }
static int getIndexCompositId(s16 param_0) { return param_0 != -1 ? (u8)param_0 : -1; }
static int getTypeCompositId(s16 param_0) { return param_0 == -1 ? 0 : param_0 >> 8; }
+2
View File
@@ -24,6 +24,8 @@ s32 dKy_daynight_check();
void dKy_clear_game_init();
void dKy_setLight_init();
u8 dKy_pol_sound_get(cBgS_PolyInfo const* param_0);
void dKy_instant_rainchg();
void dKy_instant_timechg(f32);
struct LIGHT_INFLUENCE {
/* 800CFC7C */ ~LIGHT_INFLUENCE();
+6
View File
@@ -35,6 +35,12 @@ struct SVec {
y = oY;
z = oZ;
}
void setall(s16 val) {
x = val;
y = val;
z = val;
}
};
extern "C" {
+2 -1
View File
@@ -36,7 +36,8 @@ u32 fopMsgM_Create(s16, fopMsgCreateFunc, void*);
void fopMsgM_setMessageID(unsigned int);
void fopMsgM_destroyExpHeap(JKRExpHeap*);
s32 fopMsgM_setStageLayer(void*);
void fopMsgM_messageSetDemo(u32 param_0);
int fopMsgM_messageSet(u32 param_0, u32 param_1);
int fopMsgM_messageSetDemo(u32 param_0);
msg_class* fopMsgM_SearchByID(unsigned int param_0);
char* fopMsgM_messageGet(char* msg, u32 string_id);
+6 -2
View File
@@ -39,8 +39,12 @@ bool cM3dGAab::TopPlaneYUnder(f32 pY) const {
/* 8026ECF8-8026ED1C 0024+00 s=0 e=6 z=0 None .text ClearForMinMax__8cM3dGAabFv */
void cM3dGAab::ClearForMinMax(void) {
mMin.setAll(1000000000.0f);
mMax.setAll(-1000000000.0f);
mMin.z = 1000000000.0f;
mMin.y = 1000000000.0f;
mMin.x = 1000000000.0f;
mMax.z = -1000000000.0f;
mMax.y = -1000000000.0f;
mMax.x = -1000000000.0f;
}
/* 8026ED1C-8026ED60 0044+00 s=1 e=3 z=0 None .text SetMinMax__8cM3dGAabFRC4cXyz */
+1 -33
View File
@@ -221,38 +221,6 @@ struct dDemo_camera_c {
/* 80039FFC */ ~dDemo_camera_c();
};
struct dDemo_c {
/* 80039678 */ void create();
/* 80039910 */ void remove();
/* 80039B6C */ void start(u8 const*, cXyz*, f32);
/* 80039CF8 */ void end();
/* 80039D4C */ void branch();
/* 80039DA4 */ void update();
/* 80039EDC */ void setBranchType(u16);
/* 80039EEC */ void setBranchId(u16, s16);
/* 80039F04 */ void reset();
static u16 m_branchId[1 + 3 /* padding */];
static u8 m_system[4];
static u8 m_control[4];
static u8 m_stage[4];
static u8 m_audio[4];
static u8 m_particle[4];
static u8 m_message[4];
static u8 m_factory[4];
static u8 m_mesgControl[4];
static u8 m_object[4];
static u8 m_data[4];
static u8 m_frame[4];
static u8 m_translation[4];
static f32 m_rotationY;
static u8 m_frameNoMsg[4];
static u8 m_mode[4];
static u8 m_status[4];
static u8 m_branchType[2 + 2 /* padding */];
static u8 m_branchData[4];
};
struct dDemo_ambient_c {
/* 80038DF0 */ void JSGSetColor(_GXColor);
/* 800394C8 */ ~dDemo_ambient_c();
@@ -1013,7 +981,7 @@ u8 dDemo_c::m_translation[4];
f32 dDemo_c::m_rotationY;
/* 80450E34-80450E38 000334 0004+00 2/2 1/1 0/0 .sbss m_frameNoMsg__7dDemo_c */
u8 dDemo_c::m_frameNoMsg[4];
u32 dDemo_c::m_frameNoMsg;
/* 80450E38-80450E3C 000338 0004+00 4/4 4/4 0/0 .sbss m_mode__7dDemo_c */
u8 dDemo_c::m_mode[4];
+1 -83
View File
@@ -13,8 +13,6 @@
struct request_of_phase_process_class {};
struct msg_class {};
struct mDoRst {
static u8 mResetData[4 + 4 /* padding */];
};
@@ -28,8 +26,6 @@ struct mDoGph_gInf_c {
static f32 mFadeRate;
};
struct fopAc_ac_c {};
struct dSv_player_item_c {
/* 80032FB8 */ void setItem(int, u8);
/* 80033030 */ void getItem(int, bool) const;
@@ -86,31 +82,6 @@ struct dGov_HIO_c {
/* 8019C06C */ ~dGov_HIO_c();
};
struct dGameover_c {
/* 8019B044 */ void _create();
/* 8019B2F4 */ void _execute();
/* 8019B384 */ void playerAnmWait_init();
/* 8019B388 */ void playerAnmWait_proc();
/* 8019B3A0 */ void dispFadeOut_init();
/* 8019B3E8 */ void dispFadeOut_proc();
/* 8019B40C */ void dispWait_init();
/* 8019B454 */ void dispWait_proc();
/* 8019B478 */ void demoFadeIn_init();
/* 8019B484 */ void demoFadeIn_proc();
/* 8019B4D8 */ void demoFadeOut_init();
/* 8019B4E4 */ void demoFadeOut_proc();
/* 8019B560 */ void saveOpen_init();
/* 8019B564 */ void saveOpen_proc();
/* 8019B5A4 */ void saveMove_init();
/* 8019B5A8 */ void saveMove_proc();
/* 8019B5F0 */ void saveClose_init();
/* 8019B5F4 */ void saveClose_proc();
/* 8019B7BC */ void deleteWait_init();
/* 8019B7C0 */ void deleteWait_proc();
/* 8019B7C4 */ void _draw();
/* 8019B864 */ void _delete();
};
struct dDlst_base_c {};
struct dDlst_list_c {
@@ -122,8 +93,6 @@ struct dDlst_Gameover_CAPTURE_c {
/* 8019C2CC */ ~dDlst_Gameover_CAPTURE_c();
};
struct JKRArchive {};
struct dDlst_GameOverScrnDraw_c {
/* 8019B940 */ dDlst_GameOverScrnDraw_c(JKRArchive*);
/* 8019BBFC */ ~dDlst_GameOverScrnDraw_c();
@@ -131,24 +100,6 @@ struct dDlst_GameOverScrnDraw_c {
/* 8019BCF4 */ void draw();
};
struct cXyz {};
struct ResTLUT {};
struct ResTIMG {};
struct JKRHeap {
/* 802CE5CC */ void freeAll();
/* 802CE784 */ void getTotalFreeSize();
};
struct JGeometry {
template <typename A1>
struct TBox2 {};
/* TBox2<f32> */
struct TBox2__template0 {};
};
struct JFWDisplay {
static u8 sManager[4];
};
@@ -254,38 +205,6 @@ extern "C" void setPriority__9J2DScreenFPCcUlP10JKRArchive();
extern "C" void draw__9J2DScreenFffPC14J2DGrafContext();
extern "C" void func_802FC800();
extern "C" void setString__10J2DTextBoxFPCce();
extern "C" void C_MTXOrtho();
extern "C" void GXSetVtxDesc();
extern "C" void GXClearVtxDesc();
extern "C" void GXSetVtxAttrFmt();
extern "C" void GXSetTexCoordGen2();
extern "C" void GXSetNumTexGens();
extern "C" void GXPixModeSync();
extern "C" void GXBegin();
extern "C" void GXSetCullMode();
extern "C" void GXSetTexCopySrc();
extern "C" void GXSetTexCopyDst();
extern "C" void GXCopyTex();
extern "C" void GXSetNumChans();
extern "C" void GXInitTexObj();
extern "C" void GXInitTexObjLOD();
extern "C" void GXLoadTexObj();
extern "C" void GXSetTevColorIn();
extern "C" void GXSetTevAlphaIn();
extern "C" void GXSetTevColorOp();
extern "C" void GXSetTevAlphaOp();
extern "C" void GXSetAlphaCompare();
extern "C" void GXSetTevOrder();
extern "C" void GXSetNumTevStages();
extern "C" void GXSetFog();
extern "C" void GXSetFogRangeAdj();
extern "C" void GXSetBlendMode();
extern "C" void GXSetZMode();
extern "C" void GXSetZCompLoc();
extern "C" void GXSetDither();
extern "C" void GXSetProjection();
extern "C" void GXLoadPosMtxImm();
extern "C" void GXSetCurrentMtx();
extern "C" void __register_global_object();
extern "C" void __ptmf_scall();
extern "C" void _savegpr_24();
@@ -297,7 +216,6 @@ extern "C" void _restgpr_29();
extern "C" void strcmp();
extern "C" extern u8 g_mDoMtx_identity[48 + 24 /* padding */];
extern "C" extern void* g_fopMsg_Method[5 + 1 /* padding */];
extern "C" extern void* g_fpcLf_Method[5 + 1 /* padding */];
extern "C" extern void* __vt__12dDlst_base_c[3];
extern "C" u8 saveBitLabels__16dSv_event_flag_c[1644 + 4 /* padding */];
extern "C" extern void* __vt__14mDoHIO_entry_c[3];
@@ -981,7 +899,7 @@ static asm void dGameover_Create(msg_class* param_0) {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void d_GameOver_Create(u8 param_0) {
asm s32 d_GameOver_Create(u8 param_0) {
nofralloc
#include "asm/d/d_gameover/d_GameOver_Create__FUc.s"
}
+1
View File
@@ -1428,6 +1428,7 @@ s32 dName_c::getMenuPosIdx(u8 selPos) {
case 3:
return 3;
}
//!@bug UB: no default return
}
/* 80251094-8025115C 24B9D4 00C8+00 1/0 0/0 0/0 .text draw__14dDlst_NameIN_cFv */
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -201,7 +201,7 @@ asm void fopMsgM_messageSet(u32 param_0, fopAc_ac_c* param_1, u32 param_2) {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void fopMsgM_messageSet(u32 param_0, u32 param_1) {
asm int fopMsgM_messageSet(u32 param_0, u32 param_1) {
nofralloc
#include "asm/f_op/f_op_msg_mng/fopMsgM_messageSet__FUlUl.s"
}
@@ -211,7 +211,7 @@ asm void fopMsgM_messageSet(u32 param_0, u32 param_1) {
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void fopMsgM_messageSetDemo(u32 param_0) {
asm int fopMsgM_messageSetDemo(u32 param_0) {
nofralloc
#include "asm/f_op/f_op_msg_mng/fopMsgM_messageSetDemo__FUl.s"
}