mirror of https://github.com/zeldaret/tp.git
mvstair done, obj_tks equivalent (#2565)
* mvstair done, obj_tks equivalent * fix
This commit is contained in:
parent
e0bbad1f3f
commit
8410e4fd40
|
@ -2055,7 +2055,7 @@ config.libs = [
|
||||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_mirror_screw"),
|
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_mirror_screw"),
|
||||||
ActorRel(NonMatching, "d_a_obj_mirror_table"),
|
ActorRel(NonMatching, "d_a_obj_mirror_table"),
|
||||||
ActorRel(NonMatching, "d_a_obj_msima"),
|
ActorRel(NonMatching, "d_a_obj_msima"),
|
||||||
ActorRel(NonMatching, "d_a_obj_mvstair"),
|
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_mvstair"),
|
||||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_myogan"),
|
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_myogan"),
|
||||||
ActorRel(NonMatching, "d_a_obj_nagaisu"),
|
ActorRel(NonMatching, "d_a_obj_nagaisu"),
|
||||||
ActorRel(Equivalent, "d_a_obj_nan"), # weak function order
|
ActorRel(Equivalent, "d_a_obj_nan"), # weak function order
|
||||||
|
@ -2137,7 +2137,7 @@ config.libs = [
|
||||||
ActorRel(NonMatching, "d_a_obj_thashi"),
|
ActorRel(NonMatching, "d_a_obj_thashi"),
|
||||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_thdoor"),
|
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_thdoor"),
|
||||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_timeFire"),
|
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_timeFire"),
|
||||||
ActorRel(NonMatching, "d_a_obj_tks"),
|
ActorRel(Equivalent, "d_a_obj_tks", extra_cflags=[DANPCF_C_HACK]), # weak function order, sinShort inline issue
|
||||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_tmoon"),
|
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_tmoon"),
|
||||||
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_toaru_maki"),
|
ActorRel(MatchingFor("GZ2E01"), "d_a_obj_toaru_maki"),
|
||||||
ActorRel(NonMatching, "d_a_obj_toby"),
|
ActorRel(NonMatching, "d_a_obj_toby"),
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
#define D_A_OBJ_MVSTAIR_H
|
#define D_A_OBJ_MVSTAIR_H
|
||||||
|
|
||||||
#include "f_op/f_op_actor_mng.h"
|
#include "f_op/f_op_actor_mng.h"
|
||||||
|
#include "d/d_bg_s_movebg_actor.h"
|
||||||
|
#include "d/d_particle.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup actors-objects
|
* @ingroup actors-objects
|
||||||
|
@ -11,35 +13,80 @@
|
||||||
* @details
|
* @details
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class daObjStair_c : public fopAc_ac_c {
|
class daObjStair_c : public dBgS_MoveBgActor {
|
||||||
public:
|
public:
|
||||||
|
enum Action_e {
|
||||||
|
ACTION_WAIT_e,
|
||||||
|
ACTION_ORDER_EVENT_e,
|
||||||
|
ACTION_EVENT_e,
|
||||||
|
ACTION_END_e,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum MODE_e {
|
||||||
|
MODE_WAIT_UPPER_e,
|
||||||
|
MODE_UPPER_e,
|
||||||
|
MODE_WAIT_LOWER_e,
|
||||||
|
MODE_LOWER_e,
|
||||||
|
};
|
||||||
|
|
||||||
/* 80C9D098 */ void initBaseMtx();
|
/* 80C9D098 */ void initBaseMtx();
|
||||||
/* 80C9D0D4 */ void setBaseMtx();
|
/* 80C9D0D4 */ void setBaseMtx();
|
||||||
/* 80C9D148 */ void Create();
|
/* 80C9D338 */ int create1st();
|
||||||
/* 80C9D2B8 */ void CreateHeap();
|
|
||||||
/* 80C9D338 */ void create1st();
|
|
||||||
/* 80C9D41C */ void event_proc_call();
|
/* 80C9D41C */ void event_proc_call();
|
||||||
/* 80C9D4D8 */ void mode_proc_call();
|
/* 80C9D4D8 */ void mode_proc_call();
|
||||||
/* 80C9D594 */ void Execute(f32 (**)[3][4]);
|
/* 80C9D82C */ int actionWait();
|
||||||
/* 80C9D710 */ void Draw();
|
/* 80C9D8EC */ int actionOrderEvent();
|
||||||
/* 80C9D7B4 */ void Delete();
|
/* 80C9D95C */ int actionEvent();
|
||||||
/* 80C9D82C */ void actionWait();
|
/* 80C9D9BC */ int actionEnd();
|
||||||
/* 80C9D8EC */ void actionOrderEvent();
|
/* 80C9D9C4 */ int modeWaitUpperInit();
|
||||||
/* 80C9D95C */ void actionEvent();
|
/* 80C9D9F4 */ int modeWaitUpper();
|
||||||
/* 80C9D9BC */ bool actionEnd();
|
/* 80C9DA98 */ int modeUpperInit();
|
||||||
/* 80C9D9C4 */ void modeWaitUpperInit();
|
/* 80C9DADC */ int modeUpper();
|
||||||
/* 80C9D9F4 */ void modeWaitUpper();
|
/* 80C9DF18 */ int modeWaitLowerInit();
|
||||||
/* 80C9DA98 */ void modeUpperInit();
|
/* 80C9DF60 */ int modeWaitLower();
|
||||||
/* 80C9DADC */ void modeUpper();
|
/* 80C9E004 */ int modeLowerInit();
|
||||||
/* 80C9DF18 */ void modeWaitLowerInit();
|
/* 80C9E034 */ int modeLower();
|
||||||
/* 80C9DF60 */ void modeWaitLower();
|
|
||||||
/* 80C9E004 */ void modeLowerInit();
|
|
||||||
/* 80C9E034 */ void modeLower();
|
|
||||||
/* 80C9E3D8 */ void setParticle();
|
/* 80C9E3D8 */ void setParticle();
|
||||||
/* 80C9E5A0 */ void removeParticle();
|
/* 80C9E5A0 */ void removeParticle();
|
||||||
|
|
||||||
private:
|
/* 80C9D2B8 */ virtual int CreateHeap();
|
||||||
/* 0x568 */ u8 field_0x568[0x66c - 0x568];
|
/* 80C9D148 */ virtual int Create();
|
||||||
|
/* 80C9D594 */ virtual int Execute(f32 (**)[3][4]);
|
||||||
|
/* 80C9D710 */ virtual int Draw();
|
||||||
|
/* 80C9D7B4 */ virtual int Delete();
|
||||||
|
|
||||||
|
u8 getSwbit() { return fopAcM_GetParamBit(this, 0, 8); }
|
||||||
|
u8 getSwbit2() { return fopAcM_GetParamBit(this, 8, 8); }
|
||||||
|
u8 getEvNo() { return fopAcM_GetParamBit(this, 16, 8); }
|
||||||
|
u8 getDir() { return fopAcM_GetParamBit(this, 28, 1); }
|
||||||
|
u8 getType() { return fopAcM_GetParamBit(this, 24, 4); }
|
||||||
|
u8 getMdlType() { return fopAcM_GetParamBit(this, 29, 3); }
|
||||||
|
|
||||||
|
void setAction(u8 i_action) { mAction = i_action; }
|
||||||
|
|
||||||
|
/* 0x5A0 */ request_of_phase_process_class mPhase;
|
||||||
|
/* 0x5A8 */ J3DModel* mpModel;
|
||||||
|
/* 0x5AC */ JPABaseEmitter* mSmokeEmitter;
|
||||||
|
/* 0x5B0 */ dPa_followEcallBack mParticleLeftEmitter[2];
|
||||||
|
/* 0x5D8 */ dPa_followEcallBack mParticleRightEmitter[2];
|
||||||
|
/* 0x600 */ cXyz mParticleLeftPos[2];
|
||||||
|
/* 0x618 */ cXyz mParticleRightPos[2];
|
||||||
|
/* 0x630 */ cXyz mSoundPos;
|
||||||
|
/* 0x63C */ u8 mType;
|
||||||
|
/* 0x63D */ u8 mAction;
|
||||||
|
/* 0x63E */ u8 mMode;
|
||||||
|
/* 0x63F */ u8 mIsSwitch;
|
||||||
|
/* 0x640 */ s16 mEventId;
|
||||||
|
/* 0x644 */ f32 mMoveAccel;
|
||||||
|
/* 0x648 */ f32 mMoveStep;
|
||||||
|
/* 0x64C */ u8 field_0x64C[0x650 - 0x64C];
|
||||||
|
/* 0x650 */ cXyz mModelPos;
|
||||||
|
/* 0x65C */ u16 mMoveStartShakeTimer;
|
||||||
|
/* 0x65E */ s16 mMoveEndShakeTimer;
|
||||||
|
/* 0x660 */ f32 mMoveStartShakeAmount;
|
||||||
|
/* 0x664 */ u8 field_0x664[0x668 - 0x664];
|
||||||
|
/* 0x668 */ u8 mMoveMode;
|
||||||
|
/* 0x669 */ u8 mResType;
|
||||||
};
|
};
|
||||||
|
|
||||||
STATIC_ASSERT(sizeof(daObjStair_c) == 0x66c);
|
STATIC_ASSERT(sizeof(daObjStair_c) == 0x66c);
|
||||||
|
|
|
@ -2,6 +2,23 @@
|
||||||
#define D_A_OBJ_TKS_H
|
#define D_A_OBJ_TKS_H
|
||||||
|
|
||||||
#include "f_op/f_op_actor_mng.h"
|
#include "f_op/f_op_actor_mng.h"
|
||||||
|
#include "d/actor/d_a_npc.h"
|
||||||
|
|
||||||
|
struct daObjTks_HIOParam {
|
||||||
|
/* 0x00 */ daNpcF_HIOParam common;
|
||||||
|
/* 0x6C */ f32 offset_x;
|
||||||
|
/* 0x70 */ f32 offset_y;
|
||||||
|
/* 0x74 */ f32 offset_z;
|
||||||
|
/* 0x78 */ f32 spring_factor;
|
||||||
|
/* 0x7C */ f32 spring_atten;
|
||||||
|
};
|
||||||
|
|
||||||
|
class daObjTks_Param_c {
|
||||||
|
public:
|
||||||
|
/* 80D126D0 */ virtual ~daObjTks_Param_c() {}
|
||||||
|
|
||||||
|
static const daObjTks_HIOParam m;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup actors-objects
|
* @ingroup actors-objects
|
||||||
|
@ -11,53 +28,79 @@
|
||||||
* @details
|
* @details
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class daObjTks_c : public fopAc_ac_c {
|
class daObjTks_c : public daNpcF_c {
|
||||||
public:
|
public:
|
||||||
/* 80D0F28C */ daObjTks_c();
|
/* 80D0F28C */ daObjTks_c();
|
||||||
/* 80D0F480 */ ~daObjTks_c();
|
/* 80D0F480 */ virtual ~daObjTks_c();
|
||||||
/* 80D0F640 */ void Create();
|
|
||||||
/* 80D0F904 */ void CreateHeap();
|
/* 80D0F640 */ int Create();
|
||||||
/* 80D0FD34 */ void Delete();
|
/* 80D0F904 */ int CreateHeap();
|
||||||
/* 80D0FD68 */ void Execute();
|
/* 80D0FD34 */ int Delete();
|
||||||
/* 80D0FE60 */ void Draw();
|
/* 80D0FD68 */ int Execute();
|
||||||
/* 80D0FED0 */ void ctrlJoint(J3DJoint*, J3DModel*);
|
/* 80D0FE60 */ int Draw();
|
||||||
/* 80D10094 */ void createHeapCallBack(fopAc_ac_c*);
|
/* 80D0FED0 */ int ctrlJoint(J3DJoint*, J3DModel*);
|
||||||
/* 80D100B4 */ void ctrlJointCallBack(J3DJoint*, int);
|
/* 80D10094 */ static int createHeapCallBack(fopAc_ac_c*);
|
||||||
/* 80D10100 */ void setMtx();
|
/* 80D100B4 */ static int ctrlJointCallBack(J3DJoint*, int);
|
||||||
/* 80D10184 */ void setExpressionAnm(int, bool);
|
|
||||||
/* 80D102D0 */ void setExpressionBtp(int);
|
|
||||||
/* 80D103A4 */ void setMotion(int, f32, int);
|
|
||||||
/* 80D103E8 */ void reset();
|
/* 80D103E8 */ void reset();
|
||||||
/* 80D10578 */ void setAction(void (daObjTks_c::*)());
|
/* 80D10578 */ inline int setAction(void (daObjTks_c::*)());
|
||||||
/* 80D10618 */ void wait();
|
/* 80D10618 */ void wait();
|
||||||
/* 80D106C8 */ void setExpression(int, f32);
|
|
||||||
/* 80D106F4 */ void talk();
|
/* 80D106F4 */ void talk();
|
||||||
/* 80D10A80 */ void demo();
|
/* 80D10A80 */ void demo();
|
||||||
/* 80D11104 */ bool setMotionAnm(int, f32);
|
|
||||||
/* 80D11228 */ void warp();
|
/* 80D11228 */ void warp();
|
||||||
/* 80D11670 */ void setParam();
|
/* 80D11CB4 */ inline void lookat();
|
||||||
/* 80D116C8 */ void main();
|
|
||||||
/* 80D118E8 */ void ctrlBtk();
|
/* 80D11670 */ virtual void setParam();
|
||||||
/* 80D119BC */ void setAttnPos();
|
/* 80D116C8 */ virtual BOOL main();
|
||||||
/* 80D11CB4 */ void lookat();
|
/* 80D118E8 */ virtual BOOL ctrlBtk();
|
||||||
/* 80D11E94 */ bool drawDbgInfo();
|
/* 80D10100 */ virtual void setMtx();
|
||||||
/* 80D11E9C */ void drawOtherMdls();
|
/* 80D119BC */ virtual void setAttnPos();
|
||||||
|
/* 80D10184 */ virtual bool setExpressionAnm(int, bool);
|
||||||
|
/* 80D102D0 */ virtual bool setExpressionBtp(int);
|
||||||
|
/* 80D106C8 */ virtual void setExpression(int, f32);
|
||||||
|
/* 80D11104 */ virtual void setMotionAnm(int, f32);
|
||||||
|
/* 80D103A4 */ virtual void setMotion(int, f32, int);
|
||||||
|
/* 80D11E94 */ virtual BOOL drawDbgInfo();
|
||||||
|
/* 80D11E9C */ virtual void drawOtherMdls();
|
||||||
|
|
||||||
|
void calcSpringF(f32* param_0, f32 param_1, f32* param_2) {
|
||||||
|
*param_2 = daObjTks_Param_c::m.spring_atten * (*param_2 + (daObjTks_Param_c::m.spring_factor * (*param_0 - param_1)));
|
||||||
|
*param_0 += *param_2;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void playExpression();
|
||||||
|
inline void playMotion();
|
||||||
|
|
||||||
|
bool chkAction(void (daObjTks_c::*i_action)()) { return i_action == mAction; }
|
||||||
|
|
||||||
void setStart() { field_0xde0 = 1; }
|
void setStart() { field_0xde0 = 1; }
|
||||||
|
|
||||||
private:
|
void setLookMode(int i_mode) {
|
||||||
/* 0x568 */ u8 field_0x568[0xDE0 - 0x568];
|
if (i_mode >= 0 && i_mode < 6 && i_mode != mLookMode) {
|
||||||
|
mLookMode = i_mode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void setExpressionTalkAfter() {
|
||||||
|
(void)mExpression;
|
||||||
|
setExpression(1, -1.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 0xB48 */ Z2Creature mSound;
|
||||||
|
/* 0xBD8 */ daNpcF_MatAnm_c* mpMatAnm;
|
||||||
|
/* 0xBDC */ daNpcF_Lookat_c mLookat;
|
||||||
|
/* 0xC78 */ u8 field_0xC78[0xC7C - 0xC78];
|
||||||
|
/* 0xC7C */ dCcD_Cyl mCcCyl;
|
||||||
|
/* 0xDB8 */ void (daObjTks_c::*mAction)();
|
||||||
|
/* 0xDC4 */ request_of_phase_process_class mPhase;
|
||||||
|
/* 0xDCC */ f32 field_0xdcc;
|
||||||
|
/* 0xDD0 */ f32 field_0xdd0;
|
||||||
|
/* 0xDD4 */ u8 field_0xDD4[0xDDC - 0xDD4];
|
||||||
|
/* 0xDDC */ s16 mLookMode;
|
||||||
|
/* 0xDDE */ u16 field_0xdde;
|
||||||
/* 0xDE0 */ u8 field_0xde0;
|
/* 0xDE0 */ u8 field_0xde0;
|
||||||
/* 0xDE1 */ u8 field_0xde1[0xDE4 - 0xDE1];
|
/* 0xDE1 */ u8 field_0xde1;
|
||||||
};
|
};
|
||||||
|
|
||||||
STATIC_ASSERT(sizeof(daObjTks_c) == 0xDE4);
|
STATIC_ASSERT(sizeof(daObjTks_c) == 0xDE4);
|
||||||
|
|
||||||
class daObjTks_Param_c {
|
|
||||||
public:
|
|
||||||
/* 80D126D0 */ ~daObjTks_Param_c();
|
|
||||||
|
|
||||||
static u8 const m[128];
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* D_A_OBJ_TKS_H */
|
#endif /* D_A_OBJ_TKS_H */
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue