Skip to content
5 changes: 1 addition & 4 deletions Core/GameEngine/Include/Common/ArchiveFileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,7 @@ class ArchiveFileSystem : public SubsystemInterface
ArchiveFileSystem();
virtual ~ArchiveFileSystem() override;

virtual void init() = 0;
virtual void update() = 0;
virtual void reset() = 0;
virtual void postProcessLoad() = 0;
virtual void postProcessLoad() override = 0;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if this was removed?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing. It's just to acknowledge that the base class also has this exact function, but it's not pure virtual. If that were removed that would lead to a compilation error here, which seems desirable.


// ArchiveFile operations
virtual ArchiveFile* openArchiveFile( const Char *filename ) = 0; ///< Create new or return existing Archive file from file name
Expand Down
8 changes: 4 additions & 4 deletions Core/GameEngine/Include/Common/GameMemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ private: \
// ----------------------------------------------------------------------------
#define MEMORY_POOL_GLUE_WITHOUT_GCMP(ARGCLASS) \
protected: \
virtual ~ARGCLASS(); \
virtual ~ARGCLASS() override; \
public: \
enum ARGCLASS##MagicEnum { ARGCLASS##_GLUE_NOT_IMPLEMENTED = 0 }; \
public: \
Expand Down Expand Up @@ -665,7 +665,7 @@ protected: \
ARGCLASS::getClassMemoryPool()->freeBlock(p); \
} \
private: \
virtual MemoryPool *getObjectMemoryPool() \
virtual MemoryPool *getObjectMemoryPool() override \
{ \
return ARGCLASS::getClassMemoryPool(); \
} \
Expand All @@ -690,7 +690,7 @@ private: \
// this is the version for an Abstract Base Class, which will never be instantiated...
#define MEMORY_POOL_GLUE_ABC(ARGCLASS) \
protected: \
virtual ~ARGCLASS(); \
virtual ~ARGCLASS() override; \
public: \
enum ARGCLASS##MagicEnum { ARGCLASS##_GLUE_NOT_IMPLEMENTED = 0 }; \
protected: \
Expand Down Expand Up @@ -719,7 +719,7 @@ protected: \
DEBUG_CRASH(("this should be impossible to call (abstract base class)")); \
} \
private: \
virtual MemoryPool *getObjectMemoryPool() \
virtual MemoryPool *getObjectMemoryPool() override \
{ \
throw ERROR_BUG; \
return 0; \
Expand Down
4 changes: 0 additions & 4 deletions Core/GameEngine/Include/Common/LocalFileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ class LocalFileSystem : public SubsystemInterface
public:
virtual ~LocalFileSystem() override {}

virtual void init() = 0;
virtual void reset() = 0;
virtual void update() = 0;

virtual File * openFile(const Char *filename, Int access = File::NONE, size_t bufferSize = File::BUFFERSIZE) = 0;
virtual Bool doesFileExist(const Char *filename) const = 0;
virtual void getFileListInDirectory(const AsciiString& currentDirectory, const AsciiString& originalDirectory, const AsciiString& searchName, FilenameList &filenameList, Bool searchSubdirectories) const = 0; ///< search the given directory for files matching the searchName (egs. *.ini, *.rep). Possibly search subdirectories.
Expand Down
12 changes: 6 additions & 6 deletions Core/GameEngine/Include/GameClient/LoadScreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class SinglePlayerLoadScreen : public LoadScreen

virtual void init( GameInfo *game ) override; ///< Init the loadscreen
virtual void reset() override; ///< Reset the system
virtual void update()
virtual void update() override
{
DEBUG_CRASH(("Call update(Int) instead. This update isn't supported"));
};
Expand Down Expand Up @@ -132,7 +132,7 @@ class ChallengeLoadScreen : public LoadScreen

virtual void init( GameInfo *game ) override; ///< Init the loadscreen
virtual void reset() override; ///< Reset the system
virtual void update()
virtual void update() override
{
DEBUG_CRASH(("Call update(Int) instead. This update isn't supported"));
};
Expand Down Expand Up @@ -204,7 +204,7 @@ class ShellGameLoadScreen : public LoadScreen

virtual void init( GameInfo *game ) override; ///< Init the loadscreen
virtual void reset() override; ///< Reset the system
virtual void update()
virtual void update() override
{
DEBUG_CRASH(("Call update(Int) instead. This update isn't supported"));
};
Expand Down Expand Up @@ -232,7 +232,7 @@ class MultiPlayerLoadScreen : public LoadScreen

virtual void init( GameInfo *game ) override; ///< Init the loadscreen
virtual void reset() override; ///< Reset the system
virtual void update()
virtual void update() override
{
DEBUG_CRASH(("Call update(Int) instead. This update isn't supported"));
};
Expand Down Expand Up @@ -263,7 +263,7 @@ class GameSpyLoadScreen : public LoadScreen

virtual void init( GameInfo *game ) override; ///< Init the loadscreen
virtual void reset() override; ///< Reset the system
virtual void update()
virtual void update() override
{
DEBUG_CRASH(("Call update(Int) instead. This update isn't supported"));
};
Expand Down Expand Up @@ -301,7 +301,7 @@ class MapTransferLoadScreen : public LoadScreen

virtual void init( GameInfo *game ) override; ///< Init the loadscreen
virtual void reset() override; ///< Reset the system
virtual void update()
virtual void update() override
{
DEBUG_CRASH(("Call update(Int) instead. This update isn't supported"));
};
Expand Down
5 changes: 0 additions & 5 deletions Core/GameEngine/Include/GameClient/VideoPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,6 @@ class VideoPlayerInterface : public SubsystemInterface
{

public:

virtual void init() = 0; ///< Initialize video playback
virtual void reset() = 0; ///< Reset video playback
virtual void update() = 0; ///< Services all video tasks. Should be called frequently

virtual void deinit() = 0; ///< Close down player

virtual ~VideoPlayerInterface() override {};
Expand Down
4 changes: 0 additions & 4 deletions Core/GameEngine/Include/GameNetwork/LANAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ class LANAPIInterface : public SubsystemInterface

virtual ~LANAPIInterface() override { };

virtual void init() = 0; ///< Initialize or re-initialize the instance
virtual void reset() = 0; ///< reset the logic system
virtual void update() = 0; ///< update the world

virtual void setIsActive(Bool isActive ) = 0; ///< Tell TheLAN whether or not the app is active.

// Possible types of chat messages
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Include/GameNetwork/LANGameInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class LANGameInfo : public GameInfo

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

/// Get the IP of selected player or return 0
UnsignedInt getIP( int who )
Expand Down
5 changes: 0 additions & 5 deletions Core/GameEngine/Include/GameNetwork/NetworkInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ class NetworkInterface : public SubsystemInterface

static NetworkInterface * createNetwork();

//---------------------------------------------------------------------------------------
// SubsystemInterface functions
virtual void init() = 0; ///< Initialize the network
virtual void reset() = 0; ///< Re-initialize the network
virtual void update() = 0; ///< Updates the network
virtual void liteupdate() = 0; ///< does a lightweight update for passing messages around.

virtual void setLocalAddress(UnsignedInt ip, UnsignedInt port) = 0; ///< Tell the network what local ip and port to bind to.
Expand Down
6 changes: 3 additions & 3 deletions Core/GameEngine/Include/GameNetwork/WOLBrowser/WebBrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ class WebBrowser :
// IUnknown methods
//---------------------------------------------------------------------------
protected:
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject) IUNKNOWN_NOEXCEPT;
ULONG STDMETHODCALLTYPE AddRef() IUNKNOWN_NOEXCEPT;
ULONG STDMETHODCALLTYPE Release() IUNKNOWN_NOEXCEPT;
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject) IUNKNOWN_NOEXCEPT override;
ULONG STDMETHODCALLTYPE AddRef() IUNKNOWN_NOEXCEPT override;
ULONG STDMETHODCALLTYPE Release() IUNKNOWN_NOEXCEPT override;

