d_a_obj_waterGate matching + d_a_obj_lv3Water2 equivalent (#2293)

* d_a_obj_waterGate matching + d_a_obj_lv3Water2 equivalent
* Add simpleCalcMaterial implicit inline to J3DModelData (seen in debug)
* Basic documentation for both actors
* WIP debug build implementations (note TODOs)
* Update configure.py and note weak ordering issues for lv3Water2

* Actually add modified J3DModelData.h & explicitly note fake padding
This commit is contained in:
Huitzi
2025-01-27 14:55:55 -05:00
committed by GitHub
parent bf4053fefa
commit 7c5006e446
6 changed files with 547 additions and 736 deletions
@@ -22,12 +22,13 @@ public:
/* 80325E14 */ s32 newSharedDisplayList(u32);
/* 80325EC8 */ void indexToPtr();
/* 80325F94 */ void makeSharedDL();
/* 8032600C */ void simpleCalcMaterial(u16, f32 (*)[4]);
/* 8032600C */ void simpleCalcMaterial(u16, Mtx);
/* 803260CC */ void syncJ3DSysPointers() const;
/* 803260F8 */ void syncJ3DSysFlags() const;
/* 8032617C */ virtual ~J3DModelData() {}
void simpleCalcMaterial(Mtx mtx) { simpleCalcMaterial(0, mtx); }
J3DMaterialTable& getMaterialTable() { return mMaterialTable; }
JUTNameTab* getMaterialName() const { return mMaterialTable.getMaterialName(); }
J3DVertexData& getVertexData() { return mVertexData; }
+79 -14
View File
@@ -1,40 +1,105 @@
#ifndef D_A_OBJ_LV3WATER2_H
#define D_A_OBJ_LV3WATER2_H
#include "d/d_bg_s_movebg_actor.h"
#include "d/d_event_lib.h"
#include "f_op/f_op_actor_mng.h"
struct fakeLv3Water2Padding {
u8 a[8];
};
/**
* @ingroup actors-objects
* @class daLv3Water2_c
* @brief Lakebed Temple Water 2
* @brief Lakebed Temple Central Room Water
*
* @details
* @details Water in the central room (where the boss entrance is). It can be raised twice.
*
*/
class daLv3Water2_c : public fopAc_ac_c {
class daLv3Water2_c : public dBgS_MoveBgActor, public fakeLv3Water2Padding, public dEvLib_callback_c {
public:
daLv3Water2_c() : dEvLib_callback_c(this) {}
~daLv3Water2_c() {}
/* 80C5A478 */ void setBaseMtx();
/* 80C5A4F8 */ void CreateHeap();
/* 80C5A5E4 */ void create();
/* 80C5A844 */ void Execute(f32 (**)[3][4]);
/* 80C5A4F8 */ int CreateHeap();
/* 80C5A5E4 */ cPhs__Step create();
/* 80C5A844 */ int Execute(Mtx**);
/* 80C5AC10 */ void mode_proc_wait();
/* 80C5ACB8 */ void mode_init_levelCtrl();
/* 80C5ACE4 */ void mode_proc_levelCtrl();
/* 80C5ADA4 */ void Draw();
/* 80C5AEFC */ void Delete();
/* 80C5AF3C */ void eventStart();
/* 80C5B298 */ ~daLv3Water2_c();
/* 80C5ADA4 */ int Draw();
/* 80C5AEFC */ int Delete();
/* 80C5AF3C */ BOOL eventStart();
private:
/* 0x568 */ u8 field_0x568[0x610 - 0x568];
/* 0x5B8 */ request_of_phase_process_class mPhase;
/* 0x5C0 */ J3DModel* mpModel;
/* 0x5C4 */ mDoExt_btkAnm mWaterSurfaceRefractionAnm;
/* 0x5DC */ u8 mMode;
/* 0x5DD */ u8 mResourceIndex;
/* 0x5E0 */ f32 mWaterLv;
/* 0x5E4 */ u8 mCurrentWaterLvFrame;
/* 0x5E5 */ u8 mWaterLvFrame;
/* 0x5E6 */ u8 mFullRatio;
/* 0x5E7 */ u8 mEastSwInitialStatus; // East SW is the lever in the east-most room on 2F, which can only be pulled after raising the water level in that room by pulling the lever in 4F
/* 0x5E8 */ u8 mWestSwInitialStatus; // West SW is the lever in the west-most room on 2F, which can only be pulled after raising the water level in that room by pulling the lever in 4F
/* 0x5E9 */ u8 mEastSwCurrentStatus;
/* 0x5EA */ u8 mWestSwCurrentStatus;
/* 0x5EB */ u8 mLevelControlWaitFrames;
/* 0x5EC */ f32 mBaseYPos;
/* 0x5F0 */ u32 mEastWaterParticles[4]; // If the central staircase isn't rotated to allow water from the east to flow down it, the water falls into the basin; these are the splash particles where the basin water and falling water meet
/* 0x600 */ u32 mWestWaterParticles[4]; // If the central staircase isn't rotated to allow water from the west to flow down it, the water falls into the basin; these are the splash particles where the basin water and falling water meet
enum Mode_e {
WAIT, LEVEL_CTRL
};
int getParamLevel1() {
return fopAcM_GetParamBit(this, 4, 12);
}
int getParamSw2() {
return (shape_angle.x & 0xFF00) >> 8;
}
int getParamSw1() {
return shape_angle.x & 0xFF;
}
u32 getParam(int shift, int bit) {
return fopAcM_GetParamBit(this, shift, bit);
}
int getParamEvent2() {
return fopAcM_GetParamBit(this, 24, 8);
}
int getParamEvent() {
return fopAcM_GetParamBit(this, 16, 8);
}
int getParamFrame2() {
return (shape_angle.z & 0xFF00) >> 8;
}
int getParamFrame1() {
return shape_angle.z & 0xFF;
}
};
STATIC_ASSERT(sizeof(daLv3Water2_c) == 0x610);
class daLv3Water2_HIO_c {
public:
struct daLv3Water2_HIO_c : public mDoHIO_entry_c {
/* 80C5A40C */ daLv3Water2_HIO_c();
/* 80C5B14C */ ~daLv3Water2_HIO_c();
/* 80C5B14C */ ~daLv3Water2_HIO_c() {}
#ifdef DEBUG
void genMessage(JORMContext*);
#endif
/* 0x04 */ u8 mLevelControlWaitFrames;
};
+38 -12
View File
@@ -1,22 +1,26 @@
#ifndef D_A_OBJ_WATERGATE_H
#define D_A_OBJ_WATERGATE_H
#include "f_op/f_op_actor_mng.h"
#include "d/d_bg_s_movebg_actor.h"
#include "m_Do/m_Do_hostIO.h"
#include "SSystem/SComponent/c_phase.h"
/**
* @ingroup actors-objects
* @class daWtGate_c
* @brief Water Gate
*
* @details
* @details Sluice gate that player opens in 3F and 4F of Lakebed Temple.
* Object does not control the flow of water streams in the temple, it is purely aesthetic.
*
*/
class daWtGate_c : public fopAc_ac_c {
class daWtGate_c : public dBgS_MoveBgActor {
public:
/* 80D2BC0C */ void setBaseMtx();
/* 80D2BC94 */ void CreateHeap();
/* 80D2BD00 */ void create();
/* 80D2BE7C */ void Execute(f32 (**)[3][4]);
/* 80D2BC94 */ int CreateHeap();
/* 80D2BD00 */ cPhs__Step create();
/* 80D2BE7C */ int Execute(Mtx**);
/* 80D2BECC */ void move();
/* 80D2BF88 */ void init_modeWait();
/* 80D2BF94 */ void modeWait();
@@ -26,19 +30,41 @@ public:
/* 80D2C150 */ void modeClose();
/* 80D2C250 */ void init_modeEnd();
/* 80D2C25C */ void modeEnd();
/* 80D2C260 */ void Draw();
/* 80D2C304 */ void Delete();
/* 80D2C260 */ int Draw();
/* 80D2C304 */ int Delete();
private:
/* 0x568 */ u8 field_0x568[0x5bc - 0x568];
/* 0x5A0 */ request_of_phase_process_class mPhase;
/* 0x5A8 */ J3DModel* mpModel;
/* 0x5AC */ u8 mMode;
/* 0x5AD */ u8 field_0x5AD; // Neither modified nor read; unused
/* 0x5AE */ u8 mPrevSwitchState;
/* 0x5B0 */ f32 mOpenYOffset;
/* 0x5B4 */ f32 mClosedYPos;
/* 0x5B8 */ f32 mMaxMoveSpeed;
enum SwitchState_e {
CLOSED, OPENED
};
enum Mode_e {
WAIT, OPEN, CLOSE, END
};
};
STATIC_ASSERT(sizeof(daWtGate_c) == 0x5bc);
class daWtGate_HIO_c {
public:
struct daWtGate_HIO_c : public mDoHIO_entry_c {
/* 80D2BB8C */ daWtGate_HIO_c();
/* 80D2C3C0 */ ~daWtGate_HIO_c();
/* 80D2C3C0 */ ~daWtGate_HIO_c() {};
#ifdef DEBUG
void genMessage(JORMContext*);
#endif
/* 0x4 */ f32 mMaxSpeed;
/* 0x8 */ u8 field_0x8; // Modified, but never read; unused?
/* 0x9 */ u8 field_0x9; // Modified, but never read; unused?
};