19#ifndef STATE_MANAGER_HPP
20#define STATE_MANAGER_HPP
30#include "config/player_profile.hpp"
31#include "guiengine/abstract_state_manager.hpp"
32#include "utils/ptr_vector.hpp"
62 void updateActivePlayerIDs();
91 unsigned int m_magic_number;
101 return (m_magic_number == 0xAC1EF1AE);
109 assert(m_magic_number == 0xAC1EF1AE);
119 assert(m_magic_number == 0xAC1EF1AE);
134 assert(m_magic_number == 0xAC1EF1AE);
145 assert(m_magic_number == 0xAC1EF1AE);
158 assert(m_magic_number == 0xAC1EF1AE);
168 assert(m_magic_number == 0xAC1EF1AE);
178 ActivePlayer* getActivePlayer(
const int id);
186 void removeActivePlayer(
int id);
188 unsigned int activePlayerCount();
189 void resetActivePlayers();
205 static void deallocate();
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:62
Abstract base class you must override from to use the GUI engine.
Definition: abstract_state_manager.hpp:54
std::vector< std::pair< std::string, Screen * > > m_menu_stack
This stack will contain menu names (e.g.
Definition: abstract_state_manager.hpp:65
Class for managing player profiles (name, usage frequency, etc.).
Definition: player_profile.hpp:54
Definition: ptr_vector.hpp:44
Represents a player that is currently playing.
Definition: state_manager.hpp:76
int getID() const
ID of this player within the list of active players.
Definition: state_manager.hpp:131
void setKart(AbstractKart *kart)
Sets the kart for this player.
Definition: state_manager.hpp:155
AbstractKart * getKart()
Definition: state_manager.hpp:165
void setPlayerProfile(PlayerProfile *player)
Call to change the identity of this player (useful when player is selecting his identity)
Definition: state_manager.cpp:289
PlayerProfile * getProfile()
Definition: state_manager.hpp:106
InputDevice * getDevice() const
Definition: state_manager.hpp:142
int m_id
ID of this player within the list of active players.
Definition: state_manager.hpp:86
AbstractKart * m_kart
Pointer to the kart of this player, only valid during the game.
Definition: state_manager.hpp:83
const PlayerProfile * getConstProfile() const
Definition: state_manager.hpp:116
A concrete scene manager, derived from GUIEngine's AbastractSceneManager.
Definition: state_manager.hpp:60
void escapePressed()
implementing callback from base class AbstractStateManager
Definition: state_manager.cpp:156
virtual void onGameStateChange(GUIEngine::GameState new_state)
implementing callback from base class AbstractStateManager
Definition: state_manager.cpp:195
virtual void onTopMostScreenChanged()
implementing callback from base class AbstractStateManager
Definition: state_manager.cpp:226
PtrVector< ActivePlayer, HOLD > m_active_players
A list of all currently playing players.
Definition: state_manager.hpp:212
virtual void onStackEmptied()
implementing callback from base class AbstractStateManager
Definition: state_manager.cpp:250
const PlayerProfile * getActivePlayerProfile(const int id)
Definition: state_manager.cpp:93
GameState
Definition: abstract_state_manager.hpp:41
static const int PLAYER_ID_GAME_MASTER
the player ID of the "game master" player the game master is the player that can perform the game set...
Definition: state_manager.hpp:52
Contains all GUI engine related classes and functions.
Definition: abstract_state_manager.hpp:33