Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
1c371d8
build: Add override and final keyword compatibility to CppMacros.h
bobtista Feb 23, 2026
0594fd2
refactor(GeneralsMD): Rename override and final identifiers for keywo…
bobtista Feb 23, 2026
e0af359
refactor(Generals): Rename override and final identifiers for keyword…
bobtista Feb 23, 2026
2b9e381
refactor(Core): Rename override and final identifiers for keyword com…
bobtista Feb 23, 2026
eb3c819
refactor(GeneralsMD): Add override keyword to virtual function overrides
bobtista Feb 23, 2026
aab8695
refactor(Generals): Add override keyword to virtual function overrides
bobtista Feb 23, 2026
03befe4
refactor(Core): Add override keyword to virtual function overrides
bobtista Feb 23, 2026
bf1864f
build: Add -Wsuggest-override compiler warning for GCC and Clang
bobtista Feb 23, 2026
cd1dbe8
refactor(GeneralsMD): Add override keyword to virtual function overrides
bobtista Feb 23, 2026
0284f42
refactor(Generals): Add override keyword to virtual function overrides
bobtista Feb 23, 2026
6fc8a79
refactor(Core): Add override keyword to virtual function overrides
bobtista Feb 23, 2026
d6ade3e
bugfix: Remove spurious virtual keyword from enum entries in Scripts.h
bobtista Feb 23, 2026
5675570
bugfix: Remove override from setAnimationFrame which is not in Genera…
bobtista Feb 23, 2026
2f29d46
bugfix: Remove override from methods without matching base class in G…
bobtista Feb 24, 2026
95daa6a
refactor(Core): Add override keyword to virtual function overrides
bobtista Mar 2, 2026
c2dbf68
refactor(GeneralsMD): Add override keyword to virtual function overrides
bobtista Mar 2, 2026
ab9d7ee
bugfix: Remove override from methods without matching base class in G…
bobtista Mar 2, 2026
06f57fb
refactor(Generals): Add override keyword to virtual function overrides
bobtista Mar 2, 2026
b738248
bugfix: Remove override from getPosition which is not virtual in base…
bobtista Mar 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions Core/GameEngine/Include/Common/ArchiveFileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ class ArchiveFileSystem : public SubsystemInterface
{
public:
ArchiveFileSystem();
virtual ~ArchiveFileSystem();
virtual ~ArchiveFileSystem() override;

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

// ArchiveFile operations
virtual ArchiveFile* openArchiveFile( const Char *filename ) = 0; ///< Create new or return existing Archive file from file name
Expand Down
6 changes: 3 additions & 3 deletions Core/GameEngine/Include/Common/DynamicAudioEventInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ class DynamicAudioEventInfo : public AudioEventInfo
explicit DynamicAudioEventInfo( const AudioEventInfo & baseInfo );

// DynamicAudioEventInfo interfacing function overrides
virtual Bool isLevelSpecific() const;
virtual DynamicAudioEventInfo * getDynamicAudioEventInfo();
virtual const DynamicAudioEventInfo * getDynamicAudioEventInfo() const;
virtual Bool isLevelSpecific() const override;
virtual DynamicAudioEventInfo * getDynamicAudioEventInfo() override;
virtual const DynamicAudioEventInfo * getDynamicAudioEventInfo() const override;

// Change various fields from their default (INI) values
void overrideAudioName( const AsciiString & newName );
Expand Down
8 changes: 4 additions & 4 deletions Core/GameEngine/Include/Common/FileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ class FileSystem : public SubsystemInterface

public:
FileSystem();
virtual ~FileSystem();
virtual ~FileSystem() override;

void init();
void reset();
void update();
virtual void init() override;
virtual void reset() override;
virtual void update() override;

File* openFile( const Char *filename, Int access = File::NONE, size_t bufferSize = File::BUFFERSIZE, FileInstance instance = 0 ); ///< opens a File interface to the specified file
Bool doesFileExist(const Char *filename, FileInstance instance = 0) const; ///< returns TRUE if the file exists. filename should have no directory.
Expand Down
92 changes: 46 additions & 46 deletions Core/GameEngine/Include/Common/GameAudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,16 @@ class AudioManager : public SubsystemInterface
static const char *const MuteAudioReasonNames[];

AudioManager();
virtual ~AudioManager();
virtual ~AudioManager() override;
#if defined(RTS_DEBUG)
virtual void audioDebugDisplay(DebugDisplayInterface *dd, void *userData, FILE *fp = nullptr ) = 0;
#endif

// From SubsystemInterface
virtual void init();
virtual void postProcessLoad();
virtual void reset();
virtual void update();
virtual void init() override;
virtual void postProcessLoad() override;
virtual void reset() override;
virtual void update() override;

// device dependent stop, pause and resume
virtual void stopAudio( AudioAffect which ) = 0;
Expand Down Expand Up @@ -390,47 +390,47 @@ class AudioManagerDummy : public AudioManager
#if defined(RTS_DEBUG)
virtual void audioDebugDisplay(DebugDisplayInterface* dd, void* userData, FILE* fp) {}
#endif
virtual void stopAudio(AudioAffect which) {}
virtual void pauseAudio(AudioAffect which) {}
virtual void resumeAudio(AudioAffect which) {}
virtual void pauseAmbient(Bool shouldPause) {}
virtual void killAudioEventImmediately(AudioHandle audioEvent) {}
virtual void nextMusicTrack() {}
virtual void prevMusicTrack() {}
virtual Bool isMusicPlaying() const { return false; }
virtual Bool hasMusicTrackCompleted(const AsciiString& trackName, Int numberOfTimes) const { return false; }
virtual AsciiString getMusicTrackName() const { return ""; }
virtual void openDevice() {}
virtual void closeDevice() {}
virtual void* getDevice() { return nullptr; }
virtual void notifyOfAudioCompletion(UnsignedInt audioCompleted, UnsignedInt flags) {}
virtual UnsignedInt getProviderCount() const { return 0; };
virtual AsciiString getProviderName(UnsignedInt providerNum) const { return ""; }
virtual UnsignedInt getProviderIndex(AsciiString providerName) const { return 0; }
virtual void selectProvider(UnsignedInt providerNdx) {}
virtual void unselectProvider() {}
virtual UnsignedInt getSelectedProvider() const { return 0; }
virtual void setSpeakerType(UnsignedInt speakerType) {}
virtual UnsignedInt getSpeakerType() { return 0; }
virtual UnsignedInt getNum2DSamples() const { return 0; }
virtual UnsignedInt getNum3DSamples() const { return 0; }
virtual UnsignedInt getNumStreams() const { return 0; }
virtual Bool doesViolateLimit(AudioEventRTS* event) const { return false; }
virtual Bool isPlayingLowerPriority(AudioEventRTS* event) const { return false; }
virtual Bool isPlayingAlready(AudioEventRTS* event) const { return false; }
virtual Bool isObjectPlayingVoice(UnsignedInt objID) const { return false; }
virtual void adjustVolumeOfPlayingAudio(AsciiString eventName, Real newVolume) {}
virtual void removePlayingAudio(AsciiString eventName) {}
virtual void removeAllDisabledAudio() {}
virtual Bool has3DSensitiveStreamsPlaying() const { return false; }
virtual void* getHandleForBink() { return nullptr; }
virtual void releaseHandleForBink() {}
virtual void friend_forcePlayAudioEventRTS(const AudioEventRTS* eventToPlay) {}
virtual void setPreferredProvider(AsciiString providerNdx) {}
virtual void setPreferredSpeaker(AsciiString speakerType) {}
virtual Real getFileLengthMS(AsciiString strToLoad) const { return -1; }
virtual void closeAnySamplesUsingFile(const void* fileToClose) {}
virtual void setDeviceListenerPosition() {}
virtual void stopAudio(AudioAffect which) override {}
virtual void pauseAudio(AudioAffect which) override {}
virtual void resumeAudio(AudioAffect which) override {}
virtual void pauseAmbient(Bool shouldPause) override {}
virtual void killAudioEventImmediately(AudioHandle audioEvent) override {}
virtual void nextMusicTrack() override {}
virtual void prevMusicTrack() override {}
virtual Bool isMusicPlaying() const override { return false; }
virtual Bool hasMusicTrackCompleted(const AsciiString& trackName, Int numberOfTimes) const override { return false; }
virtual AsciiString getMusicTrackName() const override { return ""; }
virtual void openDevice() override {}
virtual void closeDevice() override {}
virtual void* getDevice() override { return nullptr; }
virtual void notifyOfAudioCompletion(UnsignedInt audioCompleted, UnsignedInt flags) override {}
virtual UnsignedInt getProviderCount() const override { return 0; };
virtual AsciiString getProviderName(UnsignedInt providerNum) const override { return ""; }
virtual UnsignedInt getProviderIndex(AsciiString providerName) const override { return 0; }
virtual void selectProvider(UnsignedInt providerNdx) override {}
virtual void unselectProvider() override {}
virtual UnsignedInt getSelectedProvider() const override { return 0; }
virtual void setSpeakerType(UnsignedInt speakerType) override {}
virtual UnsignedInt getSpeakerType() override { return 0; }
virtual UnsignedInt getNum2DSamples() const override { return 0; }
virtual UnsignedInt getNum3DSamples() const override { return 0; }
virtual UnsignedInt getNumStreams() const override { return 0; }
virtual Bool doesViolateLimit(AudioEventRTS* event) const override { return false; }
virtual Bool isPlayingLowerPriority(AudioEventRTS* event) const override { return false; }
virtual Bool isPlayingAlready(AudioEventRTS* event) const override { return false; }
virtual Bool isObjectPlayingVoice(UnsignedInt objID) const override { return false; }
virtual void adjustVolumeOfPlayingAudio(AsciiString eventName, Real newVolume) override {}
virtual void removePlayingAudio(AsciiString eventName) override {}
virtual void removeAllDisabledAudio() override {}
virtual Bool has3DSensitiveStreamsPlaying() const override { return false; }
virtual void* getHandleForBink() override { return nullptr; }
virtual void releaseHandleForBink() override {}
virtual void friend_forcePlayAudioEventRTS(const AudioEventRTS* eventToPlay) override {}
virtual void setPreferredProvider(AsciiString providerNdx) override {}
virtual void setPreferredSpeaker(AsciiString speakerType) override {}
virtual Real getFileLengthMS(AsciiString strToLoad) const override { return -1; }
virtual void closeAnySamplesUsingFile(const void* fileToClose) override {}
virtual void setDeviceListenerPosition() override {}
};


