3#include <game/bases/d_enemy.hpp>
4#include <game/bases/d_heap_allocator.hpp>
5#include <game/bases/d_a_obj_center.hpp>
6#include <game/bases/d_a_obj_center2.hpp>
12class daEnDoor_c :
public dEn_c {
14 daEnDoor_c() :
mIsOpen(
false) {}
26 virtual int create()
override;
29 virtual int draw()
override;
bool isState(const sStateIDIf_c &other) const
Checks if the actor is currently in the given state.
The minimum required implementation for a stage actor.
dCc_c mCc
The actor-to-actor collision sensor.
dActor_c()
Constructs a new actor.
Collider ("Collision Check") class - handles collisions between actors.
dEn_c()
Constructs a new enemy actor.
The base class for door actors.
virtual int execute() override
do method for the execute operation.
virtual void setWaitAnm()
Stops all animations for the door.
void calcMdl()
Updates mMatrix and mModel.
void allocate()
Wraps createMdl to allocate memory for the door's assets.
dActor_c * setParentInfo(u32 rotationID)
Links the door to its parent.
virtual bool ActorDrawCullCheck() override
Checks if the actor is out of view.
fBaseID_e mParentUniqueID
The unique ID of the parent actor if linked (daObjCenter_c or daObjCenter2_c).
DoorStatus_e mDoorStatus
The current status of the door.
virtual void setCloseMoveSE()
Plays the door closing SFX.
dActor_c * rotation_move()
Moves the door along its parent's Z angle.
virtual void setOpenAnm()
Sets up the door open animation.
m3d::mdl_c mModel
The door model.
virtual void initAnm()
Initializes the animation for the door.
virtual int doDelete() override
do method for the delete operation.
mAng mOrientation
The orientation of the door.
DoorStatus_e
The possible door states.
@ DOOR_STATUS_WAIT
The door is ready to be opened.
@ DOOR_STATUS_OPEN_IN
The door must open for players to exit it.
@ DOOR_STATUS_CLOSED
The door must close.
@ DOOR_STATUS_OPEN_OUT
The door must open for players to enter it.
virtual bool isClosed()
Checks whether the door is closed.
virtual int draw() override
do method for the draw operation.
static sFStateID_c< daEnDoor_c > StateID_Wait
Waiting for players to interact with the door.
nw4r::g3d::ResFile mResFile
The resource file.
virtual void setOpenSE()
Plays the door opening SFX.
virtual bool isDummyOpen()
Returns whether the door must act like fake Ghost House Doors.
ACTOR_PARAM_CONFIG(RotationID, 0, 8)
The rotation ID that links the door to the corresponding controller.
BOOL mMayOpen
Whether the door may open.
virtual void initialize()
Initializes other elements, called by create().
u8 mRotationID
The rotation ID that links the door to the corresponding controller.
BOOL mIsOpen
Whether the door finished opening or not.
virtual void setCloseAnm()
Sets up the door close animation.
dHeapAllocator_c mAllocator
The allocator.
ACTOR_PARAM_CONFIG(HasParent, 8, 1)
Whether the door is controlled by a parent actor.
virtual void createMdl()
Creates the model and animation for the door.
virtual int create() override
do method for the create operation.
static daObjCenter2_c * searchParent_centerB(u32 rotationID)
Searches for a daObjCenter2_c with the given Rotation ID.
mVec3_c mDistanceToParent
The distance between the parent controller's position and the door when it spawned.
m3d::anmChr_c mAnim
The door model animation.
virtual void initCcData()
Initializes collision data for the door.
static daObjCenter_c * searchParent_centerA(u32 rotationID)
Searches for a daObjCenter_c with the given Rotation ID.
virtual void waitProc()
Executed every frame during the Wait state.
u8 mHasParent
Whether the door is controlled by a parent actor.
static dActor_c * searchParent(u32 rotationID)
Searches for a daObjCenter_c or daObjCenter2_c with the given Rotation ID.
bool checkOpenOk()
Checks if the door is opening for players to enter it.
ACTOR_PARAM_CONFIG(Orientation, 12, 2)
The orientation of the door.
virtual void setCloseSE()
Plays the door closed SFX.
static void ccCallback(dCc_c *self, dCc_c *other)
Collision callback for the door.
A controller for rotating objects around a center point.
A controller for swaying objects around a center point.
A three-dimensional floating point vector.
fBaseID_e
A unique identifier for each base.
#define STATE_FUNC_DECLARE(class, name)
Declares a state.
A one-dimensional short angle vector.