mirror of
https://github.com/zeldaret/tp
synced 2026-07-11 15:28:38 -04:00
d_a_obj_kwheel00, 01, & d_a_obj_klift00 Equivalent (weak func and/or vtable order) (#2291)
* d_a_obj_kwheel00, 01, & d_a_obj_klift00 Equivalent (weak func and/or vtable order) * Three rels equivalent * Basic documentation for the three rels * Define explicit constructor for dMdl_obj_c (needed for proper array creation in d_a_obj_klift00) * Modify d_a_obj_bky_rock to account for new explicit constructor of dMdl_obj_c * Specify weak func and/or vtable orders for rels in config.py * Cleanup includes and dol2asm artifacts * * Fix debug build * Restore incorrectly removed l_bmdidx * Fix US retail equivalency
This commit is contained in:
@@ -17,8 +17,6 @@ class daBkyRock_c : public fopAc_ac_c, public request_of_phase_process_class {
|
||||
public:
|
||||
struct _pieceData {
|
||||
public:
|
||||
/* 80BB6914 */ _pieceData() { mMdlObj.mpObj = NULL; }
|
||||
|
||||
/* 0x00 */ dMdl_obj_c mMdlObj;
|
||||
/* 0x34 */ Vec position;
|
||||
/* 0x40 */ f32 targetX;
|
||||
|
||||
@@ -1,37 +1,86 @@
|
||||
#ifndef D_A_OBJ_KLIFT00_H
|
||||
#define D_A_OBJ_KLIFT00_H
|
||||
|
||||
#include "d/d_bg_s_movebg_actor.h"
|
||||
#include "d/d_cc_d.h"
|
||||
#include "d/d_model.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
|
||||
/**
|
||||
* @ingroup actors-objects
|
||||
* @class daObjKLift00_c
|
||||
* @brief Water Wheel Lift?
|
||||
* @brief Water Wheel/Gear Lift
|
||||
*
|
||||
* @details
|
||||
* @details Lakebed temple lifts connected to large water wheels/gears (see d_a_obj_kwheel01) by chains
|
||||
*
|
||||
*/
|
||||
class daObjKLift00_c : public fopAc_ac_c {
|
||||
class daObjKLift00_c : public dBgS_MoveBgActor, public request_of_phase_process_class {
|
||||
public:
|
||||
struct ChainPos {
|
||||
/* 8058C338 */ ~ChainPos();
|
||||
/* 8058C374 */ ChainPos();
|
||||
};
|
||||
|
||||
/* 8058B02C */ void create1st();
|
||||
/* 8058B02C */ cPhs__Step create1st();
|
||||
/* 8058B0D0 */ void setMtx();
|
||||
/* 8058B4B0 */ void rideActor(fopAc_ac_c*);
|
||||
/* 8058B5EC */ void CreateHeap();
|
||||
/* 8058B77C */ void Create();
|
||||
/* 8058B97C */ void Execute(f32 (**)[3][4]);
|
||||
/* 8058BEEC */ void Draw();
|
||||
/* 8058C014 */ void Delete();
|
||||
/* 8058B5EC */ int CreateHeap();
|
||||
/* 8058B77C */ int Create();
|
||||
/* 8058B97C */ int Execute(Mtx**);
|
||||
/* 8058BEEC */ int Draw();
|
||||
/* 8058C014 */ int Delete();
|
||||
|
||||
enum Param_e {
|
||||
LOCK_e = (1 << 6), NO_BASE_DISP = (1 << 7)
|
||||
};
|
||||
|
||||
private:
|
||||
/* 0x568 */ u8 field_0x568[0x1160 - 0x568];
|
||||
struct ChainPos {
|
||||
cXyz mDeltaPosVector;
|
||||
cXyz mCurrentPos;
|
||||
cXyz mPrevPos;
|
||||
};
|
||||
|
||||
/* 0x05A8 */ Mtx mNewBgMtx;
|
||||
/* 0x05D8 */ Mtx mCullMtx;
|
||||
/* 0x0608 */ J3DModel* mpLiftPlatform;
|
||||
/* 0x060C */ J3DModel* mpChainBase;
|
||||
/* 0x0610 */ J3DModelData* mChainModelData; // JUT_ASSERT string shows this was called mChainModelData
|
||||
/* 0x0614 */ int mNumChains; // Foundation "chain" is the bottom-most "chain" (doesn't have an associated chain model), and is used to transform the platform itself; = 1 + mNumChainModels
|
||||
/* 0x0618 */ ChainPos* mChainPositions;
|
||||
/* 0x061C */ int mNumChainModels;
|
||||
/* 0x0620 */ dMdl_obj_c* mChainMdlObjs;
|
||||
/* 0x0624 */ dCcD_Stts mStts;
|
||||
/* 0x0660 */ dCcD_Sph mChainSphereColliders[8];
|
||||
/* 0x1020 */ dCcD_Cyl mCylinderCollider;
|
||||
/* 0x115C */ s32 mStopSwingingFrames;
|
||||
|
||||
// Number of chain models
|
||||
u32 getArg0() {
|
||||
return fopAcM_GetParamBit(this, 0, 6);
|
||||
}
|
||||
|
||||
// Determines whether lift swinging should be dampened upon creation
|
||||
u32 getLock() {
|
||||
return fopAcM_GetParamBit(this, 6, 1);
|
||||
}
|
||||
|
||||
// Determines whether the metal base from which the chain hands should be drawn (Drawn if 0)
|
||||
u32 getNoBaseDisp() {
|
||||
return fopAcM_GetParamBit(this, 7, 1);
|
||||
}
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(daObjKLift00_c) == 0x1160);
|
||||
|
||||
struct daObjKLift00_HIO_c : public mDoHIO_entry_c {
|
||||
daObjKLift00_HIO_c();
|
||||
~daObjKLift00_HIO_c() {};
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
/* 0x04 */ f32 mChainGravity;
|
||||
/* 0x08 */ f32 mRideParameters;
|
||||
/* 0x0C */ f32 mWindSwayOccuranceFactor;
|
||||
/* 0x10 */ f32 mWindMagnitudeChain;
|
||||
/* 0x14 */ f32 mWindMagnitudeFoundation;
|
||||
/* 0x18 */ f32 mChainHitSpeed;
|
||||
/* 0x1C */ f32 field_0x1C;
|
||||
};
|
||||
|
||||
#endif /* D_A_OBJ_KLIFT00_H */
|
||||
|
||||
@@ -1,33 +1,81 @@
|
||||
#ifndef D_A_OBJ_KWHEEL00_H
|
||||
#define D_A_OBJ_KWHEEL00_H
|
||||
|
||||
#include "d/d_bg_s_movebg_actor.h"
|
||||
#include "d/d_cc_d.h"
|
||||
#include "d/d_event_lib.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
|
||||
/**
|
||||
* @ingroup actors-objects
|
||||
* @class daObjKWheel00_c
|
||||
* @brief Water Wheel 00?
|
||||
*
|
||||
* @details
|
||||
* @brief Water Wheel/Gear
|
||||
*
|
||||
* @details Lakebed temple water wheels/gears without clawshot targets.
|
||||
* There are two types:
|
||||
* 1.) Larger gold-colored ones that are completely solid and lie near the end of the long axle
|
||||
* 2.) Smaller dark-colored ones where the largest gear teeth are grated and lie centered on a short axle (seen on bridges to/from central room)
|
||||
*/
|
||||
class daObjKWheel00_c : public fopAc_ac_c {
|
||||
|
||||
class daObjKWheel00_c : public dBgS_MoveBgActor, public request_of_phase_process_class, public dEvLib_callback_c {
|
||||
public:
|
||||
/* 80C4D6F8 */ void create1st();
|
||||
daObjKWheel00_c() : dEvLib_callback_c(this) {}
|
||||
~daObjKWheel00_c() {}
|
||||
|
||||
/* 80C4D6F8 */ int create1st();
|
||||
/* 80C4D86C */ void setMtx();
|
||||
/* 80C4D9B8 */ void CreateHeap();
|
||||
/* 80C4DA38 */ void Create();
|
||||
/* 80C4DBBC */ void Execute(f32 (**)[3][4]);
|
||||
/* 80C4E1B0 */ void Draw();
|
||||
/* 80C4E254 */ void Delete();
|
||||
/* 80C4E298 */ void eventStart();
|
||||
/* 80C4E6E4 */ ~daObjKWheel00_c();
|
||||
/* 80C4D9B8 */ int CreateHeap();
|
||||
/* 80C4DA38 */ int Create();
|
||||
/* 80C4DBBC */ int Execute(Mtx**);
|
||||
/* 80C4E1B0 */ int Draw();
|
||||
/* 80C4E254 */ int Delete();
|
||||
/* 80C4E298 */ BOOL eventStart();
|
||||
|
||||
int getSwNo() {
|
||||
return fopAcM_GetParamBit(this, 0, 8);
|
||||
}
|
||||
|
||||
u32 getType() {
|
||||
return fopAcM_GetParamBit(this,17,1);
|
||||
}
|
||||
|
||||
enum Type_e { TYPE_LARGE_GOLD, TYPE_SMALL_PLATINUM };
|
||||
|
||||
private:
|
||||
/* 0x568 */ u8 field_0x568[0xb44 - 0x568];
|
||||
enum QuadrantalAngle_e { DEG_INVALID = -1, DEG_0, DEG_90, DEG_180, DEG_270, DEG_MAX};
|
||||
|
||||
/* 0x5B8 */ Mtx mNewBgMtx;
|
||||
/* 0x5E8 */ Mtx mTransformMtx;
|
||||
/* 0x618 */ J3DModel* mpModel;
|
||||
/* 0x61C */ s16 mZAngularVelocity;
|
||||
/* 0x620 */ Type_e m_type; // JUT_ASSERT string shows this was called m_type
|
||||
/* 0x624 */ dCcD_Stts mStts;
|
||||
/* 0x660 */ dCcD_Sph mLargeGearTeethSphereColliders[4];
|
||||
/* 0xB40 */ QuadrantalAngle_e mPrevQuadrantalZAngle;
|
||||
|
||||
// Determines rotational direction of gear; 0 = counter-clockwise, 1 = clockwise
|
||||
u32 getArg0() {
|
||||
return fopAcM_GetParamBit(this, 8, 1);
|
||||
}
|
||||
|
||||
s32 getEvent() {
|
||||
return fopAcM_GetParamBit(this, 9, 8);
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
STATIC_ASSERT(sizeof(daObjKWheel00_c) == 0xb44);
|
||||
|
||||
struct daObjKWheel00_HIO_c : public mDoHIO_entry_c {
|
||||
daObjKWheel00_HIO_c();
|
||||
~daObjKWheel00_HIO_c();
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
/* 0x4 */ s16 mTargetZAngularSpeed;
|
||||
/* 0x6 */ s16 mZAngularAcceleration;
|
||||
};
|
||||
|
||||
#endif /* D_A_OBJ_KWHEEL00_H */
|
||||
|
||||
@@ -1,33 +1,81 @@
|
||||
#ifndef D_A_OBJ_KWHEEL01_H
|
||||
#define D_A_OBJ_KWHEEL01_H
|
||||
|
||||
|
||||
#include "d/d_bg_s_movebg_actor.h"
|
||||
#include "d/d_event_lib.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
|
||||
/**
|
||||
* @ingroup actors-objects
|
||||
* @class daObjKWheel01_c
|
||||
* @brief Water Wheel 01?
|
||||
*
|
||||
* @details
|
||||
* @brief Water Wheel/Gear
|
||||
*
|
||||
* @details Lakebed temple large water wheels/gears with clawshot targets and/or lifts
|
||||
*/
|
||||
class daObjKWheel01_c : public fopAc_ac_c {
|
||||
class daObjKWheel01_c : public dBgS_MoveBgActor, public request_of_phase_process_class, public dEvLib_callback_c {
|
||||
public:
|
||||
/* 80C4EA78 */ void create1st();
|
||||
daObjKWheel01_c() : dEvLib_callback_c(this) {}
|
||||
~daObjKWheel01_c() {};
|
||||
|
||||
/* 80C4EA78 */ cPhs__Step create1st();
|
||||
/* 80C4EC54 */ void setMtx();
|
||||
/* 80C4EDCC */ void CreateHeap();
|
||||
/* 80C4EF38 */ void Create();
|
||||
/* 80C4F048 */ void Execute(f32 (**)[3][4]);
|
||||
/* 80C4F344 */ void Draw();
|
||||
/* 80C4F3E8 */ void Delete();
|
||||
/* 80C4F498 */ void eventStart();
|
||||
/* 80C4F60C */ ~daObjKWheel01_c();
|
||||
/* 80C4EDCC */ int CreateHeap();
|
||||
/* 80C4EF38 */ int Create();
|
||||
/* 80C4F048 */ int Execute(Mtx**);
|
||||
/* 80C4F344 */ int Draw();
|
||||
/* 80C4F3E8 */ int Delete();
|
||||
/* 80C4F498 */ BOOL eventStart();
|
||||
|
||||
private:
|
||||
/* 0x568 */ u8 field_0x568[0x704 - 0x568];
|
||||
/* 0x5B8 */ Mtx mNewBgMtx;
|
||||
/* 0x5E8 */ Mtx mTransformMtx;
|
||||
/* 0x618 */ J3DModel* mpModel;
|
||||
/* 0x61C */ s16 mYAngularVelocity;
|
||||
/* 0x620 */ fpc_ProcID m_klift_pid[4]; // JUT_ASSERT debug string shows this was called m_klift_pid
|
||||
/* 0x630 */ dBgW* mKLiftCollisions[4];
|
||||
/* 0x640 */ Mtx mKLiftBaseMatrices[4];
|
||||
/* 0x700 */ u8 mCreatedKLifts;
|
||||
|
||||
// Switch number to check if water is flowing and the gear should turn, and whether the gear should accelerate to the target speed or start off at it
|
||||
int getSwNo() {
|
||||
return fopAcM_GetParamBit(this, 0, 8);
|
||||
}
|
||||
|
||||
// Determines rotational direction of gear; 0 = counter-clockwise, 1 = clockwise
|
||||
u32 getArg0() {
|
||||
return fopAcM_GetParamBit(this, 8, 1);
|
||||
}
|
||||
|
||||
int getEvent() {
|
||||
return fopAcM_GetParamBit(this, 9, 8);
|
||||
}
|
||||
|
||||
// Determines the number of chain models each lift should use
|
||||
u32 getArg2() {
|
||||
return fopAcM_GetParamBit(this, 17, 6);
|
||||
}
|
||||
|
||||
// Determines whether each of 4 potential lifts should be created and/or updated
|
||||
u32 getArg4567() {
|
||||
return fopAcM_GetParamBit(this, 23, 4);
|
||||
}
|
||||
|
||||
u32 getOut() {
|
||||
return fopAcM_GetParamBit(this, 27, 1);
|
||||
}
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(daObjKWheel01_c) == 0x704);
|
||||
|
||||
struct daObjKWheel01_HIO_c : public mDoHIO_entry_c {
|
||||
daObjKWheel01_HIO_c();
|
||||
~daObjKWheel01_HIO_c() {};
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
/* 0x4 */ s16 mTargetYAngularSpeed;
|
||||
/* 0x6 */ s16 mYAngularAcceleration;
|
||||
};
|
||||
|
||||
#endif /* D_A_OBJ_KWHEEL01_H */
|
||||
|
||||
@@ -9,6 +9,7 @@ class dKy_tevstr_c;
|
||||
|
||||
class dMdl_obj_c {
|
||||
public:
|
||||
dMdl_obj_c() : mpObj(NULL) {}
|
||||
MtxP getMtx() { return mMtx; }
|
||||
void setMtx(Mtx mtx) { cMtx_copy(mtx, mMtx); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user