RingRacers/src/g_state.h
Sally Coolatta f78b3f7794 Fixes for CEREMONY gamestate
- Made titlemap + ceremony code more straight-forward by being able to set gamestate in G_DoLoadLevel directly
- Demos are only recorded on GS_LEVEL (fixes crash for ceremony + titlemaps)
- Added G_GamestateUsesLevel to encapsulate all checks for using level rendering
- Added GS_CEREMONY to wipedefs
- K_PodiumSequence just checks for GS_CEREMONY now (optimization)

The game can now properly go to the podium after GP
2023-03-03 16:09:51 -05:00

73 lines
1.9 KiB
C

// SONIC ROBO BLAST 2
//-----------------------------------------------------------------------------
// Copyright (C) 1998-2000 by DooM Legacy Team.
// Copyright (C) 1999-2020 by Sonic Team Junior.
//
// This program is free software distributed under the
// terms of the GNU General Public License, version 2.
// See the 'LICENSE' file for more details.
//-----------------------------------------------------------------------------
/// \file g_state.h
/// \brief SRB2 game states
#ifndef __G_STATE__
#define __G_STATE__
#include "doomtype.h"
#ifdef __cplusplus
extern "C" {
#endif
// the current state of the game
typedef enum
{
GS_NULL = 0, // At beginning.
// Fadable gamestates
GS_LEVEL, // Playing, in a level.
GS_INTERMISSION, // Gazing at the intermission screen.
GS_VOTING, // SRB2Kart: MP voting screen
GS_CONTINUING, // continue screen
GS_TITLESCREEN, // title screen
GS_MENU, // SRB2Kart: menu-only (previously was GS_TIMEATTACK)
GS_CREDITS, // credit sequence
GS_EVALUATION, // Evaluation at the end of a game.
GS_GAMEEND, // game end sequence - "did you get all those chaos emeralds?"
GS_CEREMONY, // RR: Podium sequence
// Hardcoded fades or other fading methods
GS_INTRO, // introduction
GS_ENDING, // currently shared between bad and good endings
GS_CUTSCENE, // custom cutscene
// Not fadable
GS_DEDICATEDSERVER, // new state for dedicated server
GS_WAITINGPLAYERS // waiting for players in a net game
} gamestate_t;
typedef enum
{
ga_nothing,
ga_completed,
ga_worlddone,
ga_startcont,
ga_continued,
ga_startvote,
} gameaction_t;
extern gamestate_t gamestate;
extern boolean titlemapinaction;
extern UINT8 ultimatemode; // was sk_insane
extern gameaction_t gameaction;
void G_SetGamestate(gamestate_t newstate);
boolean G_GamestateUsesLevel(void);
#ifdef __cplusplus
} // extern "C"
#endif
#endif //__G_STATE__