Files
tp/include/d/actor/d_a_obj_catdoor.h
T

74 lines
1.5 KiB
C++
Raw Normal View History

2021-03-28 22:49:05 +02:00
#ifndef D_A_OBJ_CATDOOR_H
#define D_A_OBJ_CATDOOR_H
2024-03-03 07:21:16 -08:00
#include "f_op/f_op_actor_mng.h"
2024-10-10 07:29:58 -07:00
#include "d/d_bg_w.h"
2024-03-03 07:21:16 -08:00
2024-05-29 01:49:10 -06:00
class daObjCatDoor_Door_c {
public:
2024-03-03 07:21:16 -08:00
/* 0x00 */ J3DModel* pmodel;
/* 0x04 */ dBgW bgw;
/* 0xe0 */ Mtx mtx;
/* 0xf4 */ s16 angle;
};
2024-05-29 01:49:10 -06:00
/**
* @ingroup actors-objects
* @class daObjCatDoor_c
* @brief Cat Door
*
* @details
*
*/
2024-03-03 07:21:16 -08:00
class daObjCatDoor_c : public fopAc_ac_c {
public:
inline ~daObjCatDoor_c();
2025-11-30 14:23:42 -08:00
const s16* attr() const;
void initBaseMtx();
void setBaseMtx();
void calcOpen();
2024-03-03 07:21:16 -08:00
u8 getSwitchNo() { return fopAcM_GetParam(this); }
inline int createHeap();
inline int draw();
inline int execute();
inline int create();
inline void create_init();
2025-03-29 09:55:32 +03:00
void _toDoorOpened() {
mDoor1.angle = 0x8800;
mDoor2.angle = 0x7800;
setBaseMtx();
fopAcM_onSwitch(this, getSwitchNo());
}
void setDoorOpen() {
mRotSpeed = attr()[1];
dBgW* bgw1 = &mDoor1.bgw;
if (bgw1->ChkUsed()) {
dComIfG_Bgsp().Release(bgw1);
}
dBgW* bgw2 = &mDoor2.bgw;
if (bgw2->ChkUsed()) {
dComIfG_Bgsp().Release(bgw2);
}
Z2GetAudioMgr()->seStart(Z2SE_OBJ_GZ_NE_DOOR_OP, &current.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
}
2024-03-03 07:21:16 -08:00
private:
/* 0x568 */ request_of_phase_process_class mPhaseReq;
/* 0x570 */ daObjCatDoor_Door_c mDoor1;
/* 0x660 */ daObjCatDoor_Door_c mDoor2;
/* 0x760 */ Mtx mMtx;
/* 0x790 */ s16 mRotSpeed;
public:
static u32 const M_attr;
};
2021-03-28 22:49:05 +02:00
#endif /* D_A_OBJ_CATDOOR_H */