- exported gamestate variable and forced it to 32 bit internally.

- forced gameaction_t to 32 bit to avoid problems with undefined size issues.
This commit is contained in:
Christoph Oelckers 2017-02-23 19:29:43 +01:00
parent 65c4653f59
commit fc101049c6
4 changed files with 20 additions and 5 deletions

View file

@ -55,7 +55,7 @@ struct event_t
};
typedef enum
enum gameaction_t : int
{
ga_nothing,
ga_loadlevel,
@ -75,7 +75,7 @@ typedef enum
ga_screenshot,
ga_togglemap,
ga_fullconsole,
} gameaction_t;
};

View file

@ -64,7 +64,7 @@ typedef enum
// The current state of the game: whether we are
// playing, gazing at the intermission screen,
// the game final animation, or a demo.
typedef enum
enum gamestate_t : int
{
GS_LEVEL,
GS_INTERMISSION,
@ -79,7 +79,7 @@ typedef enum
GS_FORCEWIPEFADE = -2,
GS_FORCEWIPEBURN = -3,
GS_FORCEWIPEMELT = -4
} gamestate_t;
};
extern gamestate_t gamestate;

View file

@ -851,7 +851,10 @@ void InitThingdef()
fieldptr = new PField("playeringame", parray, VARF_Native | VARF_Static | VARF_ReadOnly, (intptr_t)&playeringame);
Namespaces.GlobalNamespace->Symbols.AddSymbol(fieldptr);
fieldptr = new PField("gameaction", TypeUInt8, VARF_Native | VARF_Static, (intptr_t)&gameaction);
fieldptr = new PField("gameaction", TypeUInt32, VARF_Native | VARF_Static, (intptr_t)&gameaction);
Namespaces.GlobalNamespace->Symbols.AddSymbol(fieldptr);
fieldptr = new PField("gamestate", TypeSInt32, VARF_Native | VARF_Static | VARF_ReadOnly, (intptr_t)&gamestate);
Namespaces.GlobalNamespace->Symbols.AddSymbol(fieldptr);
fieldptr = new PField("skyflatnum", TypeTextureID, VARF_Native | VARF_Static | VARF_ReadOnly, (intptr_t)&skyflatnum);

View file

@ -1029,6 +1029,18 @@ enum PaletteFlashFlags
PF_HAZARD = 8,
};
enum EGameState
{
GS_LEVEL,
GS_INTERMISSION,
GS_FINALE,
GS_DEMOSCREEN,
GS_FULLCONSOLE,
GS_HIDECONSOLE,
GS_STARTUP,
GS_TITLELEVEL,
}
enum EGameAction
{
ga_nothing,