NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
dSmallScoreManager_c Class Reference

#include <game/bases/d_SmallScoreManager.hpp>

Inheritance diagram for dSmallScoreManager_c:
[legend]

Description

A manager for the small score popups.

See also dSmallScore_c.

Definition at line 11 of file d_SmallScoreManager.hpp.

Classes

struct  GlobalData_t
 

Public Member Functions

 dSmallScoreManager_c ()
 Constructs a new base.
 
virtual ~dSmallScoreManager_c ()
 Destroys the base.
 
virtual int create ()
 do method for the create operation.
 
virtual int execute ()
 do method for the execute operation.
 
virtual int draw ()
 do method for the draw operation.
 
virtual int doDelete ()
 do method for the delete operation.
 
void CreateBlueNumber (const mVec3_c &pos, int popupType, int playerType)
 Creates a blue small score popup.
 
void CreateRedNumber (const mVec3_c &pos, int playerType)
 Creates a red number popup.
 
void CreateSmallScore (const mVec3_c &pos, int popupType, int playerType)
 Creates a small score popup.
 
void CreateGoalScore (const mVec3_c &pos, int popupType, int playerType)
 Creates a goal score popup.
 
void GoalScoreExecute (const mVec3_c &pos, int playerType)
 Updates the position of a goal score popup.
 
- Public Member Functions inherited from dBase_c
 dBase_c ()
 Constructs a new base.
 
virtual int preCreate ()
 pre method for the create operation.
 
virtual void postCreate (fBase_c::MAIN_STATE_e status)
 post method for the create operation.
 
virtual int preDelete ()
 pre method for the delete 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 void postExecute (fBase_c::MAIN_STATE_e status)
 post method for the execute operation.
 
virtual int preDraw ()
 pre method for the draw operation.
 
virtual void postDraw (fBase_c::MAIN_STATE_e status)
 post method for the draw operation.
 
virtual ~dBase_c ()
 Destroys the base.
 
virtual const char * getKindString () const
 Gets the base's kind string.
 
- Public Member Functions inherited from fBase_c
 fBase_c ()
 Constructs a new base.
 
void deleteRequest ()
 Requests deletion of the base.
 
fBase_cgetConnectParent () const
 Gets the base's parent.
 
fBase_cgetConnectChild () const
 Gets the base's first child.
 
fBase_cgetConnectBrNext () const
 Gets the base's next sibling.
 
bool checkChildProcessCreateState () const
 Checks if the base has at least one child in the CREATING state.
 
- Public Member Functions inherited from cOwnerSetMg_c
 cOwnerSetMg_c ()
 Constructs a new set container.
 
 ~cOwnerSetMg_c ()
 Destroys the set.
 
void add (cOwnerSetNd_c *nd, void *owner)
 Adds a node to the set.
 
void remove (cOwnerSetNd_c *nd, void *owner)
 Removes a node from the set.
 

Static Public Attributes

static dSmallScoreManager_cm_instance = nullptr
 The instance of the small score manager.
 
static const float c_SMALL_SCORE_SIZE_4_3_X = 0.8f
 
static const float c_SMALL_SCORE_SIZE_4_3_Y = 0.8f
 
static const float c_SMALL_SCORE_SIZE_16_9_X = 1.0f
 
static const float c_SMALL_SCORE_SIZE_16_9_Y = 1.0f
 
static const float c_SMALL_GOAL_SCORE_SIZE_4_3_X = 0.8f
 
static const float c_SMALL_GOAL_SCORE_SIZE_4_3_Y = 0.8f
 
static const float c_SMALL_GOAL_SCORE_SIZE_16_9_X = 1.1f
 
static const float c_SMALL_GOAL_SCORE_SIZE_16_9_Y = 1.1f
 
static const float c_SCISSOR_SIZE_X = 640.0f
 
static const float c_SCISSOR_SIZE_Y = 352.0f
 

Private Attributes

u8 m_70 [4]
 
d2d::ResAccMultLoader_c mResLoader
 The resource loader for the layout.
 
