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