NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
|
#include <dol/bases/d_mj2d_data.hpp>
Save data header 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 15 of file d_mj2d_data.hpp.
Public Member Functions | |
dMj2dHeader_c () | |
Constructs the holder. | |
void | initialize () |
Initializes the header data. | |
u16 | getFreeModePlayCount (int world, int level) const |
Gets the Free Mode play count for the given world/level. See mFreeModePlayCount. | |
void | setFreeModePlayCount (int world, int level, u16 count) |
Sets the Free Mode play count for the given world/level. See mFreeModePlayCount. | |
u16 | getCoinBattlePlayCount (int world, int level) const |
Gets the Coin Battle play count for the given world/level. See mCoinBattlePlayCount. | |
void | setCoinBattlePlayCount (int world, int level, u16 count) |
Sets the Coin Battle play count for the given world/level. See mCoinBattlePlayCount. | |
void | setMultiModeCompletion (int world) |
Unlocks the given world in extra modes. | |
bool | getMultiModeCompletion (int world) const |
Checks if the given world is unlocked in extra modes. | |
Private Member Functions | |
void | versionUpdate () |
Checks that the save data version matches the current one and clears the slot if not. | |
void | setSelectFileNo (s8 file) |
Sets the last used save data slot. | |
Private Attributes | |
char | mMagic [4] |
The savegame magic. | |
u8 | mVersion [2] |
The save data version and subversion. See SAVE_VERSION and SAVE_SUB_VERSION. | |
u8 | mLastSelectedFile |
The last selected save data slot. | |
u8 | mUnknown7 |
[Unused]. [Most likely declared as padding]. | |
u16 | mFreeModePlayCount [WORLD_COUNT][STAGE_COUNT] |
The play count of each level in Free Mode. | |
u16 | mCoinBattlePlayCount [WORLD_COUNT][STAGE_COUNT] |
The play count of each level in Coin Battle. | |
u16 | mExtraModesUnlockedWorlds |
The worlds unlocked in Extra Modes. | |
u16 | mUnknown69A |
[Unused]. [Most likely declared as padding]. | |
u32 | mChecksum |
The CRC32 checksum of the above data (excluding mMagic). | |
Static Private Attributes | |
static char | sSaveMagic [4] = {'S', 'M', 'N', 'P'} |
The expected savegame magic. | |
dMj2dHeader_c::dMj2dHeader_c | ( | ) |
Constructs the holder.
Definition at line 270 of file d_mj2d_data.cpp.
void dMj2dHeader_c::initialize | ( | ) |
Initializes the header data.
Definition at line 273 of file d_mj2d_data.cpp.
u16 dMj2dHeader_c::getFreeModePlayCount | ( | int | world, |
int | level | ||
) | const |
Gets the Free Mode play count for the given world/level. See mFreeModePlayCount.
Definition at line 289 of file d_mj2d_data.cpp.
void dMj2dHeader_c::setFreeModePlayCount | ( | int | world, |
int | level, | ||
u16 | count | ||
) |
Sets the Free Mode play count for the given world/level. See mFreeModePlayCount.
Definition at line 293 of file d_mj2d_data.cpp.
u16 dMj2dHeader_c::getCoinBattlePlayCount | ( | int | world, |
int | level | ||
) | const |
Gets the Coin Battle play count for the given world/level. See mCoinBattlePlayCount.
Definition at line 297 of file d_mj2d_data.cpp.
void dMj2dHeader_c::setCoinBattlePlayCount | ( | int | world, |
int | level, | ||
u16 | count | ||
) |
Sets the Coin Battle play count for the given world/level. See mCoinBattlePlayCount.
Definition at line 301 of file d_mj2d_data.cpp.
void dMj2dHeader_c::setMultiModeCompletion | ( | int | world | ) |
Unlocks the given world in extra modes.
Definition at line 305 of file d_mj2d_data.cpp.
bool dMj2dHeader_c::getMultiModeCompletion | ( | int | world | ) | const |
Checks if the given world is unlocked in extra modes.
Definition at line 309 of file d_mj2d_data.cpp.
|
private |
Checks that the save data version matches the current one and clears the slot if not.
Definition at line 313 of file d_mj2d_data.cpp.
|
private |
Sets the last used save data slot.
Definition at line 285 of file d_mj2d_data.cpp.
|
private |
The savegame magic.
Definition at line 50 of file d_mj2d_data.hpp.
|
private |
The save data version and subversion. See SAVE_VERSION and SAVE_SUB_VERSION.
Definition at line 51 of file d_mj2d_data.hpp.
|
private |
The last selected save data slot.
Definition at line 52 of file d_mj2d_data.hpp.
|
private |
[Unused]. [Most likely declared as padding].
Definition at line 53 of file d_mj2d_data.hpp.
|
private |
The play count of each level in Free Mode.
[Value is increased by 0x100 for every playthrough until 10000].
Definition at line 57 of file d_mj2d_data.hpp.
|
private |
The play count of each level in Coin Battle.
[Value is increased by 0x100 for every playthrough until 10000].
Definition at line 61 of file d_mj2d_data.hpp.
|
private |
The worlds unlocked in Extra Modes.
Playing a world in extra modes requires said world to be unlocked in at least one save slot. Value is a bitfield.
Definition at line 66 of file d_mj2d_data.hpp.
|
private |
[Unused]. [Most likely declared as padding].
Definition at line 67 of file d_mj2d_data.hpp.
|
private |
The CRC32 checksum of the above data (excluding mMagic).
Definition at line 69 of file d_mj2d_data.hpp.
|
staticprivate |
The expected savegame magic.
Value is SMNP
for PAL games.
Definition at line 74 of file d_mj2d_data.hpp.