Skip to content
Open
2 changes: 1 addition & 1 deletion Core/GameEngine/Include/GameClient/Snow.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class WeatherSetting : public Overridable

EMPTY_DTOR(WeatherSetting)

extern OVERRIDE<WeatherSetting> TheWeatherSetting;
extern OverridePtr<WeatherSetting> TheWeatherSetting;

class SnowManager : public SubsystemInterface
{
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Include/GameClient/Water.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@ EMPTY_DTOR(WaterTransparencySetting)
// EXTERNAL ///////////////////////////////////////////////////////////////////////////////////////
extern WaterSetting WaterSettings[ TIME_OF_DAY_COUNT ];

extern OVERRIDE<WaterTransparencySetting> TheWaterTransparency;
extern OverridePtr<WaterTransparencySetting> TheWaterTransparency;
2 changes: 1 addition & 1 deletion Core/GameEngine/Source/GameClient/Snow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ SnowManager::~SnowManager()
TheWeatherSetting=nullptr;
}

OVERRIDE<WeatherSetting> TheWeatherSetting = nullptr;
OverridePtr<WeatherSetting> TheWeatherSetting = nullptr;

// PRIVATE DATA ///////////////////////////////////////////////////////////////////////////////////
const FieldParse WeatherSetting::m_weatherSettingFieldParseTable[] =
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Source/GameClient/Water.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

// GLOBALS ////////////////////////////////////////////////////////////////////////////////////////
WaterSetting WaterSettings[ TIME_OF_DAY_COUNT ];
OVERRIDE<WaterTransparencySetting> TheWaterTransparency = nullptr;
OverridePtr<WaterTransparencySetting> TheWaterTransparency = nullptr;

