1#include <game/bases/d_base_actor.hpp>
2#include <game/bases/d_reset.hpp>
3#include <game/bases/d_scene.hpp>
5#include <lib/nw4r/ut/inlines.hpp>
180 float newSpeed =
mSpeed.x;
bool append(cListNd_c *node)
Adds a node to the end of the list.
bool remove(cListNd_c *node)
Removes a node from the list.
The minimum required implementation for an actor base.
bool mVisible
Whether the actor should be visible or not. Defaults to true .
mAng3_c mAngle3D
The actor's rotation (for 3D actors).
void calcSpeedXY()
Updates the actor's speed (2D actors). See here for details.
int GetProfNameActorNum(ProfileName profile)
Counts the instances of the given actor profile.
mMtx_c mMatrix
The actor's partial transformation matrix. See makeMtx for details.
virtual int preDraw()
pre method for the draw operation.
mVec3_c mScale
The actor's scale (defaults to 1).
float mAccelF
The actor's horizontal acceleration.
mVec3_c mSpeed
The actor's speed.
mVec3_c mLastPos
The actor's position in the previous frame.
mVec3_c mPos
The actor's position.
virtual void draw2D_lyt2()
Alternate drawing function used to draw 3D models in front of 2D graphics (second draw pass).
mVec3_c mSpeedMax
The actor's maximum speed.
void makeMtx()
Generates a partial transformation matrix for the actor and stores it in mMatrix.
virtual void postExecute(fBase_c::MAIN_STATE_e status)
post method for the execute operation.
virtual void postDraw(fBase_c::MAIN_STATE_e status)
post method for the draw operation.
static const mVec3_c * m_tmpCtPosP
Temporary storage for the next constructed actor's position. See mPos.
void calcSpeedX()
Updates the actor's X speed. See here for details.
mVec3_c mPosDelta
The actor's position delta since the previous frame.
mVec3_c mCenterOffs
The offset from the position to the center of the actor (defaults to 0).
void calcFallSpeed()
Updates the actor's falling speed. See here for details.
fLiNdBa_c mLinkActor
The node in m_actorManage.
static void setTmpCtData(const mVec3_c *position, const mAng3_c *rotation)
Sets temporary data to be used for the next actor's construction.
static dBaseActor_c * construct(ProfileName profName, unsigned long param, const mVec3_c *position, const mAng3_c *rotation)
Creates an actor without a parent.
virtual int preDelete()
pre method for the delete operation.
float mSpeedF
The actor's horizontal speed.
virtual void postDelete(fBase_c::MAIN_STATE_e status)
post method for the delete operation.
void posMove()
Moves the actor by its speed.
virtual void draw2D()
Alternate drawing function used to draw 3D models in front of 2D graphics (first draw pass).
float mMaxFallSpeed
The actor's maximum fall speed.
void calcSpeed()
Updates the actor's speed (3D actors). See here for details.
mVec3_c getCenterPos() const
Gets the actor's centered position.
static const mAng3_c * m_tmpCtAngleP
Temporary storage for the next constructed actor's rotation. See mAngle.
void calcSpeedF()
Updates the actor's forward speed. See here for details.
static fLiMgBa_c m_actorManage
A list of all actor bases.
mAng3_c mAngle
The actor's rotation (for 2D actors).
static void draw2DActorOnLyt2()
Calls draw2D_lyt2 on every actor.
virtual ~dBaseActor_c()
Destroys the actor.
virtual void postCreate(fBase_c::MAIN_STATE_e status)
post method for the create operation.
u32 mActorProperties
The actor's properties. See fProfile::fActorProfile_c::mActorProperties.
float mAccelY
The actor's vertical acceleration.
float mMaxSpeedF
The actor's maximum horizontal speed.
void calcSpeedY()
Updates the actor's Y speed. See here for details.
virtual int preExecute()
pre method for the execute operation.
virtual int preCreate()
pre method for the create operation.
static void draw2DActorOnLyt1()
Calls draw2D on every actor.
dBaseActor_c()
Constructs a new actor.
The minimum required implementation for a base.
virtual int preDelete()
pre method for the delete operation.
virtual void postExecute(fBase_c::MAIN_STATE_e status)
post method for the execute operation.
virtual void postDraw(fBase_c::MAIN_STATE_e status)
post method for the draw operation.
virtual void postCreate(fBase_c::MAIN_STATE_e status)
post method for the create operation.
virtual int preDraw()
pre method for the draw operation.
virtual void postDelete(fBase_c::MAIN_STATE_e status)
post method for the delete operation.
virtual int preExecute()
pre method for the execute operation.
virtual int preCreate()
pre method for the create operation.
static dBase_c * createBase(ProfileName profName, dBase_c *parent, unsigned long param, u8 groupType)
Creates a child base under the given parent.
static dBase_c * searchBaseByProfName(ProfileName profile, const dBase_c *parent)
Searches for a base with a given profile name, optionally under a given parent.
System reset management class.
static dReset::Manage_c * GetInstance()
Gets a pointer to the instance of this class.
int mModeProc
The game's current running state. See Mode_e.
@ SAFETY_WAIT
The game is about to execute the hard reset procedure indicated in mExecMode.
@ SOFT_RESET
The game is being soft reset (from the Home Menu).
int mModeInit
The running state the game's about to switch to. See Mode_e.
static ProfileName m_nowScene
The profile name of the current scene.
MAIN_STATE_e
The possible operation results.
@ SUCCESS
The operation was completed successfully.
@ ACTOR
The base is an actor.
ProfileName mProfName
The base's profile name.
@ NOT_READY
The step could not completed at this time.
A base list, made of fLiNdBa_c nodes.
int countNodeByProfName(ProfileName profName) const
Counts the number of bases using the given profile name.
static fBase_c * searchBaseByGroupType(unsigned char groupType, const fBase_c *parent)
Searches for a base with a given group type, optionally under a given parent.
A three-dimensional short angle vector.
s16 y
The rotation on the Y axis.
void YrotM(mAng angle)
Rotates the matrix on the Y axis by the given angle.
A three-dimensional floating point vector.
void PSMTXTrans(Mtx *mtx, float x, float y, float z)
Sets a translation matrix with the given components.
u16 ProfileName
The name of a profile. Value is a fProfile::PROFILE_NAME_e.
const fBaseProfile_c *(* sProfileList)[PROFILE_COUNT]
A list of all profiles.
float CosS(short ang)
Computes the cosine value.
float SinS(short ang)
Computes the sine value.
T Min(T a, T b)
Gets the smaller of the two given values.
T Max(T a, T b)
Gets the larger of the two given values.
A set of basic information needed to construct an actor base.
u32 mActorProperties
Various actor-related properties.
A one-dimensional short angle vector.