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

#include <game/bases/d_mj2d_data.hpp>

Description

Save slot data holder.

The data stored here is temporary, as it is discarded unless the game is saved. Size must be 32-byte aligned.

Definition at line 91 of file d_mj2d_data.hpp.

Public Types

enum  COURSE_COMPLETION_e {
  COIN1_COLLECTED = BIT_FLAG(0) ,
  COIN2_COLLECTED = BIT_FLAG(1) ,
  COIN3_COLLECTED = BIT_FLAG(2) ,
  COIN_MASK = COIN1_COLLECTED | COIN2_COLLECTED | COIN3_COLLECTED ,
  GOAL_NORMAL = BIT_FLAG(4) ,
  GOAL_SECRET = BIT_FLAG(5) ,
  GOAL_MASK = GOAL_NORMAL | GOAL_SECRET ,
  SUPER_GUIDE_GOAL_NORMAL = BIT_FLAG(7) ,
  SUPER_GUIDE_GOAL_SECRET = BIT_FLAG(8) ,
  SUPER_GUIDE_GOAL_MASK = SUPER_GUIDE_GOAL_NORMAL | SUPER_GUIDE_GOAL_SECRET
}
 The completion status of each level. More...
 
enum  WORLD_COMPLETION_e { WORLD_UNLOCKED = BIT_FLAG(0) }
 The completion status of each world. More...
 
enum  GAME_COMPLETION_e {
  SAVE_EMPTY = BIT_FLAG(0) ,
  FINAL_BOSS_BEATEN = BIT_FLAG(1) ,
  GOAL_ALL = BIT_FLAG(2) ,
  COIN_ALL = BIT_FLAG(3) ,
  COIN_ALL_SPECIAL = BIT_FLAG(4) ,
  GAME_COMPLETED = BIT_FLAG(5) ,
  SUPER_GUIDE_TRIGGERED = BIT_FLAG(6)
}
 The overall completion status of the save slot. More...
 
enum  START_KINOKO_KIND_e {
  TOAD_HOUSE_NONE ,
  TOAD_HOUSE_YELLOW ,
  TOAD_HOUSE_RED ,
  TOAD_HOUSE_GREEN ,
  TOAD_HOUSE_YELLOW_R ,
  TOAD_HOUSE_RED_R ,
  TOAD_HOUSE_GREEN_R
}
 The Toad House types at the start node of each world. More...
 

Public Member Functions

 dMj2dGame_c ()
 Constructs the holder.
 
 ~dMj2dGame_c ()
 Deletes the holder.
 
void initialize ()
 Initializes the slot data.
 
void setPlrID (int player, int character)
 Sets player 's character. See PLAYER_CHARACTER_e.
 
int getPlrID (int player) const
 Gets player 's character. See PLAYER_CHARACTER_e.
 
void setPlrMode (int player, u8 powerup)
 Sets player 's powerup. See PLAYER_POWERUP_e.
 
int getPlrMode (int player) const
 Gets player 's powerup. See PLAYER_POWERUP_e.
 
void setRest (int player, u8 lives)
 Sets player 's life count.
 
int getRest (int player) const
 Gets player 's life count.
 
void setCreateItem (int player, u8 flag)
 Sets player 's createItem flag. See PLAYER_CREATE_ITEM_e.
 
int getCreateItem (int player) const
 Gets player 's createItem flag. See PLAYER_CREATE_ITEM_e.
 
void setCoin (int player, s8 coins)
 Sets player 's coin count.
 
s8 getCoin (int player) const
 Gets player 's coin count.
 
void setScore (ulong score)
 Sets the score.
 
int getScore () const
 Gets the score.
 
void setStaffCreditHighScore (u16 score)
 Sets the staff credit high score.
 
int getStaffCreditHighScore () const
 Gets the staff credit high score.
 
void onOtehonMenuOpenFlag (int movie)
 Sets the given hint movie as bought.
 
bool isOtehonMenuOpenFlag (int movie) const
 Checks if the given hint movie was bought.
 
