Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Core/GameEngine/Include/Common/Radar.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ class RadarObject : public MemoryPoolObject,

// color management
void setColor( Color c ) { m_color = c; }
inline Color getColor( void ) const { return m_color; }
Color getColor( void ) const { return m_color; }

inline void friend_setObject( Object *obj ) { m_object = obj; }
inline Object *friend_getObject( void ) { return m_object; }
inline const Object *friend_getObject( void ) const { return m_object; }
void friend_setObject( Object *obj ) { m_object = obj; }
Object *friend_getObject( void ) { return m_object; }
const Object *friend_getObject( void ) const { return m_object; }

inline void friend_setNext( RadarObject *next ) { m_next = next; }
inline RadarObject *friend_getNext( void ) { return m_next; }
inline const RadarObject *friend_getNext( void ) const { return m_next; }
void friend_setNext( RadarObject *next ) { m_next = next; }
RadarObject *friend_getNext( void ) { return m_next; }
const RadarObject *friend_getNext( void ) const { return m_next; }

Bool isTemporarilyHidden() const;
static Bool isTemporarilyHidden(const Object* obj);
Expand Down Expand Up @@ -236,8 +236,8 @@ class Radar : public Snapshot,
void deleteListResources( void ); ///< delete list radar resources used
Bool deleteFromList( Object *obj, RadarObject **list ); ///< try to remove object from specific list

inline Real getTerrainAverageZ() const { return m_terrainAverageZ; }
inline Real getWaterAverageZ() const { return m_waterAverageZ; }
Real getTerrainAverageZ() const { return m_terrainAverageZ; }
Real getWaterAverageZ() const { return m_waterAverageZ; }

void clearAllEvents( void ); ///< remove all radar events in progress

Expand Down
6 changes: 3 additions & 3 deletions Core/GameEngine/Include/GameClient/ClientRandomValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ class GameClientRandomVariable
void setRange( Real low, Real high, DistributionType type = UNIFORM );

Real getValue( void ) const; ///< return a value from the random distribution
inline Real getMinimumValue( void ) const { return m_low; }
inline Real getMaximumValue( void ) const { return m_high; }
inline DistributionType getDistributionType( void ) const { return m_type; }
Real getMinimumValue( void ) const { return m_low; }
Real getMaximumValue( void ) const { return m_high; }
DistributionType getDistributionType( void ) const { return m_type; }
protected:
DistributionType m_type; ///< the kind of random distribution
Real m_low, m_high; ///< the range of random values
Expand Down
6 changes: 3 additions & 3 deletions Core/GameEngine/Include/GameClient/Smudge.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ class SmudgeManager

SmudgeSet *addSmudgeSet(void);
void removeSmudgeSet(SmudgeSet &mySmudge);
inline Int getSmudgeCountLastFrame(void) {return m_smudgeCountLastFrame;} ///<return number of smudges submitted last frame.
inline void setSmudgeCountLastFrame(Int count) { m_smudgeCountLastFrame = count;}
inline Bool getHardwareSupport(void) { return m_hardwareSupportStatus != SMUDGE_SUPPORT_NO;}
Int getSmudgeCountLastFrame(void) {return m_smudgeCountLastFrame;} ///<return number of smudges submitted last frame.
void setSmudgeCountLastFrame(Int count) { m_smudgeCountLastFrame = count;}
Bool getHardwareSupport(void) { return m_hardwareSupportStatus != SMUDGE_SUPPORT_NO;}

protected:

Expand Down
6 changes: 3 additions & 3 deletions Core/GameEngine/Include/GameLogic/LogicRandomValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ class GameLogicRandomVariable
void setRange( Real low, Real high, DistributionType type = UNIFORM );

