#ifndef GAMESTATE_H #define GAMESTATE_H /* ----------------------------------------------------------------------------- Class: GameState Desc: Holds game data that is not saved between sessions. Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. Chris Danford ----------------------------------------------------------------------------- */ #include "GameConstantsAndTypes.h" #include "PlayerOptions.h" #include "SongOptions.h" #include "Game.h" #include "Style.h" #include "Grade.h" #include "StageStats.h" class Song; struct Notes; class Course; class GameDef; class StyleDef; class GameState { public: GameState(); ~GameState(); void Reset(); void ResetLastRanking(); // // Main State Info // Game m_CurGame; Style m_CurStyle; bool m_bPlayersCanJoin; // true if it's not too late for a player to join - this only has an effect on the credits message bool m_bSideIsJoined[NUM_PLAYERS]; // left side, right side int m_iCoins; // not "credits" PlayerNumber m_MasterPlayerNumber; // used in Styles where one player controls both sides bool m_bIsOnSystemMenu; // system screens will not be effected by the operator key -- Miryokuteki int GetNumSidesJoined() { int iNumSidesJoined = 0; for( int c=0; c m_vPassedStageStats; // Only useful in Arcade for final evaluation // A song is only inserted here if at least one player passed. // StageStats are added by the Evaluation screen void GetFinalEvalStatsAndSongs( StageStats& statsOut, vector& vSongsOut ); // shown on arcade final evaluation PlayerOptions m_PlayerOptions[NUM_PLAYERS]; // The currently active options PlayerOptions m_SelectedOptions[NUM_PLAYERS]; // Keep track of player-selected options for // courses separately from the active options. SongOptions m_SongOptions; bool HasEarnedExtraStage(); bool m_bAllow2ndExtraStage; //only used when "Allow Selection of Extra Stage is on" // Filled in by ScreenNameEntry and used by ScreenRanking to flash the recent high scores NotesType m_LastRankingNotesType; // meaningless if a course was played RankingCategory m_LastRankingCategory[NUM_PLAYERS]; // meaningless if a course was played Course* m_pLastPlayedCourse; // meaningless if arcade was played int m_iLastRankingIndex[NUM_PLAYERS]; // -1 if no new high score }; extern GameState* GAMESTATE; // global and accessable from anywhere in our program #endif