void setCollectCoin (int world, int level, u8 coins)
 Sets the obtained Star Coin(s) for the given world/level. See COURSE_COMPLETION_e.
 
int getTotalWorldCollectCoin (int world)
 Gets the obtainable Star Coin count for the given world.
 
u8 isCollectCoin (int world, int level, int coin) const
 Checks if the given Star Coin has been obtained in the given world/level.
 
void setStartKinokoKind (int world, u8 type)
 Sets the starting Toad House type in the given world. See START_KINOKO_KIND_e.
 
int getStartKinokoKind (int world) const
 Gets the starting Toad House type in the given world. See START_KINOKO_KIND_e.
 
void setDeathCount (int world, int level, bool isSwitchPressed, u8 count)
 Sets the death count in a specific stage.
 
int getDeathCount (int world, int level, bool isSwitchPressed) const
 Gets the death count in a specific stage.
 
void setContinue (int player, s8 continues)
 Sets player 's continue count.
 
s8 getContinue (int player) const
 Gets player 's continue count.
 
void setStockItem (int item, s8 count)
 Sets the inventory amount for the given item.
 
s8 getStockItem (int item)
 
u8 isWorldDataFlag (int world, u8 flag) const
 Checks if the completion flag(s) for the given world is set. See WORLD_COMPLETION_e.
 
void onWorldDataFlag (int world, u8 flag)
 Sets the specified flag(s) for the given world. See WORLD_COMPLETION_e.
 
void offWorldDataFlag (int world, u8 flag)
 Unsets the specified flag(s) for the given world. See WORLD_COMPLETION_e.
 
bool isCourseDataFlag (int world, int level, ulong flag) const
 Checks if the completion flag for the given world/level is set. See COURSE_COMPLETION_e.
 
void onCourseDataFlag (int world, int level, ulong flag)
 Sets the completion flag(s) for the given world/level. See COURSE_COMPLETION_e.
 
void offCourseDataFlag (int world, int level, ulong flag)
 Unsets the completion flag(s) for the given world/level. See COURSE_COMPLETION_e.
 
int getCourseDataFlag (int world, int level) const
 Gets all the completion flags for the given world/level. See COURSE_COMPLETION_e.
 
void setCSEnemyRevivalCnt (int world, int enemy, int count)
 Sets the revival counter for the given map enemy.
 
u8 getCSEnemyRevivalCnt (int world, int enemy) const
 Gets the revival counter for the given map enemy.
 
void setCSEnemySceneNo (int world, int enemy, u8 subworld)
 Sets the subworld number for the given map enemy.
 
u8 getCSEnemySceneNo (int world, int enemy) const
 Gets the subworld number for the given map enemy.
 
void setCSEnemyPosIndex (int world, int enemy, u8 node)
 Sets the path node for the given map enemy.
 
u8 getCSEnemyPosIndex (int world, int enemy) const
 Gets the path node for the given map enemy.
 
void setCSEnemyWalkDir (int world, int enemy, u8 direction)
 Sets the path direction for the given map enemy.
 
u8 getCSEnemyWalkDir (int world, int enemy) const
 Gets the path direction for the given map enemy.
 
void setKinopioCourseNo (int world, int level)
 Sets the Toad rescue level for the given world.
 
u8 getKinopioCourseNo (int world) const
 Gets the Toad rescue level for the given world.
 
void setIbaraNow (int ibaraNow)
 Sets the worldmap vine reshuffle counter.
 
u8 getIbaraNow () const
 Gets the worldmap vine reshuffle counter.
 

Private Member Functions

void versionUpdate ()
 Checks that the save data version matches the current one and clears the slot if not.
 
void setSwitchDeathCount (u8 count)
 Sets the death count for World 3-4 for the worldmap switch-enabled variant.
 
int getSwitchDeathCount () const
 Gets the death count for World 3-4 for the worldmap switch-enabled variant.
 

Private Attributes

u8 mRevision [2]
 The save data version and subversion. See SAVE_REVISION_MAJOR and SAVE_REVISION_MINOR.
 