Real getValue( void ) const; ///< return a value from the random distribution
inline Real getMinimumValue( void ) const { return m_low; }
inline Real getMaximumValue( void ) const { return m_high; }
inline DistributionType getDistributionType( void ) const { return m_type; }
Real getMinimumValue( void ) const { return m_low; }
Real getMaximumValue( void ) const { return m_high; }
DistributionType getDistributionType( void ) const { return m_type; }
protected:
DistributionType m_type; ///< the kind of random distribution
Real m_low, m_high; ///< the range of random values
Expand Down
8 changes: 4 additions & 4 deletions Core/GameEngine/Include/GameNetwork/FirewallHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,28 +211,28 @@ class FirewallHelperClass {
/*
** Behavior query functions.
*/
inline Bool isNAT(void) {
Bool isNAT(void) {
if (m_behavior == FIREWALL_TYPE_UNKNOWN || (m_behavior & FIREWALL_TYPE_SIMPLE) != 0) {
return(FALSE);
}
return(TRUE);
};

inline Bool isNAT(FirewallBehaviorType behavior) {
Bool isNAT(FirewallBehaviorType behavior) {
if (behavior == FIREWALL_TYPE_UNKNOWN || (behavior & FIREWALL_TYPE_SIMPLE) != 0) {
return(FALSE);
}
return(TRUE);
};

inline Bool isNetgear(FirewallBehaviorType behavior) {
Bool isNetgear(FirewallBehaviorType behavior) {
if ((behavior & FIREWALL_TYPE_NETGEAR_BUG) != 0) {
return(TRUE);
}
return(FALSE);
};

inline Bool isNetgear(void) {
Bool isNetgear(void) {
if ((m_behavior & FIREWALL_TYPE_NETGEAR_BUG) != 0) {
return(TRUE);
}
Expand Down
24 changes: 12 additions & 12 deletions Core/GameEngine/Include/GameNetwork/GameInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,22 +88,22 @@ class GameSlot
void setTeamNumber( Int teamNumber ) { m_teamNumber = teamNumber; }
Int getTeamNumber( void ) const { return m_teamNumber; }

inline void setName( UnicodeString name ) { m_name = name; }
inline UnicodeString getName( void ) const { return m_name; }
void setName( UnicodeString name ) { m_name = name; }
UnicodeString getName( void ) const { return m_name; }

inline void setIP( UnsignedInt IP ) { m_IP = IP; }
inline UnsignedInt getIP( void ) const { return m_IP; }
void setIP( UnsignedInt IP ) { m_IP = IP; }
UnsignedInt getIP( void ) const { return m_IP; }

inline void setPort( UnsignedShort port ) { m_port = port; }
inline UnsignedShort getPort( void ) const { return m_port; }
void setPort( UnsignedShort port ) { m_port = port; }
UnsignedShort getPort( void ) const { return m_port; }

inline void setNATBehavior( FirewallHelperClass::FirewallBehaviorType NATBehavior) { m_NATBehavior = NATBehavior; }
inline FirewallHelperClass::FirewallBehaviorType getNATBehavior() const { return m_NATBehavior; }
void setNATBehavior( FirewallHelperClass::FirewallBehaviorType NATBehavior) { m_NATBehavior = NATBehavior; }
FirewallHelperClass::FirewallBehaviorType getNATBehavior() const { return m_NATBehavior; }

void saveOffOriginalInfo( void );
inline Int getOriginalPlayerTemplate( void ) const { return m_origPlayerTemplate; }
inline Int getOriginalColor( void ) const { return m_origColor; }
inline Int getOriginalStartPos( void ) const { return m_origStartPos; }
Int getOriginalPlayerTemplate( void ) const { return m_origPlayerTemplate; }
Int getOriginalColor( void ) const { return m_origColor; }
Int getOriginalStartPos( void ) const { return m_origStartPos; }
Int getApparentPlayerTemplate( void ) const;
Int getApparentColor( void ) const;
Int getApparentStartPos( void ) const;
Expand Down Expand Up @@ -215,7 +215,7 @@ class GameInfo

// CRC checking hack
void setCRCInterval( Int val ) { m_crcInterval = (val<100)?val:100; }
inline Int getCRCInterval( void ) const { return m_crcInterval; }
Int getCRCInterval( void ) const { return m_crcInterval; }

Bool haveWeSurrendered(void) { return m_surrendered; }
void markAsSurrendered(void) { m_surrendered = TRUE; }
Expand Down
70 changes: 35 additions & 35 deletions Core/GameEngine/Include/GameNetwork/GameSpy/StagingRoomGameInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ class GameSpyGameSlot : public GameSlot
void setFavoriteSide( Int val ) { m_favoriteSide = val; }

void setPingString( AsciiString pingStr );
inline AsciiString getPingString( void ) const { return m_pingStr; }
inline Int getPingAsInt( void ) const { return m_pingInt; }
AsciiString getPingString( void ) const { return m_pingStr; }
Int getPingAsInt( void ) const { return m_pingInt; }

protected:
Int m_profileID;
Expand Down Expand Up @@ -99,37 +99,37 @@ class GameSpyStagingRoom : public GameInfo
virtual void reset( void );

void cleanUpSlotPointers(void);
inline void setID(Int id) { m_id = id; }
inline Int getID( void ) const { return m_id; }

inline void setHasPassword(Bool val) { m_requiresPassword = val; }
inline Bool getHasPassword(void) const { return m_requiresPassword; }
inline void setAllowObservers(Bool val) { m_allowObservers = val; }
inline Bool getAllowObservers(void) const { return m_allowObservers; }

inline void setVersion(UnsignedInt val) { m_version = val; }
inline UnsignedInt getVersion(void) const { return m_version; }
inline void setExeCRC(UnsignedInt val) { m_exeCRC = val; }
inline UnsignedInt getExeCRC(void) const { return m_exeCRC; }
inline void setIniCRC(UnsignedInt val) { m_iniCRC = val; }
inline UnsignedInt getIniCRC(void) const { return m_iniCRC; }

inline void setReportedNumPlayers(Int val) { m_reportedNumPlayers = val; }
inline Int getReportedNumPlayers(void) const { return m_reportedNumPlayers; }

inline void setReportedMaxPlayers(Int val) { m_reportedMaxPlayers = val; }
inline Int getReportedMaxPlayers(void) const { return m_reportedMaxPlayers; }

inline void setReportedNumObservers(Int val) { m_reportedNumObservers = val; }
inline Int getReportedNumObservers(void) const { return m_reportedNumObservers; }

inline void setLadderIP( AsciiString ladderIP ) { m_ladderIP = ladderIP; }
inline AsciiString getLadderIP( void ) const { return m_ladderIP; }
inline void setLadderPort( UnsignedShort ladderPort ) { m_ladderPort = ladderPort; }
inline UnsignedShort getLadderPort( void ) const { return m_ladderPort; }
void setID(Int id) { m_id = id; }
Int getID( void ) const { return m_id; }

void setHasPassword(Bool val) { m_requiresPassword = val; }
Bool getHasPassword(void) const { return m_requiresPassword; }
void setAllowObservers(Bool val) { m_allowObservers = val; }
Bool getAllowObservers(void) const { return m_allowObservers; }

void setVersion(UnsignedInt val) { m_version = val; }
UnsignedInt getVersion(void) const { return m_version; }
void setExeCRC(UnsignedInt val) { m_exeCRC = val; }
UnsignedInt getExeCRC(void) const { return m_exeCRC; }
void setIniCRC(UnsignedInt val) { m_iniCRC = val; }
UnsignedInt getIniCRC(void) const { return m_iniCRC; }

void setReportedNumPlayers(Int val) { m_reportedNumPlayers = val; }
Int getReportedNumPlayers(void) const { return m_reportedNumPlayers; }

void setReportedMaxPlayers(Int val) { m_reportedMaxPlayers = val; }
Int getReportedMaxPlayers(void) const { return m_reportedMaxPlayers; }

void setReportedNumObservers(Int val) { m_reportedNumObservers = val; }
Int getReportedNumObservers(void) const { return m_reportedNumObservers; }

void setLadderIP( AsciiString ladderIP ) { m_ladderIP = ladderIP; }
AsciiString getLadderIP( void ) const { return m_ladderIP; }
void setLadderPort( UnsignedShort ladderPort ) { m_ladderPort = ladderPort; }
UnsignedShort getLadderPort( void ) const { return m_ladderPort; }
void setPingString( AsciiString pingStr );
inline AsciiString getPingString( void ) const { return m_pingStr; }
inline Int getPingAsInt( void ) const { return m_pingInt; }
AsciiString getPingString( void ) const { return m_pingStr; }
Int getPingAsInt( void ) const { return m_pingInt; }

virtual Bool amIHost( void ) const; ///< Convenience function - is the local player the game host?

Expand All @@ -147,10 +147,10 @@ class GameSpyStagingRoom : public GameInfo
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

inline void setGameName( UnicodeString name ) { m_gameName = name; }
inline UnicodeString getGameName( void ) const { return m_gameName; }
void setGameName( UnicodeString name ) { m_gameName = name; }
UnicodeString getGameName( void ) const { return m_gameName; }

inline void setLocalName( AsciiString name ) { m_localName = name; }
void setLocalName( AsciiString name ) { m_localName = name; }
};

extern GameSpyStagingRoom *TheGameSpyGame;
12 changes: 6 additions & 6 deletions Core/GameEngine/Include/GameNetwork/IPEnumeration.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ class EnumeratedIP : public MemoryPoolObject
EnumeratedIP() { m_IPstring = ""; m_next = NULL; m_IP = 0; }

// Access functions
inline AsciiString getIPstring( void ) { return m_IPstring; }
inline void setIPstring( AsciiString name ) { m_IPstring = name; }
inline UnsignedInt getIP( void ) { return m_IP; }
inline void setIP( UnsignedInt IP ) { m_IP = IP; }
inline EnumeratedIP *getNext( void ) { return m_next; }
inline void setNext( EnumeratedIP *next ) { m_next = next; }
AsciiString getIPstring( void ) { return m_IPstring; }
void setIPstring( AsciiString name ) { m_IPstring = name; }
UnsignedInt getIP( void ) { return m_IP; }
void setIP( UnsignedInt IP ) { m_IP = IP; }
EnumeratedIP *getNext( void ) { return m_next; }
void setNext( EnumeratedIP *next ) { m_next = next; }

protected:
AsciiString m_IPstring;
Expand Down
6 changes: 3 additions & 3 deletions Core/GameEngine/Include/GameNetwork/LANAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ class LANAPI : public LANAPIInterface
virtual Bool SetLocalIP( UnsignedInt localIP ); ///< For multiple NIC machines
virtual void SetLocalIP( AsciiString localIP ); ///< For multiple NIC machines
virtual Bool AmIHost( void ); ///< Am I hosting a game?
virtual inline UnicodeString GetMyName( void ) { return m_name; } ///< What's my name?
virtual inline LANGameInfo* GetMyGame( void ) { return m_currentGame; } ///< What's my Game?
virtual inline UnsignedInt GetLocalIP( void ) { return m_localIP; } ///< What's my IP?
virtual UnicodeString GetMyName( void ) { return m_name; } ///< What's my name?
virtual LANGameInfo* GetMyGame( void ) { return m_currentGame; } ///< What's my Game?
virtual UnsignedInt GetLocalIP( void ) { return m_localIP; } ///< What's my IP?
virtual void fillInLANMessage( LANMessage *msg ); ///< Fill in default params
virtual void checkMOTD( void );
protected:
Expand Down
44 changes: 22 additions & 22 deletions Core/GameEngine/Include/GameNetwork/LANGameInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ class LANGameSlot : public GameSlot
Bool isUser( LANPlayer *user ); ///< Does this slot contain the given user? Based off user->name
Bool isUser( UnicodeString userName ); ///< Does this slot contain the given user?
Bool isLocalPlayer( void ) const; ///< Is this slot me?
inline void setLogin( UnicodeString name ) { m_user.setLogin(name); }
inline void setLogin( AsciiString name ) { m_user.setLogin(name); }
inline void setHost( UnicodeString name ) { m_user.setHost(name); }
inline void setHost( AsciiString name ) { m_user.setHost(name); }
inline void setSerial( AsciiString serial ) { m_serial = serial; }
inline AsciiString getSerial( void ) { return m_serial; }
void setLogin( UnicodeString name ) { m_user.setLogin(name); }
void setLogin( AsciiString name ) { m_user.setLogin(name); }
void setHost( UnicodeString name ) { m_user.setHost(name); }
void setHost( AsciiString name ) { m_user.setHost(name); }
void setSerial( AsciiString serial ) { m_serial = serial; }
AsciiString getSerial( void ) { return m_serial; }

inline void setLastHeard( UnsignedInt t ) { m_lastHeard = t; }
inline UnsignedInt getLastHeard( void ) { return m_lastHeard; }
void setLastHeard( UnsignedInt t ) { m_lastHeard = t; }
UnsignedInt getLastHeard( void ) { return m_lastHeard; }

//LANGameSlot& operator=(const LANGameSlot& src);

Expand Down Expand Up @@ -85,68 +85,68 @@ class LANGameInfo : public GameInfo
virtual Int getLocalSlotNum( void ) const; ///< Get the local slot number, or -1 if we're not present
Int getSlotNum( UnicodeString userName ); ///< Get the slot number corresponding to a specific user, or -1 if he's not present

inline UnsignedInt getLastHeard( void ) { return m_lastHeard; }
inline void setLastHeard( UnsignedInt lastHeard ) { m_lastHeard = lastHeard; }
inline LANGameInfo *getNext( void ) { return m_next; }
inline void setNext( LANGameInfo *next ) { m_next = next; }
UnsignedInt getLastHeard( void ) { return m_lastHeard; }
void setLastHeard( UnsignedInt lastHeard ) { m_lastHeard = lastHeard; }
LANGameInfo *getNext( void ) { return m_next; }
void setNext( LANGameInfo *next ) { m_next = next; }

// Game options
void setMap( AsciiString mapName ); ///< Set the map to play on
void setSeed( Int seed ); ///< Set the random seed for the game

inline void setName( UnicodeString name ) { m_gameName = name; } ///< Set the Name of the Game
inline UnicodeString getName( void ) { return m_gameName; } ///< Get the Name of the Game
void setName( UnicodeString name ) { m_gameName = name; } ///< Set the Name of the Game
UnicodeString getName( void ) { return m_gameName; } ///< Get the Name of the Game

// Convinience functions that interface with the LANPlayer held in the slot list
virtual void resetAccepted(void); ///< Reset the accepted flag on all players
Bool amIHost( void ); ///< Convenience function - is the local player the game host?

/// Get the IP of selected player or return 0
inline UnsignedInt getIP( int who )
UnsignedInt getIP( int who )
{
return m_LANSlot[who].getIP();
}

/// Set the IP of the Selected Player
inline void setIP( int who, UnsignedInt IP )
void setIP( int who, UnsignedInt IP )
{
m_LANSlot[who].setIP(IP);
}

/// set whether or not this is a direct connect game or not.
inline void setIsDirectConnect(Bool isDirectConnect)
void setIsDirectConnect(Bool isDirectConnect)
{
m_isDirectConnect = isDirectConnect;
}

/// returns whether or not this is a direct connect game or not.
inline Bool getIsDirectConnect()
Bool getIsDirectConnect()
{
return m_isDirectConnect;
}

/// Set the Player Name
inline void setPlayerName( int who, UnicodeString name )
void setPlayerName( int who, UnicodeString name )
{
m_LANSlot[who].setName(name);
}

/// Return the Player name or TheEmptyString
inline UnicodeString getPlayerName(int who)
UnicodeString getPlayerName(int who)
{
return m_LANSlot[who].getName();
}

/// Return the time the player was heard from last, or 0
inline UnsignedInt getPlayerLastHeard( int who )
UnsignedInt getPlayerLastHeard( int who )
{
if (m_LANSlot[who].isHuman())
return m_LANSlot[who].getLastHeard();
return 0;
}

/// Set the last time we heard from the player
inline void setPlayerLastHeard( int who, UnsignedInt lastHeard )
void setPlayerLastHeard( int who, UnsignedInt lastHeard )
{
DEBUG_LOG(("LANGameInfo::setPlayerLastHeard - changing player %d last heard from %d to %d", who, getPlayerLastHeard(who), lastHeard));
if (m_LANSlot[who].isHuman())
Expand Down
Loading
Loading