SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Note Class Reference

Class that represents a single note in a NoteFairy actor. More...

#include <Note.hpp>

Inheritance diagram for Note:
LiveActor NameObj

Public Member Functions

 Note (const char *, const TVec3f &, NoteFairy *)
 
virtual void init (const JMapInfoIter &)
 Intializes the NameObj and can set various settings and construct necessary classes.
 
virtual void control ()
 
virtual void calcAndSetBaseMtx ()
 Calculates and sets the base matrix of the actor.
 
virtual void attackSensor (HitSensor *, HitSensor *)
 Checks if the sensor is either a player or a rideable entity and if it is, it will "collect" the note.
 
void startCountDown ()
 
void exeWait ()
 Begins the countdown sequence that plays the "waiting" animation, and is switched to the countdown nerve when mIsCountdown is set to true by the Note::mParentFairy.
 
void exeCountDown ()
 Begins the flashing sequence and if the current step reaches Note::mCounter's value, it calls Note::kill().
 
void exeFlyUp ()
 Scales the note's velocity by -30.0 and then invalidates all hit sensors, and after 10 steps, calls Note::kill().
 
- Public Member Functions inherited from LiveActor
 LiveActor (const char *pName)
 Constructs a new LiveActor instance.
 
virtual void movement ()
 
virtual void calcAnim ()
 
virtual void calcViewAndEntry ()
 
virtual void appear ()
 
virtual void makeActorAppeared ()
 
virtual void kill ()
 
virtual void makeActorDead ()
 
virtual bool receiveMessage (u32, HitSensor *, HitSensor *)
 
virtual MtxPtr getBaseMtx () const
 Gets the base matrix of the model used for the actor.
 
virtual MtxPtr getTakingMtx () const
 
virtual void startClipped ()
 
virtual void endClipped ()
 
virtual void updateHitSensor (HitSensor *)
 
virtual bool receiveMsgPush (HitSensor *, HitSensor *)
 
virtual bool receiveMsgPlayerAttack (u32, HitSensor *, HitSensor *)
 
virtual bool receiveMsgEnemyAttack (u32, HitSensor *, HitSensor *)
 
virtual u32 receiveMsgTake (HitSensor *, HitSensor *)
 
virtual u32 receiveMsgTaken (HitSensor *, HitSensor *)
 
virtual u32 receiveMsgThrow (HitSensor *, HitSensor *)
 
virtual u32 receiveMsgApart (HitSensor *, HitSensor *)
 
virtual bool receiveOtherMsg (u32, HitSensor *, HitSensor *)
 
void calcAnmMtx ()
 
void setNerve (const Nerve *)
 
bool isNerve (const Nerve *) const
 
s32 getNerveStep () const
 
HitSensorgetSensor (const char *pSensorName) const
 Gets a sensor.
 
void initModelManagerWithAnm (const char *, const char *, bool)
 
void initNerve (const Nerve *)
 
void initHitSensor (int)
 
void initBinder (f32, f32, u32)
 
void initRailRider (const JMapInfoIter &)
 
void initEffectKeeper (int, const char *, bool)
 
void initSound (int, bool)
 
void initShadowControllerList (u32)
 
void initActorCollisionParts (const char *, HitSensor *, ResourceHolder *, MtxPtr, bool, bool)
 
void initStageSwitch (const JMapInfoIter &)
 
void initActorStarPointerTarget (f32, const TVec3f *, MtxPtr, TVec3f)
 
void initActorLightCtrl ()
 
void addToSoundObjHolder ()
 
void updateBinder ()
 
bool isBinderValid (Binder *pBinder)
 
TVec3f * getPosPtr ()
 
- Public Member Functions inherited from NameObj
 NameObj (const char *pName)
 Constructs a new NameObj instance.
 
virtual void initAfterPlacement ()
 
virtual void draw () const
 Draws the object. Does nothing until overridden.
 
void initWithoutIter ()
 Initializes a NameObj without a JMapInfoIter instance.
 
void setName (const char *pName)
 Sets the NameObj's mName.
 
void executeMovement ()
 
void requestSuspend ()
 
void requestResume ()
 
void syncWithFlags ()
 

Public Attributes

NoteFairymParentFairy
 The parent NoteFairy that this note was spawned from.
 
TVec3f _90
 
TVec3f mRailDirection
 
int mCounter
 The amount of steps it takes for the note to disappear.
 
f32 _AC
 
bool mIsCountdown
 
FlashingCtrlmFlashCtrl
 
u32 _B8
 
- Public Attributes inherited from LiveActor
TVec3f mPosition
 3D vector of the actor's position.
 
TVec3f mRotation
 3D vector of the actor's rotation.
 
