Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
GameSpyStagingRoom Class Reference

#include <StagingRoomGameInfo.h>

Inherits GameInfo.

Public Member Functions

 GameSpyStagingRoom ()
 
virtual void reset (void)
 
void cleanUpSlotPointers (void)
 
void setID (Int id)
 
Int getID (void) const
 
void setHasPassword (Bool val)
 
Bool getHasPassword (void) const
 
void setAllowObservers (Bool val)
 
Bool getAllowObservers (void) const
 
void setVersion (UnsignedInt val)
 
UnsignedInt getVersion (void) const
 
void setExeCRC (UnsignedInt val)
 
UnsignedInt getExeCRC (void) const
 
void setIniCRC (UnsignedInt val)
 
UnsignedInt getIniCRC (void) const
 
void setReportedNumPlayers (Int val)
 
Int getReportedNumPlayers (void) const
 
void setReportedMaxPlayers (Int val)
 
Int getReportedMaxPlayers (void) const
 
void setReportedNumObservers (Int val)
 
Int getReportedNumObservers (void) const
 
void setLadderIP (AsciiString ladderIP)
 
AsciiString getLadderIP (void) const
 
void setLadderPort (UnsignedShort ladderPort)
 
UnsignedShort getLadderPort (void) const
 
void setPingString (AsciiString pingStr)
 
AsciiString getPingString (void) const
 
Int getPingAsInt (void) const
 
virtual Bool amIHost (void) const
 Convenience function - is the local player the game host?
 
GameSpyGameSlotgetGameSpySlot (Int index)
 
AsciiString generateGameSpyGameResultsPacket (void)
 
AsciiString generateLadderGameResultsPacket (void)
 
void markGameAsQM (void)
 
Bool isQMGame (void)
 
virtual void init (void)
 
virtual void resetAccepted (void)
 Reset the accepted flag on all players.
 
virtual void startGame (Int gameID)
 Mark our game as started and record the game ID.
 
void launchGame (void)
 NAT negotiation has finished - really start.
 
virtual Int getLocalSlotNum (void) const
 Get the local slot number, or -1 if we're not present.
 
void setGameName (UnicodeString name)
 
UnicodeString getGameName (void) const
 
void setLocalName (AsciiString name)
 
- Public Member Functions inherited from GameInfo
 GameInfo ()
 
void init (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.
 
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)
 
GameSlotgetSlot (Int slotNum)
 Get the slot.
 
const GameSlotgetConstSlot (Int slotNum) const
 Get the slot.
 
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 MoneygetStartingCash (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 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)
 

Additional Inherited Members

- Protected Attributes inherited from GameInfo
Int m_preorderMask
 
Int m_crcInterval
 
Bool m_inGame
 
Bool m_inProgress
 
Bool m_surrendered
 
Int m_gameID
 
GameSlotm_slot [MAX_SLOTS]
 
UnsignedInt m_localIP
 
AsciiString m_mapName
 
UnsignedInt m_mapCRC
 
UnsignedInt m_mapSize
 
Int m_mapMask
 
Int m_seed
 
Int m_useStats
 
Money m_startingCash
 
UnsignedShort m_superweaponRestriction
 
Bool m_oldFactionsOnly
 

Detailed Description

GameSpyStagingRoom class - maintains information about the GameSpy game and the contents of its slot list throughout the game.

Definition at line 76 of file StagingRoomGameInfo.h.

Constructor & Destructor Documentation

◆ GameSpyStagingRoom()

GameSpyStagingRoom::GameSpyStagingRoom ( )

Definition at line 457 of file StagingRoomGameInfo.cpp.

Member Function Documentation

◆ amIHost()

Bool GameSpyStagingRoom::amIHost ( void ) const
virtual

Convenience function - is the local player the game host?

Reimplemented from GameInfo.

Definition at line 494 of file StagingRoomGameInfo.cpp.

◆ cleanUpSlotPointers()

void GameSpyStagingRoom::cleanUpSlotPointers ( void )

Definition at line 470 of file StagingRoomGameInfo.cpp.

◆ generateGameSpyGameResultsPacket()

AsciiString GameSpyStagingRoom::generateGameSpyGameResultsPacket ( void )

Definition at line 603 of file StagingRoomGameInfo.cpp.

◆ generateLadderGameResultsPacket()

AsciiString GameSpyStagingRoom::generateLadderGameResultsPacket ( void )

Definition at line 697 of file StagingRoomGameInfo.cpp.

◆ getAllowObservers()

Bool GameSpyStagingRoom::getAllowObservers ( void ) const
inline

Definition at line 111 of file StagingRoomGameInfo.h.

◆ getExeCRC()

UnsignedInt GameSpyStagingRoom::getExeCRC ( void ) const
inline

Definition at line 116 of file StagingRoomGameInfo.h.

◆ getGameName()

UnicodeString GameSpyStagingRoom::getGameName ( void ) const
inline

Definition at line 154 of file StagingRoomGameInfo.h.

◆ getGameSpySlot()

GameSpyGameSlot * GameSpyStagingRoom::getGameSpySlot ( Int index)

Definition at line 476 of file StagingRoomGameInfo.cpp.

◆ getHasPassword()

Bool GameSpyStagingRoom::getHasPassword ( void ) const
inline

Definition at line 109 of file StagingRoomGameInfo.h.

◆ getID()

Int GameSpyStagingRoom::getID ( void ) const
inline

Definition at line 106 of file StagingRoomGameInfo.h.

◆ getIniCRC()

