1#include <game/bases/d_awa.hpp>
2#include <game/bases/d_bg.hpp>
4#include <game/mLib/m_allocator_dummy_heap.hpp>
11 static const float DUMMY_ORDERING[] = { 0.1f, 2.0f };
22 mScale.set(1.0f, 1.0f, 1.0f);
23 mSpeed.set(0.0f, 0.0f, 0.0f);
30 mAllocator.createFrmHeap(0x80000, mHeap::g_gameHeaps[0],
nullptr, 0x20);
33 nw4r::g3d::ResMdl model =
mResFile.GetResMdl(
"waterbubble");
37 nw4r::g3d::ResAnmChr anim =
mResFile.GetResAnmChr(
"waterbubble");
45 if (
mLifeTimer == 0 ||
mPos.y >= dBg_c::m_bg_p->getLiquidHeight()) {
58 mMatrix.trans(pos.x, pos.y, pos.z);
70 if (
mAllocator.mpHeap != mAllocatorDummyHeap_c::getInstance()) {
79 nw4r::g3d::ResAnmChr anim =
mResFile.GetResAnmChr(
"waterbubble");
static void setSoftLight_MapObj(m3d::bmdl_c &mdl)
Sets the soft light effect for map objects.
static void changePosAngle(mVec3_c *pos, mAng3_c *ang, int param3)
Adjusts the actor's position to account for looping stages.
An early version of the unused water bubble, without collision.
nw4r::g3d::ResFile mResFile
The resource file.
void createModel()
Initializes the resources for the actor.
void(dAwa_c::* CalcSpeed)()
The speed update function.
m3d::anmChr_c mBubbleAnim
The bubble animation.
virtual void deleteReady()
Informs the base that it's about to be deleted.
void setAnim()
Initializes the model animation.
dHeapAllocator_c mAllocator
The allocator.
int mLifeTimer
The amount of frames left before the bubble is deleted.
virtual int execute()
do method for the execute operation.
void calcSpeedDown()
Updates the bubble's speed (downwards direction).
virtual int draw()
do method for the draw operation.
void calcSpeedRight()
Updates the bubble's speed (rightwards direction).
void calc()
Updates the bubble's position and speed.
m3d::mdl_c mBubbleModel
The bubble model.
void calcSpeedUp()
Updates the bubble's speed (upwards direction).
void calcSpeedLeft()
Updates the bubble's speed (leftwards direction).
CalcSpeed mCalcSpeedFn
The speed update function.
virtual int doDelete()
do method for the delete operation.
virtual int create()
do method for the create operation.
mMtx_c mMatrix
The actor's partial transformation matrix. See makeMtx() for details.
mVec3_c mScale
The actor's scale (defaults to 1).
mVec3_c mSpeed
The actor's speed.
mVec3_c mPos
The actor's position.
void posMove()
Moves the actor by its speed.
static dResMng_c * m_instance
The instance of this class.
void deleteRequest()
Requests deletion of the base.
@ SUCCEEDED
The step was completed successfully.
A three-dimensional floating point vector.
#define ACTOR_PROFILE(profName, className, properties)
Creates an actor profile, using the profile number as the execute and draw order value.
@ FORWARD_LOOP
Play the animation forward in a loop.