u8 mGameCompletion
 The overall completion of the save slot. See GAME_COMPLETION_e.
 
u8 mCurrentWorld
 The world the player is currently in.
 
u8 mCurrentSubWorld
 The subworld the player is currently in.
 
u8 mCurrentPathNode
 The path node the player is currently on.
 
u8 mIbaraNow
 The worldmap vine reshuffle counter.
 
u8 mSwitchOn
 The status of the worldmap switch.
 
u8 mUnknown8
 [Unused].
 
u8 mStockItemCount [POWERUP_COUNT]
 The inventory amount for each item.
 
u8 mStartKinokoType [WORLD_COUNT]
 The starting Toad House type for each world. See START_KINOKO_KIND_e.
 
u8 mPlayerContinue [PLAYER_COUNT]
 The continue count for each player.
 
s8 mPlayerCoin [PLAYER_COUNT]
 The coin count for each player.
 
u8 mPlayerLife [PLAYER_COUNT]
 The life count for each player.
 
u8 mPlayerCreateItem [PLAYER_COUNT]
 The Star Power flag for each player. See PLAYER_CREATE_ITEM_e.
 
u8 mPlayerCharacter [PLAYER_COUNT]
 The character for each player. See PLAYER_CHARACTER_e.
 
u8 mPlayerPowerup [PLAYER_COUNT]
 The powerup for each player. See PLAYER_POWERUP_e.
 
u8 mWorldCompletion [WORLD_COUNT]
 The completion flags for each world. See WORLD_COMPLETION_e.
 
u8 mEnemyRevivalCount [WORLD_COUNT][AMBUSH_ENEMY_COUNT]
 The revival counter for each map enemy.
 
u16 mUnknown64
 [Unused].
 
u16 mStaffRollHighScore
 The staff credits high score.
 
u32 mScore
 The regular score.
 
u32 mStageCompletion [WORLD_COUNT][STAGE_COUNT]
 The completion flags for each level. See COURSE_COMPLETION_e.
 
bool mOtehonMenuOpen [HINT_MOVIE_COUNT]
 The hint movie bought status for each movie.
 
u8 mKinopioCourseNo [WORLD_COUNT]
 The Toad Rescue level for each world.
 
u8 mEnemySceneNo [WORLD_COUNT][AMBUSH_ENEMY_COUNT]
 The subworld number for each map enemy.
 
u8 mEnemyPosIndex [WORLD_COUNT][AMBUSH_ENEMY_COUNT]
 The path node for each map enemy.
 
u8 mEnemyWalkDir [WORLD_COUNT][AMBUSH_ENEMY_COUNT]
 The movement direction for each map enemy.
 
u8 mDeathCount [WORLD_COUNT][STAGE_COUNT]
 The death count for each level.
 
u8 mDeathCountSwitch
 The death count for the worldmap switch variant of World 3-4. See mDeathCount.
 
u8 pad [0x13]
 
u32 mChecksum
 The CRC32 checksum of the above data.
 

Static Private Attributes

static const u32 sDefaultCharacters [4] = {PLAYER_MARIO, PLAYER_LUIGI, PLAYER_YELLOW_TOAD, PLAYER_BLUE_TOAD}
 The default character for each player.
 

Member Enumeration Documentation

◆ COURSE_COMPLETION_e

The completion status of each level.

Enumerator
COIN1_COLLECTED 

The first Star Coin was obtained.

COIN2_COLLECTED 

The second Star Coin was obtained.

COIN3_COLLECTED 

The third Star Coin was obtained.

GOAL_NORMAL 

The regular exit was cleared.

GOAL_SECRET 

The secret exit was cleared.

SUPER_GUIDE_GOAL_NORMAL 

The regular exit was cleared with the Super Guide.

SUPER_GUIDE_GOAL_SECRET 

The secret exit was cleared with the Super Guide.

Definition at line 95 of file d_mj2d_data.hpp.

◆ WORLD_COMPLETION_e

The completion status of each world.

Definition at line 109 of file d_mj2d_data.hpp.

◆ GAME_COMPLETION_e

The overall completion status of the save slot.

