d_a_canon (#865)

This commit is contained in:
Maide
2025-08-25 23:55:36 +01:00
committed by GitHub
parent b8ddc45f52
commit 1b49cb3ce0
8 changed files with 605 additions and 79 deletions
+46 -8
View File
@@ -2,22 +2,28 @@
#define D_A_CANON_H
#include "f_op/f_op_actor.h"
#include "d/d_cc_d.h"
class dDlst_2DObject_c;
class dDlst_2DBattery_c;
class daCanon_c : public fopAc_ac_c {
typedef void (daCanon_c::*Func)();
public:
inline cPhs_State _create();
inline bool _delete();
inline bool _draw();
inline bool _execute();
void checkProcess(void (daCanon_c::*)()) {}
bool checkProcess(Func func) { return m290 == func; }
void getCanonPtr() {}
void setProcess(void (daCanon_c::*)()) {}
void setProcess(Func func) { m290 = func; }
void set_mtx();
void bul_set_mtx(cXyz*);
void getGridPos(int, int);
void getBulEndPos(short, short);
void createCheck(int, int, int);
cXyz getGridPos(int, int);
cXyz getBulEndPos(short, short);
BOOL createCheck(int, int, int);
void createTargetObj();
void breakAllObj();
void makeFireEffect(cXyz&, csXyz&, int);
@@ -34,13 +40,45 @@ public:
void end_proc_init();
void end_proc();
void PadMove();
void CreateHeap();
BOOL CreateHeap();
void GameInfo2DDraw();
static daCanon_c* canon_p;
static const char M_arcname[];
public:
/* Place member variables here */
};
/* 0x290 */ Func m290;
/* 0x29C */ dCcD_Stts mStts1;
/* 0x2D8 */ dCcD_Cyl mCyl1;
/* 0x408 */ dCcD_Stts mStts2;
/* 0x444 */ dCcD_Cyl mCyl2;
/* 0x574 */ request_of_phase_process_class mPhase;
/* 0x57C */ J3DModel* mpModel1;
/* 0x580 */ J3DModel* mpModel2;
/* 0x584 */ dDlst_2DObject_c* m584[10];
/* 0x5AC */ dDlst_2DObject_c* m5AC[5];
/* 0x5C0 */ dDlst_2DBattery_c* m5C0;
/* 0x5C4 */ Mtx m5C4;
/* 0x5F4 */ u8 m5F4[10];
/* 0x600 */ fpc_ProcID m600[5];
/* 0x614 */ cXyz m614;
/* 0x620 */ cXyz m620;
/* 0x62C */ cXyz m62C;
/* 0x638 */ f32 m638;
/* 0x63C */ cXyz m63C;
/* 0x648 */ csXyz m648;
/* 0x64E */ s16 m64E;
/* 0x650 */ s16 m650;
/* 0x652 */ s16 m652;
/* 0x654 */ s16 m654;
/* 0x656 */ s16 m656;
/* 0x658 */ u8 field_658[0x65A - 0x658];
/* 0x65A */ s16 m65A;
/* 0x65C */ s16 m65C;
/* 0x65E */ s16 m65E;
/* 0x660 */ s16 m660;
/* 0x662 */ u8 field_662[0x664 - 0x662];
/* 0x664 */ bool m664;
}; // size = 0x668
#endif /* D_A_CANON_H */
+1 -1
View File
@@ -9,7 +9,7 @@ public:
void getEyePos() {}
void seStart(u32) {}
void setAction(int (daNpc_Kg2_c::*)(void*), void*) {}
void setCanonGameResult(u8) {}
static void setCanonGameResult(u8 result) { canon_game_result = result; }
void set_mtx();
void initTexPatternAnm(bool);
+11 -8
View File
@@ -46,7 +46,7 @@ public:
class dDlst_2DBattery_c : public dDlst_base_c {
public:
bool init(ResTIMG*, ResTIMG*, ResTIMG*, ResTIMG*);
BOOL init(ResTIMG*, ResTIMG*, ResTIMG*, ResTIMG*);
void setRotate(float);
void draw();
@@ -62,21 +62,24 @@ public:
/* 0x48 */ cXy mBatteryBaseSize;
/* 0x50 */ cXy mNumSize;
/* 0x58 */ f32 mRotation;
/* 0x5C */ f32 field_0x5c;
};
}; // size = 0x5C
class dDlst_2DObject_c : public dDlst_base_c {
public:
bool init(ResTIMG*, ResTIMG*);
BOOL init(ResTIMG*, ResTIMG*);
void draw();
void setPosition(f32 x, f32 y) { mPos.x = x; mPos.y = y; }
void setScale(f32 scale) { mScale = scale; }
void onBeforeTex() { mCurrentNo = 0; }
void offBeforeTex() { mCurrentNo = 1; }
public:
/* 0x04 */ J2DPicture* mPicture[2];
/* 0x0C */ cXy mPos;
/* 0x10 */ cXy mSize[2];
/* 0x18 */ f32 mScale;
/* 0x1C */ u8 mCurrentNo;
};
/* 0x14 */ cXy mSize[2];
/* 0x24 */ f32 mScale;
/* 0x28 */ u8 mCurrentNo;
}; // size = 0x2C
class dDlst_2DOutFont_c {
public:
+9 -2
View File
@@ -576,7 +576,10 @@ public:
void endMiniGame(u16 i_gameType) {
mMiniGameType = 0;
mMinigameFlags ^= 1 << (i_gameType - 1); // toggle Nth bit
field_0x4A3E = 0;
mMinigameResult = 0;
}
void setMiniGameResult(u8 i_result) {
mMinigameResult = i_result;
}
void show2dOn() { m2dShow = true; }
@@ -780,7 +783,7 @@ public:
/* 0x4A38 */ u16 mMinigameFlags;
/* 0x4A3A */ u8 mMiniGameType;
/* 0x4A3C */ s16 mMiniGameRupee;
/* 0x4A3E */ u8 field_0x4A3E;
/* 0x4A3E */ u8 mMinigameResult;
/* 0x4A40 */ __d_timer_info_c mTimerInfo;
/* 0x4A54 */ dDlst_window_c* mCurrentWindow;
/* 0x4A58 */ view_class* mCurrentView;
@@ -2657,6 +2660,10 @@ inline void dComIfGp_endMiniGame(u16 i_gameType) {
g_dComIfG_gameInfo.play.endMiniGame(i_gameType);
}
inline u8 dComIfGp_setMiniGameResult(u8 result) {
g_dComIfG_gameInfo.play.setMiniGameResult(result);
}
enum dActionStatus_e {
/* 0x00 */ dActStts_BLANK_e,
/* 0x01 */ dActStts_LOOK_e, // "Look"
+18
View File
@@ -57,6 +57,24 @@ enum BOMBER_RES_FILE_ID { // IDs and indexes are synced
BOMBER_BTI_GAME_SHIP_NODAMAGE=0x11,
BOMBER_BTI_RUPY_NUM_DEGREE=0x12,
};
enum BOMBER_RES_FILE_INDEX {
/* BMDC */
BOMBER_INDEX_BMD_AISI=0x8,
/* BDL */
BOMBER_INDEX_BDL_VCANK=0x5,
/* TEX */
BOMBER_INDEX_BTI_GAME_BATTERY=0xB,
BOMBER_INDEX_BTI_GAME_BATTERY_BASE=0xC,
BOMBER_INDEX_BTI_GAME_BOMB_01=0xD,
BOMBER_INDEX_BTI_GAME_BOMB_02=0xE,
BOMBER_INDEX_BTI_GAME_HUNE_DAMAGE=0xF,
BOMBER_INDEX_BTI_GAME_RULE=0x10,
BOMBER_INDEX_BTI_GAME_SHIP_NODAMAGE=0x11,
BOMBER_INDEX_BTI_RUPY_NUM_DEGREE=0x12,
};
#endif
#endif /* RES_BOMBER_H */