[Scummvm-cvs-logs] scummvm master -> 1d2abb4c9e616b6803ec03d317fe972021bbbdec

bluegr bluegr at gmail.com
Fri Jan 15 00:53:52 CET 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
1d2abb4c9e SCI: Fix usage of override functions and silence a warning


Commit: 1d2abb4c9e616b6803ec03d317fe972021bbbdec
    https://github.com/scummvm/scummvm/commit/1d2abb4c9e616b6803ec03d317fe972021bbbdec
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-01-15T01:53:12+02:00

Commit Message:
SCI: Fix usage of override functions and silence a warning

Changed paths:
    engines/sci/graphics/palette32.cpp
    engines/sci/graphics/palette32.h



diff --git a/engines/sci/graphics/palette32.cpp b/engines/sci/graphics/palette32.cpp
index 8ce8b85..e330b56 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 2e3f627..8744687 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);






More information about the Scummvm-git-logs mailing list