GameClient Class Reference

#include <game_client.h>

Inherits Game.

Inheritance diagram for GameClient:

Inheritance graph
[legend]
Collaboration diagram for GameClient:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GameClient (void)
virtual ~GameClient (void)
GameGUIgetGUI ()
virtual void run ()
CameragetCamera ()
virtual void init ()
 Init data structures for game.
virtual void clean ()
 Clean data structures for game.
PlayergetClientPlayer ()
 Return player controled by this client.

Private Member Functions

 GameClient (GameClient &copy)
 Program killer - trap.

Private Attributes

GameGUI mGUI
CameramActualCamera
 actual view, it can be one of tracers
Tracer mTankTracer

Detailed Description

Definition at line 12 of file game_client.h.


Constructor & Destructor Documentation

GameClient::GameClient void   ) 
 

Definition at line 18 of file game_client.cpp.

References TIN.

GameClient::~GameClient void   )  [virtual]
 

Definition at line 24 of file game_client.cpp.

References TIN.

GameClient::GameClient GameClient copy  )  [private]
 

Program killer - trap.

From security reasons we don't allow anyone to create copy of GameClient since it is probably a mistake. Anyway calling this constructor will kill program.

Parameters:
copy not used

Definition at line 29 of file game_client.cpp.

References DIE(), LOGE, and TIN.

Here is the call graph for this function:


Member Function Documentation

void GameClient::clean  )  [virtual]
 

Clean data structures for game.

It mean for examlpe unloading textures and models... This function shouls clean players vector. So don't forget to call it in derived classes.

Reimplemented from Game.

Definition at line 108 of file game_client.cpp.

References Game::clean(), GameGUI::clean(), and mGUI.

Referenced by ApplicationClient::run().

Here is the call graph for this function:

Camera * GameClient::getCamera  ) 
 

Definition at line 120 of file game_client.cpp.

References getAppClient(), ApplicationClient::getGFX(), GFX::getHeight(), GFX::getWidth(), mActualCamera, and Camera::setPerspective().

Referenced by LayerGame::initRefs().

Here is the call graph for this function:

Player * GameClient::getClientPlayer  ) 
 

Return player controled by this client.

Returns:
player for this client. Allways != 0

Definition at line 115 of file game_client.cpp.

GameGUI & GameClient::getGUI  ) 
 

Definition at line 46 of file game_client.cpp.

References mGUI.

Referenced by LayerGUI::render().

void GameClient::init  )  [virtual]
 

Init data structures for game.

This is for example loading some textures, models, registering to input manager,...

Implements Game.

Definition at line 103 of file game_client.cpp.

References GameGUI::init(), and mGUI.

Referenced by ApplicationClient::run().

Here is the call graph for this function:

void GameClient::run  )  [virtual]
 

Start the game.

Implements Game.

Definition at line 52 of file game_client.cpp.

References TaskManager::add(), InputManager::checkSDLEvents(), TaskManager::cleanTasks(), getAppClient(), ApplicationClient::getCommander(), ApplicationClient::getInputManager(), World::getLandscape(), Game::getTaskManager(), Landscape::getTerrain(), Game::getWorld(), Terrain::initClient(), TaskManager::initTasks(), Game::mEndFun, Game::mTaskManager, Commander::processAllCommands(), InputManager::processKeys(), Game::recreateWorld(), TaskManager::remove(), Thread::reshedule(), TIN, TPOINTS, and TaskManager::update().

Referenced by ApplicationClient::run().

Here is the call graph for this function:


Member Data Documentation

Camera* GameClient::mActualCamera [private]
 

actual view, it can be one of tracers

Definition at line 62 of file game_client.h.

Referenced by getCamera().

GameGUI GameClient::mGUI [private]
 

Definition at line 60 of file game_client.h.

Referenced by clean(), getGUI(), and init().

Tracer GameClient::mTankTracer [private]
 

Definition at line 66 of file game_client.h.


The documentation for this class was generated from the following files:
Generated on Wed Apr 12 14:15:44 2006 for bjs by  doxygen 1.4.5