Files
tp/include/d/actor/d_a_obj_yobikusa.h
T
LagoLunatic 4dc0cd9d09 Debug version now builds OK and all_source compiles (#2343)
* Fix missing arg to JUT_ASSERT

* Fix some MWCC version diff errors

* Compile m_Do_ext, d_demo, actor_mng

* Add VSCode task to quickly switch between versions

* Unlink magLift for debug

* Update the hash of the debug dol

The old cbea5fa... hash here was for the dol generated by the alf2dol.py script, which produces incorrect alignment.

The dol with the new hash can be obtained by using `dtk elf2dol` to convert the debug .alf file to a dol.

The DOL now builds OK.

* Fix all debug REL dtor splits

All RELs now also build OK, meaning `ninja build/ShieldD/ok` now succeeds.

* Add genMessage declarations to all HIO subclasses

* Fixing more compilation errors

* m_Do_mtx 100% on debug

Cannot be linked due to weak function name mangling?

* Improve various matches

* Fix all remaining compilation errors

* Fix new compilation errors from main

* Fix retail regression

* Link f_pc_profile_lst
2025-03-22 18:00:51 -07:00

114 lines
3.4 KiB
C++

#ifndef D_A_OBJ_YOBIKUSA_H
#define D_A_OBJ_YOBIKUSA_H
#include "d/d_cc_d.h"
#include "f_op/f_op_actor_mng.h"
/**
* @ingroup actors-objects
* @class daObjYobikusa_c
* @brief Hawk Grass
*
* @details
*
*/
class daObjYobikusa_c : public fopAc_ac_c {
public:
enum Mode_e {
/* 0 */ MODE_SWING_WIND,
/* 1 */ MODE_PUSH_DOWN,
/* 2 */ MODE_PICK_LEAF,
};
enum CallType_e {
/* 0 */ CALL_TYPE_FLY,
/* 1 */ CALL_TYPE_HORSE,
};
typedef void (daObjYobikusa_c::*actionFunc)();
typedef struct actionFuncEntry {
actionFunc initFn;
actionFunc execFn;
} actionFuncEntry;
typedef struct attributes {
/* 0x00 */ f32 field_0x00;
/* 0x04 */ f32 field_0x04;
/* 0x08 */ f32 field_0x08;
/* 0x0C */ f32 field_0x0c;
/* 0x10 */ f32 field_0x10;
/* 0x14 */ f32 field_0x14;
/* 0x18 */ f32 field_0x18;
/* 0x1C */ f32 field_0x1c;
/* 0x20 */ f32 field_0x20;
/* 0x24 */ f32 mJointScaleStep;
/* 0x28 */ f32 mNewLeafInitialAmplitude;
/* 0x2C */ f32 field_0x2c; // Unused?
/* 0x30 */ f32 mPickLeafInitialAmplitude;
/* 0x34 */ f32 mPickLeafAmplitudeDecay;
/* 0x38 */ s16 field_0x38; // Unused?
/* 0x3A */ s16 field_0x3a;
/* 0x3C */ s16 mNewLeafTickSpeed;
/* 0x3E */ s16 mPickLeafTickSpeed;
} attributes;
/* 8059C9F8 */ void setAction(daObjYobikusa_c::Mode_e);
/* 8059CA2C */ void callInit();
/* 8059CA54 */ void callExecute();
/* 8059CA80 */ void initSwingWind();
/* 8059CA8C */ void executeSwingWind();
/* 8059CC54 */ void initPushDown();
/* 8059CC60 */ void executePushDown();
/* 8059CD44 */ void initPickLeaf();
/* 8059CD80 */ void executePickLeaf();
/* 8059CE7C */ void create_init();
/* 8059D120 */ void initBaseMtx();
/* 8059D198 */ void getJointAngle(csXyz*, int);
/* 8059D1BC */ f32 getJointScale(int);
/* 8059D320 */ void initCcCylinder();
/* 8059D380 */ void setCcCylinder();
/* 8059D3B4 */ bool toPickLeaf();
/* 8059D454 */ bool setNewLeaf();
/* 8059D738 */ int execute();
inline int createHeap();
inline int draw();
inline cPhs__Step create();
inline ~daObjYobikusa_c();
static attributes const M_attr;
static actionFuncEntry ActionTable[3];
const attributes* attr() const { return &M_attr; }
int getType() { return subtype & 0x7F; }
u8 getPathID() { return fopAcM_GetParam(this); }
bool isPlayerCorrect() { return (s8)(u8)(fopAcM_GetParam(this) >> 8) > 0; }
private:
/* 0x568 */ J3DModel* mpActiveModel;
/* 0x56C */ J3DModel* mpModelTypeA;
/* 0x570 */ J3DModel* mpModelTypeB;
/* 0x574 */ Mtx mMtx;
/* 0x5A4 */ request_of_phase_process_class mPhase;
/* 0x5AC */ actionFuncEntry* mActionEntry;
/* 0x5B0 */ int mMode;
/* 0x5B4 */ dCcD_Stts mStts;
/* 0x5F0 */ dCcD_Cyl mCcCyl;
/* 0x72C */ cBgS_PolyInfo mPolyInfo;
/* 0x73C */ f32 mGroundH;
/* 0x740 */ f32 mJointScale;
/* 0x744 */ f32 mNewLeafAmplitude;
/* 0x748 */ f32 mPickLeafAmplitude;
/* 0x74C */ csXyz mLeafAngles[3];
/* 0x760 */ char* mResName;
/* 0x764 */ s16 field_0x764;
/* 0x766 */ s16 field_0x766;
/* 0x768 */ s16 mNewLeafTick;
/* 0x76A */ s16 mPickLeafTick;
/* 0x76C */ s16 mPlayerDeltaAngle;
}; // Size: 0x770
STATIC_ASSERT(sizeof(daObjYobikusa_c) == 0x770);
#endif /* D_A_OBJ_YOBIKUSA_H */