//---------------------------------------------------------------------------
// IBrowserDispatch methods
Expand Down
9 changes: 0 additions & 9 deletions Core/GameEngine/Source/Common/System/LocalFileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,3 @@ LocalFileSystem *TheLocalFileSystem = nullptr;
//----------------------------------------------------------------------------
// Public Functions
//----------------------------------------------------------------------------

void LocalFileSystem::init() {
}

void LocalFileSystem::reset() {
}

void LocalFileSystem::update() {
}
4 changes: 2 additions & 2 deletions Core/GameEngine/Source/GameNetwork/LANGameInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,13 @@ Int LANGameInfo::getSlotNum( UnicodeString userName )
return -1;
}

Bool LANGameInfo::amIHost()
Bool LANGameInfo::amIHost() const
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this change behavior? Meaning a different function is called now?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a bug to me, but without noticeable issues:

Code

Bool GameInfo::amIHost() const
{
DEBUG_ASSERTCRASH(m_inGame, ("Looking for game slot while not in game"));
if (!m_inGame)
return false;
return getConstSlot(0)->isPlayer(m_localIP);
}

Bool GameSlot::isPlayer( UnsignedInt ip ) const
{
return (m_state == SLOT_PLAYER && m_IP == ip);
}

Bool LANGameInfo::amIHost()
{
DEBUG_ASSERTCRASH(m_inGame, ("Looking for game slot while not in game"));
if (!m_inGame)
return false;
return getLANSlot(0)->isLocalPlayer();
}