dSmallScore_c mSmallScores [SMALL_SCORE_COUNT]
 The regular small score popups.
 
dSmallScore_c mGoalScores [PLAYER_COUNT]
 The goal score popups.
 
int mSmallScoresIdx
 The next free index in mSmallScores.
 
int mGoalScoresIdx
 The next free index in mGoalScores.
 

Additional Inherited Members

- Public Types inherited from fBase_c
enum  LIFECYCLE_e {
  CREATING ,
  ACTIVE ,
  DELETING
}
 The possible lifecycle states. More...
 
enum  GROUP_TYPE_e {
  OTHER ,
  SCENE ,
  ACTOR
}
 The possible group types. More...
 
enum  MAIN_STATE_e {
  CANCELED ,
  ERROR ,
  SUCCESS ,
  WAITING
}
 The possible operation results. More...
 
enum  PACK_RESULT_e {
  NOT_READY ,
  SUCCEEDED ,
  FAILED
}
 The possible operation step results. More...
 
enum  PROC_DISABLE_e {
  ROOT_DISABLE_EXECUTE = BIT_FLAG(0) ,
  DISABLE_EXECUTE = BIT_FLAG(1) ,
  ROOT_DISABLE_DRAW = BIT_FLAG(2) ,
  DISABLE_DRAW = BIT_FLAG(3)
}
 Controls if the execute and draw operations should be skipped. More...
 
- Static Public Member Functions inherited from dBase_c
static dBase_csearchBaseByProfName (ProfileName profile, const dBase_c *parent)
 Searches for a base with a given profile name, optionally under a given parent.
 
static void initLoader ()
 Sets the callbacks for the scrapped relocatable profile system.
 
static dBase_ccreateBase (ProfileName profName, dBase_c *parent, unsigned long param, u8 groupType)
 Creates a child base under the given parent.
 
static dBase_ccreateRoot (ProfileName profName, unsigned long param, u8 groupType)
 Creates a root base.
 
- Static Public Member Functions inherited from fBase_c
static void * operator new (size_t)
 new operator override for all bases.
 
static void operator delete (void *)
 delete operator override for all bases.
 
static fBase_ccreateChild (ProfileName profName, fBase_c *parent, unsigned long param, u8 groupType)
 Creates a child base under the given parent.
 
static fBase_ccreateRoot (ProfileName profName, unsigned long param, u8 groupType)
 Creates a root base.
 
- Public Attributes inherited from fBase_c
fBaseID_e mUniqueID
 The base's unique identifier.
 
u32 mParam
 A bitfield that configures the base's behaviour. Its usage varies from profile to profile.
 
ProfileName mProfName
 The base's profile name.
 
- Protected Member Functions inherited from fBase_c
bool isProcControlFlag (u8 flag) const
 Checks if a flag is set in mProcControl.
 
void setProcControlFlag (u8 flag)
 Sets a flag in mProcControl.
 
void clearProcControlFlag (u8 flag)
 Clears a flag in mProcControl.
 
virtual void deleteReady ()
 Informs the base that it's about to be deleted.
 
virtual bool entryFrmHeap (unsigned long size, EGG::Heap *parentHeap)
 Creates a heap of the given size for the base.
 
virtual bool entryFrmHeapNonAdjust (unsigned long size, EGG::Heap *parentHeap)
 Creates a heap of the given size for the base.
 
virtual bool createHeap ()
 [Does nothing].
 
virtual ~fBase_c ()
 Destroys the base.
 
- Protected Attributes inherited from dBase_c
const char * mpKindString
 The base's kind string.
 
const char * mpNameString
 The base's profile name string.
 
- Protected Attributes inherited from fBase_c
u8 mLifecycleState
 The base's lifecycle state. Value is a LIFECYCLE_e.
 
bool mDeleteRequested
 If deletion of the base was requested, but the delete operation has not been scheduled yet.
 
bool mDeferExecute
 If the create operation was completed, but scheduling the execute and draw operations isn't possible at this time.
 
bool mDeferRetryCreate
 If the create operation has not been completed, and rescheduling it isn't possible at this time.
 