Enumerator
SAVE_EMPTY 

The slot is empty.

FINAL_BOSS_BEATEN 

The final boss was beaten.

GOAL_ALL 

All levels were completed.

COIN_ALL 

All the Star Coins in the regular worlds were obtained.

COIN_ALL_SPECIAL 

All the Star Coins in the special worlds were obtained.

GAME_COMPLETED 

All the above objectives were completed.

SUPER_GUIDE_TRIGGERED 

The player died at least SUPER_GUIDE_DEATH_COUNT times in a single stage.

Definition at line 114 of file d_mj2d_data.hpp.

◆ START_KINOKO_KIND_e

The Toad House types at the start node of each world.

Values marked with R are used for houses that spawn after a successful Toad Rescue mission.

Definition at line 126 of file d_mj2d_data.hpp.

Constructor & Destructor Documentation

◆ dMj2dGame_c()

dMj2dGame_c::dMj2dGame_c ( )

Constructs the holder.

Definition at line 7 of file d_mj2d_data.cpp.

◆ ~dMj2dGame_c()

dMj2dGame_c::~dMj2dGame_c ( )
inline

Deletes the holder.

Definition at line 140 of file d_mj2d_data.hpp.

Member Function Documentation

◆ initialize()

void dMj2dGame_c::initialize ( )

Initializes the slot data.

Definition at line 9 of file d_mj2d_data.cpp.

◆ setPlrID()

void dMj2dGame_c::setPlrID ( int player,
int character )

Sets player 's character. See PLAYER_CHARACTER_e.

Definition at line 51 of file d_mj2d_data.cpp.

◆ getPlrID()

int dMj2dGame_c::getPlrID ( int player) const

Gets player 's character. See PLAYER_CHARACTER_e.

Definition at line 55 of file d_mj2d_data.cpp.

◆ setPlrMode()

void dMj2dGame_c::setPlrMode ( int player,
u8 powerup )

Sets player 's powerup. See PLAYER_POWERUP_e.

Definition at line 59 of file d_mj2d_data.cpp.

◆ getPlrMode()

int dMj2dGame_c::getPlrMode ( int player) const

Gets player 's powerup. See PLAYER_POWERUP_e.

Definition at line 63 of file d_mj2d_data.cpp.

◆ setRest()

void dMj2dGame_c::setRest ( int player,
u8 lives )

Sets player 's life count.

Definition at line 67 of file d_mj2d_data.cpp.

◆ getRest()

int dMj2dGame_c::getRest ( int player) const

Gets player 's life count.

Definition at line 71 of file d_mj2d_data.cpp.

◆ setCreateItem()

void dMj2dGame_c::setCreateItem ( int player,
u8 flag )

Sets player 's createItem flag. See PLAYER_CREATE_ITEM_e.

Flags other than CREATE_ITEM_STAR_POWER are ignored.

Definition at line 75 of file d_mj2d_data.cpp.

◆ getCreateItem()

int dMj2dGame_c::getCreateItem ( int player) const

Gets player 's createItem flag. See PLAYER_CREATE_ITEM_e.

Flags other than CREATE_ITEM_STAR_POWER are ignored.

Definition at line 79 of file d_mj2d_data.cpp.

◆ setCoin()

void dMj2dGame_c::setCoin ( int player,
s8 coins )

Sets player 's coin count.

Definition at line 83 of file d_mj2d_data.cpp.

◆ getCoin()

s8 dMj2dGame_c::getCoin ( int player) const

Gets player 's coin count.

Definition at line 87 of file d_mj2d_data.cpp.

◆ setScore()

void dMj2dGame_c::setScore ( ulong score)

Sets the score.

Definition at line 91 of file d_mj2d_data.cpp.

◆ getScore()

int dMj2dGame_c::getScore ( ) const

Gets the score.

Definition at line 95 of file d_mj2d_data.cpp.

◆ setStaffCreditHighScore()

void dMj2dGame_c::setStaffCreditHighScore ( u16 score)

Sets the staff credit high score.

Definition at line 99 of file d_mj2d_data.cpp.

