3#include <game/bases/d_actor_state.hpp>
21 virtual int create()
override;
dActorState_c()
Constructs a new actor.
~daObjCenter2_c()
Destroys the actor.
ACTOR_PARAM_CONFIG(TargetRotationOffset, 24, 4)
The target rotation offset for MODE_BACK_AND_FORTH and MODE_WHILE_ACTIVE.
ACTOR_PARAM_CONFIG(RotateShock, 8, 1)
Shakes the screen when the rotation is complete.
ACTOR_PARAM_CONFIG(InitialRotation, 28, 4)
The starting rotation.
u8 mZoomControl
Whether the zoom level is controlled by the rotation controller. [Unknown what 1 and 2 mean].
daObjCenter2_c()
Constructs a new actor.
int mAngDelta
The incremental change in rotation per frame.
short getAngle()
Returns the home rotation angle of this rotation controller.
void tryPlayCoinSE()
Plays a coin sound effect if it has not been played yet for the current rotation.
ACTOR_PARAM_CONFIG(RotID, 0, 8)
The rotation ID to be set on the affected objects.
u8 mRotationID
The rotation ID to be set on the affected objects.
virtual int create() override
do method for the create operation.
short mHomeRotation
The starting rotation.
virtual int execute() override
do method for the execute operation.
RotationMode_e
The possible rotation modes of the controller.
@ MODE_WHILE_ACTIVE
Rotate by TargetRotationOffset when the linked event is active.
@ MODE_PERMANENT
Permamently rotate in one direction.
@ MODE_BACK_AND_FORTH
Move to the stop target when active, move back when inactive.
ACTOR_PARAM_CONFIG(IsCCW, 12, 1)
The rotation direction, 0 for clockwise, 1 for counter-clockwise.
bool mCoinSoundReady
Whether the coin sound is ready to be played.
u8 mRotationMode
The rotation mode. See RotationMode_e.
bool mCoinSoundPlayed
Whether the coin sound has been played.
ACTOR_PARAM_CONFIG(RotationMode, 16, 2)
The rotation mode. See RotationMode_e.
ACTOR_PARAM_CONFIG(ZoomControl, 10, 2)
Whether the zoom level is controlled by the rotation controller. [Unknown what 1 and 2 mean].
short mTargetRotation
The current rotation the controller is targeting.
u8 mRotDir
The rotation direction. See DIRECTION_LR_e (right = clockwise, left = counter-clockwise).
short mRotationSpeed
The angular speed of the rotation.
void coinSE()
Plays a coin sound effect if the actor is configured to do so.
ACTOR_PARAM_CONFIG(RotateCoinSE, 9, 1)
Enables playing a coin sound effect at the end of a rotation.
ACTOR_PARAM_CONFIG(RotationSpeed, 20, 3)
The angular speed of the rotation. See l_RotSpeed in create() for the possible values.
#define STATE_FUNC_DECLARE(class, name)
Declares a state.