mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +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:
@@ -1762,7 +1762,7 @@ void entityclass::createentity(int xp, int yp, int t, int meta1, int meta2, int
|
||||
entity.colour = 21;
|
||||
entity.tile = 78; //default case
|
||||
entity.animate = 1;
|
||||
if (game.swngame == 1)
|
||||
if (game.swngame == SWN_SUPERGRAVITRON)
|
||||
{
|
||||
//set colour based on current state
|
||||
entity.colour = swncolour(game.swncolstate);
|
||||
|
||||
Reference in New Issue
Block a user