diff options
| author | hatal175 <hatal175@users.noreply.github.com> | 2024-10-08 01:32:29 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-07 15:32:29 -0700 |
| commit | 1f3948e40ef095bb758914cce6fc652091cf4f4a (patch) | |
| tree | a7d2c024e62d8824b13d20c6d4bebea57f2205b9 /include | |
| parent | 24b6124609b03acc800b2b8231567f13b3f0b0c8 (diff) | |
d_map_path_dmap OK (#2201)
* d_map_path_dmap work
* d_map_path_dmap OK
* Probable inheritance for dalv4CandleDemoTag_c
* daObjFuta_c OK
* daObjHHASHI_c OK
Diffstat (limited to 'include')
| -rw-r--r-- | include/Z2AudioLib/Z2DebugSys.h | 10 | ||||
| -rw-r--r-- | include/Z2AudioLib/Z2Instances.h | 36 | ||||
| -rw-r--r-- | include/Z2AudioLib/Z2SpeechMgr2.h | 4 | ||||
| -rw-r--r-- | include/d/map/d_map_path.h | 4 | ||||
| -rw-r--r-- | include/d/map/d_map_path_dmap.h | 10 | ||||
| -rw-r--r-- | include/rel/d/a/e/d_a_e_fm/d_a_e_fm.h | 10 | ||||
| -rw-r--r-- | include/rel/d/a/obj/d_a_obj_hfuta/d_a_obj_hfuta.h | 38 | ||||
| -rw-r--r-- | include/rel/d/a/obj/d_a_obj_hhashi/d_a_obj_hhashi.h | 40 | ||||
| -rw-r--r-- | include/rel/d/a/obj/d_a_obj_lv4CandleDemoTag/d_a_obj_lv4CandleDemoTag.h | 8 |
9 files changed, 129 insertions, 31 deletions
diff --git a/include/Z2AudioLib/Z2DebugSys.h b/include/Z2AudioLib/Z2DebugSys.h new file mode 100644 index 0000000000..285228d3e1 --- /dev/null +++ b/include/Z2AudioLib/Z2DebugSys.h @@ -0,0 +1,10 @@ +#ifndef Z2DEBUGSYS_H +#define Z2DEBUGSYS_H + +#include "JSystem/JAudio2/JASGadget.h" + +// Only here for instance sub. No known code. +struct Z2DebugSys : public JASGlobalInstance<Z2DebugSys> { +}; + +#endif
\ No newline at end of file diff --git a/include/Z2AudioLib/Z2Instances.h b/include/Z2AudioLib/Z2Instances.h new file mode 100644 index 0000000000..71e2fa7433 --- /dev/null +++ b/include/Z2AudioLib/Z2Instances.h @@ -0,0 +1,36 @@ +#ifndef Z2INSTANCES_H +#define Z2INSTANCES_H + +#include "Z2AudioLib/Z2WolfHowlMgr.h" +#include "Z2AudioLib/Z2DebugSys.h" +#include "JSystem/JAudio2/JASAudioThread.h" +#include "JSystem/JAudio2/JAUSoundTable.h" + +#define AUDIO_INSTANCES \ + JASDefaultBankTable* JASGlobalInstance<JASDefaultBankTable>::sInstance; \ + JASAudioThread* JASGlobalInstance<JASAudioThread>::sInstance; \ + Z2SeMgr* JASGlobalInstance<Z2SeMgr>::sInstance; \ + Z2SeqMgr* JASGlobalInstance<Z2SeqMgr>::sInstance; \ + Z2SceneMgr* JASGlobalInstance<Z2SceneMgr>::sInstance; \ + Z2StatusMgr* JASGlobalInstance<Z2StatusMgr>::sInstance; \ + Z2DebugSys* JASGlobalInstance<Z2DebugSys>::sInstance; \ + JAISoundStarter* JASGlobalInstance<JAISoundStarter>::sInstance; \ + Z2SoundStarter* JASGlobalInstance<Z2SoundStarter>::sInstance; \ + Z2SpeechMgr2* JASGlobalInstance<Z2SpeechMgr2>::sInstance; \ + JAISeMgr* JASGlobalInstance<JAISeMgr>::sInstance; \ + JAISeqMgr* JASGlobalInstance<JAISeqMgr>::sInstance; \ + JAIStreamMgr* JASGlobalInstance<JAIStreamMgr>::sInstance; \ + Z2SoundMgr* JASGlobalInstance<Z2SoundMgr>::sInstance; \ + JAISoundInfo* JASGlobalInstance<JAISoundInfo>::sInstance; \ + JAUSoundTable* JASGlobalInstance<JAUSoundTable>::sInstance; \ + JAUSoundNameTable* JASGlobalInstance<JAUSoundNameTable>::sInstance; \ + JAUSoundInfo* JASGlobalInstance<JAUSoundInfo>::sInstance; \ + Z2SoundInfo* JASGlobalInstance<Z2SoundInfo>::sInstance; \ + Z2SoundObjMgr* JASGlobalInstance<Z2SoundObjMgr>::sInstance; \ + Z2Audience* JASGlobalInstance<Z2Audience>::sInstance; \ + Z2FxLineMgr* JASGlobalInstance<Z2FxLineMgr>::sInstance; \ + Z2EnvSeMgr* JASGlobalInstance<Z2EnvSeMgr>::sInstance; \ + Z2SpeechMgr* JASGlobalInstance<Z2SpeechMgr>::sInstance; \ + Z2WolfHowlMgr* JASGlobalInstance<Z2WolfHowlMgr>::sInstance; + +#endif
\ No newline at end of file diff --git a/include/Z2AudioLib/Z2SpeechMgr2.h b/include/Z2AudioLib/Z2SpeechMgr2.h index c776a468e6..515ebb69b2 100644 --- a/include/Z2AudioLib/Z2SpeechMgr2.h +++ b/include/Z2AudioLib/Z2SpeechMgr2.h @@ -14,6 +14,10 @@ struct Z2SpeechStarter : public Z2SoundStarter { f32, u32); }; +// Only here for instance sub. No known code. +struct Z2SpeechMgr : public JASGlobalInstance<Z2SpeechMgr> { +}; + struct Z2SpeechMgr2 : public JASGlobalInstance<Z2SpeechMgr2> { /* 802CBC60 */ Z2SpeechMgr2(); /* 802CBD88 */ void setString(u16 const*, s16, u8, u16); diff --git a/include/d/map/d_map_path.h b/include/d/map/d_map_path.h index d131368b87..87e8631562 100644 --- a/include/d/map/d_map_path.h +++ b/include/d/map/d_map_path.h @@ -42,6 +42,10 @@ public: /* 0x8 */ f32* mpFloatData; // might be Vec or cXyz instead }; + struct layer_data { + /* 0x0 */ room_class* mRooms[0x2][0x40]; + }; + /* 8003CB00 */ void rendering(dDrawPath_c::group_class const*); /* 8003CBBC */ void rendering(dDrawPath_c::floor_class const*); diff --git a/include/d/map/d_map_path_dmap.h b/include/d/map/d_map_path_dmap.h index 059531080a..06708d174e 100644 --- a/include/d/map/d_map_path_dmap.h +++ b/include/d/map/d_map_path_dmap.h @@ -18,7 +18,7 @@ public: /* 8003FBD0 */ static void reset(); /* 8003FC70 */ static void remove(); static dDrawPath_c::room_class* getRoomPointer(int layerNo, int roomNo) { - return (mLayerList + 0x40*layerNo)[roomNo]; + return mLayerList->mRooms[layerNo][roomNo]; } static f32 getMinX() { return mMinX; } @@ -26,7 +26,7 @@ public: static f32 getMaxX() { return mMaxX; } static f32 getMaxZ() { return mMaxZ; } - static dDrawPath_c::room_class** mLayerList; // this doesn't seem right, but can't figure it out atm + static dDrawPath_c::layer_data* mLayerList; // this doesn't seem right, but can't figure it out atm static f32 mMinX; static f32 mMaxX; static f32 mMinZ; @@ -111,10 +111,12 @@ public: /* 8003FF14 */ virtual void preDrawPath(); /* 8003FFC4 */ virtual void postDrawPath(); /* 800402C0 */ virtual bool isDrawPath(); - /* 8003FE4C */ virtual GXColor* getBackColor() const; + /* 8003FE4C */ virtual const GXColor* getBackColor() const; /* 800402E0 */ virtual int getFirstDrawLayerNo(); /* 800402E8 */ virtual int getNextDrawLayerNo(int); - /* 800409E0 */ virtual bool isDrawIconSingle(dTres_c::data_s const*, int, int, bool, bool, + + // See cpp for argument type change comment + /* 800409E0 */ virtual bool isDrawIconSingle(dTres_c::data_s const*, int, int, int, bool, Vec const*) const; /* 80040AE4 */ virtual int getIconGroupNumber(u8) const; virtual bool hasMap() const = 0; diff --git a/include/rel/d/a/e/d_a_e_fm/d_a_e_fm.h b/include/rel/d/a/e/d_a_e_fm/d_a_e_fm.h index 010cb7818b..a1b39a274c 100644 --- a/include/rel/d/a/e/d_a_e_fm/d_a_e_fm.h +++ b/include/rel/d/a/e/d_a_e_fm/d_a_e_fm.h @@ -1,6 +1,8 @@ #ifndef D_A_E_FM_H #define D_A_E_FM_H + #include "f_op/f_op_actor_mng.h" +#include "Z2AudioLib/Z2Creature.h" /** * @ingroup actors-enemies @@ -11,9 +13,13 @@ * */ class e_fm_class : public fopEn_enemy_c { +public: /* 804F9B64 */ e_fm_class(); -private: - /* 0x5ac */ u8 field_0x5ac[0x1b084 - 0x5ac]; + /* 0x005AC */ u8 field_0x5ac[0x63c - 0x5ac]; + /* 0x0063C */ Z2CreatureFM field_0x63c; + /* 0x00760 */ u8 field_0x760[0x1828 - 0x760]; + /* 0x01828 */ u8 field_0x1828; + /* 0x01829 */ u8 field_0x1829[0x1b084 - 0x1829]; }; STATIC_ASSERT(sizeof(e_fm_class) == 0x1b084); diff --git a/include/rel/d/a/obj/d_a_obj_hfuta/d_a_obj_hfuta.h b/include/rel/d/a/obj/d_a_obj_hfuta/d_a_obj_hfuta.h index deb9e958a5..1b0004646d 100644 --- a/include/rel/d/a/obj/d_a_obj_hfuta/d_a_obj_hfuta.h +++ b/include/rel/d/a/obj/d_a_obj_hfuta/d_a_obj_hfuta.h @@ -2,6 +2,7 @@ #define D_A_OBJ_HFUTA_H #include "f_op/f_op_actor_mng.h" +#include "d/bg/d_bg_s_movebg_actor.h" /** * @ingroup actors-objects @@ -11,26 +12,45 @@ * @details * */ -class daObjFuta_c : public fopAc_ac_c { +class daObjFuta_c : public dBgS_MoveBgActor { public: + enum Mode { + MODE_0, + MODE_1, + MODE_2, + }; + + typedef void (daObjFuta_c::*modeFunc)(); + /* 80C1DD8C */ void initBaseMtx(); /* 80C1DDC8 */ void setBaseMtx(); - /* 80C1DE94 */ void Create(); - /* 80C1DF2C */ void CreateHeap(); - /* 80C1DF9C */ void create1st(); - /* 80C1E020 */ void Execute(f32 (**)[3][4]); + /* 80C1DE94 */ int Create(); + /* 80C1DF2C */ int CreateHeap(); + /* 80C1DF9C */ int create1st(); + /* 80C1E020 */ int Execute(f32 (**)[3][4]); /* 80C1EB38 */ void mode_proc_call(); /* 80C1EBDC */ void mode_wait(); /* 80C1EC44 */ void mode_move(); /* 80C1ECB4 */ void mode_end(); - /* 80C1ECC4 */ void Draw(); - /* 80C1ED68 */ void Delete(); + /* 80C1ECC4 */ int Draw(); + /* 80C1ED68 */ int Delete(); + + void setMode(u8 mode) { mMode = mode; } private: - /* 0x568 */ u8 field_0x568[0x5cc - 0x568]; + /* 0x5A0 */ request_of_phase_process_class mPhase; + /* 0x5A8 */ J3DModel* mModel; + /* 0x5AC */ cXyz mTransM; + /* 0x5B8 */ csXyz mZXYRotationM; + /* 0x5BE */ u8 mMode; + /* 0x5BF */ u8 field_0x5bf; + /* 0x5C0 */ int field_0x5c0; + /* 0x5C4 */ f32 field_0x5c4; + /* 0x5C8 */ u8 field_0x5c8; + /* 0x5CA */ u16 mRotationIndex; }; -STATIC_ASSERT(sizeof(daObjFuta_c) == 0x5cc); +//STATIC_ASSERT(sizeof(daObjFuta_c) == 0x5cc); #endif /* D_A_OBJ_HFUTA_H */ diff --git a/include/rel/d/a/obj/d_a_obj_hhashi/d_a_obj_hhashi.h b/include/rel/d/a/obj/d_a_obj_hhashi/d_a_obj_hhashi.h index 754c8f6fa2..78a655c8ae 100644 --- a/include/rel/d/a/obj/d_a_obj_hhashi/d_a_obj_hhashi.h +++ b/include/rel/d/a/obj/d_a_obj_hhashi/d_a_obj_hhashi.h @@ -2,6 +2,8 @@ #define D_A_OBJ_HHASHI_H #include "f_op/f_op_actor_mng.h" +#include "d/bg/d_bg_s_movebg_actor.h" +#include "d/cc/d_cc_d.h" /** * @ingroup actors-objects @@ -11,7 +13,7 @@ * @details * */ -class daObjHHASHI_c : public fopAc_ac_c { +class daObjHHASHI_c : public dBgS_MoveBgActor { public: /* 8057F9B8 */ void initCcCylinder(); /* 8057FA18 */ void setCcCylinder(); @@ -21,19 +23,39 @@ public: /* 80580358 */ void Wall_Check(s16); /* 8058043C */ void Hahen_Motion(s16); /* 805805F4 */ void CheckCull(); - /* 805807C4 */ void checkViewArea(int); + /* 805807C4 */ bool checkViewArea(int); /* 80580854 */ void Rolling(cXyz*, f32, f32, s8); /* 80580A48 */ void Roll_Set(cXyz*, f32, s16); /* 80580C80 */ void setBaseMtx(); - /* 80580DA4 */ void CreateHeap(); - /* 80580EA0 */ void create(); - /* 805811CC */ void Create(); - /* 80581210 */ void Execute(f32 (**)[3][4]); - /* 805812BC */ void Draw(); - /* 8058140C */ void Delete(); + /* 80580DA4 */ int CreateHeap(); + /* 80580EA0 */ int create(); + /* 805811CC */ int Create(); + /* 80581210 */ int Execute(f32 (**)[3][4]); + /* 805812BC */ int Draw(); + /* 8058140C */ int Delete(); private: - /* 0x568 */ u8 field_0x568[0x119c - 0x568]; + /* 0x05A0 */ int field_0x5a0; + /* 0x05A4 */ int field_0x5a4; + /* 0x05A8 */ s8 field_0x5a8; + /* 0x05AA */ s16 field_0x5aa; + /* 0x05AC */ int field_0x5ac; + /* 0x05B0 */ cXyz field_0x5b0[50]; + /* 0x0808 */ cXyz field_0x808[50]; + /* 0x0A60 */ cXyz field_0xa60[50]; + /* 0x0CB8 */ f32 field_0xcb8; + /* 0x0CBC */ csXyz field_0xcbc[50]; + /* 0x0DE8 */ csXyz field_0xde8[50]; + /* 0x0F14 */ u8 field_0xf14[50]; + /* 0x0F46 */ s16 field_0xf46; + /* 0x0F48 */ int field_0xf48; + /* 0x0F4C */ J3DModel* mModel; + /* 0x0F50 */ J3DModel* mShardModels[50]; + /* 0x1018 */ request_of_phase_process_class mPhase; + /* 0x1020 */ dCcD_Stts mStts; + /* 0x105c */ dCcD_Cyl mCyl; + /* 0x1198 */ u8 field_0x1198; + /* 0x1199 */ u8 field_0x1199; }; STATIC_ASSERT(sizeof(daObjHHASHI_c) == 0x119c); diff --git a/include/rel/d/a/obj/d_a_obj_lv4CandleDemoTag/d_a_obj_lv4CandleDemoTag.h b/include/rel/d/a/obj/d_a_obj_lv4CandleDemoTag/d_a_obj_lv4CandleDemoTag.h index ea2a4c9ac4..aad0a1ec95 100644 --- a/include/rel/d/a/obj/d_a_obj_lv4CandleDemoTag/d_a_obj_lv4CandleDemoTag.h +++ b/include/rel/d/a/obj/d_a_obj_lv4CandleDemoTag/d_a_obj_lv4CandleDemoTag.h @@ -5,12 +5,6 @@ #include "d/event/d_event_lib.h" #include "rel/d/a/obj/d_a_obj_lv4EdShutter/d_a_obj_lv4EdShutter.h" -// idk how this works atm. dEvLib_callback_c seems to need to be inherited, but this data comes -// before it. the fopAc_ac_c struct size is 100% correct, so do not change it -struct temp { - /* 0x568 */ u8 field_0x568[0x570 - 0x568]; -}; - /** * @ingroup actors-objects * @class dalv4CandleDemoTag_c @@ -19,7 +13,7 @@ struct temp { * @details * */ -class dalv4CandleDemoTag_c : public fopAc_ac_c, temp, public dEvLib_callback_c { +class dalv4CandleDemoTag_c : public fopAc_ac_c, public request_of_phase_process_class, public dEvLib_callback_c { public: dalv4CandleDemoTag_c() : dEvLib_callback_c(this) {} |