// PRIVATE DATA ///////////////////////////////////////////////////////////////////////////////////
const FieldParse WaterSetting::m_waterSettingFieldParseTable[] =
Expand Down
42 changes: 21 additions & 21 deletions Core/GameEngine/Source/GameNetwork/GameSpy/GSConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,40 +45,40 @@ class GameSpyConfig : public GameSpyConfigInterface
{
public:
GameSpyConfig( AsciiString config );
~GameSpyConfig() {}
~GameSpyConfig() OVERRIDE {}

// Pings
std::list<AsciiString> getPingServers(void) { return m_pingServers; }
Int getNumPingRepetitions(void) { return m_pingReps; }
Int getPingTimeoutInMs(void) { return m_pingTimeout; }
virtual Int getPingCutoffGood( void ) { return m_pingCutoffGood; }
virtual Int getPingCutoffBad( void ) { return m_pingCutoffBad; }
std::list<AsciiString> getPingServers(void) OVERRIDE { return m_pingServers; }
Int getNumPingRepetitions(void) OVERRIDE { return m_pingReps; }
Int getPingTimeoutInMs(void) OVERRIDE { return m_pingTimeout; }
Int getPingCutoffGood( void ) OVERRIDE { return m_pingCutoffGood; }
Int getPingCutoffBad( void ) OVERRIDE { return m_pingCutoffBad; }

// QM
std::list<AsciiString> getQMMaps(void) { return m_qmMaps; }
Int getQMBotID(void) { return m_qmBotID; }
Int getQMChannel(void) { return m_qmChannel; }
void setQMChannel(Int channel) { m_qmChannel = channel; }
std::list<AsciiString> getQMMaps(void) OVERRIDE { return m_qmMaps; }
Int getQMBotID(void) OVERRIDE { return m_qmBotID; }
Int getQMChannel(void) OVERRIDE { return m_qmChannel; }
void setQMChannel(Int channel) OVERRIDE { m_qmChannel = channel; }

// Player Info
Int getPointsForRank(Int rank);
virtual Bool isPlayerVIP(Int id);
Int getPointsForRank(Int rank) OVERRIDE;
Bool isPlayerVIP(Int id) OVERRIDE;

virtual Bool getManglerLocation(Int index, AsciiString& host, UnsignedShort& port);
Bool getManglerLocation(Int index, AsciiString& host, UnsignedShort& port) OVERRIDE;

// Ladder / Any other external parsing
AsciiString getLeftoverConfig(void) { return m_leftoverConfig; }
AsciiString getLeftoverConfig(void) OVERRIDE { return m_leftoverConfig; }

// NAT Timeouts
virtual Int getTimeBetweenRetries() { return m_natRetryInterval; }
virtual Int getMaxManglerRetries() { return m_natMaxManglerRetries; }
virtual time_t getRetryInterval() { return m_natManglerRetryInterval; }
virtual time_t getKeepaliveInterval() { return m_natKeepaliveInterval; }
virtual time_t getPortTimeout() { return m_natPortTimeout; }
virtual time_t getRoundTimeout() { return m_natRoundTimeout; }
Int getTimeBetweenRetries() OVERRIDE { return m_natRetryInterval; }
Int getMaxManglerRetries() OVERRIDE { return m_natMaxManglerRetries; }
time_t getRetryInterval() OVERRIDE { return m_natManglerRetryInterval; }
time_t getKeepaliveInterval() OVERRIDE { return m_natKeepaliveInterval; }
time_t getPortTimeout() OVERRIDE { return m_natPortTimeout; }
time_t getRoundTimeout() OVERRIDE { return m_natRoundTimeout; }

// Custom match
virtual Bool restrictGamesToLobby() { return m_restrictGamesToLobby; }
Bool restrictGamesToLobby() OVERRIDE { return m_restrictGamesToLobby; }

protected:
std::list<AsciiString> m_pingServers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ IDirect3DSurface8 *W3DShaderManager::m_oldDepthSurface=nullptr; ///<previous dep
class ScreenDefaultFilter : public W3DFilterInterface
{
public:
virtual Int init(void); ///<perform any one time initialization and validation
virtual Bool preRender(Bool &skipRender, CustomScenePassModes &scenePassMode); ///< Set up at start of render. Only applies to screen filter shaders.
virtual Bool postRender(FilterModes mode, Coord2D &scrollDelta,Bool &doExtraRender); ///< Called after render. Only applies to screen filter shaders.
virtual Bool setup(FilterModes mode){return true;} ///< Called when the filter is started, one time before the first prerender.
Int init(void) OVERRIDE; ///<perform any one time initialization and validation
Bool preRender(Bool &skipRender, CustomScenePassModes &scenePassMode) OVERRIDE; ///< Set up at start of render. Only applies to screen filter shaders.
Bool postRender(FilterModes mode, Coord2D &scrollDelta,Bool &doExtraRender) OVERRIDE; ///< Called after render. Only applies to screen filter shaders.
Bool setup(FilterModes mode) OVERRIDE{return true;} ///< Called when the filter is started, one time before the first prerender.
protected:
virtual Int set(FilterModes mode); ///<setup shader for the specified rendering pass.
virtual void reset(void); ///<do any custom resetting necessary to bring W3D in sync.
Int set(FilterModes mode) OVERRIDE; ///<setup shader for the specified rendering pass.
void reset(void) OVERRIDE; ///<do any custom resetting necessary to bring W3D in sync.
};

ScreenDefaultFilter screenDefaultFilter;
Expand Down Expand Up @@ -1177,9 +1177,9 @@ Int ScreenMotionBlurFilter::shutdown(void)
///Shroud layer rendering shader
class ShroudTextureShader : public W3DShaderInterface
{
virtual Int set(Int pass); ///<setup shader for the specified rendering pass.
virtual Int init(void); ///<perform any one time initialization and validation
virtual void reset(void); ///<do any custom resetting necessary to bring W3D in sync.
Int set(Int pass) OVERRIDE; ///<setup shader for the specified rendering pass.
Int init(void) OVERRIDE; ///<perform any one time initialization and validation
void reset(void) OVERRIDE; ///<do any custom resetting necessary to bring W3D in sync.
Int m_stageOfSet;
} shroudTextureShader;

Expand Down Expand Up @@ -1277,9 +1277,9 @@ void ShroudTextureShader::reset(void)
///Shroud layer rendering shader
class FlatShroudTextureShader : public W3DShaderInterface
{
virtual Int set(Int pass); ///<setup shader for the specified rendering pass.
virtual Int init(void); ///<perform any one time initialization and validation
virtual void reset(void); ///<do any custom resetting necessary to bring W3D in sync.
Int set(Int pass) OVERRIDE; ///<setup shader for the specified rendering pass.
Int init(void) OVERRIDE; ///<perform any one time initialization and validation
void reset(void) OVERRIDE; ///<do any custom resetting necessary to bring W3D in sync.
Int m_stageOfSet;
} flatShroudTextureShader;

Expand Down Expand Up @@ -1370,9 +1370,9 @@ void FlatShroudTextureShader::reset(void)
///Mask layer rendering shader
class MaskTextureShader : public W3DShaderInterface
{
virtual Int set(Int pass); ///<setup shader for the specified rendering pass.
virtual Int init(void); ///<perform any one time initialization and validation
virtual void reset(void); ///<do any custom resetting necessary to bring W3D in sync.
Int set(Int pass) OVERRIDE; ///<setup shader for the specified rendering pass.
Int init(void) OVERRIDE; ///<perform any one time initialization and validation
void reset(void) OVERRIDE; ///<do any custom resetting necessary to bring W3D in sync.
} maskTextureShader;

///List of different shroud shader implementations in order of preference
Expand Down Expand Up @@ -1486,9 +1486,9 @@ class TerrainShader2Stage : public W3DShaderInterface
float m_xOffset;
float m_yOffset;

virtual Int set(Int pass); ///<setup shader for the specified rendering pass.
virtual Int init(void); ///<perform any one time initialization and validation
virtual void reset(void); ///<do any custom resetting necessary to bring W3D in sync.
Int set(Int pass) OVERRIDE; ///<setup shader for the specified rendering pass.
Int init(void) OVERRIDE; ///<perform any one time initialization and validation
void reset(void) OVERRIDE; ///<do any custom resetting necessary to bring W3D in sync.

void updateCloud();
void updateNoise1 (D3DXMATRIX *destMatrix,D3DXMATRIX *curViewInverse, Bool doUpdate=true); ///<generate the uv coordinates for Noise1 (i.e clouds)
Expand All @@ -1499,9 +1499,9 @@ class TerrainShader2Stage : public W3DShaderInterface
class FlatTerrainShader2Stage : public W3DShaderInterface
{
public:
virtual Int set(Int pass); ///<setup shader for the specified rendering pass.
virtual Int init(void); ///<perform any one time initialization and validation
virtual void reset(void); ///<do any custom resetting necessary to bring W3D in sync.
Int set(Int pass) OVERRIDE; ///<setup shader for the specified rendering pass.
Int init(void) OVERRIDE; ///<perform any one time initialization and validation
void reset(void) OVERRIDE; ///<do any custom resetting necessary to bring W3D in sync.
} flatTerrainShader2Stage;

///regular terrain shader that should work on all multi-texture video cards (slowest version)
Expand All @@ -1512,18 +1512,18 @@ class FlatTerrainShaderPixelShader : public W3DShaderInterface
DWORD m_dwBaseNoise1PixelShader; ///<handle to terrain/single noise D3D pixel shader
DWORD m_dwBaseNoise2PixelShader; ///<handle to terrain/double noise D3D pixel shader
DWORD m_dwBase0PixelShader; ///<handle to terrain only pixel shader
virtual Int set(Int pass); ///<setup shader for the specified rendering pass.
virtual Int init(void); ///<perform any one time initialization and validation
virtual void reset(void); ///<do any custom resetting necessary to bring W3D in sync.
virtual Int shutdown(void); ///<release resources used by shader
Int set(Int pass) OVERRIDE; ///<setup shader for the specified rendering pass.
Int init(void) OVERRIDE; ///<perform any one time initialization and validation
void reset(void) OVERRIDE; ///<do any custom resetting necessary to bring W3D in sync.
Int shutdown(void) OVERRIDE; ///<release resources used by shader
} flatTerrainShaderPixelShader;