◆ getStaffCreditHighScore()

int dMj2dGame_c::getStaffCreditHighScore ( ) const

Gets the staff credit high score.

Definition at line 105 of file d_mj2d_data.cpp.

◆ onOtehonMenuOpenFlag()

void dMj2dGame_c::onOtehonMenuOpenFlag ( int movie)

Sets the given hint movie as bought.

Definition at line 109 of file d_mj2d_data.cpp.

◆ isOtehonMenuOpenFlag()

bool dMj2dGame_c::isOtehonMenuOpenFlag ( int movie) const

Checks if the given hint movie was bought.

Definition at line 113 of file d_mj2d_data.cpp.

◆ setCollectCoin()

void dMj2dGame_c::setCollectCoin ( int world,
int level,
u8 coins )

Sets the obtained Star Coin(s) for the given world/level. See COURSE_COMPLETION_e.

Other flags are discarded.

Definition at line 117 of file d_mj2d_data.cpp.

◆ getTotalWorldCollectCoin()

int dMj2dGame_c::getTotalWorldCollectCoin ( int world)

Gets the obtainable Star Coin count for the given world.

Definition at line 121 of file d_mj2d_data.cpp.

◆ isCollectCoin()

u8 dMj2dGame_c::isCollectCoin ( int world,
int level,
int coin ) const

Checks if the given Star Coin has been obtained in the given world/level.

Definition at line 134 of file d_mj2d_data.cpp.

◆ setStartKinokoKind()

void dMj2dGame_c::setStartKinokoKind ( int world,
u8 type )

Sets the starting Toad House type in the given world. See START_KINOKO_KIND_e.

Definition at line 138 of file d_mj2d_data.cpp.

◆ getStartKinokoKind()

int dMj2dGame_c::getStartKinokoKind ( int world) const

Gets the starting Toad House type in the given world. See START_KINOKO_KIND_e.

Definition at line 142 of file d_mj2d_data.cpp.

◆ setDeathCount()

void dMj2dGame_c::setDeathCount ( int world,
int level,
bool isSwitchPressed,
u8 count )

Sets the death count in a specific stage.

Parameters
worldThe world.
levelThe level.
isSwitchPressedIf the worldmap switch was activated [only used for level 3-4].
countThe death count.

Definition at line 146 of file d_mj2d_data.cpp.

◆ getDeathCount()

int dMj2dGame_c::getDeathCount ( int world,
int level,
bool isSwitchPressed ) const

Gets the death count in a specific stage.

Parameters
worldThe world.
levelThe level.
isSwitchPressedIf the worldmap switch was activated [only used for level 3-4].
Returns
The death count.

Definition at line 159 of file d_mj2d_data.cpp.

◆ setContinue()

void dMj2dGame_c::setContinue ( int player,
s8 continues )

Sets player 's continue count.

Definition at line 176 of file d_mj2d_data.cpp.

◆ getContinue()

s8 dMj2dGame_c::getContinue ( int player) const

Gets player 's continue count.

Definition at line 180 of file d_mj2d_data.cpp.

◆ setStockItem()

void dMj2dGame_c::setStockItem ( int item,
s8 count )

Sets the inventory amount for the given item.

Definition at line 183 of file d_mj2d_data.cpp.

◆ getStockItem()

s8 dMj2dGame_c::getStockItem ( int item)
inline

Definition at line 214 of file d_mj2d_data.hpp.

◆ isWorldDataFlag()

u8 dMj2dGame_c::isWorldDataFlag ( int world,
u8 flag ) const

Checks if the completion flag(s) for the given world is set. See WORLD_COMPLETION_e.

Definition at line 191 of file d_mj2d_data.cpp.

◆ onWorldDataFlag()

void dMj2dGame_c::onWorldDataFlag ( int world,
u8 flag )

Sets the specified flag(s) for the given world. See WORLD_COMPLETION_e.

Definition at line 195 of file d_mj2d_data.cpp.

◆ offWorldDataFlag()

void dMj2dGame_c::offWorldDataFlag ( int world,
u8 flag )

