CDemo Class Reference

The demo screen, showing a match between computer players. More...

#include <CDemo.h>

Inheritance diagram for CDemo:

Inheritance graph
[legend]
Collaboration diagram for CDemo:

Collaboration graph
[legend]

List of all members.

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?
CHurryMessagem_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?


Detailed Description

The demo screen, showing a match between computer players.

Constructor & Destructor Documentation

CDemo::CDemo ( void   ) 

Constructor. Initialize some members.

Here is the call graph for this function:

CDemo::~CDemo ( void   )  [virtual]

Destructor. Does nothing.


Member Function Documentation

void CDemo::CreateMainComponents ( void   )  [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void CDemo::CreateComputerPlayers ( void   )  [private]

void CDemo::CreateFont ( void   )  [private]

Here is the call graph for this function:

Here is the caller graph for this function:

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.

See also:
CDemo::SetOptions

For each player

  • This player is the computer

Play in a random level.

Set default start time (1:00 min.) and time up (35 sec.).

Here is the call graph for this function:

Here is the caller graph for this function:

void CDemo::DestroyComputerPlayers ( void   )  [private]

void CDemo::DestroyHurryUpMessage ( void   )  [private]

Here is the caller graph for this function:

void CDemo::DestroyMainComponents ( void   )  [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void CDemo::PlaySong ( void   )  [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void CDemo::StopSong ( void   )  [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void CDemo::ProcessPlayerCommands ( void   )  [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void CDemo::ManageExit ( void   )  [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void CDemo::UpdateMatch ( void   )  [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void CDemo::UpdateDemoText ( void   )  [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void CDemo::ManageHurryUpMessage ( void   )  [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void CDemo::ManageMatchOver ( void   )  [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void CDemo::DisplayDemoText ( void   )  [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void CDemo::DisplayMatchScreen ( void   )  [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void CDemo::DisplayHurryUpMessage ( void   )  [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void CDemo::SetDisplay ( CDisplay pDisplay  )  [inline, virtual]

Set link to the display object to use.

Reimplemented from CModeScreen.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

void CDemo::SetScores ( CScores pScores  )  [inline]

Set link to the scores object to use.

Here is the call graph for this function:

Here is the caller graph for this function:

void CDemo::SetTimer ( CTimer pTimer  )  [inline, virtual]

Set link to the timer object to use.

Reimplemented from CModeScreen.

Here is the call graph for this function:

Here is the caller graph for this function:

void CDemo::SetSound ( CSound pSound  )  [inline, virtual]

Set link to the sound object to use.

Reimplemented from CModeScreen.

Here is the call graph for this function:

Here is the caller graph for this function:

void CDemo::Create ( void   )  [virtual]

Initialize the object.

Reimplemented from CModeScreen.

Here is the call graph for this function:

void CDemo::Destroy ( void   )  [virtual]

Uninitialize the object.

Reimplemented from CModeScreen.

Here is the call graph for this function:

void CDemo::OpenInput ( void   )  [virtual]

Get access to the input this object needs.

Implements CModeScreen.

Here is the call graph for this function:

void CDemo::CloseInput ( void   )  [virtual]

Release access to the input this object needs.

Implements CModeScreen.

Here is the call graph for this function:

EGameMode CDemo::Update ( void   )  [virtual]

Update the object and return what game mode should be set.

Implements CModeScreen.

Here is the call graph for this function:

void CDemo::Display ( void   )  [virtual]

Display on the screen.

Implements CModeScreen.

Here is the call graph for this function:


Member Data Documentation

Our own customized options based on the real options.

Board object.

Clock object.

Arena object.

Computer brain.

bool CDemo::m_MatchOver [private]

Is match over? (ie. there is a result : winner or draw game).

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?

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?


The documentation for this class was generated from the following files:

Generated on Sat Oct 18 12:26:44 2008 for Bombermaaan by  doxygen 1.5.5
Visit the Bombermaaan project page
SourceForge.net Logo