u8 mGroupType
 The base's group type. Value is a GROUP_TYPE_e.
 
u8 mProcControl
 The operations to be skipped. Value is a PROC_DISABLE_e.
 
fManager_c mMng
 The base's process manager.
 
fBaHelper_cmpUnusedHelper
 See Unused Content.
 
fLiMgBa_c mUnusedList
 See Unused Content.
 
EGG::FrmHeapmHeap
 The base's dedicated heap.
 
- Static Protected Attributes inherited from fBase_c
static int(* sLoadAsyncCallback )()
 See Unused Content.
 
static void(* sUnloadCallback )()
 See Unused Content.
 

Constructor & Destructor Documentation

◆ dSmallScoreManager_c()

dSmallScoreManager_c::dSmallScoreManager_c ( )

Constructs a new base.

Definition at line 30 of file d_SmallScoreManager.cpp.

◆ ~dSmallScoreManager_c()

dSmallScoreManager_c::~dSmallScoreManager_c ( )
virtual

Destroys the base.

Definition at line 34 of file d_SmallScoreManager.cpp.

Member Function Documentation

◆ create()

int dSmallScoreManager_c::create ( )
virtual

do method for the create operation.

Returns
A PACK_RESULT_e value.

Reimplemented from fBase_c.

Definition at line 38 of file d_SmallScoreManager.cpp.

◆ execute()

int dSmallScoreManager_c::execute ( )
virtual

do method for the execute operation.

Returns
A PACK_RESULT_e value.

Reimplemented from fBase_c.

Definition at line 70 of file d_SmallScoreManager.cpp.

◆ draw()

int dSmallScoreManager_c::draw ( )
virtual

do method for the draw operation.

Returns
A PACK_RESULT_e value.

Reimplemented from fBase_c.

Definition at line 87 of file d_SmallScoreManager.cpp.

◆ doDelete()

int dSmallScoreManager_c::doDelete ( )
virtual

do method for the delete operation.

This method was renamed due to conflict with the delete C++ keyword.

Returns
A PACK_RESULT_e value.

Reimplemented from fBase_c.

Definition at line 99 of file d_SmallScoreManager.cpp.

◆ CreateBlueNumber()

void dSmallScoreManager_c::CreateBlueNumber ( const mVec3_c & pos,
int popupType,
int playerType )

Creates a blue small score popup.

Parameters
posThe position of the popup.
popupTypeThe type of popup to create. A value from dSmallScore_c::POPUP_TYPE_e.
playerTypeThe player type. A value from PLAYER_CHARACTER_e.

Definition at line 119 of file d_SmallScoreManager.cpp.

◆ CreateRedNumber()

void dSmallScoreManager_c::CreateRedNumber ( const mVec3_c & pos,
int playerType )

Creates a red number popup.

Parameters
posThe position of the popup.
playerTypeThe player type. A value from PLAYER_CHARACTER_e.

Definition at line 124 of file d_SmallScoreManager.cpp.

◆ CreateSmallScore()

void dSmallScoreManager_c::CreateSmallScore ( const mVec3_c & pos,
int popupType,
int playerType )

Creates a small score popup.

Parameters
posThe position of the popup.
popupTypeThe type of popup to create. A value from dSmallScore_c::POPUP_TYPE_e.
playerTypeThe player type. A value from PLAYER_CHARACTER_e.

Definition at line 130 of file d_SmallScoreManager.cpp.

◆ CreateGoalScore()

void dSmallScoreManager_c::CreateGoalScore ( const mVec3_c & pos,
int popupType,
int playerType )

Creates a goal score popup.

Parameters
posThe position of the popup.
popupTypeThe type of popup to create. A value from dSmallScore_c::POPUP_TYPE_e.
playerTypeThe player type. A value from PLAYER_CHARACTER_e.

Definition at line 146 of file d_SmallScoreManager.cpp.

◆ GoalScoreExecute()

void dSmallScoreManager_c::GoalScoreExecute ( const mVec3_c & pos,
int playerType )

Updates the position of a goal score popup.

