Skip to content

Commit

Permalink
fix some d_com_inf_game stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
TakaRikka committed Sep 10, 2023
1 parent 5b7dc79 commit fe79d73
Show file tree
Hide file tree
Showing 7 changed files with 242 additions and 174 deletions.
1 change: 1 addition & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ def NonMatching(obj_path, **kwargs):
Matching ("d/d_com_lib_game.cpp"),
Matching ("d/d_particle_name.cpp"),
NonMatching("d/d_s_title.cpp"),
NonMatching("d/d_com_inf_game.cpp"),
NonMatching("d/d_save.cpp"),
NonMatching("d/d_save_init.cpp"),

Expand Down
68 changes: 56 additions & 12 deletions include/d/d_com_inf_game.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,18 @@ class dTimer_c;
class camera_class;
class J2DOrthoGraph;

struct dADM {
class dADM {
public:
/* 0x00 */ int mBlockCount;
/* 0x04 */ void* mpData;
/* 0x08 */ u8 mCharTbl[0x90];
/* 0x98 */ void* vtbl;

public:
dADM();
void FindTag(u32, u32*, u32*);
void SetData(void*);

virtual ~dADM();
};

// setup properly later
Expand Down Expand Up @@ -75,14 +82,47 @@ class dComIfG_camera_info_class {
/* 0x05 */ u8 mCamIdx;
/* 0x06 */ u8 field_0x06;
/* 0x07 */ u8 field_0x07;
/* 0x08 */ u32 field_0x08;
/* 0x0C */ f32 field_0x0c;
/* 0x10 */ f32 field_0x10;
/* 0x08 */ u32 mCameraAttentionStatus;
/* 0x0C */ f32 mCameraZoomScale;
/* 0x10 */ f32 mCameraZoomForcus;
};
STATIC_ASSERT(sizeof(dComIfG_camera_info_class) == 0x14);

class dComIfG_play_c {
public:
dComIfG_play_c() { ct(); }

void ct();
void init();
void itemInit();
void getLayerNo(int);
void createParticle();
void createDemo();
void removeDemo();
void executeEvtManager();
void createMagma();
void removeMagma();
void executeMagma();
void drawMagma();
void createGrass();
void removeGrass();
void executeGrass();
void drawGrass();
void createFlower();
void removeFlower();
void executeFlower();
void drawFlower();
void createTree();
void removeTree();
void executeTree();
void drawTree();
void createWood();
void removeWood();
void executeWood();
void drawWood();

~dComIfG_play_c();

/* 0x0000 */ dBgS mBgS;
/* 0x1404 */ dCcS mCcS;
/* 0x3DF8 */ dADM mADM;
Expand Down Expand Up @@ -131,19 +171,18 @@ class dComIfG_play_c {
/* 0x4834 */ dTree_packet_c* mpTreePacket;
/* 0x4838 */ Packet_c* mpWoodPacket;
/* 0x483C */ dFlower_packet_c* mpFlowerPacket;
/* 0x4840 */ u8 mLkDArcIdx;
/* 0x4840 */ s8 mLkDArcIdx;
/* 0x4841 */ u8 field_0x4841;
/* 0x4842 */ short mVrboxFlags;
/* 0x4842 */ s16 mVrboxFlags;
/* 0x4844 */ dDlst_window_c mDlstWindow[1];
/* 0x486C */ u8 mCurCameraInfo;
/* 0x486D */ u8 field_0x486D[0x4870 - 0x486D];
/* 0x4870 */ dComIfG_camera_info_class mCameraInfo[1];
/* 0x48A4 */ daPy_py_c* mpCurPlayerActor[1];
/* 0x48A8 */ u8 mCurCamera;
/* 0x4884 */ u8 field_0x4884[0x48A4 - 0x4884];
/* 0x48A4 */ daPy_py_c* mpPlayer[1];
/* 0x48A8 */ s8 mCurCamera[1];
/* 0x48A9 */ u8 field_0x48A9[0x48AC - 0x48A9];
/* 0x48AC */ daPy_lk_c* mpLinkActor;
/* 0x48B0 */ daPy_npc_c* mpPlayerPartnerActor;
/* 0x48B4 */ daShip_c* mpShip;
/* 0x48AC */ fopAc_ac_c* mpPlayerPtr[3]; // 0: Link, 1: Partner, 2: Ship
/* 0x48B8 */ f32 field_0x48b8;
/* 0x48BC */ int mItemLifeCount;
/* 0x48C0 */ int mItemRupeeCount;
Expand Down Expand Up @@ -258,6 +297,11 @@ class dComIfG_play_c {

class dComIfG_inf_c {
public:
dComIfG_inf_c() { ct(); }
~dComIfG_inf_c();

void ct();

/* 0x00000 */ dSv_info_c info;
/* 0x012A0 */ dComIfG_play_c play;
/* 0x05D1C */ dDlst_list_c drawlist;
Expand Down
36 changes: 36 additions & 0 deletions include/d/d_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,42 @@ class dEvt_order_c {

class dEvt_control_c {
public:
dEvt_control_c();

void orderOld(u16, u16, u16, u16, void*, void*, const void*);
void order(u16, u16, u16, u16, void*, void*, s16, u8);
void setParam(dEvt_order_c*);
void beforeFlagProc(dEvt_order_c*);
void afterFlagProc(dEvt_order_c*);
void commonCheck(dEvt_order_c*, u16, u16);
void talkCheck(dEvt_order_c*);
void talkXyCheck(dEvt_order_c*);
void photoCheck(dEvt_order_c*);
void catchCheck(dEvt_order_c*);
void talkEnd();
void demoCheck(dEvt_order_c*);
void demoEnd();
void potentialCheck(dEvt_order_c*);
void doorCheck(dEvt_order_c*);
void itemCheck(dEvt_order_c*);
void endProc();
void checkChange();
void changeProc();
void checkStart();
void soundProc();
void check();
void photoCheck();
void moveApproval(void*);
void compulsory(void*, const char*, u16);
void remove();
void getStageEventDt();
void nextStageEventDt(void*);
void getPId(void*);
void convPId(unsigned int);
void getTactFreeMStick(int);
void getTactFreeCStick(int);
void giveItemCut(u8);

/* 0x00 */ dEvt_order_c mOrder[8];
/* 0xC0 */ u8 mOrderCount;
/* 0xC1 */ u8 mFirstOrderIdx;
Expand Down
9 changes: 9 additions & 0 deletions include/d/d_event_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,20 @@ class dEvDtEvent_c {};

class dEvDtFlag_c {
public:
dEvDtFlag_c() {}

u32 mFlags[320];
}; // Size = 0x500

class dEvDtBase_c {
public:
dEvDtBase_c() { init(); }
~dEvDtBase_c() {}

void init();
void advanceCut(dEvDtEvent_c*);
void advanceCutLocal(dEvDtStaff_c*);

/* 0x00 */ event_binary_data_header* mHeaderP;
/* 0x04 */ dEvDtEvent_c* mEventP;
/* 0x08 */ dEvDtStaff_c* mStaffP;
Expand Down
46 changes: 46 additions & 0 deletions include/d/d_event_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class fopAc_ac_c;

class dEvent_exception_c {
public:
dEvent_exception_c() { mEventInfoIdx = -1; }

/* 0x0 */ s32 mEventInfoIdx;
/* 0x4 */ u8 field_0x4;
/* 0x5 */ u8 field_0x5;
Expand All @@ -18,6 +20,50 @@ class dEvent_exception_c {

class dEvent_manager_c {
public:
dEvent_manager_c() {}
~dEvent_manager_c() {}

void debugBfProc();
void getSubstance(dEvDtData_c*, int);
void setData(const char*);
void create();
void remove(const char*);
void startProc(dEvDtEvent_c*);
void closeProc(dEvDtEvent_c*);
void endProc(s16, int);
void mainProc();
void runProc();
void getEventData(s16);
void getEventIdx(const char*, u8);
void order(s16);
void startCheck(s16);
void startCheckOld(const char*);
void endCheck(s16);
void endCheckOld(const char*);
void getMyStaffId(const char*, fopAc_ac_c*, int);
void getIsAddvance(int);
void getMyActIdx(int, const char* const*, int, int, int);
void getMyActName(int);
void getMyNowCutName(int);
void getMyDataP(int, const char*, int);
void getMySubstanceP(int, const char*, int);
void getMySubstanceNum(int, const char*);
void cutEnd(int);
void getEventPrio(s16);
void getEventEndSound(s16);
void exceptionProc();
void issueStaff(const char*);
void cancelStaff(const char*);
void setGoal(cXyz*);
void getGoal();
void specialCast_Shutter(s16, int);
void specialCast(const char*, int);
void setPrmStaff(void*, int);
void getToolId(u8, int);
void ChkPresentEnd();
void CancelPresent();
void checkStartDemo();

/* 0x000 */ dEvDtBase_c mList;
/* 0x020 */ int mCameraPlay;
/* 0x024 */ dEvent_exception_c mException;
Expand Down
2 changes: 2 additions & 0 deletions include/d/d_save.h
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ class dSv_reserve_c {

class dSv_memory_c {
public:
dSv_memory_c() { init(); }
/* 8005CBB0 */ void init();

dSv_memBit_c& getBit() { return mMembit; }
Expand Down Expand Up @@ -723,6 +724,7 @@ class dSv_zoneActor_c {

class dSv_zone_c {
public:
dSv_zone_c() { mRoomNo = -1; }
/* 8005D468 */ void init(int);

dSv_zoneBit_c& getZoneBit() { return mZoneBit; }
Expand Down
Loading

0 comments on commit fe79d73

Please sign in to comment.