#include <GameInfo.h>
Inherited by GameSpyGameSlot, GameSpyGameSlot, and LANGameSlot.
Public Member Functions | |
| GameSlot () | |
| virtual void | reset () |
| void | setAccept (void) |
| Accept the current options. | |
| void | unAccept (void) |
| Unaccept (options changed, etc) | |
| Bool | isAccepted (void) const |
| Non-human slots are always accepted. | |
| void | setMapAvailability (Bool hasMap) |
| Set whether the slot has the map. | |
| Bool | hasMap (void) const |
| Non-human slots always have the map. | |
| void | setState (SlotState state, UnicodeString name=UnicodeString::TheEmptyString, UnsignedInt IP=0) |
| Set the slot's state (human, AI, open, etc) | |
| SlotState | getState (void) const |
| Get the slot state. | |
| void | setColor (Int color) |
| Int | getColor (void) const |
| void | setStartPos (Int startPos) |
| Int | getStartPos (void) const |
| void | setPlayerTemplate (Int playerTemplate) |
| Int | getPlayerTemplate (void) const |
| void | setTeamNumber (Int teamNumber) |
| Int | getTeamNumber (void) const |
| void | setName (UnicodeString name) |
| UnicodeString | getName (void) const |
| void | setIP (UnsignedInt IP) |
| UnsignedInt | getIP (void) const |
| void | setPort (UnsignedShort port) |
| UnsignedShort | getPort (void) const |
| void | setNATBehavior (FirewallHelperClass::FirewallBehaviorType NATBehavior) |
| FirewallHelperClass::FirewallBehaviorType | getNATBehavior () const |
| void | saveOffOriginalInfo (void) |
| Int | getOriginalPlayerTemplate (void) const |
| Int | getOriginalColor (void) const |
| Int | getOriginalStartPos (void) const |
| Int | getApparentPlayerTemplate (void) const |
| Int | getApparentColor (void) const |
| Int | getApparentStartPos (void) const |
| UnicodeString | getApparentPlayerTemplateDisplayName (void) const |
| Bool | isHuman (void) const |
| Is this slot occupied by a human player? | |
| Bool | isOccupied (void) const |
| Is this slot occupied (by a human or an AI)? | |
| Bool | isAI (void) const |
| Is this slot occupied by an AI? | |
| Bool | isPlayer (AsciiString userName) const |
| Does this slot contain the given user? | |
| Bool | isPlayer (UnicodeString userName) const |
| Does this slot contain the given user? | |
| Bool | isPlayer (UnsignedInt ip) const |
| Is this slot at this IP? | |
| Bool | isOpen (void) const |
| void | setLastFrameInGame (UnsignedInt frame) |
| void | markAsDisconnected (void) |
| UnsignedInt | lastFrameInGame (void) const |
| Bool | disconnected (void) const |
| void | mute (Bool isMuted) |
| Bool | isMuted (void) const |
Protected Attributes | |
| SlotState | m_state |
| Bool | m_isAccepted |
| Bool | m_hasMap |
| Bool | m_isMuted |
| Int | m_color |
| color, or -1 for random | |
| Int | m_startPos |
| start position, or -1 for random | |
| Int | m_playerTemplate |
| PlayerTemplate. | |
| Int | m_teamNumber |
| alliance, -1 for none | |
| Int | m_origColor |
| color, or -1 for random | |
| Int | m_origStartPos |
| start position, or -1 for random | |
| Int | m_origPlayerTemplate |
| PlayerTemplate. | |
| UnicodeString | m_name |
| Only valid for human players. | |
| UnsignedInt | m_IP |
| Only valid for human players in LAN/WOL. | |
| UnsignedShort | m_port |
| Only valid for human players in LAN/WOL. | |
| FirewallHelperClass::FirewallBehaviorType | m_NATBehavior |
| The NAT behavior for this slot's player. | |
| UnsignedInt | m_lastFrameInGame |
| Bool | m_disconnected |
GameSlot class - maintains information about the contents of a game slot. This persists throughout the game.
Definition at line 60 of file GameInfo.h.
| GameSlot::GameSlot | ( | ) |
Definition at line 59 of file GameInfo.cpp.
|
inline |
Definition at line 127 of file GameInfo.h.
| Int GameSlot::getApparentColor | ( | void | ) | const |
Definition at line 160 of file GameInfo.cpp.
| Int GameSlot::getApparentPlayerTemplate | ( | void | ) | const |
Definition at line 150 of file GameInfo.cpp.
| UnicodeString GameSlot::getApparentPlayerTemplateDisplayName | ( | void | ) | const |
Definition at line 130 of file GameInfo.cpp.
| Int GameSlot::getApparentStartPos | ( | void | ) | const |
Definition at line 173 of file GameInfo.cpp.
|
inline |
Definition at line 79 of file GameInfo.h.
|
inline |
Definition at line 98 of file GameInfo.h.
|
inline |
Definition at line 95 of file GameInfo.h.
|
inline |
Definition at line 104 of file GameInfo.h.
|
inline |
Definition at line 108 of file GameInfo.h.
|
inline |
Definition at line 107 of file GameInfo.h.
|
inline |
Definition at line 109 of file GameInfo.h.
|
inline |
Definition at line 89 of file GameInfo.h.
|
inline |
Definition at line 101 of file GameInfo.h.
|
inline |
Definition at line 82 of file GameInfo.h.
|
inline |
Get the slot state.
Definition at line 76 of file GameInfo.h.
|
inline |
Definition at line 92 of file GameInfo.h.
|
inline |
Non-human slots always have the map.
Definition at line 71 of file GameInfo.h.
|
inline |
Non-human slots are always accepted.
Definition at line 68 of file GameInfo.h.
| Bool GameSlot::isAI | ( | void | ) | const |
Is this slot occupied by an AI?
Definition at line 260 of file GameInfo.cpp.
| Bool GameSlot::isHuman | ( | void | ) | const |
Is this slot occupied by a human player?
Definition at line 250 of file GameInfo.cpp.
|
inline |
Definition at line 130 of file GameInfo.h.
| Bool GameSlot::isOccupied | ( | void | ) | const |
Is this slot occupied (by a human or an AI)?
Definition at line 255 of file GameInfo.cpp.
| Bool GameSlot::isOpen | ( | void | ) | const |
Definition at line 282 of file GameInfo.cpp.
| Bool GameSlot::isPlayer | ( | AsciiString | userName | ) | const |
Does this slot contain the given user?
Definition at line 265 of file GameInfo.cpp.
| Bool GameSlot::isPlayer | ( | UnicodeString | userName | ) | const |
Does this slot contain the given user?
Definition at line 272 of file GameInfo.cpp.
| Bool GameSlot::isPlayer | ( | UnsignedInt | ip | ) | const |
Is this slot at this IP?
Definition at line 277 of file GameInfo.cpp.
|
inline |
Definition at line 126 of file GameInfo.h.
|
inline |
Definition at line 125 of file GameInfo.h.
|
inline |
Definition at line 129 of file GameInfo.h.
|
virtual |
Definition at line 64 of file GameInfo.cpp.
| void GameSlot::saveOffOriginalInfo | ( | void | ) |
Definition at line 83 of file GameInfo.cpp.
|
inline |
Accept the current options.
Definition at line 66 of file GameInfo.h.
|
inline |
Definition at line 78 of file GameInfo.h.
|
inline |
Definition at line 97 of file GameInfo.h.
|
inline |
Definition at line 124 of file GameInfo.h.
| void GameSlot::setMapAvailability | ( | Bool | hasMap | ) |
Set whether the slot has the map.
Definition at line 192 of file GameInfo.cpp.
|
inline |
Definition at line 94 of file GameInfo.h.
|
inline |
Definition at line 103 of file GameInfo.h.
|
inline |
Definition at line 84 of file GameInfo.h.
|
inline |
Definition at line 100 of file GameInfo.h.
|
inline |
Definition at line 81 of file GameInfo.h.
| void GameSlot::setState | ( | SlotState | state, |
| UnicodeString | name = UnicodeString::TheEmptyString, | ||
| UnsignedInt | IP = 0 ) |
Set the slot's state (human, AI, open, etc)
Definition at line 200 of file GameInfo.cpp.
|
inline |
Definition at line 91 of file GameInfo.h.
| void GameSlot::unAccept | ( | void | ) |
Unaccept (options changed, etc)
Definition at line 184 of file GameInfo.cpp.
|
protected |
color, or -1 for random
Definition at line 136 of file GameInfo.h.
|
protected |
Definition at line 148 of file GameInfo.h.
|
protected |
Definition at line 134 of file GameInfo.h.
|
protected |
Only valid for human players in LAN/WOL.
Definition at line 144 of file GameInfo.h.
|
protected |
Definition at line 133 of file GameInfo.h.
|
protected |
Definition at line 135 of file GameInfo.h.
|
protected |
Definition at line 147 of file GameInfo.h.
|
protected |
Only valid for human players.
Definition at line 143 of file GameInfo.h.
|
protected |
The NAT behavior for this slot's player.
Definition at line 146 of file GameInfo.h.
|
protected |
color, or -1 for random
Definition at line 140 of file GameInfo.h.
|
protected |
Definition at line 142 of file GameInfo.h.
|
protected |
start position, or -1 for random
Definition at line 141 of file GameInfo.h.
|
protected |
Definition at line 138 of file GameInfo.h.
|
protected |
Only valid for human players in LAN/WOL.
Definition at line 145 of file GameInfo.h.
|
protected |
start position, or -1 for random
Definition at line 137 of file GameInfo.h.
|
protected |
Definition at line 132 of file GameInfo.h.
|
protected |
alliance, -1 for none
Definition at line 139 of file GameInfo.h.