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

#include <GameSpyGameInfo.h>

Inherits GameInfo.

Public Member Functions

 GameSpyGameInfo ()
 
void setServer (SBServer server)
 
SBServer getServer (void)
 
AsciiString generateGameResultsPacket (void)
 
virtual void init (void)
 
virtual void resetAccepted (void)
 Reset the accepted flag on all players.
 
void markGameAsQM (void)
 
virtual void startGame (Int gameID)
 Mark our game as started and record the game ID.
 
virtual Int getLocalSlotNum (void) const
 Get the local slot number, or -1 if we're not present.
 
void gotGOACall (void)
 Mark the game info as having been queried.
 
- Public Member Functions inherited from GameInfo
 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.
 
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.
 
virtual Bool amIHost (void) const
 Convenience function - is the local player the game host?
 
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

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

Definition at line 63 of file GameSpyGameInfo.h.

Constructor & Destructor Documentation

◆ GameSpyGameInfo()

GameSpyGameInfo::GameSpyGameInfo ( )

Definition at line 435 of file GameSpyGameInfo.cpp.

Member Function Documentation

◆ generateGameResultsPacket()

AsciiString GameSpyGameInfo::generateGameResultsPacket ( void )

Definition at line 662 of file GameSpyGameInfo.cpp.

◆ getLocalSlotNum()

Int GameSpyGameInfo::getLocalSlotNum ( void ) const
virtual

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

Reimplemented from GameInfo.

Definition at line 598 of file GameSpyGameInfo.cpp.

◆ getServer()

SBServer GameSpyGameInfo::getServer ( void )
inline

Definition at line 76 of file GameSpyGameInfo.h.

◆ gotGOACall()

void GameSpyGameInfo::gotGOACall ( void )

Mark the game info as having been queried.

Definition at line 618 of file GameSpyGameInfo.cpp.

◆ init()

void GameSpyGameInfo::init ( void )
virtual

Definition at line 579 of file GameSpyGameInfo.cpp.

◆ markGameAsQM()

void GameSpyGameInfo::markGameAsQM ( void )
inline

Definition at line 83 of file GameSpyGameInfo.h.

◆ resetAccepted()

void GameSpyGameInfo::resetAccepted ( void )
virtual

Reset the accepted flag on all players.

Reimplemented from GameInfo.

Definition at line 586 of file GameSpyGameInfo.cpp.

◆ setServer()

void GameSpyGameInfo::setServer ( SBServer server)
inline

Definition at line 75 of file GameSpyGameInfo.h.

◆ startGame()

void GameSpyGameInfo::startGame ( Int gameID)
virtual

Mark our game as started and record the game ID.

Reimplemented from GameInfo.

Definition at line 624 of file GameSpyGameInfo.cpp.


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