Bool LANGameSlot::isLocalPlayer() const
{
return isHuman() && TheLAN && TheLAN->GetLocalIP() == getIP();
}

{
DEBUG_ASSERTCRASH(m_inGame, ("Looking for game slot while not in game"));
if (!m_inGame)
return false;

return getLANSlot(0)->isLocalPlayer();
return getConstLANSlot(0)->isLocalPlayer();
}

void LANGameInfo::setMap( AsciiString mapName )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class BaseHeightMapRenderObjClass : public RenderObjClass, public DX8_CleanupHoo
/////////////////////////////////////////////////////////////////////////////
virtual RenderObjClass * Clone() const override;
virtual int Class_ID() const override;
virtual void Render(RenderInfoClass & rinfo) = 0;
virtual void Render(RenderInfoClass & rinfo) override = 0;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if this is omitted?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing. It's just to acknowledge that the base class also has this exact function, but it's not pure virtual. If that were removed that would lead to a compilation error here, which seems desirable.

virtual bool Cast_Ray(RayCollisionTestClass & raytest) override; // This CANNOT be Bool, as it will not inherit properly if you make Bool == Int
virtual void Get_Obj_Space_Bounding_Sphere(SphereClass & sphere) const override;
virtual void Get_Obj_Space_Bounding_Box(AABoxClass & aabox) const override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ class W3DModelDraw : public DrawModule, public ObjectDrawInterface
virtual void allocateShadows() override; ///< create shadow resources if not already present. Used by Options screen.

#if defined(RTS_DEBUG)
virtual void getRenderCost(RenderCost & rc) const; ///< estimates the render cost of this draw module
virtual void getRenderCost(RenderCost & rc) const override; ///< estimates the render cost of this draw module
void getRenderCostRecursive(RenderCost & rc,RenderObjClass * robj) const;
#endif

Expand Down Expand Up @@ -408,7 +408,7 @@ class W3DModelDraw : public DrawModule, public ObjectDrawInterface
virtual void setPauseAnimation(Bool pauseAnim) override;

//Kris: Manually set a drawable's current animation to specific frame.
virtual void setAnimationFrame( int frame );
virtual void setAnimationFrame( int frame ) override;

virtual void updateSubObjects() override;
virtual void showSubObject( const AsciiString& name, Bool show ) override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class W3DTreeDrawModuleData : public ModuleData
virtual ~W3DTreeDrawModuleData() override;
static void buildFieldParse(MultiIniFieldParse& p);
// ugh, hack
virtual const W3DTreeDrawModuleData* getAsW3DTreeDrawModuleData() const { return this; }
virtual const W3DTreeDrawModuleData* getAsW3DTreeDrawModuleData() const override { return this; }
};

//-------------------------------------------------------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions Core/GameEngineDevice/Include/W3DDevice/GameClient/W3DView.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ class W3DView : public View, public SubsystemInterface

virtual void forceRedraw() override;

virtual Bool isDoingScriptedCamera();
virtual void stopDoingScriptedCamera();
virtual Bool isDoingScriptedCamera() override;
virtual void stopDoingScriptedCamera() override;

