#include <GameInfo.h>
Inherited by GameSpyGameInfo, GameSpyStagingRoom, LANGameInfo, ReplayGameInfo, and SkirmishGameInfo.
Public Member Functions | |
| GameInfo () | |
| void | init (void) |
| virtual void | reset (void) |
| void | clearSlotList (void) |
| Int | getNumPlayers (void) const |
| How many players (human and AI) are in the game? | |
| Int | getNumNonObserverPlayers (void) const |
| How many non-observer players (human and AI) are in the game? | |
| Int | getMaxPlayers (void) const |
| How many players (human and AI) can be in the game? | |
| void | enterGame (void) |
| Mark us as having entered the game. | |
| void | leaveGame (void) |
| Mark us as having left the game. | |
| virtual void | startGame (Int gameID) |
| Mark our game as started, and record the game ID. | |
| void | endGame (void) |
| Mark us as out of game. | |
| Int | getGameID (void) const |
| Get the game ID of the current game or the last one if we're not in game. | |
| void | setInGame (void) |
| set the m_inGame flag | |
| Bool | isInGame (void) const |
| Are we (in game or in game setup)? As opposed to chatting, matching, etc. | |
| Bool | isGameInProgress (void) const |
| Is the game in progress? | |
| void | setGameInProgress (Bool inProgress) |
| Set whether the game is in progress or not. | |
| void | setSlot (Int slotNum, GameSlot slotInfo) |
| Set the slot state (human, open, AI, etc) | |
| GameSlot * | getSlot (Int slotNum) |
| Get the slot. | |
| const GameSlot * | getConstSlot (Int slotNum) const |
| Get the slot. | |
| virtual Bool | amIHost (void) const |
| Convenience function - is the local player the game host? | |
| virtual Int | getLocalSlotNum (void) const |
| Get the local slot number, or -1 if we're not present. | |
| Int | getSlotNum (AsciiString userName) const |
| Get the slot number corresponding to a specific user, or -1 if he's not present. | |
| void | setMap (AsciiString mapName) |
| Set the map to play on. | |
| void | setMapCRC (UnsignedInt mapCRC) |
| Set the map CRC. | |
| void | setMapSize (UnsignedInt mapSize) |
| Set the map size. | |
| void | setMapContentsMask (Int mask) |
| Set the map contents mask (1=map,2=preview,4=map.ini) | |
| AsciiString | getMap (void) const |
| Get the game map. | |
| UnsignedInt | getMapCRC (void) const |
| Get the map CRC. | |
| UnsignedInt | getMapSize (void) const |
| Get the map size. | |
| Int | getMapContentsMask (void) const |
| Get the map contents mask. | |
| void | setSeed (Int seed) |
| Set the random seed for the game. | |
| Int | getSeed (void) const |
| Get the game seed. | |
| Int | getUseStats (void) const |
| Does this game count towards gamespy stats? | |
| void | setUseStats (Int useStats) |
| UnsignedShort | getSuperweaponRestriction (void) const |
| Get any optional limits on superweapons. | |
| void | setSuperweaponRestriction (UnsignedShort restriction) |
| Set the optional limits on superweapons. | |
| const Money & | getStartingCash (void) const |
| void | setStartingCash (const Money &startingCash) |
| void | setSlotPointer (Int index, GameSlot *slot) |
| Set the slot info pointer. | |
| void | setLocalIP (UnsignedInt ip) |
| Set the local IP. | |
| UnsignedInt | getLocalIP (void) const |
| Get the local IP. | |
| Bool | isColorTaken (Int colorIdx, Int slotToIgnore=-1) const |
| Bool | isStartPositionTaken (Int positionIdx, Int slotToIgnore=-1) const |
| virtual void | resetAccepted (void) |
| Reset the accepted flag on all players. | |
| virtual void | resetStartSpots (void) |
| reset the start spots for the new map. | |
| virtual void | adjustSlotsForMap (void) |
| adjusts the slots to open and closed depending on the players in the game and the number of players the map can hold. | |
| virtual void | closeOpenSlots (void) |
| close all slots that are currently unoccupied. | |
| void | setCRCInterval (Int val) |
| Int | getCRCInterval (void) const |
| Bool | haveWeSurrendered (void) |
| void | markAsSurrendered (void) |
| Bool | isSkirmish (void) |
| Bool | isMultiPlayer (void) |
| Bool | isSandbox (void) |
| Bool | isPlayerPreorder (Int index) |
| void | markPlayerAsPreorder (Int index) |
| Bool | oldFactionsOnly (void) const |
| void | setOldFactionsOnly (Bool oldFactionsOnly) |
GameInfo class - maintains information about the game setup and the contents of its slot list hroughout the game.
Definition at line 155 of file GameInfo.h.
| GameInfo::GameInfo | ( | ) |
Definition at line 289 of file GameInfo.cpp.
|
virtual |
adjusts the slots to open and closed depending on the players in the game and the number of players the map can hold.
Definition at line 763 of file GameInfo.cpp.
|
virtual |
Convenience function - is the local player the game host?
Reimplemented in GameSpyStagingRoom.
Definition at line 504 of file GameInfo.cpp.
| void GameInfo::clearSlotList | ( | void | ) |
Definition at line 349 of file GameInfo.cpp.
|
virtual |
close all slots that are currently unoccupied.
Definition at line 813 of file GameInfo.cpp.
| void GameInfo::endGame | ( | void | ) |
Mark us as out of game.
Definition at line 416 of file GameInfo.cpp.
| void GameInfo::enterGame | ( | void | ) |
Mark us as having entered the game.
Definition at line 394 of file GameInfo.cpp.
Get the slot.
Definition at line 460 of file GameInfo.cpp.
|
inline |
Definition at line 221 of file GameInfo.h.
|
inline |
Get the game ID of the current game or the last one if we're not in game.
Definition at line 262 of file GameInfo.h.
|
inline |
Get the local IP.
Definition at line 208 of file GameInfo.h.
|
virtual |
Get the local slot number, or -1 if we're not present.
Reimplemented in GameSpyGameInfo, GameSpyStagingRoom, and LANGameInfo.
Definition at line 469 of file GameInfo.cpp.
|
inline |
Get the game map.
Definition at line 263 of file GameInfo.h.
|
inline |
Get the map contents mask.
Definition at line 266 of file GameInfo.h.
|
inline |
Get the map CRC.
Definition at line 264 of file GameInfo.h.
|
inline |
Get the map size.
Definition at line 265 of file GameInfo.h.
| Int GameInfo::getMaxPlayers | ( | void | ) | const |
How many players (human and AI) can be in the game?
Definition at line 380 of file GameInfo.cpp.
| Int GameInfo::getNumNonObserverPlayers | ( | void | ) | const |
How many non-observer players (human and AI) are in the game?
Definition at line 369 of file GameInfo.cpp.
| Int GameInfo::getNumPlayers | ( | void | ) | const |
How many players (human and AI) are in the game?
Definition at line 358 of file GameInfo.cpp.
|
inline |
Get the game seed.
Definition at line 267 of file GameInfo.h.
Get the slot.
Definition at line 451 of file GameInfo.cpp.
| Int GameInfo::getSlotNum | ( | AsciiString | userName | ) | const |
Get the slot number corresponding to a specific user, or -1 if he's not present.
Definition at line 487 of file GameInfo.cpp.
|
inline |
Definition at line 274 of file GameInfo.h.
|
inline |
Get any optional limits on superweapons.
Definition at line 275 of file GameInfo.h.
|
inline |
Does this game count towards gamespy stats?
Definition at line 272 of file GameInfo.h.
|
inline |
Definition at line 223 of file GameInfo.h.
| void GameInfo::init | ( | void | ) |
Definition at line 298 of file GameInfo.cpp.
Definition at line 712 of file GameInfo.cpp.
|
inline |
Is the game in progress?
Definition at line 270 of file GameInfo.h.
|
inline |
Are we (in game or in game setup)? As opposed to chatting, matching, etc.
Definition at line 268 of file GameInfo.h.
| Bool GameInfo::isMultiPlayer | ( | void | ) |
Definition at line 864 of file GameInfo.cpp.
Definition at line 335 of file GameInfo.cpp.
| Bool GameInfo::isSandbox | ( | void | ) |
Definition at line 878 of file GameInfo.cpp.
| Bool GameInfo::isSkirmish | ( | void | ) |
Definition at line 842 of file GameInfo.cpp.
Definition at line 723 of file GameInfo.cpp.
| void GameInfo::leaveGame | ( | void | ) |
Mark us as having left the game.
Definition at line 402 of file GameInfo.cpp.
|
inline |
Definition at line 224 of file GameInfo.h.
| void GameInfo::markPlayerAsPreorder | ( | Int | index | ) |
Definition at line 342 of file GameInfo.cpp.
|
inline |
Definition at line 276 of file GameInfo.h.
|
virtual |
Reimplemented in GameSpyStagingRoom.
Definition at line 303 of file GameInfo.cpp.
|
virtual |
Reset the accepted flag on all players.
Reimplemented in GameSpyGameInfo, GameSpyStagingRoom, and LANGameInfo.
Definition at line 734 of file GameInfo.cpp.
|
virtual |
reset the start spots for the new map.
Definition at line 747 of file GameInfo.cpp.
|
inline |
Definition at line 220 of file GameInfo.h.
|
inline |
Set whether the game is in progress or not.
Definition at line 271 of file GameInfo.h.
|
inline |
set the m_inGame flag
Definition at line 269 of file GameInfo.h.
|
inline |
Set the local IP.
Definition at line 207 of file GameInfo.h.
| void GameInfo::setMap | ( | AsciiString | mapName | ) |
Set the map to play on.
Definition at line 513 of file GameInfo.cpp.
| void GameInfo::setMapContentsMask | ( | Int | mask | ) |
Set the map contents mask (1=map,2=preview,4=map.ini)
Definition at line 613 of file GameInfo.cpp.
| void GameInfo::setMapCRC | ( | UnsignedInt | mapCRC | ) |
Set the map CRC.
Definition at line 618 of file GameInfo.cpp.
| void GameInfo::setMapSize | ( | UnsignedInt | mapSize | ) |
Set the map size.
Definition at line 658 of file GameInfo.cpp.
|
inline |
Definition at line 277 of file GameInfo.h.
| void GameInfo::setSeed | ( | Int | seed | ) |
Set the random seed for the game.
Definition at line 689 of file GameInfo.cpp.
Set the slot state (human, open, AI, etc)
Definition at line 423 of file GameInfo.cpp.
Set the slot info pointer.
Definition at line 694 of file GameInfo.cpp.
| void GameInfo::setStartingCash | ( | const Money & | startingCash | ) |
Definition at line 707 of file GameInfo.cpp.
| void GameInfo::setSuperweaponRestriction | ( | UnsignedShort | restriction | ) |
Set the optional limits on superweapons.
Definition at line 702 of file GameInfo.cpp.
|
inline |
Definition at line 273 of file GameInfo.h.
|
virtual |
Mark our game as started, and record the game ID.
Reimplemented in GameSpyGameInfo, and GameSpyStagingRoom.
Definition at line 408 of file GameInfo.cpp.
|
protected |
Definition at line 238 of file GameInfo.h.
|
protected |
Definition at line 242 of file GameInfo.h.
|
protected |
Definition at line 239 of file GameInfo.h.
|
protected |
Definition at line 240 of file GameInfo.h.
|
protected |
Definition at line 245 of file GameInfo.h.
|
protected |
Definition at line 249 of file GameInfo.h.
|
protected |
Definition at line 251 of file GameInfo.h.
|
protected |
Definition at line 248 of file GameInfo.h.
|
protected |
Definition at line 250 of file GameInfo.h.
|
protected |
Definition at line 256 of file GameInfo.h.
|
protected |
Definition at line 237 of file GameInfo.h.
|
protected |
Definition at line 252 of file GameInfo.h.
|
protected |
Definition at line 243 of file GameInfo.h.
|
protected |
Definition at line 254 of file GameInfo.h.
|
protected |
Definition at line 255 of file GameInfo.h.
|
protected |
Definition at line 241 of file GameInfo.h.
|
protected |
Definition at line 253 of file GameInfo.h.