Unsets the specified flag(s) for the given world. See WORLD_COMPLETION_e.

Definition at line 199 of file d_mj2d_data.cpp.

◆ isCourseDataFlag()

bool dMj2dGame_c::isCourseDataFlag ( int world,
int level,
ulong flag ) const

Checks if the completion flag for the given world/level is set. See COURSE_COMPLETION_e.

Definition at line 207 of file d_mj2d_data.cpp.

◆ onCourseDataFlag()

void dMj2dGame_c::onCourseDataFlag ( int world,
int level,
ulong flag )

Sets the completion flag(s) for the given world/level. See COURSE_COMPLETION_e.

Definition at line 211 of file d_mj2d_data.cpp.

◆ offCourseDataFlag()

void dMj2dGame_c::offCourseDataFlag ( int world,
int level,
ulong flag )

Unsets the completion flag(s) for the given world/level. See COURSE_COMPLETION_e.

Definition at line 215 of file d_mj2d_data.cpp.

◆ getCourseDataFlag()

int dMj2dGame_c::getCourseDataFlag ( int world,
int level ) const

Gets all the completion flags for the given world/level. See COURSE_COMPLETION_e.

Definition at line 203 of file d_mj2d_data.cpp.

◆ setCSEnemyRevivalCnt()

void dMj2dGame_c::setCSEnemyRevivalCnt ( int world,
int enemy,
int count )

Sets the revival counter for the given map enemy.

Definition at line 219 of file d_mj2d_data.cpp.

◆ getCSEnemyRevivalCnt()

u8 dMj2dGame_c::getCSEnemyRevivalCnt ( int world,
int enemy ) const

Gets the revival counter for the given map enemy.

Definition at line 223 of file d_mj2d_data.cpp.

◆ setCSEnemySceneNo()

void dMj2dGame_c::setCSEnemySceneNo ( int world,
int enemy,
u8 subworld )

Sets the subworld number for the given map enemy.

Definition at line 227 of file d_mj2d_data.cpp.

◆ getCSEnemySceneNo()

u8 dMj2dGame_c::getCSEnemySceneNo ( int world,
int enemy ) const

Gets the subworld number for the given map enemy.

Definition at line 231 of file d_mj2d_data.cpp.

◆ setCSEnemyPosIndex()

void dMj2dGame_c::setCSEnemyPosIndex ( int world,
int enemy,
u8 node )

Sets the path node for the given map enemy.

Definition at line 235 of file d_mj2d_data.cpp.

◆ getCSEnemyPosIndex()

u8 dMj2dGame_c::getCSEnemyPosIndex ( int world,
int enemy ) const

Gets the path node for the given map enemy.

Definition at line 239 of file d_mj2d_data.cpp.

◆ setCSEnemyWalkDir()

void dMj2dGame_c::setCSEnemyWalkDir ( int world,
int enemy,
u8 direction )

Sets the path direction for the given map enemy.

Values are: 0 (forwards), 1 (backwards) and 2 (initial value).

Todo
Turn the value list into an enum and move it to the appropriate section once decompiled.

Definition at line 243 of file d_mj2d_data.cpp.

◆ getCSEnemyWalkDir()

u8 dMj2dGame_c::getCSEnemyWalkDir ( int world,
int enemy ) const

Gets the path direction for the given map enemy.

Definition at line 247 of file d_mj2d_data.cpp.

◆ setKinopioCourseNo()

void dMj2dGame_c::setKinopioCourseNo ( int world,
int level )

Sets the Toad rescue level for the given world.

Definition at line 251 of file d_mj2d_data.cpp.

◆ getKinopioCourseNo()

u8 dMj2dGame_c::getKinopioCourseNo ( int world) const

Gets the Toad rescue level for the given world.

Definition at line 255 of file d_mj2d_data.cpp.

◆ setIbaraNow()

void dMj2dGame_c::setIbaraNow ( int ibaraNow)

Sets the worldmap vine reshuffle counter.

Definition at line 259 of file d_mj2d_data.cpp.

