mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-11-24 22:34:21 +03:00
Use enums for swngame
This replaces the swngame int variable with a named enum and enforces strict typechecking on it. Strict typechecking is okay here as the swngame variable is not part of the API surface of the game in any way and is completely internal. And just to make things clear, I've added a SWN_NONE enum to use for initialization, because previously it was being initialized to 0, even though 0 was the Gravitron.
This commit is contained in:
1 parent
414b0647aa
commit
14d034e4c6
8 files changed
+66
-44
No files matched your search
@@ -117,6 +117,21 @@ enum SLIDERMODE
|
||||
SLIDER_SOUNDVOLUME
|
||||
};
|
||||
|
||||
/* enums for swngame variable */
|
||||
enum SWNMODE
|
||||
{
|
||||
SWN_GRAVITRON,
|
||||
SWN_SUPERGRAVITRON,
|
||||
SWN_START_GRAVITRON_STEP_3,
|
||||
SWN_START_GRAVITRON_STEP_2,
|
||||
SWN_START_GRAVITRON_STEP_1,
|
||||
SWN_FINISH_GRAVITRON_STEP_1,
|
||||
SWN_START_SUPERGRAVITRON_STEP_1,
|
||||
SWN_START_SUPERGRAVITRON_STEP_2,
|
||||
SWN_FINISH_GRAVITRON_STEP_2,
|
||||
SWN_NONE
|
||||
};
|
||||
|
||||
struct MenuStackFrame
|
||||
{
|
||||
int option;
|
||||
@@ -334,7 +349,8 @@ public:
|
||||
|
||||
//Sine Wave Ninja Minigame
|
||||
bool swnmode;
|
||||
int swngame, swnstate, swnstate2, swnstate3, swnstate4, swndelay, swndeaths;
|
||||
enum SWNMODE swngame;
|
||||
int swnstate, swnstate2, swnstate3, swnstate4, swndelay, swndeaths;
|
||||
int swntimer, swncolstate, swncoldelay;
|
||||
int swnrecord, swnbestrank, swnrank, swnmessage;
|
||||
|
||||
|
||||
Reference in new issue
Block a user