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_AREAS 64 ///< The maximum number of areas per course file.
19
20#define MAX_LIVES 99 ///< The maximum life count.
21
22#define MAX_MAP_ACTOR_COUNT 1000 ///< The maximum number of map actors that can exist simultaneously.
23
24#define MAX_STOCK_ITEM 99 ///< The maximum inventory amount per item.
25
26#define MAX_EXTRA_MODE_SCORE 1000000 ///< The maximum possible score in Free Mode and Coin Battle.
27
28#define SAVE_SLOT_COUNT 3 ///< The total save slot count.
29
30#define SMALL_SCORE_COUNT 30 ///< The maximum number of small score popups visible simultaneously.
31
32#define STAR_COIN_COUNT 3 ///< The amount of Star Coins per level.
33
34#define STAR_COIN_MENU_LEVEL_COUNT 12 ///< The maximum number of levels in the Star Coins Menu.
35
36#define STARTING_LIVES_COUNT 5 ///< The amount of starting lives.
37
38#define SUPER_GUIDE_DEATH_COUNT 8 ///< The amount of deaths required for the Super Guide to show.
39
40#define WM_ENEMY_PATH_MAX_POINT_COUNT 64 ///< The maximum number of keypoints for world map enemy paths.
41
42#define WM_PATH_MAX_POINT_COUNT 32 ///< The maximum number of keypoints for generic world map paths.
43
44#define Z_POS_COUNT 30 ///< The number of Z positions inside a layer.
45
46enum DIRECTION_e {
47 DIR_UP,
48 DIR_DOWN,
49 DIR_LEFT,
50 DIR_RIGHT
51};
52
53enum DIRECTION_LR_e {
54 DIR_LR_R,
55 DIR_LR_L
56};
57
58enum LAYER_e {
59 LAYER_1,
60 LAYER_2,
61 LAYER_0,
62};
63
64enum PATH_DIRECTION_e {
65 PATH_DIR_NORMAL,
66 PATH_DIR_REVERSE,
67 PATH_DIR_INITIAL,
68};
69
70/// @brief The identifiers for each player type.
72 PLAYER_MARIO,
73 PLAYER_LUIGI,
74 PLAYER_YELLOW_TOAD,
75 PLAYER_BLUE_TOAD,
76 PLAYER_COUNT
77};
78
79/// @brief Various flags applied to the player on occasion.
81 CREATE_ITEM_NONE = BIT_FLAG(-1),
82 CREATE_ITEM_STAR_POWER = BIT_FLAG(0), ///< Gives the player Star Power.
83 CREATE_ITEM_YOSHI = BIT_FLAG(1), ///< Spawns a Yoshi along with the player.
84 CREATE_ITEM_BUBBLE = BIT_FLAG(2), ///< Spawns the player inside a bubble.
85 CREATE_ITEM_RESCUE_TOAD = BIT_FLAG(3) ///< Spawns a Rescue Toad instead of the regular player character.
86};
87
88/// @brief The identifiers for each powerup.
90 POWERUP_NONE,
91 POWERUP_MUSHROOM,
92 POWERUP_FIRE_FLOWER,
93 POWERUP_MINI_MUSHROOM,
94 POWERUP_PROPELLER_SHROOM,
95 POWERUP_PENGUIN_SUIT,
96 POWERUP_ICE_FLOWER,
97 POWERUP_COUNT
98};
99
100/// @brief The numbers corresponding to each level type.
102 STAGE_1,
103 STAGE_2,
104 STAGE_3,
105 STAGE_4,
106 STAGE_5,
107 STAGE_6,
108 STAGE_7,
109 STAGE_8,
110 STAGE_9,
111 STAGE_COIN_BATTLE = 19,
112 STAGE_GHOST_HOUSE,
113 STAGE_TOWER,
114 STAGE_TOWER_2, ///< @unused
115 STAGE_CASTLE,
116 STAGE_CASTLE_2, ///< @unused
117 STAGE_KINOKO_HOUSE,
118 STAGE_KINOKO_HOUSE_2,
119 STAGE_KINOKO_HOUSE_3,
120 STAGE_KINOKO_HOUSE_4,
121 STAGE_KINOKO_HOUSE_5,
122 STAGE_KINOKO_HOUSE_6,
123 STAGE_KINOKO_HOUSE_7,
124 STAGE_ENEMY,
125 STAGE_ENEMY_2,
126 STAGE_ENEMY_3,
127 STAGE_CANNON,
128 STAGE_TRSHIP,
129 STAGE_AIRSHIP,
130 STAGE_START_KINOKO_HOUSE, ///< The toad house on the starting node of each world.
131 STAGE_TITLE,
132 STAGE_PEACH_CASTLE,
133 STAGE_STAFFROLL,
134 STAGE_COUNT
135};
136
137/// @brief The numbers corresponding to each world.
139 WORLD_1,
140 WORLD_2,
141 WORLD_3,
142 WORLD_4,
143 WORLD_5,
144 WORLD_6,
145 WORLD_7,
146 WORLD_8,
147 WORLD_9,
148 WORLD_10, ///< @unused
149 WORLD_COUNT,
150
151 LAST_WORLD = WORLD_8,
152 LAST_SPECIAL_WORLD = WORLD_9,
153 NORMAL_WORLD_COUNT = LAST_WORLD + 1,
154 SPECIAL_WORLD_COUNT = LAST_SPECIAL_WORLD - LAST_WORLD,
155 WORLD_USED_COUNT = NORMAL_WORLD_COUNT + SPECIAL_WORLD_COUNT
156};
157
158/// @}
WORLD_e
The numbers corresponding to each world.
PLAYER_CREATE_ITEM_e
Various flags applied to the player on occasion.
PLAYER_TYPE_e
The identifiers for each player type.
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