diff options
author | Filippos Karapetis | 2016-01-15 01:53:12 +0200 |
---|---|---|
committer | Filippos Karapetis | 2016-01-15 01:53:12 +0200 |
commit | 1d2abb4c9e616b6803ec03d317fe972021bbbdec (patch) | |
tree | db1e4ea575def2d337ea187b00a4b43ee21fb561 | |
parent | d44c150d16b2d1d3b1aec4181fe6328db36cd8fd (diff) | |
download | scummvm-rg350-1d2abb4c9e616b6803ec03d317fe972021bbbdec.tar.gz scummvm-rg350-1d2abb4c9e616b6803ec03d317fe972021bbbdec.tar.bz2 scummvm-rg350-1d2abb4c9e616b6803ec03d317fe972021bbbdec.zip |
SCI: Fix usage of override functions and silence a warning
-rw-r--r-- | engines/sci/graphics/palette32.cpp | 10 | ||||
-rw-r--r-- | engines/sci/graphics/palette32.h | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/engines/sci/graphics/palette32.cpp b/engines/sci/graphics/palette32.cpp index 8ce8b85678..e330b5620b 100644 --- a/engines/sci/graphics/palette32.cpp +++ b/engines/sci/graphics/palette32.cpp @@ -95,7 +95,7 @@ void GfxPalette32::submit(Palette &palette) { palette.timestamp = _version; } -override bool GfxPalette32::kernelSetFromResource(GuiResourceId resourceId, bool force) { +bool GfxPalette32::kernelSetFromResource(GuiResourceId resourceId, bool force) { // TODO: In SCI32, palettes that come from resources come in as // HunkPalette objects, not SOLPalette objects. The HunkPalettes // have some extra persistence stuff associated with them, such that @@ -113,7 +113,7 @@ override bool GfxPalette32::kernelSetFromResource(GuiResourceId resourceId, bool // In SCI32 engine this method is SOLPalette::Match(Rgb24 *) // and is called as PaletteMgr.Current().Match(color) -override int16 GfxPalette32::kernelFindColor(uint16 r, uint16 g, uint16 b) { +int16 GfxPalette32::kernelFindColor(uint16 r, uint16 g, uint16 b) { // SQ6 SCI32 engine takes the 16-bit r, g, b arguments from the // VM and puts them into al, ah, dl. For compatibility, make sure // to discard any high bits here too @@ -158,7 +158,7 @@ override int16 GfxPalette32::kernelFindColor(uint16 r, uint16 g, uint16 b) { // GfxPalette::set is very similar to GfxPalette32::submit, except that SCI32 // does not do any fancy best-fit merging and so does not accept arguments // like `force` and `forceRealMerge`. -override void GfxPalette32::set(Palette *newPalette, bool force, bool forceRealMerge) { +void GfxPalette32::set(Palette *newPalette, bool force, bool forceRealMerge) { submit(*newPalette); } @@ -371,7 +371,7 @@ void GfxPalette32::kernelPalVaryMergeStart(GuiResourceId paletteId) { mergeStart(&palette); } -override void GfxPalette32::kernelPalVaryPause(bool pause) { +void GfxPalette32::kernelPalVaryPause(bool pause) { if (pause) { varyPause(); } else { @@ -492,7 +492,7 @@ void GfxPalette32::mergeStart(const Palette *const palette) { } void GfxPalette32::applyVary() { - while (g_sci->getTickCount() - _varyLastTick > _varyTime && _varyDirection != 0) { + while (g_sci->getTickCount() - _varyLastTick > (uint32)_varyTime && _varyDirection != 0) { _varyLastTick += _varyTime; if (_varyPercent == _varyTargetPercent) { diff --git a/engines/sci/graphics/palette32.h b/engines/sci/graphics/palette32.h index 2e3f6274fa..8744687e4c 100644 --- a/engines/sci/graphics/palette32.h +++ b/engines/sci/graphics/palette32.h @@ -198,11 +198,11 @@ namespace Sci { void submit(Palette &palette); public: - override virtual void saveLoadWithSerializer(Common::Serializer &s); + virtual void saveLoadWithSerializer(Common::Serializer &s) override; - override virtual bool kernelSetFromResource(GuiResourceId resourceId, bool force); - override virtual int16 kernelFindColor(const uint16 r, const uint16 g, const uint16 b); - override virtual void set(Palette *newPalette, bool force, bool forceRealMerge = false); + bool kernelSetFromResource(GuiResourceId resourceId, bool force) override; + int16 kernelFindColor(uint16 r, uint16 g, uint16 b) override; + void set(Palette *newPalette, bool force, bool forceRealMerge = false) override; int16 matchColor(const byte matchRed, const byte matchGreen, const byte matchBlue, const int defaultDifference, int &lastCalculatedDifference, const bool *const matchTable); void updateForFrame(); @@ -218,7 +218,7 @@ namespace Sci { void kernelPalVarySetTarget(const GuiResourceId paletteId); void kernelPalVarySetStart(const GuiResourceId paletteId); void kernelPalVaryMergeStart(const GuiResourceId paletteId); - override virtual void kernelPalVaryPause(const bool pause); + virtual void kernelPalVaryPause(bool pause) override; void setVary(const Palette *const targetPalette, const int16 percent, const int time, const int16 fromColor, const int16 toColor); void setVaryPercent(const int16 percent, const int time, const int16 fromColor, const int16 fromColorAlternate); |