Fix bitflags enum marathonmode_t for C++

This commit is contained in:
Eidolon 2026-03-15 15:58:50 -05:00
parent ef1c653e85
commit 3060f456d3
3 changed files with 8 additions and 10 deletions

View file

@ -1233,7 +1233,7 @@ void D_ClearState(void)
// In case someone exits out at the same time they start a time attack run,
// reset modeattacking
modeattacking = ATTACKING_NONE;
marathonmode = static_cast<marathonmode_t>(0);
marathonmode = 0;
// Reset GP and roundqueue
memset(&grandprixinfo, 0, sizeof(struct grandprixinfo));

View file

@ -64,13 +64,11 @@ extern UINT8 gamecomplete;
#define CUPMENU_ROWS 2
// Extra abilities/settings for skins (combinable stuff)
typedef enum
{
MA_RUNNING = 1, // In action
MA_INIT = 1<<1, // Initialisation
MA_NOCUTSCENES = 1<<2, // No cutscenes
MA_INGAME = 1<<3 // Timer ignores loads
} marathonmode_t;
typedef INT32 marathonmode_t;
#define MA_RUNNING (1) // In action
#define MA_INIT (1<<1) // Initialisation
#define MA_NOCUTSCENES (1<<2) // No cutscenes
#define MA_INGAME (1<<3) // Timer ignores loads
extern marathonmode_t marathonmode;
extern tic_t marathontime;

View file

@ -8997,7 +8997,7 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
if (marathonmode & MA_INGAME)
{
marathonmode = static_cast<marathonmode_t>(marathonmode | MA_INIT);
marathonmode |= MA_INIT;
}
}
else
@ -9100,7 +9100,7 @@ void P_PostLoadLevel(void)
if (marathonmode & MA_INGAME)
{
marathonmode = static_cast<marathonmode_t>(marathonmode & ~MA_INIT);
marathonmode &= ~MA_INIT;
}
Music_TuneReset(); // Placed before ACS scripts to allow remaps to occur on level start.