Parameters
posThe new position.
playerTypeThe player type. A value from PLAYER_CHARACTER_e.

Definition at line 167 of file d_SmallScoreManager.cpp.

Member Data Documentation

◆ m_70

u8 dSmallScoreManager_c::m_70[4]
private

Definition at line 51 of file d_SmallScoreManager.hpp.

◆ mResLoader

d2d::ResAccMultLoader_c dSmallScoreManager_c::mResLoader
private

The resource loader for the layout.

Definition at line 52 of file d_SmallScoreManager.hpp.

◆ mSmallScores

dSmallScore_c dSmallScoreManager_c::mSmallScores[SMALL_SCORE_COUNT]
private

The regular small score popups.

Definition at line 53 of file d_SmallScoreManager.hpp.

◆ mGoalScores

dSmallScore_c dSmallScoreManager_c::mGoalScores[PLAYER_COUNT]
private

The goal score popups.

Definition at line 54 of file d_SmallScoreManager.hpp.

◆ mSmallScoresIdx

int dSmallScoreManager_c::mSmallScoresIdx
private

The next free index in mSmallScores.

Definition at line 55 of file d_SmallScoreManager.hpp.

◆ mGoalScoresIdx

int dSmallScoreManager_c::mGoalScoresIdx
private

The next free index in mGoalScores.

Definition at line 56 of file d_SmallScoreManager.hpp.

◆ m_instance

dSmallScoreManager_c * dSmallScoreManager_c::m_instance = nullptr
static

The instance of the small score manager.

Definition at line 59 of file d_SmallScoreManager.hpp.

◆ c_SMALL_SCORE_SIZE_4_3_X

const float dSmallScoreManager_c::c_SMALL_SCORE_SIZE_4_3_X = 0.8f
static

Definition at line 71 of file d_SmallScoreManager.hpp.

◆ c_SMALL_SCORE_SIZE_4_3_Y

const float dSmallScoreManager_c::c_SMALL_SCORE_SIZE_4_3_Y = 0.8f
static

Definition at line 71 of file d_SmallScoreManager.hpp.

◆ c_SMALL_SCORE_SIZE_16_9_X

const float dSmallScoreManager_c::c_SMALL_SCORE_SIZE_16_9_X = 1.0f
static

Definition at line 72 of file d_SmallScoreManager.hpp.

◆ c_SMALL_SCORE_SIZE_16_9_Y

const float dSmallScoreManager_c::c_SMALL_SCORE_SIZE_16_9_Y = 1.0f
static

Definition at line 72 of file d_SmallScoreManager.hpp.

◆ c_SMALL_GOAL_SCORE_SIZE_4_3_X

const float dSmallScoreManager_c::c_SMALL_GOAL_SCORE_SIZE_4_3_X = 0.8f
static

Definition at line 73 of file d_SmallScoreManager.hpp.

◆ c_SMALL_GOAL_SCORE_SIZE_4_3_Y

const float dSmallScoreManager_c::c_SMALL_GOAL_SCORE_SIZE_4_3_Y = 0.8f
static

Definition at line 73 of file d_SmallScoreManager.hpp.

◆ c_SMALL_GOAL_SCORE_SIZE_16_9_X

const float dSmallScoreManager_c::c_SMALL_GOAL_SCORE_SIZE_16_9_X = 1.1f
static

Definition at line 74 of file d_SmallScoreManager.hpp.

◆ c_SMALL_GOAL_SCORE_SIZE_16_9_Y

const float dSmallScoreManager_c::c_SMALL_GOAL_SCORE_SIZE_16_9_Y = 1.1f
static

Definition at line 74 of file d_SmallScoreManager.hpp.

◆ c_SCISSOR_SIZE_X

const float dSmallScoreManager_c::c_SCISSOR_SIZE_X = 640.0f
static

Definition at line 75 of file d_SmallScoreManager.hpp.

◆ c_SCISSOR_SIZE_Y

const float dSmallScoreManager_c::c_SCISSOR_SIZE_Y = 352.0f
static

Definition at line 75 of file d_SmallScoreManager.hpp.