News SF.net Project Frequently Asked Questions Documentation Downloads Mailing Lists How to Contribute

SourceForge.net Logo

Changing the way games are made and played.

Zap::ServerGame class Reference

Zap::ServerGame Class Reference

#include <game.h>

Inheritance diagram for Zap::ServerGame:

Zap::Game Zap::LevelLoader

Public Member Functions

U32 getPlayerCount ()
U32 getMaxPlayers ()
const char * getHostName ()
bool isFull ()
void addClient (GameConnection *theConnection)
void removeClient (GameConnection *theConnection)
 ServerGame (const Address &theBindAddress, U32 maxPlayers, const char *hostName)
void setLevelList (const char *levelList)
void loadLevel (const char *fileName)
void cycleLevel (S32 newLevelIndex=-1)
StringTableEntry getLevelName (S32 index)
void processLevelLoadLine (int argc, const char **argv)
bool isServer ()
void idle (U32 timeDelta)
void gameEnded ()

Private Types

enum  { LevelSwitchTime = 5000 }

Private Attributes

U32 mPlayerCount
U32 mMaxPlayers
const char * mHostName
Vector< StringTableEntrymLevelList
Vector< StringTableEntrymLevelNames
Vector< StringTableEntrymLevelTypes
U32 mCurrentLevelIndex
Timer mLevelSwitchTimer

Member Enumeration Documentation

anonymous enum [private]
 

Enumeration values:
LevelSwitchTime 


Constructor & Destructor Documentation

Zap::ServerGame::ServerGame const Address theBindAddress,
U32  maxPlayers,
const char *  hostName
 


Member Function Documentation

U32 Zap::ServerGame::getPlayerCount  )  [inline]
 

U32 Zap::ServerGame::getMaxPlayers  )  [inline]
 

const char* Zap::ServerGame::getHostName  )  [inline]
 

bool Zap::ServerGame::isFull  )  [inline]
 

void Zap::ServerGame::addClient GameConnection theConnection  ) 
 

void Zap::ServerGame::removeClient GameConnection theConnection  ) 
 

void Zap::ServerGame::setLevelList const char *  levelList  ) 
 

void Zap::ServerGame::loadLevel const char *  fileName  ) 
 

void Zap::ServerGame::cycleLevel S32  newLevelIndex = -1  ) 
 

StringTableEntry Zap::ServerGame::getLevelName S32  index  ) 
 

void Zap::ServerGame::processLevelLoadLine int  argc,
const char **  argv
[virtual]
 

Implements Zap::LevelLoader.

bool Zap::ServerGame::isServer  )  [inline, virtual]
 

Implements Zap::Game.

void Zap::ServerGame::idle U32  timeDelta  )  [virtual]
 

Implements Zap::Game.

void Zap::ServerGame::gameEnded  ) 
 


Field Documentation

U32 Zap::ServerGame::mPlayerCount [private]
 

U32 Zap::ServerGame::mMaxPlayers [private]
 

const char* Zap::ServerGame::mHostName [private]
 

Vector<StringTableEntry> Zap::ServerGame::mLevelList [private]
 

Vector<StringTableEntry> Zap::ServerGame::mLevelNames [private]
 

Vector<StringTableEntry> Zap::ServerGame::mLevelTypes [private]
 

U32 Zap::ServerGame::mCurrentLevelIndex [private]
 

Timer Zap::ServerGame::mLevelSwitchTimer [private]