UnsignedInt GameSpyStagingRoom::getIniCRC ( void ) const
inline

Definition at line 118 of file StagingRoomGameInfo.h.

◆ getLadderIP()

AsciiString GameSpyStagingRoom::getLadderIP ( void ) const
inline

Definition at line 130 of file StagingRoomGameInfo.h.

◆ getLadderPort()

UnsignedShort GameSpyStagingRoom::getLadderPort ( void ) const
inline

Definition at line 132 of file StagingRoomGameInfo.h.

◆ getLocalSlotNum()

Int GameSpyStagingRoom::getLocalSlotNum ( void ) const
virtual

Get the local slot number, or -1 if we're not present.

Reimplemented from GameInfo.

Definition at line 517 of file StagingRoomGameInfo.cpp.

◆ getPingAsInt()

Int GameSpyStagingRoom::getPingAsInt ( void ) const
inline

Definition at line 135 of file StagingRoomGameInfo.h.

◆ getPingString()

AsciiString GameSpyStagingRoom::getPingString ( void ) const
inline

Definition at line 134 of file StagingRoomGameInfo.h.

◆ getReportedMaxPlayers()

Int GameSpyStagingRoom::getReportedMaxPlayers ( void ) const
inline

Definition at line 124 of file StagingRoomGameInfo.h.

◆ getReportedNumObservers()

Int GameSpyStagingRoom::getReportedNumObservers ( void ) const
inline

Definition at line 127 of file StagingRoomGameInfo.h.

◆ getReportedNumPlayers()

Int GameSpyStagingRoom::getReportedNumPlayers ( void ) const
inline

Definition at line 121 of file StagingRoomGameInfo.h.

◆ getVersion()

UnsignedInt GameSpyStagingRoom::getVersion ( void ) const
inline

Definition at line 114 of file StagingRoomGameInfo.h.

◆ init()

void GameSpyStagingRoom::init ( void )
virtual

Definition at line 483 of file StagingRoomGameInfo.cpp.

◆ isQMGame()

Bool GameSpyStagingRoom::isQMGame ( void )
inline

Definition at line 144 of file StagingRoomGameInfo.h.

◆ launchGame()

void GameSpyStagingRoom::launchGame ( void )

NAT negotiation has finished - really start.

Definition at line 794 of file StagingRoomGameInfo.cpp.

◆ markGameAsQM()

void GameSpyStagingRoom::markGameAsQM ( void )
inline

Definition at line 143 of file StagingRoomGameInfo.h.

◆ reset()

void GameSpyStagingRoom::reset ( void )
virtual

Reimplemented from GameInfo.

Definition at line 883 of file StagingRoomGameInfo.cpp.

◆ resetAccepted()

void GameSpyStagingRoom::resetAccepted ( void )
virtual

Reset the accepted flag on all players.

Reimplemented from GameInfo.

Definition at line 503 of file StagingRoomGameInfo.cpp.

◆ setAllowObservers()

void GameSpyStagingRoom::setAllowObservers ( Bool val)
inline

Definition at line 110 of file StagingRoomGameInfo.h.

◆ setExeCRC()

void GameSpyStagingRoom::setExeCRC ( UnsignedInt val)
inline

Definition at line 115 of file StagingRoomGameInfo.h.

◆ setGameName()

void GameSpyStagingRoom::setGameName ( UnicodeString name)
inline

Definition at line 153 of file StagingRoomGameInfo.h.

◆ setHasPassword()

void GameSpyStagingRoom::setHasPassword ( Bool val)
inline

Definition at line 108 of file StagingRoomGameInfo.h.

◆ setID()

void GameSpyStagingRoom::setID ( Int id)
inline

Definition at line 105 of file StagingRoomGameInfo.h.

◆ setIniCRC()

void GameSpyStagingRoom::setIniCRC ( UnsignedInt val)
inline

Definition at line 117 of file StagingRoomGameInfo.h.

◆ setLadderIP()

void GameSpyStagingRoom::setLadderIP ( AsciiString ladderIP)
inline

Definition at line 129 of file StagingRoomGameInfo.h.

◆ setLadderPort()

void GameSpyStagingRoom::setLadderPort ( UnsignedShort ladderPort)
inline

Definition at line 131 of file StagingRoomGameInfo.h.

◆ setLocalName()

void GameSpyStagingRoom::setLocalName ( AsciiString name)
inline

Definition at line 156 of file StagingRoomGameInfo.h.

◆ setPingString()

void GameSpyStagingRoom::setPingString ( AsciiString pingStr)

Definition at line 488 of file StagingRoomGameInfo.cpp.

◆ setReportedMaxPlayers()

void GameSpyStagingRoom::setReportedMaxPlayers ( Int val)
inline

Definition at line 123 of file StagingRoomGameInfo.h.

◆ setReportedNumObservers()

void GameSpyStagingRoom::setReportedNumObservers ( Int val)
inline

Definition at line 126 of file StagingRoomGameInfo.h.

◆ setReportedNumPlayers()

void GameSpyStagingRoom::setReportedNumPlayers ( Int val)
inline

Definition at line 120 of file StagingRoomGameInfo.h.

◆ setVersion()

void GameSpyStagingRoom::setVersion ( UnsignedInt val)
inline

Definition at line 113 of file StagingRoomGameInfo.h.

◆ startGame()

void GameSpyStagingRoom::startGame ( Int gameID)
virtual

Mark our game as started and record the game ID.

Reimplemented from GameInfo.

Definition at line 537 of file StagingRoomGameInfo.cpp.


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