Expand Down
10 changes: 5 additions & 5 deletions Core/GameEngine/Include/Common/GameSounds.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ class SoundManager : public SubsystemInterface
{
public:
SoundManager();
virtual ~SoundManager();
virtual ~SoundManager() override;

virtual void init(); ///< Initializes the sounds system
virtual void postProcessLoad();
virtual void update(); ///< Services sounds tasks. Called by AudioInterface
virtual void reset(); ///< Reset the sounds system
virtual void init() override; ///< Initializes the sounds system
virtual void postProcessLoad() override;
virtual void update() override; ///< Services sounds tasks. Called by AudioInterface
virtual void reset() override; ///< Reset the sounds system

virtual void loseFocus(); ///< Called when application loses focus
virtual void regainFocus(); ///< Called when application regains focus
Expand Down
36 changes: 18 additions & 18 deletions Core/GameEngine/Include/Common/LocalFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,31 +91,31 @@ class LocalFile : public File
//virtual ~LocalFile();


virtual Bool open( const Char *filename, Int access = NONE, size_t bufferSize = BUFFERSIZE ); ///< Open a file for access
virtual void close(); ///< Close the file
virtual Int read( void *buffer, Int bytes ); ///< Read the specified number of bytes in to buffer: See File::read
virtual Int readChar(); ///< Read a character from the file
virtual Int readWideChar(); ///< Read a wide character from the file
virtual Int write( const void *buffer, Int bytes ); ///< Write the specified number of bytes from the buffer: See File::write
virtual Int writeFormat( const Char* format, ... ); ///< Write an unterminated formatted string to the file
virtual Int writeFormat( const WideChar* format, ... ); ///< Write an unterminated formatted string to the file
virtual Int writeChar( const Char* character ); ///< Write a character to the file
virtual Int writeChar( const WideChar* character ); ///< Write a wide character to the file
virtual Int seek( Int new_pos, seekMode mode = CURRENT ); ///< Set file position: See File::seek
virtual Bool flush(); ///< flush data to disk
virtual void nextLine(Char *buf = nullptr, Int bufSize = 0); ///< moves file position to after the next new-line
virtual Bool scanInt(Int &newInt); ///< return what gets read in as an integer at the current file position.
virtual Bool scanReal(Real &newReal); ///< return what gets read in as a float at the current file position.
virtual Bool scanString(AsciiString &newString); ///< return what gets read in as a string at the current file position.
virtual Bool open( const Char *filename, Int access = NONE, size_t bufferSize = BUFFERSIZE ) override; ///< Open a file for access
virtual void close() override; ///< Close the file
virtual Int read( void *buffer, Int bytes ) override; ///< Read the specified number of bytes in to buffer: See File::read
virtual Int readChar() override; ///< Read a character from the file
virtual Int readWideChar() override; ///< Read a wide character from the file
virtual Int write( const void *buffer, Int bytes ) override; ///< Write the specified number of bytes from the buffer: See File::write
virtual Int writeFormat( const Char* format, ... ) override; ///< Write an unterminated formatted string to the file
virtual Int writeFormat( const WideChar* format, ... ) override; ///< Write an unterminated formatted string to the file
virtual Int writeChar( const Char* character ) override; ///< Write a character to the file
virtual Int writeChar( const WideChar* character ) override; ///< Write a wide character to the file
virtual Int seek( Int new_pos, seekMode mode = CURRENT ) override; ///< Set file position: See File::seek
virtual Bool flush() override; ///< flush data to disk
virtual void nextLine(Char *buf = nullptr, Int bufSize = 0) override; ///< moves file position to after the next new-line
virtual Bool scanInt(Int &newInt) override; ///< return what gets read in as an integer at the current file position.
virtual Bool scanReal(Real &newReal) override; ///< return what gets read in as a float at the current file position.
virtual Bool scanString(AsciiString &newString) override; ///< return what gets read in as a string at the current file position.
/**
Allocate a buffer large enough to hold entire file, read
the entire file into the buffer, then close the file.
the buffer is owned by the caller, who is responsible
for freeing is (via delete[]). This is a Good Thing to
use because it minimizes memory copies for BIG files.
*/
virtual char* readEntireAndClose();
virtual File* convertToRAMFile();
virtual char* readEntireAndClose() override;
virtual File* convertToRAMFile() override;

protected:

Expand Down
8 changes: 4 additions & 4 deletions Core/GameEngine/Include/Common/LocalFileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
class LocalFileSystem : public SubsystemInterface
{
public:
virtual ~LocalFileSystem() {}
virtual ~LocalFileSystem() override {}

virtual void init() = 0;
virtual void reset() = 0;
virtual void update() = 0;
virtual void init() override = 0;
virtual void reset() override = 0;
virtual void update() override = 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;
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Include/Common/OptionPreferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class OptionPreferences : public UserPreferences
{
public:
OptionPreferences();
virtual ~OptionPreferences();
virtual ~OptionPreferences() override;

Bool loadFromIniFile();

Expand Down
38 changes: 19 additions & 19 deletions Core/GameEngine/Include/Common/RAMFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,23 +82,23 @@ class RAMFile : public File
//virtual ~RAMFile();


virtual Bool open( const Char *filename, Int access = NONE, size_t bufferSize = 0 ); ///< Open a file for access
virtual void close(); ///< Close the file
virtual Int read( void *buffer, Int bytes ); ///< Read the specified number of bytes in to buffer: See File::read
virtual Int readChar(); ///< Read a character from the file
virtual Int readWideChar(); ///< Read a wide character from the file
virtual Int write( const void *buffer, Int bytes ); ///< Write the specified number of bytes from the buffer: See File::write
virtual Int writeFormat( const Char* format, ... ); ///< Write the formatted string to the file
virtual Int writeFormat( const WideChar* format, ... ); ///< Write the formatted string to the file
virtual Int writeChar( const Char* character ); ///< Write a character to the file
virtual Int writeChar( const WideChar* character ); ///< Write a wide character to the file
virtual Int seek( Int new_pos, seekMode mode = CURRENT ); ///< Set file position: See File::seek
virtual Bool flush(); ///< flush data to disk
virtual void nextLine(Char *buf = nullptr, Int bufSize = 0); ///< moves current position to after the next new-line

virtual Bool scanInt(Int &newInt); ///< return what gets read as an integer from the current memory position.
virtual Bool scanReal(Real &newReal); ///< return what gets read as a float from the current memory position.
virtual Bool scanString(AsciiString &newString); ///< return what gets read as a string from the current memory position.
virtual Bool open( const Char *filename, Int access = NONE, size_t bufferSize = 0 ) override; ///< Open a file for access
virtual void close() override; ///< Close the file
virtual Int read( void *buffer, Int bytes ) override; ///< Read the specified number of bytes in to buffer: See File::read
virtual Int readChar() override; ///< Read a character from the file
virtual Int readWideChar() override; ///< Read a wide character from the file
virtual Int write( const void *buffer, Int bytes ) override; ///< Write the specified number of bytes from the buffer: See File::write
virtual Int writeFormat( const Char* format, ... ) override; ///< Write the formatted string to the file
virtual Int writeFormat( const WideChar* format, ... ) override; ///< Write the formatted string to the file
virtual Int writeChar( const Char* character ) override; ///< Write a character to the file
virtual Int writeChar( const WideChar* character ) override; ///< Write a wide character to the file
virtual Int seek( Int new_pos, seekMode mode = CURRENT ) override; ///< Set file position: See File::seek
virtual Bool flush() override; ///< flush data to disk
virtual void nextLine(Char *buf = nullptr, Int bufSize = 0) override; ///< moves current position to after the next new-line

virtual Bool scanInt(Int &newInt) override; ///< return what gets read as an integer from the current memory position.
virtual Bool scanReal(Real &newReal) override; ///< return what gets read as a float from the current memory position.
virtual Bool scanString(AsciiString &newString) override; ///< return what gets read as a string from the current memory position.

virtual Bool open( File *file ); ///< Open file for fast RAM access
virtual Bool openFromArchive(File *archiveFile, const AsciiString& filename, Int offset, Int size); ///< copy file data from the given file at the given offset for the given size.
Expand All @@ -111,8 +111,8 @@ class RAMFile : public File
for freeing is (via delete[]). This is a Good Thing to
use because it minimizes memory copies for BIG files.
*/
virtual char* readEntireAndClose();
virtual File* convertToRAMFile();
virtual char* readEntireAndClose() override;
virtual File* convertToRAMFile() override;

protected:

Expand Down
26 changes: 13 additions & 13 deletions Core/GameEngine/Include/Common/Radar.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ class RadarObject : public MemoryPoolObject,
protected:

// snapshot methods
virtual void crc( Xfer *xfer );
virtual void xfer( Xfer *xfer );
virtual void loadPostProcess();
virtual void crc( Xfer *xfer ) override;
virtual void xfer( Xfer *xfer ) override;
virtual void loadPostProcess() override;

Object *m_object; ///< the object
RadarObject *m_next; ///< next radar object
Expand Down Expand Up @@ -157,11 +157,11 @@ class Radar : public Snapshot,
public:

Radar();
virtual ~Radar();
virtual ~Radar() override;

virtual void init() { } ///< subsystem initialization
virtual void reset(); ///< subsystem reset
virtual void update(); ///< subsystem per frame update
virtual void init() override { } ///< subsystem initialization
virtual void reset() override; ///< subsystem reset
virtual void update() override; ///< subsystem per frame update

// is the game window parameter the radar window
Bool isRadarWindow( GameWindow *window ) { return (m_radarWindow == window) && (m_radarWindow != nullptr); }
Expand Down Expand Up @@ -228,9 +228,9 @@ class Radar : public Snapshot,
protected:

// snapshot methods
virtual void crc( Xfer *xfer );
virtual void xfer( Xfer *xfer );
virtual void loadPostProcess();
virtual void crc( Xfer *xfer ) override;
virtual void xfer( Xfer *xfer ) override;
virtual void loadPostProcess() override;

/// internal method for creating a radar event with specific colors
void internalCreateEvent( const Coord3D *world, RadarEventType type, Real secondsToLive,
Expand Down Expand Up @@ -304,7 +304,7 @@ extern Radar *TheRadar; ///< the radar singleton extern
class RadarDummy : public Radar
{
public:
virtual void draw(Int pixelX, Int pixelY, Int width, Int height) { }
virtual void clearShroud() { }
virtual void setShroudLevel(Int x, Int y, CellShroudStatus setting) { }
virtual void draw(Int pixelX, Int pixelY, Int width, Int height) override { }
virtual void clearShroud() override { }
virtual void setShroudLevel(Int x, Int y, CellShroudStatus setting) override { }
};
Loading
Loading