///8 stage terrain shader which only works on certain Nvidia cards.
class TerrainShader8Stage : public W3DShaderInterface
{
virtual Int set(Int pass); ///<setup shader for the specified rendering pass.
virtual void reset(void); ///<do any custom resetting necessary to bring W3D in sync.
virtual Int init(void); ///<perform any one time initialization and validation
Int set(Int pass) OVERRIDE; ///<setup shader for the specified rendering pass.
void reset(void) OVERRIDE; ///<do any custom resetting necessary to bring W3D in sync.
Int init(void) OVERRIDE; ///<perform any one time initialization and validation
} terrainShader8Stage;

//Offsets into constant register pool used by vertex shader
Expand All @@ -1536,10 +1536,10 @@ class TerrainShaderPixelShader : public W3DShaderInterface
DWORD m_dwBaseNoise1PixelShader; ///<handle to terrain/single noise D3D pixel shader
DWORD m_dwBaseNoise2PixelShader; ///<handle to terrain/double noise D3D pixel shader

virtual Int set(Int pass); ///<setup shader for the specified rendering pass.
virtual void reset(void); ///<do any custom resetting necessary to bring W3D in sync.
virtual Int init(void); ///<perform any one time initialization and validation
virtual Int shutdown(void); ///<release resources used by shader
Int set(Int pass) OVERRIDE; ///<setup shader for the specified rendering pass.
void reset(void) OVERRIDE; ///<do any custom resetting necessary to bring W3D in sync.
Int init(void) OVERRIDE; ///<perform any one time initialization and validation
Int shutdown(void) OVERRIDE; ///<release resources used by shader
} terrainShaderPixelShader;

