summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTakaRikka <38417346+TakaRikka@users.noreply.github.com>2024-12-18 10:02:52 -0800
committerGitHub <noreply@github.com>2024-12-18 20:02:52 +0200
commitff5f31b84453722de3d1cc1287725eec06d08c6a (patch)
treef515a32d77aadae2135f80e77a035e7437ef23f8 /include
parentc5ab943cfc057be3c9310e93e27fc62a2be9cbeb (diff)
kankyo_rain / obj_life_container mostly done, obj_glowsphere done (#2266)
* obj_life_container mostly done * obj_glowSphere done * kankyo_rain mostly done * some cleanup * more kankyo_rain cleanup
Diffstat (limited to 'include')
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DAnimation.h17
-rw-r--r--include/JSystem/J3DGraphBase/J3DMaterial.h1
-rw-r--r--include/SSystem/SComponent/c_angle.h3
-rw-r--r--include/d/actor/d_a_itembase.h1
-rw-r--r--include/d/actor/d_a_obj_glowSphere.h172
-rw-r--r--include/d/actor/d_a_obj_life_container.h80
-rw-r--r--include/d/actor/d_a_player.h2
-rw-r--r--include/d/d_com_inf_game.h75
-rw-r--r--include/d/d_kankyo.h10
-rw-r--r--include/d/d_kankyo_wether.h33
-rw-r--r--include/d/d_resorce.h126
-rw-r--r--include/f_op/f_op_camera_mng.h4
-rw-r--r--include/m_Do/m_Do_audio.h4
-rw-r--r--include/m_Do/m_Do_dvd_thread.h3
14 files changed, 376 insertions, 155 deletions
diff --git a/include/JSystem/J3DGraphAnimator/J3DAnimation.h b/include/JSystem/J3DGraphAnimator/J3DAnimation.h
index 2d6107db5c..7f21d3d1fe 100644
--- a/include/JSystem/J3DGraphAnimator/J3DAnimation.h
+++ b/include/JSystem/J3DGraphAnimator/J3DAnimation.h
@@ -24,6 +24,23 @@ struct JUTDataFileHeader { // actual struct name unknown
/* 0x20 */ JUTDataBlockHeader mFirstBlock;
};
+// unknown name. refers to ANK1 chunk of BCK files
+struct J3DAnmTransform_ANK1 {
+ /* 0x00 */ u32 magic;
+ /* 0x04 */ u32 size;
+ /* 0x08 */ u8 attribute;
+ /* 0x09 */ u8 rotation_frac;
+ /* 0x0A */ s16 duration;
+ /* 0x0C */ s16 keyframe_num;
+ /* 0x0E */ s16 scale_entries;
+ /* 0x10 */ s16 rotation_entries;
+ /* 0x12 */ s16 translation_entries;
+ /* 0x14 */ u32 anm_data_offset;
+ /* 0x18 */ u32 scale_data_offset;
+ /* 0x1C */ u32 rotation_data_offset;
+ /* 0x20 */ u32 translation_data_offset;
+};
+
typedef struct _GXColor GXColor;
typedef struct _GXColorS10 GXColorS10;
diff --git a/include/JSystem/J3DGraphBase/J3DMaterial.h b/include/JSystem/J3DGraphBase/J3DMaterial.h
index 7deeff03f0..4113522218 100644
--- a/include/JSystem/J3DGraphBase/J3DMaterial.h
+++ b/include/JSystem/J3DGraphBase/J3DMaterial.h
@@ -78,6 +78,7 @@ public:
J3DTexCoord* getTexCoord(u32 idx) { return mTexGenBlock->getTexCoord(idx); }
J3DZMode* getZMode() { return mPEBlock->getZMode(); }
J3DBlend* getBlend() { return mPEBlock->getBlend(); }
+ J3DColorChan* getColorChan(u32 idx) { return getColorBlock()->getColorChan(idx); }
void setTevColor(u32 i, const J3DGXColorS10* i_color) { mTevBlock->setTevColor(i, i_color); }
void setTevKColor(u32 i, const J3DGXColor* i_color) { mTevBlock->setTevKColor(i, i_color); }
diff --git a/include/SSystem/SComponent/c_angle.h b/include/SSystem/SComponent/c_angle.h
index 2ac5066607..db0055ef6e 100644
--- a/include/SSystem/SComponent/c_angle.h
+++ b/include/SSystem/SComponent/c_angle.h
@@ -69,6 +69,9 @@ struct cAngle {
/* Converts Degree value to s16 angle */
static s16 d2s(f32 d) { return Degree_to_SAngle(d); }
+ /* Converts s16 angle to Degree value */
+ static f32 s2d(s16 a) { return SAngle_to_Degree(a); }
+
template <typename T>
static T Adjust(T f1, T f2, T f3);
};
diff --git a/include/d/actor/d_a_itembase.h b/include/d/actor/d_a_itembase.h
index 2cce55b397..7f248253fe 100644
--- a/include/d/actor/d_a_itembase.h
+++ b/include/d/actor/d_a_itembase.h
@@ -3,6 +3,7 @@
#include "d/d_bg_s_acch.h"
#include "d/d_cc_d.h"
+#include "d/d_a_itembase_static.h"
#include "f_op/f_op_actor_mng.h"
struct daItemBase_data {
diff --git a/include/d/actor/d_a_obj_glowSphere.h b/include/d/actor/d_a_obj_glowSphere.h
index 73c7525371..e2f3d8f5f8 100644
--- a/include/d/actor/d_a_obj_glowSphere.h
+++ b/include/d/actor/d_a_obj_glowSphere.h
@@ -2,6 +2,78 @@
#define D_A_OBJ_GLOWSPHERE_H
#include "f_op/f_op_actor_mng.h"
+#include "d/d_bg_s_acch.h"
+#include "d/d_cc_d.h"
+
+class daGlwSph_c;
+class _GlSph_LstInfo_c{
+public:
+ _GlSph_LstInfo_c() {
+ mpSph = NULL;
+ mIsSet = false;
+ }
+
+ ~_GlSph_LstInfo_c() {}
+
+ void Set(daGlwSph_c* i_sph) {
+ if (!mIsSet && i_sph != NULL) {
+ mpSph = i_sph;
+ mIsSet = true;
+ }
+ }
+
+ void Remove() {
+ mpSph = NULL;
+ mIsSet = false;
+ }
+
+ bool isSet() { return mIsSet; }
+ daGlwSph_c* getpSph() { return mpSph; }
+
+private:
+ /* 0x0 */ daGlwSph_c* mpSph;
+ /* 0x4 */ s8 mIsSet;
+};
+
+class _GlSph_Mng_c {
+public:
+ _GlSph_Mng_c() {
+ field_0x0 = 0;
+ }
+
+ ~_GlSph_Mng_c() {
+ reset();
+ }
+
+ /* 80BFA4B8 */ void _clrLstBuf();
+ /* 80BFA4DC */ int entry(daGlwSph_c*);
+ /* 80BFA528 */ void remove(daGlwSph_c*);
+ /* 80BFA55C */ int _setting_main();
+ /* 80BFA5C4 */ bool _chkAllGet_main();
+ /* 80BFA60C */ void SphSeProc();
+ /* 80BFA6D8 */ static void clrSphSe();
+ /* 80BFA6E8 */ static u16 getSphSe();
+ /* 80BFA6F8 */ static void incSphSe();
+
+ void setting() {
+ _setting_main();
+ }
+
+ bool isAllGet() {
+ return _chkAllGet_main();
+ }
+
+ void reset() {
+ field_0x0 = 0;
+ _clrLstBuf();
+ }
+
+ static u16 mSphSe;
+ static s16 mSeClrTmr;
+
+ /* 0x0 */ int field_0x0;
+ /* 0x4 */ _GlSph_LstInfo_c mListBuf[120];
+};
/**
* @ingroup actors-objects
@@ -13,12 +85,27 @@
*/
class daGlwSph_c : public fopAc_ac_c {
public:
- /* 80BF9430 */ void getSphMng();
+ enum COLOR_e {
+ COLOR_GRAY_e,
+ COLOR_RED_e,
+ COLOR_YELLOW_e,
+ COLOR_BLUE_e,
+
+ COLOR_DEFAULT_e = 0xFF,
+ };
+
+ enum ACTION_e {
+ ACTION_WAIT_e,
+ ACTION_GET_e,
+ ACTION_MOVE_e,
+ };
+
+ /* 80BF9430 */ _GlSph_Mng_c& getSphMng();
/* 80BF943C */ void setBaseMtx();
- /* 80BF94AC */ void createHeapCallBack(fopAc_ac_c*);
- /* 80BF94CC */ void CreateHeap();
- /* 80BF95D4 */ void create();
- /* 80BF9B1C */ void execute();
+ /* 80BF94AC */ static int createHeapCallBack(fopAc_ac_c*);
+ /* 80BF94CC */ int CreateHeap();
+ /* 80BF95D4 */ int create();
+ /* 80BF9B1C */ int execute();
/* 80BF9BC0 */ void actionMain();
/* 80BF9DF0 */ void effectSet();
/* 80BF9F30 */ void getSE();
@@ -29,44 +116,61 @@ public:
/* 80BFA130 */ void actionGet();
/* 80BFA1E0 */ void actionMoveInit();
/* 80BFA204 */ void actionMove();
- /* 80BFA2A4 */ void draw();
- /* 80BFA3EC */ void _delete();
+ /* 80BFA2A4 */ int draw();
+ /* 80BFA3EC */ int _delete();
- static u8 const mCcDObjInfo[48];
- static u8 mCcDSph[64];
- static u8 mSphMng[964];
+ int getSw() { return fopAcM_GetParamBit(this, 0, 8); }
+ u8 getArg0() { return fopAcM_GetParamBit(this, 8, 8); }
+ u8 getColor() { return fopAcM_GetParamBit(this, 0x10, 8); }
-private:
- /* 0x568 */ u8 field_0x568[0x98c - 0x568];
+ void onGetFlag() { mGetFlag = true; }
+ void offGetFlag() { mGetFlag = false; }
+ void saveGetFlag() { field_0x951 = mGetFlag; }
+ bool is_getted() { return mGetFlag == true; }
+
+ void reset() {
+ current.pos = home.pos;
+ mSphCollider.OnCoSetBit();
+ offGetFlag();
+ saveGetFlag();
+ }
+
+ static const dCcD_SrcGObjInf mCcDObjInfo;
+ static dCcD_SrcSph mCcDSph;
+ static _GlSph_Mng_c mSphMng;
+
+ /* 0x568 */ request_of_phase_process_class mPhase;
+ /* 0x570 */ J3DModel* mpModel;
+ /* 0x574 */ mDoExt_btkAnm mBtk;
+ /* 0x58C */ mDoExt_brkAnm mBrk;
+ /* 0x5A4 */ dBgS_ObjAcch mAcch;
+ /* 0x77C */ dBgS_AcchCir mAcchCir;
+ /* 0x7BC */ dCcD_Stts mColliderStts;
+ /* 0x7F8 */ dCcD_Sph mSphCollider;
+ /* 0x930 */ LIGHT_INFLUENCE mLight;
+ /* 0x950 */ u8 mGetFlag;
+ /* 0x951 */ u8 field_0x951;
+ /* 0x952 */ u8 mAction;
+ /* 0x953 */ u8 mIsNoMoveHome;
+ /* 0x954 */ u8 mColor;
+ /* 0x955 */ u8 mMoveTimer;
+ /* 0x958 */ f32 mMoveSpeed;
+ /* 0x95C */ cXyz mMoveVec;
+ /* 0x968 */ cXyz field_0x968;
+ /* 0x974 */ cXyz field_0x974;
+ /* 0x980 */ s16 field_0x980;
+ /* 0x984 */ u32 mEmitterIDs[2];
};
STATIC_ASSERT(sizeof(daGlwSph_c) == 0x98C);
-class daGlwSph_HIO_c {
+class daGlwSph_HIO_c : public fOpAcm_HIO_entry_c {
public:
/* 80BF934C */ daGlwSph_HIO_c();
- /* 80BFA76C */ ~daGlwSph_HIO_c();
-};
+ /* 80BFA76C */ virtual ~daGlwSph_HIO_c() {}
-class _GlSph_Mng_c {
-public:
- /* 80BFA4B8 */ void _clrLstBuf();
- /* 80BFA4DC */ void entry(daGlwSph_c*);
- /* 80BFA528 */ void remove(daGlwSph_c*);
- /* 80BFA55C */ void _setting_main();
- /* 80BFA5C4 */ void _chkAllGet_main();
- /* 80BFA60C */ void SphSeProc();
- /* 80BFA6D8 */ void clrSphSe();
- /* 80BFA6E8 */ void getSphSe();
- /* 80BFA6F8 */ void incSphSe();
- /* 80BFA890 */ ~_GlSph_Mng_c();
+ /* 0x4 */ f32 speed;
+ /* 0x8 */ f32 speed2;
};
-class _GlSph_LstInfo_c{
-public:
- /* 80BFA900 */ ~_GlSph_LstInfo_c();
- /* 80BFA93C */ _GlSph_LstInfo_c();
-};
-
-
#endif /* D_A_OBJ_GLOWSPHERE_H */
diff --git a/include/d/actor/d_a_obj_life_container.h b/include/d/actor/d_a_obj_life_container.h
index 70e4644af5..f8e50269fa 100644
--- a/include/d/actor/d_a_obj_life_container.h
+++ b/include/d/actor/d_a_obj_life_container.h
@@ -1,7 +1,8 @@
#ifndef D_A_OBJ_LIFE_CONTAINER_H
#define D_A_OBJ_LIFE_CONTAINER_H
-#include "f_op/f_op_actor_mng.h"
+#include "d/actor/d_a_itembase.h"
+#include "d/d_particle.h"
/**
* @ingroup actors-objects
@@ -11,37 +12,76 @@
* @details
*
*/
-class daObjLife_c : public fopAc_ac_c {
+class daObjLife_c : public daItemBase_c {
public:
+ enum Status_e {
+ STATUS_WAIT_e,
+ STATUS_ORDER_GET_DEMO_e,
+ STATUS_GET_DEMO_e,
+ STATUS_SW_ON_WAIT_e,
+ STATUS_BOOMERANG_CARRY_e,
+ STATUS_WAIT_2_e,
+ };
+
/* 804CCBE4 */ void initBaseMtx();
/* 804CCC04 */ void setBaseMtx();
- /* 804CCC6C */ void Create();
+ /* 804CCC6C */ int Create();
/* 804CCE00 */ void setEffect();
/* 804CCF5C */ void endEffect00();
/* 804CCFAC */ void endEffect02();
- /* 804CCFD8 */ bool __CreateHeap();
- /* 804CCFE0 */ void create();
+ /* 804CCFE0 */ int create();
/* 804CD428 */ void bg_check();
- /* 804CD5B8 */ void actionWaitInit();
- /* 804CD660 */ void actionWait();
- /* 804CD8C0 */ void initActionOrderGetDemo();
- /* 804CD98C */ void actionOrderGetDemo();
- /* 804CDA08 */ void actionGetDemo();
- /* 804CDBC8 */ void actionSwOnWait();
- /* 804CDC2C */ void actionInitBoomerangCarry();
- /* 804CDD0C */ void actionBoomerangCarry();
- /* 804CDD7C */ void actionInitWait2();
- /* 804CDD8C */ void actionWait2();
+ /* 804CD5B8 */ int actionWaitInit();
+ /* 804CD660 */ int actionWait();
+ /* 804CD8C0 */ int initActionOrderGetDemo();
+ /* 804CD98C */ int actionOrderGetDemo();
+ /* 804CDA08 */ int actionGetDemo();
+ /* 804CDBC8 */ int actionSwOnWait();
+ /* 804CDC2C */ int actionInitBoomerangCarry();
+ /* 804CDD0C */ int actionBoomerangCarry();
+ /* 804CDD7C */ int actionInitWait2();
+ /* 804CDD8C */ int actionWait2();
/* 804CDDAC */ void calcScale();
- /* 804CDE70 */ void execute();
- /* 804CE19C */ void draw();
- /* 804CE1F0 */ void setListStart();
- /* 804CE214 */ void _delete();
+ /* 804CDE70 */ int execute();
+ /* 804CE19C */ int draw();
+ /* 804CE214 */ int _delete();
+
+ /* 804CE1F0 */ virtual void setListStart();
+ /* 804CCFD8 */ virtual int __CreateHeap();
+
+ bool chkStatus(u8 i_status) { return mStatus == i_status; }
+ void setStatus(u8 i_status) { mStatus = i_status; }
+
+ u8 getSaveBitNo() { return fopAcM_GetParamBit(this, 8, 8); }
+ u8 getItemNo() { return fopAcM_GetParamBit(this, 0, 8); }
+ int getSwNo() { return 0xFF; }
void setPos(cXyz);
private:
- /* 0x568 */ u8 field_0x568[0x9d4 - 0x568];
+ /* 0x92C */ fpc_ProcID mItemId;
+ /* 0x930 */ int mCounter;
+ /* 0x934 */ u8 mStatus;
+ /* 0x935 */ u8 field_0x935;
+ /* 0x936 */ u8 mGndLandCount;
+ /* 0x937 */ u8 mIsPrmsInit;
+ /* 0x938 */ s16 field_0x938;
+ /* 0x93A */ s16 field_0x93a;
+ /* 0x93C */ cXyz mPrevSpeed;
+ /* 0x948 */ u16 mLv5Counter;
+ /* 0x94C */ f32 field_0x94c;
+ /* 0x950 */ f32 field_0x950;
+ /* 0x954 */ f32 field_0x954;
+ /* 0x958 */ u8 field_0x958[0x95E - 0x958];
+ /* 0x95E */ s16 field_0x95e;
+ /* 0x960 */ u8 field_0x960[0x962 - 0x960];
+ /* 0x962 */ s16 mRotateSpeed;
+ /* 0x964 */ u8 field_0x964[0x974 - 0x964];
+ /* 0x974 */ dPa_followEcallBack mEffect0;
+ /* 0x988 */ dPa_followEcallBack mEffect1;
+ /* 0x99C */ dPa_followEcallBack mEffect2;
+ /* 0x9B0 */ Z2SoundObjSimple mSound;
+ /* 0x9D0 */ u8 mIsHookCarry;
};
STATIC_ASSERT(sizeof(daObjLife_c) == 0x9d4);
diff --git a/include/d/actor/d_a_player.h b/include/d/actor/d_a_player.h
index cf3e5484e5..271beebeb8 100644
--- a/include/d/actor/d_a_player.h
+++ b/include/d/actor/d_a_player.h
@@ -814,7 +814,7 @@ public:
virtual s16 getBoardCutTurnOffsetAngleY() const;
virtual cXyz* getMagneHitPos();
virtual cXyz* getMagneBootsTopVec();
- virtual cXyz* getKandelaarFlamePos();
+ virtual cXyz* getKandelaarFlamePos() { return NULL; }
virtual bool checkUseKandelaar(int);
virtual void setDkCaught(fopAc_ac_c*);
virtual void onPressedDamage(cXyz const&, short);
diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h
index 6c7f1f2797..a649da80ce 100644
--- a/include/d/d_com_inf_game.h
+++ b/include/d/d_com_inf_game.h
@@ -839,13 +839,13 @@ extern GXColor g_saftyWhiteColor;
int dComLbG_PhaseHandler(request_of_phase_process_class*, request_of_phase_process_fn*, void*);
BOOL dComIfG_resetToOpening(scene_class* scene);
char* dComIfG_getRoomArcName(int roomNo);
-void* dComIfG_getStageRes(char const* resName);
-void* dComIfG_getOldStageRes(char const* resName);
+void* dComIfG_getStageRes(char const* i_resName);
+void* dComIfG_getOldStageRes(char const* i_resName);
void dComIfG_get_timelayer(int* layer);
-int dComIfG_resDelete(request_of_phase_process_class* i_phase, char const* resName);
+int dComIfG_resDelete(request_of_phase_process_class* i_phase, char const* i_resName);
int dComIfG_changeOpeningScene(scene_class* scene, s16 procName);
-int dComIfG_resLoad(request_of_phase_process_class* i_phase, char const* arc_name);
-int dComIfG_resLoad(request_of_phase_process_class* i_phase, char const* resName, JKRHeap* heap);
+int dComIfG_resLoad(request_of_phase_process_class* i_phase, char const* i_arcName);
+int dComIfG_resLoad(request_of_phase_process_class* i_phase, char const* i_resName, JKRHeap* heap);
int dComIfG_TimerDeleteRequest(int i_mode);
int dComIfG_TimerStart(int i_mode, s16 i_time);
bool dComIfGp_isLightDropMapVisible();
@@ -888,44 +888,57 @@ 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);
+/**
+ * Attempts to add a new Object Resource Archive (*.arc) into the Resource Control.
+ * @param i_arcName Name of archive to be added
+ * @param i_mountDirection The direction to mount the archive. mDoDvd_MOUNT_DIRECTION_HEAD or mDoDvd_MOUNT_DIRECTION_TAIL
+ * @param i_heap Pointer to heap to load resources into
+ * @return TRUE if successful, FALSE otherwise
+ */
+inline int dComIfG_setObjectRes(const char* i_arcName, u8 i_mountDirection, JKRHeap* i_heap) {
+ return g_dComIfG_gameInfo.mResControl.setObjectRes(i_arcName, i_mountDirection, i_heap);
}
-inline int dComIfG_setObjectRes(const char* name, void* param_1, u32 param_2) {
- return g_dComIfG_gameInfo.mResControl.setObjectRes(name, param_1, param_2, NULL);
+inline int dComIfG_setObjectRes(const char* i_arcName, void* i_archiveRes, u32 i_bufferSize) {
+ return g_dComIfG_gameInfo.mResControl.setObjectRes(i_arcName, i_archiveRes, i_bufferSize, NULL);
}
-inline int dComIfG_setStageRes(const char* name, JKRHeap* heap) {
- return g_dComIfG_gameInfo.mResControl.setStageRes(name, heap);
+/**
+ * Attempts to add a new Stage Resource Archive (*.arc) into the Resource Control.
+ * @param i_arcName Name of archive to be added
+ * @param i_heap Pointer to heap to load resources into
+ * @return TRUE if successful, FALSE otherwise
+ */
+inline int dComIfG_setStageRes(const char* i_arcName, JKRHeap* i_heap) {
+ return g_dComIfG_gameInfo.mResControl.setStageRes(i_arcName, i_heap);
}
-inline int dComIfG_syncObjectRes(const char* name) {
- return g_dComIfG_gameInfo.mResControl.syncObjectRes(name);
+inline int dComIfG_syncObjectRes(const char* i_arcName) {
+ return g_dComIfG_gameInfo.mResControl.syncObjectRes(i_arcName);
}
-inline int dComIfG_syncStageRes(const char* name) {
- return g_dComIfG_gameInfo.mResControl.syncStageRes(name);
+inline int dComIfG_syncStageRes(const char* i_arcName) {
+ return g_dComIfG_gameInfo.mResControl.syncStageRes(i_arcName);
}
-inline int dComIfG_deleteObjectResMain(const char* res) {
- return g_dComIfG_gameInfo.mResControl.deleteObjectRes(res);
+inline int dComIfG_deleteObjectResMain(const char* i_arcName) {
+ return g_dComIfG_gameInfo.mResControl.deleteObjectRes(i_arcName);
}
-inline int dComIfG_deleteStageRes(const char* res) {
- return g_dComIfG_gameInfo.mResControl.deleteStageRes(res);
+inline int dComIfG_deleteStageRes(const char* i_arcName) {
+ return g_dComIfG_gameInfo.mResControl.deleteStageRes(i_arcName);
}
-inline void* dComIfG_getStageRes(const char* arcName, const char* resName) {
- return g_dComIfG_gameInfo.mResControl.getStageRes(arcName, resName);
+inline void* dComIfG_getStageRes(const char* i_arcName, const char* i_resName) {
+ return g_dComIfG_gameInfo.mResControl.getStageRes(i_arcName, i_resName);
}
-inline void* dComIfG_getObjectRes(const char* arcName, const char* resName) {
- return g_dComIfG_gameInfo.mResControl.getObjectRes(arcName, resName);
+inline void* dComIfG_getObjectRes(const char* i_arcName, const char* i_resName) {
+ return g_dComIfG_gameInfo.mResControl.getObjectRes(i_arcName, i_resName);
}
-inline void* dComIfG_getObjectRes(const char* arcName, int param_1) {
- return g_dComIfG_gameInfo.mResControl.getObjectRes(arcName, param_1);
+inline void* dComIfG_getObjectRes(const char* i_arcName, int i_index) {
+ return g_dComIfG_gameInfo.mResControl.getObjectRes(i_arcName, i_index);
}
inline dBgS& dComIfG_Bgsp() {
@@ -940,20 +953,20 @@ inline dCcS& dComIfG_Ccsp2() {
return g_dComIfG_gameInfo.play.mCcs;
}
-inline dRes_info_c* dComIfG_getObjectResInfo(const char* arc_name) {
- return g_dComIfG_gameInfo.mResControl.getObjectResInfo(arc_name);
+inline dRes_info_c* dComIfG_getObjectResInfo(const char* i_arcName) {
+ return g_dComIfG_gameInfo.mResControl.getObjectResInfo(i_arcName);
}
-inline dRes_info_c* dComIfG_getStageResInfo(const char* arc_name) {
- return g_dComIfG_gameInfo.mResControl.getStageResInfo(arc_name);
+inline dRes_info_c* dComIfG_getStageResInfo(const char* i_arcName) {
+ return g_dComIfG_gameInfo.mResControl.getStageResInfo(i_arcName);
}
inline int dComIfG_syncAllObjectRes() {
return g_dComIfG_gameInfo.mResControl.syncAllObjectRes();
}
-inline void* dComIfG_getObjectIDRes(const char* arc_name, u16 id) {
- return g_dComIfG_gameInfo.mResControl.getObjectIDRes(arc_name, id);
+inline void* dComIfG_getObjectIDRes(const char* i_arcName, u16 i_resID) {
+ return g_dComIfG_gameInfo.mResControl.getObjectIDRes(i_arcName, i_resID);
}
inline u8 dComIfG_getBrightness() {
diff --git a/include/d/d_kankyo.h b/include/d/d_kankyo.h
index ff4580d46f..0929c15577 100644
--- a/include/d/d_kankyo.h
+++ b/include/d/d_kankyo.h
@@ -137,10 +137,10 @@ struct GB_WIND_INFLUENCE {
struct EF_THUNDER {
/* 0x00 */ u8 mStatus;
- /* 0x01 */ u8 mStateTimer;
+ /* 0x01 */ u8 mState;
/* 0x02 */ u8 field_0x2;
/* 0x04 */ int mMode;
- /* 0x08 */ f32 field_0x8;
+ /* 0x08 */ f32 mFlashTimer;
/* 0x0C */ f32 field_0xc;
/* 0x10 */ f32 field_0x10;
/* 0x14 */ f32 field_0x14;
@@ -605,5 +605,11 @@ _GXColor dKy_light_influence_col(_GXColor* param_0, f32 param_1);
static void dKy_WaterIn_Light_set();
void dKy_SordFlush_set(cXyz param_0, int param_1);
void dKy_camera_water_in_status_set(u8 status);
+void dKy_mock_light_every_set(LIGHT_INFLUENCE* param_0);
+f32 dKy_move_room_ratio(dKy_tevstr_c* param_0, s8* param_1);
+void dKy_bg1_addcol_amb_set(s16 r, s16 g, s16 b, f32 factor);
+void dKy_vrbox_addcol_sky0_set(s16 r, s16 g, s16 b, f32 factor);
+void dKy_vrbox_addcol_kasumi_set(s16 r, s16 g, s16 b, f32 factor);
+void dKy_addcol_fog_set(s16 r, s16 g, s16 b, f32 factor);
#endif /* D_KANKYO_D_KANKYO_H */
diff --git a/include/d/d_kankyo_wether.h b/include/d/d_kankyo_wether.h
index a0cf10e235..30d35b37df 100644
--- a/include/d/d_kankyo_wether.h
+++ b/include/d/d_kankyo_wether.h
@@ -55,7 +55,7 @@ public:
/* 0x5C */ f32 mVisibility;
/* 0x60 */ f32 mSunAlpha;
/* 0x64 */ f32 field_0x64;
- /* 0x68 */ f32 field_0x68;
+ /* 0x68 */ f32 mMoonAlpha;
/* 0x6C */ f32 field_0x6c;
/* 0x70 */ GXColor mColor;
/* 0x74 */ GXColor field_0x74;
@@ -174,7 +174,7 @@ public:
virtual void draw();
virtual ~dKankyo_star_Packet();
- /* 0x10 */ u8* field_0x10;
+ /* 0x10 */ u8* mpTex;
/* 0x14 */ STAR_EFF mEffect[1];
/* 0x48 */ s16 mEffectNum;
};
@@ -214,11 +214,14 @@ struct CLOUD_EFF {
/* 80056E38 */ ~CLOUD_EFF();
/* 80056E74 */ CLOUD_EFF();
- /* 0x00 */ u8 mStatus;
+ /* 0x00 */ s8 mStatus;
/* 0x04 */ cXyz mPosition;
/* 0x10 */ cXyz mBasePos;
/* 0x1C */ cXyz mPntWindSpeed;
- /* 0x28 */ u8 field_0x28[0x10];
+ /* 0x28 */ f32 field_0x28;
+ /* 0x2C */ u16 field_0x2c;
+ /* 0x30 */ f32 mAlpha;
+ /* 0x34 */ f32 mSize;
}; // Size: 0x38
class dKankyo_cloud_Packet : public J3DPacket {
@@ -235,7 +238,7 @@ struct VRKUMO_EFF {
/* 80056F18 */ ~VRKUMO_EFF();
/* 80056F54 */ VRKUMO_EFF();
- /* 0x00 */ u8 mStatus;
+ /* 0x00 */ s8 mStatus;
/* 0x04 */ cXyz mPosition;
/* 0x10 */ cXyz mBasePos;
/* 0x1C */ f32 mHeight;
@@ -268,8 +271,8 @@ struct EF_ODOUR_EFF {
/* 0x00 */ u8 mStatus;
/* 0x04 */ cXyz mPosition;
/* 0x10 */ cXyz mBasePos;
- /* 0x1C */ s16 field_0x1c;
- /* 0x1E */ s16 field_0x1e;
+ /* 0x1C */ s16 mRotX;
+ /* 0x1E */ s16 mRotY;
/* 0x20 */ f32 field_0x20;
/* 0x24 */ f32 field_0x24;
/* 0x28 */ f32 field_0x28;
@@ -284,18 +287,28 @@ public:
/* 0x00010 */ u8* mpResTex;
/* 0x00014 */ EF_ODOUR_EFF mOdourEff[2000];
/* 0x17714 */ cXyz field_0x17714;
- /* 0x17720 */ u8 field_0x17720[0x17728 - 0x17720];
+ /* 0x17720 */ u8 field_0x17720[0x17724 - 0x17720];
+ /* 0x17724 */ s16 field_0x17724;
+ /* 0x17720 */ s16 field_0x17726;
}; // Size: 0x17728
struct EF_MUD_EFF {
/* 80056FFC */ ~EF_MUD_EFF();
/* 80057038 */ EF_MUD_EFF();
- /* 0x00 */ u8 mStatus;
+ /* 0x00 */ s8 mStatus;
/* 0x04 */ cXyz mPosition;
/* 0x10 */ cXyz mBasePos;
/* 0x1C */ cXyz field_0x1c;
- /* 0x28 */ u8 field_0x28[0x20];
+ /* 0x28 */ f32 field_0x28;
+ /* 0x2C */ f32 field_0x2c;
+ /* 0x30 */ f32 field_0x30;
+ /* 0x34 */ f32 field_0x34;
+ /* 0x38 */ f32 field_0x38;
+ /* 0x3C */ f32 field_0x3c;
+ /* 0x40 */ s16 field_0x40;
+ /* 0x42 */ s16 field_0x42;
+ /* 0x44 */ u8 field_0x44[0x48 - 0x44];
}; // Size: 0x48
class dKankyo_mud_Packet : public J3DPacket {
diff --git a/include/d/d_resorce.h b/include/d/d_resorce.h
index 9603d4e9af..0b5f416819 100644
--- a/include/d/d_resorce.h
+++ b/include/d/d_resorce.h
@@ -10,21 +10,29 @@ class JKRSolidHeap;
class dRes_info_c {
public:
- /* 8003A260 */ dRes_info_c();
- /* 8003A280 */ ~dRes_info_c();
- /* 8003A348 */ int set(char const*, char const*, u8, JKRHeap*);
- /* 8003AB30 */ static void onWarpMaterial(J3DModelData*);
- /* 8003AC1C */ static void offWarpMaterial(J3DModelData*);
- /* 8003AD08 */ static void setWarpSRT(J3DModelData*, cXyz const&, f32, f32);
- /* 8003AE14 */ static J3DModelData* loaderBasicBmd(u32, void*);
- /* 8003B30C */ int loadResource();
- /* 8003B998 */ void deleteArchiveRes();
- /* 8003BAC4 */ int setRes(JKRArchive*, JKRHeap*);
- /* 8003BAF8 */ int setRes();
- /* 8003BD2C */ static void dump_long(dRes_info_c*, int);
- /* 8003BE38 */ static void dump(dRes_info_c*, int);
-
- void* getRes(u32 resIdx) { return *(mRes + resIdx); }
+ dRes_info_c();
+ ~dRes_info_c();
+
+ int set(char const* i_arcName, char const* i_path, u8 i_mountDirection, JKRHeap* i_heap);
+ int loadResource();
+ void deleteArchiveRes();
+ int setRes(JKRArchive* i_archive, JKRHeap* i_heap);
+ int setRes();
+
+ static void onWarpMaterial(J3DModelData* i_modelData);
+ static void offWarpMaterial(J3DModelData* i_modelData);
+ static void setWarpSRT(J3DModelData* i_modelData, const cXyz& i_pos, f32 i_transX, f32 i_transY);
+ static J3DModelData* loaderBasicBmd(u32 i_tag, void* i_data);
+ static void dump_long(dRes_info_c* i_resInfo, int i_infoNum);
+ static void dump(dRes_info_c* i_resInfo, int i_infoNum);
+
+ void* getRes(s32 i_index) {
+ JUT_ASSERT(25, i_index >= 0 && i_index < getResNum());
+ return *(mRes + i_index);
+ }
+
+ s32 getResNum() { return mArchive->countFile(); }
+
int getCount() { return mCount; }
char* getArchiveName() { return mArchiveName; }
mDoDvdThd_mountArchive_c* getDMCommand() { return mDMCommand; }
@@ -34,6 +42,8 @@ public:
return --mCount;
}
+ static const int NAME_MAX = 8;
+
private:
/* 0x00 */ char mArchiveName[11];
/* 0x0C */ u16 mCount;
@@ -49,71 +59,73 @@ STATIC_ASSERT(sizeof(dRes_info_c) == 0x24);
class dRes_control_c {
public:
dRes_control_c() {}
- /* 8003BFB0 */ ~dRes_control_c();
- /* 8003C078 */ static int setRes(char const*, dRes_info_c*, int, char const*, u8, JKRHeap*);
- /* 8003C160 */ static int syncRes(char const*, dRes_info_c*, int);
- /* 8003C194 */ static int deleteRes(char const*, dRes_info_c*, int);
- /* 8003C37C */ static void* getRes(char const*, char const*, dRes_info_c*, int);
- /* 8003C1E4 */ static dRes_info_c* getResInfo(char const*, dRes_info_c*, int);
- /* 8003C260 */ static dRes_info_c* newResInfo(dRes_info_c*, int);
- /* 8003C288 */ static dRes_info_c* getResInfoLoaded(char const*, dRes_info_c*, int);
- /* 8003C2EC */ static void* getRes(char const*, s32, dRes_info_c*, int);
- /* 8003C400 */ static void* getIDRes(char const*, u16, dRes_info_c*, int);
- /* 8003C470 */ static int syncAllRes(dRes_info_c*, int);
- /* 8003C4E4 */ int setObjectRes(char const*, void*, u32, JKRHeap*);
- /* 8003C5BC */ int setStageRes(char const*, JKRHeap*);
- /* 8003C638 */ void dump();
- /* 8003C6B8 */ int getObjectResName2Index(char const*, char const*);
-
- int setObjectRes(const char* name, u8 param_1, JKRHeap* heap) {
- return setRes(name, &mObjectInfo[0], ARRAY_SIZE(mObjectInfo), "/res/Object/", param_1,
- heap);
+ ~dRes_control_c();
+
+ int setObjectRes(char const* i_arcName, void* i_archiveRes, u32 i_bufferSize, JKRHeap* i_heap);
+ int setStageRes(char const* i_arcName, JKRHeap* i_heap);
+ void dump();
+ int getObjectResName2Index(char const* i_arcName, char const* i_resName);
+
+ static int setRes(char const* i_arcName, dRes_info_c* i_resInfo, int i_infoNum, char const* i_path, u8 i_mountDirection, JKRHeap* i_heap);
+ static int syncRes(char const* i_arcName, dRes_info_c* i_resInfo, int i_infoNum);
+ static int deleteRes(char const* i_arcName, dRes_info_c* i_resInfo, int i_infoNum);
+ static void* getRes(char const* i_arcName, char const* i_resName, dRes_info_c* i_resInfo, int i_infoNum);
+ static dRes_info_c* getResInfo(char const* i_arcName, dRes_info_c* i_resInfo, int i_infoNum);
+ static dRes_info_c* newResInfo(dRes_info_c* i_resInfo, int i_infoNum);
+ static dRes_info_c* getResInfoLoaded(char const* i_arcName, dRes_info_c* i_resInfo, int i_infoNum);
+ static void* getRes(char const* i_arcName, s32 i_index, dRes_info_c* i_resInfo, int i_infoNum);
+ static void* getIDRes(char const* i_arcName, u16 i_resID, dRes_info_c* i_resInfo, int i_infoNum);
+ static int syncAllRes(dRes_info_c* i_resInfo, int i_infoNum);
+
+ int setObjectRes(const char* i_arcName, u8 i_mountDirection, JKRHeap* i_heap) {
+ return setRes(i_arcName, mObjectInfo, ARRAY_SIZE(mObjectInfo), "/res/Object/", i_mountDirection,
+ i_heap);
}
- void* getObjectRes(const char* arcName, const char* resName) {
- return getRes(arcName, resName, &mObjectInfo[0], ARRAY_SIZE(mObjectInfo));
+ void* getObjectRes(const char* i_arcName, const char* resName) {
+ return getRes(i_arcName, resName, mObjectInfo, ARRAY_SIZE(mObjectInfo));
}
- void* getObjectRes(const char* arcName, s32 param_1) {
- return getRes(arcName, param_1, &mObjectInfo[0], ARRAY_SIZE(mObjectInfo));
+ void* getObjectRes(const char* i_arcName, s32 i_index) {
+ return getRes(i_arcName, i_index, mObjectInfo, ARRAY_SIZE(mObjectInfo));
}
- void* getObjectIDRes(const char* arcName, u16 id) {
- return getIDRes(arcName, id, &mObjectInfo[0], ARRAY_SIZE(mObjectInfo));
+ void* getObjectIDRes(const char* i_arcName, u16 i_resID) {
+ return getIDRes(i_arcName, i_resID, mObjectInfo, ARRAY_SIZE(mObjectInfo));
}
- int syncObjectRes(const char* name) {
- return syncRes(name, &mObjectInfo[0], ARRAY_SIZE(mObjectInfo));
+ int syncObjectRes(const char* i_arcName) {
+ return syncRes(i_arcName, mObjectInfo, ARRAY_SIZE(mObjectInfo));
}
- int syncStageRes(const char* name) {
- return syncRes(name, &mStageInfo[0], ARRAY_SIZE(mStageInfo));
+ int syncStageRes(const char* i_arcName) {
+ return syncRes(i_arcName, mStageInfo, ARRAY_SIZE(mStageInfo));
}
- int syncAllObjectRes() { return syncAllRes(&mObjectInfo[0], ARRAY_SIZE(mObjectInfo)); }
+ int syncAllObjectRes() { return syncAllRes(mObjectInfo, ARRAY_SIZE(mObjectInfo)); }
- int deleteObjectRes(const char* name) {
- return deleteRes(name, &mObjectInfo[0], ARRAY_SIZE(mObjectInfo));
+ int deleteObjectRes(const char* i_arcName) {
+ return deleteRes(i_arcName, mObjectInfo, ARRAY_SIZE(mObjectInfo));
}
- int deleteStageRes(const char* name) {
- return deleteRes(name, &mStageInfo[0], ARRAY_SIZE(mStageInfo));
+ int deleteStageRes(const char* i_arcName) {
+ return deleteRes(i_arcName, mStageInfo, ARRAY_SIZE(mStageInfo));
}
- void* getStageRes(const char* arcName, const char* resName) {
- return getRes(arcName, resName, &mStageInfo[0], ARRAY_SIZE(mStageInfo));
+ void* getStageRes(const char* i_arcName, const char* i_resName) {
+ return getRes(i_arcName, i_resName, mStageInfo, ARRAY_SIZE(mStageInfo));
}
- dRes_info_c* getObjectResInfo(const char* arcName) {
- return getResInfo(arcName, &mObjectInfo[0], ARRAY_SIZE(mObjectInfo));
+ dRes_info_c* getObjectResInfo(const char* i_arcName) {
+ return getResInfo(i_arcName, mObjectInfo, ARRAY_SIZE(mObjectInfo));
}
- dRes_info_c* getStageResInfo(const char* arcName) {
- return getResInfo(arcName, &mStageInfo[0], ARRAY_SIZE(mStageInfo));
+ dRes_info_c* getStageResInfo(const char* i_arcName) {
+ return getResInfo(i_arcName, mStageInfo, ARRAY_SIZE(mStageInfo));
}
- /* 0x0000 */ dRes_info_c mObjectInfo[0x80];
- /* 0x1200 */ dRes_info_c mStageInfo[0x40];
+ /* 0x0000 */ dRes_info_c mObjectInfo[128];
+ /* 0x1200 */ dRes_info_c mStageInfo[64];
}; // Size: 0x1B00
#endif /* D_D_RESORCE_H */
diff --git a/include/f_op/f_op_camera_mng.h b/include/f_op/f_op_camera_mng.h
index 54033648df..05ade1a4ba 100644
--- a/include/f_op/f_op_camera_mng.h
+++ b/include/f_op/f_op_camera_mng.h
@@ -91,6 +91,10 @@ inline cXyz* fopCamM_GetCenter_p(camera_class* i_camera) {
return &i_camera->lookat.center;
}
+inline s16 fopCamM_GetBank(camera_class* i_camera) {
+ return i_camera->bank;
+}
+
fpc_ProcID fopCamM_Create(int i_cameraIdx, s16 i_procName, void* i_append);
void fopCamM_Management();
u32 fopCamM_GetParam(camera_class* i_this);
diff --git a/include/m_Do/m_Do_audio.h b/include/m_Do/m_Do_audio.h
index f111436f98..ab34cbf083 100644
--- a/include/m_Do/m_Do_audio.h
+++ b/include/m_Do/m_Do_audio.h
@@ -175,6 +175,10 @@ inline void mDoAud_mEnvSe_startFarThunderSe(const Vec* param_0) {
g_mEnvSeMgr.startFarThunderSe((Vec*)param_0, 0);
}
+inline void mDoAud_mEnvSe_startNearThunderSe() {
+ g_mEnvSeMgr.startNearThunderSe(0);
+}
+
inline void mDoAud_mEnvse_initStrongWind() {
g_mEnvSeMgr.initStrongWindSe();
}
diff --git a/include/m_Do/m_Do_dvd_thread.h b/include/m_Do/m_Do_dvd_thread.h
index 8922ca7f36..0a6ac3e49c 100644
--- a/include/m_Do/m_Do_dvd_thread.h
+++ b/include/m_Do/m_Do_dvd_thread.h
@@ -6,6 +6,9 @@
#include "dolphin/os/OSMutex.h"
#include "f_pc/f_pc_node.h"
+#define mDoDvd_MOUNT_DIRECTION_HEAD 0
+#define mDoDvd_MOUNT_DIRECTION_TAIL 1
+
class JKRHeap;
class JKRMemArchive;