 |
OpenXcom
1.0
Open-source clone of the original X-Com
|
19 #ifndef OPENXCOM_GAME_H
20 #define OPENXCOM_GAME_H
51 std::list<State*> _states, _deleted;
58 unsigned int _timeOfLastFrame;
59 int _timeUntilNextFrame;
60 static const double VOLUME_GRADIENT;
64 Game(
const std::string &title);
72 void setVolume(
int sound,
int music,
int ui);
COPYING:
Definition: BaseInfoState.cpp:41
FpsCounter * getFpsCounter() const
Gets the FpsCounter.
Definition: Game.cpp:387
Ruleset * getRuleset() const
Gets the currently loaded ruleset.
Definition: Game.cpp:520
void loadRuleset()
Loads a new ruleset for the game.
Definition: Game.cpp:528
void loadLanguage(const std::string &filename)
Loads a new language for the game.
Definition: Game.cpp:445
Screen * getScreen() const
Gets the game's display screen.
Definition: Game.cpp:369
Cursor * getCursor() const
Gets the game's cursor.
Definition: Game.cpp:378
SavedGame * getSavedGame() const
Gets the currently loaded saved game.
Definition: Game.cpp:501
~Game()
Cleans up all the game's resources and shuts down SDL.
Definition: Game.cpp:112
Mouse cursor that replaces the system cursor.
Definition: Cursor.h:35
void setState(State *state)
Resets the state stack to a new state.
Definition: Game.cpp:398
A display screen, handles rendering onto the game window.
Definition: Screen.h:41
Contains strings used throughout the game for localization.
Definition: Language.h:44
Language * getLanguage() const
Gets the currently loaded language.
Definition: Game.cpp:436
Game(const std::string &title)
Creates a new game and initializes SDL.
Definition: Game.cpp:53
static double volumeExponent(int volume)
Adjusts a linear volume level to an exponential one.
Definition: Game.cpp:361
void pushState(State *state)
Pushes a new state into the state stack.
Definition: Game.cpp:413
void setSavedGame(SavedGame *save)
Sets a new saved game for the game.
Definition: Game.cpp:510
void defaultLanguage()
Sets up the default language.
Definition: Game.cpp:593
Set of rules and stats for a game.
Definition: Ruleset.h:70
The game data that gets written to disk when the game is saved.
Definition: SavedGame.h:81
void run()
Starts the game's state machine.
Definition: Game.cpp:142
void setResourcePack(ResourcePack *res)
Sets a new resource pack for the game.
Definition: Game.cpp:491
void setVolume(int sound, int music, int ui)
Sets the game's audio volume.
Definition: Game.cpp:338
Counts the amount of frames each second and displays them in a NumberText surface.
Definition: FpsCounter.h:37
void popState()
Pops the last state from the state stack.
Definition: Game.cpp:425
Packs of external game media.
Definition: ResourcePack.h:51
void initAudio()
Sets up the audio.
Definition: Game.cpp:638
bool isState(State *state) const
Returns whether current state is the param state.
Definition: Game.cpp:575
void quit()
Quits the game.
Definition: Game.cpp:320
bool isQuitting() const
Returns whether the game is shutting down.
Definition: Game.cpp:584
A game state that receives user input and reacts accordingly.
Definition: State.h:45
ResourcePack * getResourcePack() const
Gets the currently loaded resource pack.
Definition: Game.cpp:482
The core of the game engine, manages the game's entire contents and structure.
Definition: Game.h:45
void setMouseActive(bool active)
Sets whether the mouse cursor is activated.
Definition: Game.cpp:564