NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
game_constants.h
Go to the documentation of this file.
1#pragma once
2#include <types.h>
3
4/// @file
5// Please place the defines/enums in alphabetical order!
6
7/// @addtogroup constants
8/// @{
9
10#define AMBUSH_ENEMY_COUNT 4 ///< The maximum amount of ambush enemies per world map.
11
12#define CHECKPOINT_COUNT 2 ///< The maximum number of checkpoints supported.
13
14#define COURSE_FILE_COUNT 4 ///< The number of files in a course.
15
16#define HINT_MOVIE_COUNT 70 ///< The total hint movie count.
17
18#define MAX_LIVES 99 ///< The maximum life count.
19
20#define MAX_STOCK_ITEM 99 ///< The maximum inventory amount per item.
21
22#define MAX_EXTRA_MODE_SCORE 1000000 ///< The maximum possible score in Free Mode and Coin Battle.
23
24#define SAVE_SLOT_COUNT 3 ///< The total save slot count.
25
26#define SMALL_SCORE_COUNT 30 ///< The maximum number of small score popups visible simultaneously.
27
28#define STAR_COIN_COUNT 3 ///< The amount of Star Coins per level.
29
30#define STARTING_LIVES_COUNT 5 ///< The amount of starting lives.
31
32#define SUPER_GUIDE_DEATH_COUNT 8 ///< The amount of deaths required for the Super Guide to show.
33
34#define WM_ENEMY_PATH_MAX_POINT_COUNT 64 ///< The maximum number of keypoints for world map enemy paths.
35
36#define WM_PATH_MAX_POINT_COUNT 32 ///< The maximum number of keypoints for generic world map paths.
37
38enum DIRECTION_e {
39 DIR_UP,
40 DIR_DOWN,
41 DIR_LEFT,
42 DIR_RIGHT
43};
44
45enum PATH_DIRECTION_e {
46 PATH_DIR_NORMAL,
47 PATH_DIR_REVERSE,
48 PATH_DIR_INITIAL,
49};
50
51/// @brief The identifiers for each character.
53 PLAYER_MARIO,
54 PLAYER_LUIGI,
55 PLAYER_YELLOW_TOAD,
56 PLAYER_BLUE_TOAD,
57 PLAYER_COUNT
58};
59
60/// @brief Various flags applied to the player on occasion.
62 CREATE_ITEM_NONE = BIT_FLAG(-1),
63 CREATE_ITEM_STAR_POWER = BIT_FLAG(0), ///< Gives the player Star Power.
64 CREATE_ITEM_YOSHI = BIT_FLAG(1), ///< Spawns a Yoshi along with the player.
65 CREATE_ITEM_BUBBLE = BIT_FLAG(2), ///< Spawns the player inside a bubble.
66 CREATE_ITEM_RESCUE_TOAD = BIT_FLAG(3) ///< Spawns a Rescue Toad instead of the regular player character.
67};
68
69/// @brief The identifiers for each powerup.
71 POWERUP_NONE,
72 POWERUP_MUSHROOM,
73 POWERUP_FIRE_FLOWER,
74 POWERUP_MINI_MUSHROOM,
75 POWERUP_PROPELLER_SHROOM,
76 POWERUP_PENGUIN_SUIT,
77 POWERUP_ICE_FLOWER,
78 POWERUP_COUNT
79};
80
81/// @brief The numbers corresponding to each level type.
82enum STAGE_e {
83 STAGE_1,
84 STAGE_2,
85 STAGE_3,
86 STAGE_4,
87 STAGE_5,
88 STAGE_6,
89 STAGE_7,
90 STAGE_8,
91 STAGE_9,
92 STAGE_COIN_BATTLE = 19,
93 STAGE_GHOST_HOUSE,
94 STAGE_TOWER,
95 STAGE_TOWER_2, ///< @unused
96 STAGE_CASTLE,
97 STAGE_CASTLE_2, ///< @unused
98 STAGE_KINOKO_HOUSE,
99 STAGE_KINOKO_HOUSE_2,
100 STAGE_KINOKO_HOUSE_3,
101 STAGE_KINOKO_HOUSE_4,
102 STAGE_KINOKO_HOUSE_5,
103 STAGE_KINOKO_HOUSE_6,
104 STAGE_KINOKO_HOUSE_7,
105 STAGE_ENEMY,
106 STAGE_ENEMY_2,
107 STAGE_ENEMY_3,
108 STAGE_CANNON,
109 STAGE_UNK37,
110 STAGE_DOOMSHIP,
111 STAGE_START_KINOKO_HOUSE, ///< The toad house on the starting node of each world.
112 STAGE_TITLE,
113 STAGE_PEACH_CASTLE,
114 STAGE_STAFFROLL,
115 STAGE_COUNT
116};
117
118/// @brief The numbers corresponding to each world.
120 WORLD_1,
121 WORLD_2,
122 WORLD_3,
123 WORLD_4,
124 WORLD_5,
125 WORLD_6,
126 WORLD_7,
127 WORLD_8,
128 WORLD_9,
129 WORLD_10, ///< @unused
130 WORLD_COUNT,
131
132 LAST_WORLD = WORLD_8,
133 LAST_SPECIAL_WORLD = WORLD_9,
134 NORMAL_WORLD_COUNT = LAST_WORLD + 1,
135 SPECIAL_WORLD_COUNT = LAST_SPECIAL_WORLD - LAST_WORLD,
136 WORLD_USED_COUNT = NORMAL_WORLD_COUNT + SPECIAL_WORLD_COUNT
137};
138
139/// @}
WORLD_e
The numbers corresponding to each world.
PLAYER_CHARACTER_e
The identifiers for each character.
PLAYER_CREATE_ITEM_e
Various flags applied to the player on occasion.
PLAYER_POWERUP_e
The identifiers for each powerup.
STAGE_e
The numbers corresponding to each level type.
@ WORLD_10
@ CREATE_ITEM_RESCUE_TOAD
Spawns a Rescue Toad instead of the regular player character.
@ CREATE_ITEM_BUBBLE
Spawns the player inside a bubble.
@ CREATE_ITEM_YOSHI
Spawns a Yoshi along with the player.
@ CREATE_ITEM_STAR_POWER
Gives the player Star Power.
@ STAGE_START_KINOKO_HOUSE
The toad house on the starting node of each world.
@ STAGE_CASTLE_2
@ STAGE_TOWER_2