◆ getIbaraNow()

u8 dMj2dGame_c::getIbaraNow ( ) const

Gets the worldmap vine reshuffle counter.

Definition at line 263 of file d_mj2d_data.cpp.

◆ versionUpdate()

void dMj2dGame_c::versionUpdate ( )
private

Checks that the save data version matches the current one and clears the slot if not.

Definition at line 43 of file d_mj2d_data.cpp.

◆ setSwitchDeathCount()

void dMj2dGame_c::setSwitchDeathCount ( u8 count)
private

Sets the death count for World 3-4 for the worldmap switch-enabled variant.

Definition at line 168 of file d_mj2d_data.cpp.

◆ getSwitchDeathCount()

int dMj2dGame_c::getSwitchDeathCount ( ) const
private

Gets the death count for World 3-4 for the worldmap switch-enabled variant.

Definition at line 172 of file d_mj2d_data.cpp.

Member Data Documentation

◆ mRevision

u8 dMj2dGame_c::mRevision[2]
private

The save data version and subversion. See SAVE_REVISION_MAJOR and SAVE_REVISION_MINOR.

Definition at line 280 of file d_mj2d_data.hpp.

◆ mGameCompletion

u8 dMj2dGame_c::mGameCompletion
private

The overall completion of the save slot. See GAME_COMPLETION_e.

Definition at line 282 of file d_mj2d_data.hpp.

◆ mCurrentWorld

u8 dMj2dGame_c::mCurrentWorld
private

The world the player is currently in.

Definition at line 284 of file d_mj2d_data.hpp.

◆ mCurrentSubWorld

u8 dMj2dGame_c::mCurrentSubWorld
private

The subworld the player is currently in.

Definition at line 285 of file d_mj2d_data.hpp.

◆ mCurrentPathNode

u8 dMj2dGame_c::mCurrentPathNode
private

The path node the player is currently on.

Todo
[Verify].

Definition at line 286 of file d_mj2d_data.hpp.

◆ mIbaraNow

u8 dMj2dGame_c::mIbaraNow
private

The worldmap vine reshuffle counter.

[Value decreases every time a level is played. If it reaches zero, the vines are moved].

Definition at line 290 of file d_mj2d_data.hpp.

◆ mSwitchOn

u8 dMj2dGame_c::mSwitchOn
private

The status of the worldmap switch.

Definition at line 292 of file d_mj2d_data.hpp.

◆ mUnknown8

u8 dMj2dGame_c::mUnknown8
private

[Unused].

Definition at line 293 of file d_mj2d_data.hpp.

◆ mStockItemCount

u8 dMj2dGame_c::mStockItemCount[POWERUP_COUNT]
private

The inventory amount for each item.

Definition at line 295 of file d_mj2d_data.hpp.

◆ mStartKinokoType

u8 dMj2dGame_c::mStartKinokoType[WORLD_COUNT]
private

The starting Toad House type for each world. See START_KINOKO_KIND_e.

Definition at line 298 of file d_mj2d_data.hpp.

◆ mPlayerContinue

u8 dMj2dGame_c::mPlayerContinue[PLAYER_COUNT]
private

The continue count for each player.

Definition at line 300 of file d_mj2d_data.hpp.

◆ mPlayerCoin

s8 dMj2dGame_c::mPlayerCoin[PLAYER_COUNT]
private

The coin count for each player.

Definition at line 301 of file d_mj2d_data.hpp.

◆ mPlayerLife

u8 dMj2dGame_c::mPlayerLife[PLAYER_COUNT]
private

The life count for each player.

Definition at line 302 of file d_mj2d_data.hpp.

◆ mPlayerCreateItem

u8 dMj2dGame_c::mPlayerCreateItem[PLAYER_COUNT]
private

The Star Power flag for each player. See PLAYER_CREATE_ITEM_e.

Definition at line 303 of file d_mj2d_data.hpp.

◆ mPlayerCharacter

u8 dMj2dGame_c::mPlayerCharacter[PLAYER_COUNT]
private

The character for each player. See PLAYER_CHARACTER_e.

