#include <CDemo.h>
Public Member Functions | |
CDemo () | |
Constructor. Initialize some members. | |
virtual | ~CDemo () |
Destructor. Does nothing. | |
void | SetDisplay (CDisplay *pDisplay) |
Set link to the display object to use. | |
void | SetOptions (COptions *pOptions) |
Set link to the options object to use. | |
void | SetScores (CScores *pScores) |
Set link to the scores object to use. | |
void | SetTimer (CTimer *pTimer) |
Set link to the timer object to use. | |
void | SetSound (CSound *pSound) |
Set link to the sound object to use. | |
void | Create (void) |
Initialize the object. | |
void | Destroy (void) |
Uninitialize the object. | |
void | OpenInput (void) |
Get access to the input this object needs. | |
void | CloseInput (void) |
Release access to the input this object needs. | |
EGameMode | Update (void) |
Update the object and return what game mode should be set. | |
void | Display (void) |
Display on the screen. | |
Private Member Functions | |
void | CreateMainComponents (void) |
void | CreateComputerPlayers (void) |
void | CreateFont (void) |
void | SetupOptions (void) |
Modify the options to suit the demo mode. | |
void | DestroyComputerPlayers (void) |
void | DestroyHurryUpMessage (void) |
void | DestroyMainComponents (void) |
void | PlaySong (void) |
void | StopSong (void) |
void | ProcessPlayerCommands (void) |
void | ManageExit (void) |
void | UpdateMatch (void) |
void | UpdateDemoText (void) |
void | ManageHurryUpMessage (void) |
void | ManageMatchOver (void) |
void | DisplayDemoText (void) |
void | DisplayMatchScreen (void) |
void | DisplayHurryUpMessage (void) |
Private Attributes | |
COptions | m_Options |
Our own customized options based on the real options. | |
CBoard | m_Board |
Board object. | |
CClock | m_Clock |
Clock object. | |
CArena | m_Arena |
Arena object. | |
CAiManager | m_AiManager |
Computer brain. | |
bool | m_MatchOver |
Is match over? (ie. there is a result : winner or draw game). | |
ESong | m_CurrentSong |
Current song being played. | |
bool | m_IsSongPlaying |
Is the match song playing? | |
bool | m_NoticedTimeUp |
Did we notice that time is up and do what is necessary? | |
CHurryMessage * | m_pHurryMessage |
Hurry up message object, instanciated when the arena starts to close. | |
CFont | m_Font |
Font object needed to draw the DEMO text on the screen. | |
float | m_DemoTextTime |
Time we have spent drawing (or not) the demo text. | |
bool | m_DrawDemoText |
Do we currently need to draw the demo text or not draw it? | |
float | m_ModeTime |
Time (in seconds) that elapsed since the mode has started. | |
float | m_ExitModeTime |
Mode time when we have to start the last black screen. | |
int | m_ExitGameMode |
Game mode to ask for when exiting. | |
bool | m_HaveToExit |
Do we have to exit this mode? |
CDemo::CDemo | ( | void | ) |
Constructor. Initialize some members.
CDemo::~CDemo | ( | void | ) | [virtual] |
Destructor. Does nothing.
void CDemo::CreateMainComponents | ( | void | ) | [private] |
void CDemo::CreateComputerPlayers | ( | void | ) | [private] |
void CDemo::CreateFont | ( | void | ) | [private] |
void CDemo::SetupOptions | ( | void | ) | [private] |
Modify the options to suit the demo mode.
We are working on a copy of the game options, so we can the settings without influencing the game options.
For each player
Play in a random level.
Set default start time (1:00 min.) and time up (35 sec.).
void CDemo::DestroyComputerPlayers | ( | void | ) | [private] |
void CDemo::DestroyHurryUpMessage | ( | void | ) | [private] |
void CDemo::DestroyMainComponents | ( | void | ) | [private] |
void CDemo::PlaySong | ( | void | ) | [private] |
void CDemo::StopSong | ( | void | ) | [private] |
void CDemo::ProcessPlayerCommands | ( | void | ) | [private] |
void CDemo::ManageExit | ( | void | ) | [private] |
void CDemo::UpdateMatch | ( | void | ) | [private] |
void CDemo::UpdateDemoText | ( | void | ) | [private] |
void CDemo::ManageHurryUpMessage | ( | void | ) | [private] |
void CDemo::ManageMatchOver | ( | void | ) | [private] |
void CDemo::DisplayDemoText | ( | void | ) | [private] |
void CDemo::DisplayMatchScreen | ( | void | ) | [private] |
void CDemo::DisplayHurryUpMessage | ( | void | ) | [private] |
void CDemo::SetDisplay | ( | CDisplay * | pDisplay | ) | [inline, virtual] |
Set link to the display object to use.
Reimplemented from CModeScreen.
void CDemo::SetOptions | ( | COptions * | pOptions | ) | [inline, virtual] |
Set link to the options object to use.
Make a copy of the options object. This copy will be customized to suit our needs.
Give the objects of the demo match this copy of the options object.
Reimplemented from CModeScreen.
void CDemo::SetScores | ( | CScores * | pScores | ) | [inline] |
Set link to the scores object to use.
void CDemo::SetTimer | ( | CTimer * | pTimer | ) | [inline, virtual] |
Set link to the timer object to use.
Reimplemented from CModeScreen.
void CDemo::SetSound | ( | CSound * | pSound | ) | [inline, virtual] |
Set link to the sound object to use.
Reimplemented from CModeScreen.
void CDemo::Create | ( | void | ) | [virtual] |
void CDemo::Destroy | ( | void | ) | [virtual] |
void CDemo::OpenInput | ( | void | ) | [virtual] |
Get access to the input this object needs.
Implements CModeScreen.
void CDemo::CloseInput | ( | void | ) | [virtual] |
Release access to the input this object needs.
Implements CModeScreen.
EGameMode CDemo::Update | ( | void | ) | [virtual] |
Update the object and return what game mode should be set.
Implements CModeScreen.
void CDemo::Display | ( | void | ) | [virtual] |
COptions CDemo::m_Options [private] |
Our own customized options based on the real options.
CBoard CDemo::m_Board [private] |
Board object.
CClock CDemo::m_Clock [private] |
Clock object.
CArena CDemo::m_Arena [private] |
Arena object.
CAiManager CDemo::m_AiManager [private] |
Computer brain.
bool CDemo::m_MatchOver [private] |
Is match over? (ie. there is a result : winner or draw game).
ESong CDemo::m_CurrentSong [private] |
Current song being played.
bool CDemo::m_IsSongPlaying [private] |
Is the match song playing?
bool CDemo::m_NoticedTimeUp [private] |
Did we notice that time is up and do what is necessary?
CHurryMessage* CDemo::m_pHurryMessage [private] |
Hurry up message object, instanciated when the arena starts to close.
CFont CDemo::m_Font [private] |
Font object needed to draw the DEMO text on the screen.
float CDemo::m_DemoTextTime [private] |
Time we have spent drawing (or not) the demo text.
bool CDemo::m_DrawDemoText [private] |
Do we currently need to draw the demo text or not draw it?
float CDemo::m_ModeTime [private] |
Time (in seconds) that elapsed since the mode has started.
float CDemo::m_ExitModeTime [private] |
Mode time when we have to start the last black screen.
int CDemo::m_ExitGameMode [private] |
Game mode to ask for when exiting.
bool CDemo::m_HaveToExit [private] |
Do we have to exit this mode?