TVec3f mScale
 3D vector of the actor's scale.
 
TVec3f mVelocity
 3D vector of the actor's velocity.
 
TVec3f mGravity
 3D vector of the actor's gravity.
 
ModelManagermModelManager
 A pointer to a ModelManager instance, used for drawing a 3D model.
 
ActorAnimKeepermAnimationKeeper
 A pointer to a ActorAnimKeeper instance, used for storing and playing model animations.
 
SpinemSpine
 
HitSensorKeepermSensorKeeper
 A pointer to a HitSensorKeeper instance, used for storing HitSensor instances.
 
BindermBinder
 
RailRidermRailRider
 A pointer to a RailRider instance, used for allowing the actor to ride on paths.
 
EffectKeepermEffectKeeper
 
AudAnmSoundObjectmSoundObject
 
LiveActorFlag mFlags
 Flags relating to drawing, animation calculation, etc.
 
ShadowControllerListmShadowList
 
CollisionPartsmCollisionParts
 
StageSwitchCtrlmStageSwitchCtrl
 A pointer to a StageSwitchCtrl instance, used for activating and deactivating switches.
 
StarPointerTarget * mStarPointerTarget
 
ActorLightCtrlmActorLightCtrl
 
ActorPadAndCameraCtrlmCameraCtrl
 
- Public Attributes inherited from NameObj
const char * mName
 A string to identify the NameObj.
 
volatile u16 mFlags
 Flags in relation to movement.
 
s16 mExecutorIdx
 The index into the NameObjExecuteInfo array.
 

Detailed Description

Class that represents a single note in a NoteFairy actor.

Definition at line 21 of file Note.hpp.

Constructor & Destructor Documentation

◆ Note()

Note::Note ( const char * pName,
const TVec3f & rRailDirection,
NoteFairy * pParent )

Definition at line 6 of file Note.cpp.

◆ ~Note()

Note::~Note ( )
virtual

Definition at line 131 of file Note.cpp.

Member Function Documentation

◆ init()

void Note::init ( const JMapInfoIter & rIter)
virtual

Intializes the NameObj and can set various settings and construct necessary classes.

Parameters
rIterA reference to the JMapInfoIter that supplies BCSV information.

Reimplemented from LiveActor.

Definition at line 16 of file Note.cpp.

◆ control()

void Note::control ( )
virtual

Reimplemented from LiveActor.

Definition at line 87 of file Note.cpp.

◆ calcAndSetBaseMtx()

void Note::calcAndSetBaseMtx ( )
virtual

Calculates and sets the base matrix of the actor.

Reimplemented from LiveActor.

Definition at line 91 of file Note.cpp.

◆ attackSensor()

void Note::attackSensor ( HitSensor * a1,
HitSensor * a2 )
virtual

Checks if the sensor is either a player or a rideable entity and if it is, it will "collect" the note.

Reimplemented from LiveActor.

Definition at line 106 of file Note.cpp.

◆ startCountDown()

void Note::startCountDown ( )

Definition at line 44 of file Note.cpp.

◆ exeWait()

void Note::exeWait ( )

Begins the countdown sequence that plays the "waiting" animation, and is switched to the countdown nerve when mIsCountdown is set to true by the Note::mParentFairy.

Definition at line 48 of file Note.cpp.

◆ exeCountDown()

void Note::exeCountDown ( )

Begins the flashing sequence and if the current step reaches Note::mCounter's value, it calls Note::kill().

Definition at line 61 of file Note.cpp.

◆ exeFlyUp()

void Note::exeFlyUp ( )

Scales the note's velocity by -30.0 and then invalidates all hit sensors, and after 10 steps, calls Note::kill().

Definition at line 74 of file Note.cpp.

Member Data Documentation

◆ mParentFairy

NoteFairy* Note::mParentFairy

The parent NoteFairy that this note was spawned from.

Definition at line 42 of file Note.hpp.

◆ _90

TVec3f Note::_90

Definition at line 43 of file Note.hpp.

◆ mRailDirection

TVec3f Note::mRailDirection

Definition at line 44 of file Note.hpp.

◆ mCounter

int Note::mCounter

The amount of steps it takes for the note to disappear.

Definition at line 45 of file Note.hpp.

◆ _AC

f32 Note::_AC

Definition at line 46 of file Note.hpp.

◆ mIsCountdown

bool Note::mIsCountdown

Definition at line 47 of file Note.hpp.

◆ mFlashCtrl

FlashingCtrl* Note::mFlashCtrl

Definition at line 48 of file Note.hpp.

◆ _B8

u32 Note::_B8

Definition at line 49 of file Note.hpp.