Definition at line 304 of file d_mj2d_data.hpp.

◆ mPlayerPowerup

u8 dMj2dGame_c::mPlayerPowerup[PLAYER_COUNT]
private

The powerup for each player. See PLAYER_POWERUP_e.

Definition at line 305 of file d_mj2d_data.hpp.

◆ mWorldCompletion

u8 dMj2dGame_c::mWorldCompletion[WORLD_COUNT]
private

The completion flags for each world. See WORLD_COMPLETION_e.

Definition at line 307 of file d_mj2d_data.hpp.

◆ mEnemyRevivalCount

u8 dMj2dGame_c::mEnemyRevivalCount[WORLD_COUNT][AMBUSH_ENEMY_COUNT]
private

The revival counter for each map enemy.

Definition at line 308 of file d_mj2d_data.hpp.

◆ mUnknown64

u16 dMj2dGame_c::mUnknown64
private

[Unused].

Definition at line 310 of file d_mj2d_data.hpp.

◆ mStaffRollHighScore

u16 dMj2dGame_c::mStaffRollHighScore
private

The staff credits high score.

Definition at line 311 of file d_mj2d_data.hpp.

◆ mScore

u32 dMj2dGame_c::mScore
private

The regular score.

Definition at line 312 of file d_mj2d_data.hpp.

◆ mStageCompletion

u32 dMj2dGame_c::mStageCompletion[WORLD_COUNT][STAGE_COUNT]
private

The completion flags for each level. See COURSE_COMPLETION_e.

Definition at line 315 of file d_mj2d_data.hpp.

◆ mOtehonMenuOpen

bool dMj2dGame_c::mOtehonMenuOpen[HINT_MOVIE_COUNT]
private

The hint movie bought status for each movie.

Definition at line 316 of file d_mj2d_data.hpp.

◆ mKinopioCourseNo

u8 dMj2dGame_c::mKinopioCourseNo[WORLD_COUNT]
private

The Toad Rescue level for each world.

Definition at line 317 of file d_mj2d_data.hpp.

◆ mEnemySceneNo

u8 dMj2dGame_c::mEnemySceneNo[WORLD_COUNT][AMBUSH_ENEMY_COUNT]
private

The subworld number for each map enemy.

Definition at line 319 of file d_mj2d_data.hpp.

◆ mEnemyPosIndex

u8 dMj2dGame_c::mEnemyPosIndex[WORLD_COUNT][AMBUSH_ENEMY_COUNT]
private

The path node for each map enemy.

Definition at line 320 of file d_mj2d_data.hpp.

◆ mEnemyWalkDir

u8 dMj2dGame_c::mEnemyWalkDir[WORLD_COUNT][AMBUSH_ENEMY_COUNT]
private

The movement direction for each map enemy.

Definition at line 321 of file d_mj2d_data.hpp.

◆ mDeathCount

u8 dMj2dGame_c::mDeathCount[WORLD_COUNT][STAGE_COUNT]
private

The death count for each level.

The value is cumulative, and not reset after clearing the level.

Definition at line 325 of file d_mj2d_data.hpp.

◆ mDeathCountSwitch

u8 dMj2dGame_c::mDeathCountSwitch
private

The death count for the worldmap switch variant of World 3-4. See mDeathCount.

Definition at line 326 of file d_mj2d_data.hpp.

◆ pad

u8 dMj2dGame_c::pad[0x13]
private

Definition at line 328 of file d_mj2d_data.hpp.

◆ mChecksum

u32 dMj2dGame_c::mChecksum
private

The CRC32 checksum of the above data.

Definition at line 329 of file d_mj2d_data.hpp.

◆ sDefaultCharacters

const u32 dMj2dGame_c::sDefaultCharacters = {PLAYER_MARIO, PLAYER_LUIGI, PLAYER_YELLOW_TOAD, PLAYER_BLUE_TOAD}
staticprivate

The default character for each player.

Unofficial name.
Decompilation Note:
Should be part of the class in theory.

Definition at line 5 of file d_mj2d_data.hpp.