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

The basis of a drawable actor that can contain states (see: Nerve) More...

#include <LiveActor.hpp>

Inheritance diagram for LiveActor:
NameObj Air AirBubble AirBubbleGenerator ArrowSwitch ArrowSwitchMulti AssemblyBlock AstroOverlookObj BallRail BeeFlowerHover BenefitItemObj BigFan BlackHole BreakableCage ChipBase ChooChooTrain ClipArea CocoNut CoconutTree Coin CoinBox CoinGroup CoinSpot CollisionBlocker CrystalCage CrystalSwitch CutBushModelObj DashRing DynamicCollisionObj EarthenPipe FileSelectEffect FireBar FirePressureBullet FlipPanelObserver Fountain FountainBig GlobalGravityObj GreenCaterpillarBig GroundChecker HatchWaterPlanet HipDropMoveObj IceStep ItemAppearStone ItemBlock KeySwitch KillerGunnerSingle LargeChain LargeChainParts MagicBell MapObjActor MapParts MapPartsRailGuidePoint MarblePlanet MarblePlanetElectron MarblePlanetElectronShadow MarioActor MarioLauncherAttractor MarioNullBck MarioParts MercatorFixParts MessageSensorHolder MirrorActor MirrorReflectionModel ModelObj ModelObjNpc NPCActor NormalMapBase Note NoteFairy OceanRing PTimerSwitch PackunPetit PartsModel PlayerRacer Poihana PowerStar PowerStarAppearPoint PressureBase PressureMessenger PunchingKinoko SeaGull SeaGullGroup ShadowClipActor ShootingStar SkeletalFishBabyRail SkeletalFishBoss SkeletalFishBossRail SkeletalFishGuard Sky SnowplowSwitch SpaceInner SphereRailDash SphereSelector SpinDriver SpinDriverOperateRing SpinDriverPathDrawer SubmarineVolcanoBigColumn Sun SuperSpinDriver SwitchBox TimerSwitch TreasureBoxCracked WatchTowerRotateStep WaterPressureBullet WaterRoad WoodBox

Public Member Functions

 LiveActor (const char *pName)
 Constructs a new LiveActor instance.
 
virtual void init (JMapInfoIter const &)
 Intializes the NameObj and can set various settings and construct necessary classes.
 
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 control ()
 
virtual void calcAndSetBaseMtx ()
 Calculates and sets the base matrix of the actor.
 
virtual void updateHitSensor (HitSensor *)
 