///List of different terrain shader implementations in order of preference
Expand Down Expand Up @@ -2133,9 +2133,9 @@ void TerrainShaderPixelShader::reset(void)
///Cloud layer rendering shader - used for objects similar to terrain which only need the cloud layer.
class CloudTextureShader : public W3DShaderInterface
{
virtual Int set(Int stage); ///<setup shader for the specified rendering pass.
virtual Int init(void); ///<perform any one time initialization and validation
virtual void reset(void); ///<do any custom resetting necessary to bring W3D in sync.
Int set(Int stage) OVERRIDE; ///<setup shader for the specified rendering pass.
Int init(void) OVERRIDE; ///<perform any one time initialization and validation
void reset(void) OVERRIDE; ///<do any custom resetting necessary to bring W3D in sync.
Int m_stageOfSet;
} cloudTextureShader;

Expand Down Expand Up @@ -2208,18 +2208,18 @@ class RoadShaderPixelShader : public W3DShaderInterface
{
DWORD m_dwBaseNoise2PixelShader; ///<handle to road/double noise D3D pixel shader

virtual Int set(Int pass); ///<setup shader for the specified rendering pass.
virtual void reset(void); ///<do any custom resetting necessary to bring W3D in sync.
virtual Int init(void); ///<perform any one time initialization and validation
virtual Int shutdown(void); ///<release resources used by shader
Int set(Int pass) OVERRIDE; ///<setup shader for the specified rendering pass.
void reset(void) OVERRIDE; ///<do any custom resetting necessary to bring W3D in sync.
Int init(void) OVERRIDE; ///<perform any one time initialization and validation
Int shutdown(void) OVERRIDE; ///<release resources used by shader
} roadShaderPixelShader;

class RoadShader2Stage : public W3DShaderInterface
{ friend class RoadShaderPixelShader; //pixel shader version uses some of the same features.

virtual Int set(Int pass); ///<setup shader for the specified rendering pass.
virtual Int init(void); ///<perform any one time initialization and validation
virtual void reset(void);
Int set(Int pass) OVERRIDE; ///<setup shader for the specified rendering pass.
Int init(void) OVERRIDE; ///<perform any one time initialization and validation
void reset(void) OVERRIDE;
} roadShader2Stage;

///List of different terrain shader implementations in order of preference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
class TestSeismicFilter : public SeismicSimulationFilterBase
{

virtual SeismicSimStatusCode filterCallback( WorldHeightMapInterfaceClass *heightMap, const SeismicSimulationNode *node )
SeismicSimStatusCode filterCallback( WorldHeightMapInterfaceClass *heightMap, const SeismicSimulationNode *node ) OVERRIDE
{


Expand Down Expand Up @@ -140,7 +140,7 @@ class TestSeismicFilter : public SeismicSimulationFilterBase
return SEISMIC_STATUS_ZERO_ENERGY;
}

virtual Real applyGravityCallback( Real velocityIn )
Real applyGravityCallback( Real velocityIn ) OVERRIDE
{
Real velocityOut = velocityIn;
velocityOut -= 1.5f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ class GDIFileStream2 : public InputStream
public:
GDIFileStream2():m_file(nullptr) {};
GDIFileStream2(File* pFile):m_file(pFile) {};
virtual Int read(void *pData, Int numBytes) {
Int read(void *pData, Int numBytes) OVERRIDE {
return(m_file?m_file->read(pData, numBytes):0);
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class GDIFileStream : public InputStream
File* m_file;
public:
GDIFileStream(File* pFile):m_file(pFile) {};
virtual Int read(void *pData, Int numBytes) {
Int read(void *pData, Int numBytes) OVERRIDE {
return(m_file->read(pData, numBytes));
};
};
Expand Down
4 changes: 4 additions & 0 deletions Dependencies/Utility/Utility/CppMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@

#if __cplusplus >= 201103L
#define CPP_11(code) code
#define OVERRIDE override
#define FINAL final
#else
#define CPP_11(code)
#define static_assert(expr, msg)
#define constexpr
#define noexcept
#define nullptr 0
#define OVERRIDE
#define FINAL
#endif

#if __cplusplus >= 201703L
Expand Down
2 changes: 1 addition & 1 deletion Generals/Code/GameEngine/Include/Common/Overridable.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "Common/GameMemory.h"

/*
In order for something to live in an OVERRIDE<> object, it must be derived from Overridable
In order for something to live in an OverridePtr<> object, it must be derived from Overridable
(publicly).

This is useful for things like templates, where we want to override the template and make sure
Expand Down
Loading
Loading