2#include <lib/MSL_C/string.h>
3#include <game/bases/d_mj2d_data.hpp>
18 for (
int world = 0; world <= NORMAL_WORLD_COUNT; world++) {
23 for (
int player = 0; player < PLAYER_COUNT; player++) {
31 for (
int world = 0; world < WORLD_COUNT; world++) {
123 for (
int level = 0; level < STAGE_COUNT; level++) {
147 if (count >=
SUPER_GUIDE_DEATH_COUNT && world < NORMAL_WORLD_COUNT && (level <= STAGE_CASTLE || level == STAGE_DOOMSHIP)) {
152 if (isSwitchPressed && world == WORLD_3 && level == STAGE_4) {
161 if (isSwitchPressed && world == WORLD_3 && level == STAGE_4) {
u8 getCSEnemyPosIndex(int world, int enemy) const
Gets the path node for the given map enemy.
@ SUPER_GUIDE_TRIGGERED
The player died at least SUPER_GUIDE_DEATH_COUNT times in a single stage.
@ SAVE_EMPTY
The slot is empty.
int getSwitchDeathCount() const
Gets the death count for World 3-4 for the worldmap switch-enabled variant.
s8 getContinue(int player) const
Gets player 's continue count.
u8 mIbaraNow
The worldmap vine reshuffle counter.
u32 mStageCompletion[WORLD_COUNT][STAGE_COUNT]
The completion flags for each level. See COURSE_COMPLETION_e.
int getStartKinokoKind(int world) const
Gets the starting Toad House type in the given world. See START_KINOKO_KIND_e.
void offCourseDataFlag(int world, int level, ulong flag)
Unsets the completion flag(s) for the given world/level. See COURSE_COMPLETION_e.
void setScore(ulong score)
Sets the score.
u8 mEnemySceneNo[WORLD_COUNT][AMBUSH_ENEMY_COUNT]
The subworld number for each map enemy.
void setSwitchDeathCount(u8 count)
Sets the death count for World 3-4 for the worldmap switch-enabled variant.
void setStockItem(int item, s8 count)
Sets the inventory amount for the given item.
u8 mPlayerContinue[PLAYER_COUNT]
The continue count for each player.
void setCSEnemySceneNo(int world, int enemy, u8 subworld)
Sets the subworld number for the given map enemy.
bool mOtehonMenuOpen[HINT_MOVIE_COUNT]
The hint movie bought status for each movie.
u8 getCSEnemySceneNo(int world, int enemy) const
Gets the subworld number for the given map enemy.
u16 mStaffRollHighScore
The staff credits high score.
u8 mPlayerCreateItem[PLAYER_COUNT]
The Star Power flag for each player. See PLAYER_CREATE_ITEM_e.
u8 getCSEnemyWalkDir(int world, int enemy) const
Gets the path direction for the given map enemy.
void setContinue(int player, s8 continues)
Sets player 's continue count.
void setPlrID(int player, int character)
Sets player 's character. See PLAYER_CHARACTER_e.
u8 mEnemyRevivalCount[WORLD_COUNT][AMBUSH_ENEMY_COUNT]
The revival counter for each map enemy.
void initialize()
Initializes the slot data.
u8 mPlayerPowerup[PLAYER_COUNT]
The powerup for each player. See PLAYER_POWERUP_e.
void onCourseDataFlag(int world, int level, ulong flag)
Sets the completion flag(s) for the given world/level. See COURSE_COMPLETION_e.
u8 getCSEnemyRevivalCnt(int world, int enemy) const
Gets the revival counter for the given map enemy.
void setRest(int player, u8 lives)
Sets player 's life count.
int getRest(int player) const
Gets player 's life count.
void setStaffCreditHighScore(u16 score)
Sets the staff credit high score.
u32 mScore
The regular score.
u8 isWorldDataFlag(int world, u8 flag) const
Checks if the completion flag(s) for the given world is set. See WORLD_COMPLETION_e.
void setDeathCount(int world, int level, bool isSwitchPressed, u8 count)
Sets the death count in a specific stage.
u8 mStockItemCount[POWERUP_COUNT]
The inventory amount for each item.
u8 mDeathCount[WORLD_COUNT][STAGE_COUNT]
The death count for each level.
void setIbaraNow(int ibaraNow)
Sets the worldmap vine reshuffle counter.
void setCSEnemyPosIndex(int world, int enemy, u8 node)
Sets the path node for the given map enemy.
void setStartKinokoKind(int world, u8 type)
Sets the starting Toad House type in the given world. See START_KINOKO_KIND_e.
u8 mGameCompletion
The overall completion of the save slot. See GAME_COMPLETION_e.
u8 mEnemyWalkDir[WORLD_COUNT][AMBUSH_ENEMY_COUNT]
The movement direction for each map enemy.
int getCourseDataFlag(int world, int level) const
Gets all the completion flags for the given world/level. See COURSE_COMPLETION_e.
int getDeathCount(int world, int level, bool isSwitchPressed) const
Gets the death count in a specific stage.
void setPlrMode(int player, u8 powerup)
Sets player 's powerup. See PLAYER_POWERUP_e.
void setCSEnemyRevivalCnt(int world, int enemy, int count)
Sets the revival counter for the given map enemy.
int getScore() const
Gets the score.
u8 isCollectCoin(int world, int level, int coin) const
Checks if the given Star Coin has been obtained in the given world/level.
int getPlrID(int player) const
Gets player 's character. See PLAYER_CHARACTER_e.
void setCreateItem(int player, u8 flag)
Sets player 's createItem flag. See PLAYER_CREATE_ITEM_e.
u8 mPlayerCharacter[PLAYER_COUNT]
The character for each player. See PLAYER_CHARACTER_e.
void setCollectCoin(int world, int level, u8 coins)
Sets the obtained Star Coin(s) for the given world/level. See COURSE_COMPLETION_e.
u8 mPlayerLife[PLAYER_COUNT]
The life count for each player.
void versionUpdate()
Checks that the save data version matches the current one and clears the slot if not.
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 offWorldDataFlag(int world, u8 flag)
Unsets the specified flag(s) for the given world. See WORLD_COMPLETION_e.
int getPlrMode(int player) const
Gets player 's powerup. See PLAYER_POWERUP_e.
u8 mDeathCountSwitch
The death count for the worldmap switch variant of World 3-4. See mDeathCount.
void onOtehonMenuOpenFlag(int movie)
Sets the given hint movie as bought.
u8 mRevision[2]
The save data version and subversion. See SAVE_REVISION_MAJOR and SAVE_REVISION_MINOR.
bool isOtehonMenuOpenFlag(int movie) const
Checks if the given hint movie was bought.
void onWorldDataFlag(int world, u8 flag)
Sets the specified flag(s) for the given world. See WORLD_COMPLETION_e.
void setKinopioCourseNo(int world, int level)
Sets the Toad rescue level for the given world.
u8 mEnemyPosIndex[WORLD_COUNT][AMBUSH_ENEMY_COUNT]
The path node for each map enemy.
u8 mKinopioCourseNo[WORLD_COUNT]
The Toad Rescue level for each world.
u8 mWorldCompletion[WORLD_COUNT]
The completion flags for each world. See WORLD_COMPLETION_e.
s8 mPlayerCoin[PLAYER_COUNT]
The coin count for each player.
void setCoin(int player, s8 coins)
Sets player 's coin count.
dMj2dGame_c()
Constructs the holder.
u8 mStartKinokoType[WORLD_COUNT]
The starting Toad House type for each world. See START_KINOKO_KIND_e.
int getTotalWorldCollectCoin(int world)
Gets the obtainable Star Coin count for the given world.
int getCreateItem(int player) const
Gets player 's createItem flag. See PLAYER_CREATE_ITEM_e.
u8 getKinopioCourseNo(int world) const
Gets the Toad rescue level for the given world.
static const u32 sDefaultCharacters[4]
The default character for each player.
s8 getCoin(int player) const
Gets player 's coin count.
void setCSEnemyWalkDir(int world, int enemy, u8 direction)
Sets the path direction for the given map enemy.
int getStaffCreditHighScore() const
Gets the staff credit high score.
u8 getIbaraNow() const
Gets the worldmap vine reshuffle counter.
#define SAVE_REVISION_MAJOR
The savegame's major revision number.
#define SUPER_GUIDE_DEATH_COUNT
The amount of deaths required for the Super Guide to show.
#define STARTING_LIVES_COUNT
The amount of starting lives.
#define STAR_COIN_COUNT
The amount of Star Coins per level.
#define SAVE_MAGIC
The savegame's magic.
#define AMBUSH_ENEMY_COUNT
The maximum amount of ambush enemies per world map.
#define MAX_STOCK_ITEM
The maximum inventory amount per item.
#define SAVE_REVISION_MINOR
The savegame's minor revision number.
@ CREATE_ITEM_STAR_POWER
Gives the player Star Power.
@ STAGE_RESCUE
When used, it loads the Toad Rescue level for the corresponding world.