virtual void attackSensor (HitSensor *, 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

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

The basis of a drawable actor that can contain states (see: Nerve)

Definition at line 24 of file LiveActor.hpp.

Constructor & Destructor Documentation

◆ LiveActor()

LiveActor::LiveActor ( const char * pName)

Constructs a new LiveActor instance.

Parameters
pNameThe new name assigned to the LiveActor.

Definition at line 9 of file LiveActor.cpp.

◆ ~LiveActor()

virtual LiveActor::~LiveActor ( )
inlinevirtual

Definition at line 30 of file LiveActor.hpp.

Member Function Documentation

◆ init()

void LiveActor::init ( JMapInfoIter const & 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 NameObj.

Reimplemented in AreaPolygon, SkeletalFishBabyRail, SkeletalFishBoss, SkeletalFishBossScarFlash, SkeletalFishBossRail, SkeletalFishGuard, PackunPetit, MessageSensorHolder, MirrorActor, MirrorReflectionModel, ModelObj, ModelObjNpc, PartsModel, Air, FileSelectEffect, Halo, PowerStarHalo, OceanRing, PlayerRacer, SeaGull, SeaGullGroup, Sky, SpaceInner, SphereSelector, TimerSwitch, AirBubble, AirBubbleGenerator, AnmModelObj, ArrowSwitch, ArrowSwitchMulti, AssemblyBlock, BallRail, BeeFlowerHover, BenefitItemInvincible, BenefitItemLifeUp, BenefitItemObj, BigFan, BlackHole, BreakableCage, CapsuleCage, ChipBase, ChooChooTrain, CocoNut, CoconutTree, Coin, CoinBox, CoinGroup, CoinSpot, CollapsePlane, CollisionBlocker, CrystalCage, CrystalCageMoving, CrystalSwitch, CutBushModelObj, DashRing, DeadLeaves, DynamicCollisionObj, FireBarBall, FireBar, FirePressure, FirePressureBullet, FlipPanel, FlipPanelObserver, Fountain, FountainBig, GeneralMapParts, GreenCaterpillarBigBody, GreenCaterpillarBig, HatchWaterPlanet, HipDropMoveObj, IceStep, ItemAppearStone, ItemBlock, KeySwitch, KillerGunnerSingle, LargeChain, LavaBallRisingPlanetLava, MagicBell, ManholeCover, MapObjActor, MapParts, MapPartsRailGuidePoint, MarblePlanet, MarblePlanetElectron, MarblePlanetElectronShadow, MechaKoopaPartsArm, MechaKoopaPartsHead, Note, NoteFairy, PowerStar, PowerStarAppearPoint, PressureMessenger, PressureBase, PunchingKinoko, RailMoveObj, RailMoveObjPress, RailMoveObjSwitchShadow, RailDemoMoveObj, ReverseGravityRoomPlanet, RotateMoveObj, SandCapsuleInsidePlanet, ShootingStar, SimpleMapObj, SimpleEnvironmentObj, SimpleMapObjFarMax, SimpleSeesawObj, SimpleMirrorObj, SimpleMirrorReflectionObj, UFOKinokoUnderConstruction, SimpleTimerObj, SnowplowSwitch, SpaceMine, SphereRailDash, SpinDriver, SpinDriverOperateRing, SpinDriverPathDrawer, SubmarineVolcanoBigColumn, Sun, SuperSpinDriver, TimeAppearObj, TreasureBoxCracked, TreasureSpot, UFOKinoko, WatchTowerRotateStep, WaterPressureBullet, WoodBox, NPCActor, MarioActor, Poihana, GlobalGravityObj, MarioLauncherAttractor, PTimerSwitch, and SwitchBox.

Definition at line 26 of file LiveActor.cpp.

◆ movement()

virtual void LiveActor::movement ( )
virtual

Reimplemented from NameObj.

◆ calcAnim()

virtual void LiveActor::calcAnim ( )
virtual

Reimplemented from NameObj.

◆ calcViewAndEntry()

virtual void LiveActor::calcViewAndEntry ( )
virtual

Reimplemented from NameObj.

◆ appear()

void LiveActor::appear ( )
virtual

Definition at line 30 of file LiveActor.cpp.

◆ makeActorAppeared()

void LiveActor::makeActorAppeared ( )
virtual

Definition at line 34 of file LiveActor.cpp.

◆ kill()

void LiveActor::kill ( )
virtual

Definition at line 62 of file LiveActor.cpp.

◆ getBaseMtx()

MtxPtr LiveActor::getBaseMtx ( ) const
virtual

Gets the base matrix of the model used for the actor.

Returns
A MtxPtr to the base matrix. NULL if there is no model present.

Reimplemented in MagicBell.

Definition at line 120 of file LiveActor.cpp.

◆ getTakingMtx()

MtxPtr LiveActor::getTakingMtx ( ) const
virtual

Definition at line 96 of file LiveActor.cpp.

◆ calcAndSetBaseMtx()

virtual void LiveActor::calcAndSetBaseMtx ( )
virtual

◆ attackSensor()

void LiveActor::attackSensor ( HitSensor * ,
HitSensor *  )
virtual

Reimplemented in Note.

Definition at line 230 of file LiveActor.cpp.

◆ receiveMsgApart()

u32 LiveActor::receiveMsgApart ( HitSensor * pSensor_0,
HitSensor * pSensor_1 )
virtual

Definition at line 234 of file LiveActor.cpp.

◆ setNerve()

void LiveActor::setNerve ( const Nerve * pNerve)

Definition at line 100 of file LiveActor.cpp.

◆ isNerve()

bool LiveActor::isNerve ( const Nerve * pNerve) const

Definition at line 104 of file LiveActor.cpp.

◆ getNerveStep()

s32 LiveActor::getNerveStep ( ) const

Definition at line 108 of file LiveActor.cpp.

◆ getSensor()

HitSensor * LiveActor::getSensor ( const char * pSensorName) const

Gets a sensor.

Parameters
pSensorNameThe name of the sensor to get.
Returns
The sensor that contains the name given. Returns the result of HitSensorKeeper::getSensor or NULL if there is no HitSensorKeeper created.

Definition at line 112 of file LiveActor.cpp.

◆ initModelManagerWithAnm()

void LiveActor::initModelManagerWithAnm ( const char * pName,
const char * a2,
bool a3 )

Definition at line 171 of file LiveActor.cpp.

◆ initNerve()

void LiveActor::initNerve ( const Nerve * pNerve)

Definition at line 181 of file LiveActor.cpp.

◆ initHitSensor()

void LiveActor::initHitSensor ( int numSensors)

Definition at line 185 of file LiveActor.cpp.

◆ initRailRider()

void LiveActor::initRailRider ( const JMapInfoIter & rIter)

Definition at line 191 of file LiveActor.cpp.

◆ initShadowControllerList()

void LiveActor::initShadowControllerList ( u32 numShadows)

Definition at line 214 of file LiveActor.cpp.

◆ initStageSwitch()

void LiveActor::initStageSwitch ( const JMapInfoIter & rIter)

Definition at line 220 of file LiveActor.cpp.

◆ initActorLightCtrl()

void LiveActor::initActorLightCtrl ( )

Definition at line 226 of file LiveActor.cpp.

◆ isBinderValid()

bool LiveActor::isBinderValid ( Binder * pBinder)
inline

Definition at line 87 of file LiveActor.hpp.

◆ getPosPtr()

TVec3f * LiveActor::getPosPtr ( )
inline

Definition at line 91 of file LiveActor.hpp.

Member Data Documentation

◆ mPosition

TVec3f LiveActor::mPosition

3D vector of the actor's position.

Definition at line 95 of file LiveActor.hpp.

◆ mRotation

TVec3f LiveActor::mRotation

3D vector of the actor's rotation.

Definition at line 96 of file LiveActor.hpp.

◆ mScale

TVec3f LiveActor::mScale

3D vector of the actor's scale.

Definition at line 97 of file LiveActor.hpp.

◆ mVelocity

TVec3f LiveActor::mVelocity

3D vector of the actor's velocity.

Definition at line 98 of file LiveActor.hpp.

◆ mGravity

TVec3f LiveActor::mGravity

3D vector of the actor's gravity.

Definition at line 99 of file LiveActor.hpp.

◆ mModelManager

ModelManager* LiveActor::mModelManager

A pointer to a ModelManager instance, used for drawing a 3D model.

Definition at line 100 of file LiveActor.hpp.

◆ mAnimationKeeper

ActorAnimKeeper* LiveActor::mAnimationKeeper

A pointer to a ActorAnimKeeper instance, used for storing and playing model animations.

Definition at line 101 of file LiveActor.hpp.

◆ mSpine

Spine* LiveActor::mSpine

Definition at line 102 of file LiveActor.hpp.

◆ mSensorKeeper

HitSensorKeeper* LiveActor::mSensorKeeper

A pointer to a HitSensorKeeper instance, used for storing HitSensor instances.

Definition at line 103 of file LiveActor.hpp.

◆ mBinder

Binder* LiveActor::mBinder

Definition at line 104 of file LiveActor.hpp.

◆ mRailRider

RailRider* LiveActor::mRailRider

A pointer to a RailRider instance, used for allowing the actor to ride on paths.

Definition at line 105 of file LiveActor.hpp.

◆ mEffectKeeper

EffectKeeper* LiveActor::mEffectKeeper

Definition at line 106 of file LiveActor.hpp.

◆ mSoundObject

AudAnmSoundObject* LiveActor::mSoundObject

Definition at line 107 of file LiveActor.hpp.

◆ mFlags

LiveActorFlag LiveActor::mFlags

Flags relating to drawing, animation calculation, etc.

Definition at line 108 of file LiveActor.hpp.

◆ mShadowList

ShadowControllerList* LiveActor::mShadowList

Definition at line 109 of file LiveActor.hpp.

◆ mCollisionParts

CollisionParts* LiveActor::mCollisionParts

Definition at line 110 of file LiveActor.hpp.

◆ mStageSwitchCtrl

StageSwitchCtrl* LiveActor::mStageSwitchCtrl

A pointer to a StageSwitchCtrl instance, used for activating and deactivating switches.

Definition at line 111 of file LiveActor.hpp.

◆ mStarPointerTarget

StarPointerTarget* LiveActor::mStarPointerTarget

Definition at line 112 of file LiveActor.hpp.

◆ mActorLightCtrl

ActorLightCtrl* LiveActor::mActorLightCtrl

Definition at line 113 of file LiveActor.hpp.

◆ mCameraCtrl

ActorPadAndCameraCtrl* LiveActor::mCameraCtrl

Definition at line 114 of file LiveActor.hpp.