Main Page   Class Hierarchy   Compound List   File List   Compound Members  

GameEngine Class Reference

Controls the behavior of the game. More...

#include <gameengine.h>

Collaboration diagram for GameEngine:

Collaboration graph
[legend]
List of all members.

Public Methods

 GameEngine (Graphics &g, NetManagerClient &n, Sound &s, string const &name, char color, char race)
void run ()
 ~GameEngine ()

Private Types

enum  gameState { PLAY, TRADE, MENU }

Private Methods

void processInput ()
void processMessage (string msg)
void processMoving (Player &CPlayer, int oldX, int oldY)
void processUpKey ()
void processDownKey ()
void processRightKey ()
void processLeftKey ()
void processActionKey ()
void processMenuKey ()
void processAccessKey ()
void processChatKey (const SDL_keysym &key)
 Processes the chat input. More...

void processDropKey ()
void processInvScrollUpKey ()
void processInvScrollDownKey ()
void processHelpKey ()
void processDebugKey ()
string buildMessagea (int p, int x, int y, int d) const
string buildMessageb (int p, Resource r, int x, int y, int n) const
string buildMessagec (int p, int x, int y) const
string buildMessagef (int p, BuildingType t, int x, int y) const
string buildMessageg (int p, Resource r, int a, int x, int y) const
string buildMessagem (int p)
string buildMessageq (int p) const
string buildMessager () const
string buildMessages () const
string buildMessagex () const
bool processMessageA (string c)
bool processMessageB (string c)
bool processMessageC (string c)
bool processMessageD (string c)
bool processMessageE (string c)
bool processMessageF (string c)
bool processMessageG (string c)
bool processMessageI (string c)
bool processMessageM (string c)
bool processMessageR (string c)
bool processMessageS (string c)
bool processMessageU (string c)
bool processMessageT (string c)
 Processes the chat message.

bool processMessageO ()
 Processes the server timeout message.

bool processMessageX (string c)
void printDebugInfo ()
 Custom method used to print out debugging info as required, when F12 is pressed. More...


Private Attributes

Graphicsgraphics
NetManagerClientnetworking
Sound & sound
World world
bool quitProgram
gameState currentState
Menu gameOptionsMenu
InfoMenu helpMenu
MenucurrentMenu
bool chatting
string typedMessage
bool serverAcknowledged

Detailed Description

Controls the behavior of the game.


Member Function Documentation

void GameEngine::printDebugInfo   [private]
 

Custom method used to print out debugging info as required, when F12 is pressed.

Feel free to add/remove stuff from here as desired.

void GameEngine::processChatKey const SDL_keysym &    key [private]
 

Processes the chat input.

Processes the input related to the chat, such as backspaces or letters to be typed.

Parameters:
key  the SDL_keysym contained in the keyboard event that we are processing.


The documentation for this class was generated from the following files:
Generated on Thu Jun 6 17:22:21 2002 for Perihelion by doxygen1.2.15