virtual void setAngle( Real radians ) override; ///< Rotate the view around the vertical axis to the given angle (yaw)
virtual void setPitch( Real radians ) override; ///< Rotate the view around the horizontal axis to the given angle (pitch)
Expand All @@ -188,9 +188,9 @@ class W3DView : public View, public SubsystemInterface
virtual void rotateCamera(Real rotations, Int frames, Real easeIn, Real easeOut) override; ///< Rotate camera about current viewpoint.
virtual void rotateCameraTowardObject(ObjectID id, Int milliseconds, Int holdMilliseconds, Real easeIn, Real easeOut) override; ///< Rotate camera to face an object, and hold on it
virtual void rotateCameraTowardPosition(const Coord3D *pLoc, Int milliseconds, Real easeIn, Real easeOut, Bool reverseRotation) override; ///< Rotate camera to face a location.
virtual void cameraModFreezeTime(){ m_freezeTimeForCameraMovement = true;} ///< Freezes time during the next camera movement.
virtual void cameraModFreezeTime() override { m_freezeTimeForCameraMovement = true;} ///< Freezes time during the next camera movement.
virtual void cameraModFreezeAngle() override; ///< Freezes time during the next camera movement.
virtual Bool isTimeFrozen(){ return m_freezeTimeForCameraMovement;} ///< Freezes time during the next camera movement.
virtual Bool isTimeFrozen() override { return m_freezeTimeForCameraMovement;} ///< Freezes time during the next camera movement.
virtual void cameraModFinalZoom(Real finalZoom, Real easeIn, Real easeOut) override; ///< Final zoom for current camera movement.
virtual void cameraModRollingAverage(Int framesToAverage) override; ///< Number of frames to average movement for current camera movement.
virtual void cameraModFinalTimeMultiplier(Int finalMultiplier) override; ///< Final time multiplier for current camera movement.
Expand Down Expand Up @@ -314,7 +314,7 @@ class W3DView : public View, public SubsystemInterface
void clipCameraIntoAreaConstraints();
Bool isWithinCameraAreaConstraints() const;
Bool isWithinCameraHeightConstraints() const;
virtual void setUserControlled(Bool value);
virtual void setUserControlled(Bool value) override;
Bool hasScriptedState(ScriptedState state) const;
void addScriptedState(ScriptedState state);
void removeScriptedState(ScriptedState state);
Expand Down
2 changes: 1 addition & 1 deletion Core/Libraries/Source/WWVegas/WW3D2/texture.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ class TextureBaseClass : public RefCountClass
** modes.
**
*************************************************************************/
class TextureClass : public TextureBaseClass
class TextureClass : public W3DMPO, public TextureBaseClass
{
W3DMPO_GLUE(TextureClass)
// friend DX8Wrapper;
Expand Down
2 changes: 1 addition & 1 deletion Core/Libraries/Source/WWVegas/WWAudio/FilteredSound.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class FilteredSoundClass : public SoundPseudo3DClass
//////////////////////////////////////////////////////////////////////
// Identification methods
//////////////////////////////////////////////////////////////////////
virtual SOUND_CLASSID Get_Class_ID () { return CLASSID_FILTERED; }
virtual SOUND_CLASSID Get_Class_ID () const override { return CLASSID_FILTERED; }

//////////////////////////////////////////////////////////////////////
// Conversion methods
Expand Down
2 changes: 1 addition & 1 deletion Core/Libraries/Source/WWVegas/WWAudio/Sound3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class Sound3DClass : public AudibleSoundClass
// This is the distance where the sound can not be heard any longer. (its vol is 0)
//
virtual void Set_DropOff_Radius (float radius = 1) override;
virtual float Get_DropOff_Radius () {return(m_DropOffRadius);}
virtual float Get_DropOff_Radius () const override {return(m_DropOffRadius);}

// From PersistClass
virtual const PersistFactoryClass & Get_Factory () const override;
Expand Down
2 changes: 1 addition & 1 deletion Core/Libraries/Source/WWVegas/WWLib/always.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ private: \
return The##ARGCLASS##Pool; \
} \
protected: \
virtual void glueEnforcer() const { } \
virtual void glueEnforcer() const override { } \
public: \
inline void* operator new(size_t s) { return allocateFromW3DMemPool(getClassMemoryPool(), s); } \
inline void operator delete(void *p) { freeFromW3DMemPool(getClassMemoryPool(), p); } \
Expand Down
4 changes: 2 additions & 2 deletions Core/Libraries/Source/WWVegas/WWMath/cardinalspline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ bool CardinalSpline3DClass::Load(ChunkLoadClass &cload)
/*
** CardinalSpline1DClass Implementation
*/
int CardinalSpline1DClass::Add_Key(float point,float t)
int CardinalSpline1DClass::Add_Key(float point,float t,unsigned int extra)
{
int index = HermiteSpline1DClass::Add_Key(point,t);
int index = HermiteSpline1DClass::Add_Key(point,t,extra);
float tightness = 0.5f;
Tightness.Insert(index,tightness);
return index;
Expand Down
2 changes: 1 addition & 1 deletion Core/Libraries/Source/WWVegas/WWMath/cardinalspline.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class CardinalSpline1DClass : public HermiteSpline1DClass
{
public:

virtual int Add_Key(float point,float t);
virtual int Add_Key(float point,float t,unsigned int extra=0) override;
virtual void Remove_Key(int i) override;
virtual void Clear_Keys() override;

Expand Down
2 changes: 1 addition & 1 deletion Core/Tools/ParticleEditor/CColorAlphaDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class CColorAlphaDialog : public CDialog


protected:
virtual BOOL OnInitDialog();
virtual BOOL OnInitDialog() override;

afx_msg void OnColor1();
afx_msg void OnColor2();
Expand Down
Loading
Loading