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 STARTING_LIVES_COUNT 5 ///< The amount of starting lives.
35
36#define SUPER_GUIDE_DEATH_COUNT 8 ///< The amount of deaths required for the Super Guide to show.
37
38#define WM_ENEMY_PATH_MAX_POINT_COUNT 64 ///< The maximum number of keypoints for world map enemy paths.
39
40#define WM_PATH_MAX_POINT_COUNT 32 ///< The maximum number of keypoints for generic world map paths.
41
42#define Z_POS_COUNT 30 ///< The number of Z positions inside a layer.
43
44enum DIRECTION_e {
45 DIR_UP,
46 DIR_DOWN,
47 DIR_LEFT,
48 DIR_RIGHT
49};
50
51enum LAYER_e {
52 LAYER_1,
53 LAYER_2,
54 LAYER_0,
55};
56
57enum PATH_DIRECTION_e {
58 PATH_DIR_NORMAL,
59 PATH_DIR_REVERSE,
60 PATH_DIR_INITIAL,
61};
62
63/// @brief The identifiers for each player type.
65 PLAYER_MARIO,
66 PLAYER_LUIGI,
67 PLAYER_YELLOW_TOAD,
68 PLAYER_BLUE_TOAD,
69 PLAYER_COUNT
70};
71
72/// @brief Various flags applied to the player on occasion.
74 CREATE_ITEM_NONE = BIT_FLAG(-1),
75 CREATE_ITEM_STAR_POWER = BIT_FLAG(0), ///< Gives the player Star Power.
76 CREATE_ITEM_YOSHI = BIT_FLAG(1), ///< Spawns a Yoshi along with the player.
77 CREATE_ITEM_BUBBLE = BIT_FLAG(2), ///< Spawns the player inside a bubble.
78 CREATE_ITEM_RESCUE_TOAD = BIT_FLAG(3) ///< Spawns a Rescue Toad instead of the regular player character.
79};
80
81/// @brief The identifiers for each powerup.
83 POWERUP_NONE,
84 POWERUP_MUSHROOM,
85 POWERUP_FIRE_FLOWER,
86 POWERUP_MINI_MUSHROOM,
87 POWERUP_PROPELLER_SHROOM,
88 POWERUP_PENGUIN_SUIT,
89 POWERUP_ICE_FLOWER,
90 POWERUP_COUNT
91};
92
93/// @brief The numbers corresponding to each level type.
94enum STAGE_e {
95 STAGE_1,
96 STAGE_2,
97 STAGE_3,
98 STAGE_4,
99 STAGE_5,
100 STAGE_6,
101 STAGE_7,
102 STAGE_8,
103 STAGE_9,
104 STAGE_COIN_BATTLE = 19,
105 STAGE_GHOST_HOUSE,
106 STAGE_TOWER,
107 STAGE_TOWER_2, ///< @unused
108 STAGE_CASTLE,
109 STAGE_CASTLE_2, ///< @unused
110 STAGE_KINOKO_HOUSE,
111 STAGE_KINOKO_HOUSE_2,
112 STAGE_KINOKO_HOUSE_3,
113 STAGE_KINOKO_HOUSE_4,
114 STAGE_KINOKO_HOUSE_5,
115 STAGE_KINOKO_HOUSE_6,
116 STAGE_KINOKO_HOUSE_7,
117 STAGE_ENEMY,
118 STAGE_ENEMY_2,
119 STAGE_ENEMY_3,
120 STAGE_CANNON,
121 STAGE_UNK37,
122 STAGE_DOOMSHIP,
123 STAGE_START_KINOKO_HOUSE, ///< The toad house on the starting node of each world.
124 STAGE_TITLE,
125 STAGE_PEACH_CASTLE,
126 STAGE_STAFFROLL,
127 STAGE_COUNT
128};
129
130/// @brief The numbers corresponding to each world.
132 WORLD_1,
133 WORLD_2,
134 WORLD_3,
135 WORLD_4,
136 WORLD_5,
137 WORLD_6,
138 WORLD_7,
139 WORLD_8,
140 WORLD_9,
141 WORLD_10, ///< @unused
142 WORLD_COUNT,
143
144 LAST_WORLD = WORLD_8,
145 LAST_SPECIAL_WORLD = WORLD_9,
146 NORMAL_WORLD_COUNT = LAST_WORLD + 1,
147 SPECIAL_WORLD_COUNT = LAST_SPECIAL_WORLD - LAST_WORLD,
148 WORLD_USED_COUNT = NORMAL_WORLD_COUNT + SPECIAL_WORLD_COUNT
149};
150
151/// @}
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