From a401f0a19e09d7d00a3ee94d928db82e658b7b48 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 3 Jun 2012 02:02:57 +0200 Subject: ALL: Replace cursorTargetScale in OSystem API with a simple "do not scale" logic. All uses of the old target scale API actually wanted to disallow scaling of the mouse cursor. This commit adapts our API to this and thus simplifies backend implementations. Some backends, most notable the Wii and Android, did some implementation of the cursor target scale, which I didn't adapt yet. I added a TODO for the porters there. --- gui/ThemeEngine.cpp | 7 +- gui/ThemeEngine.h | 6 +- gui/ThemeParser.cpp | 7 +- gui/ThemeParser.h | 1 - gui/themes/default.inc | 784 ++++++++++++++--------------- gui/themes/scummclassic.zip | Bin 93390 -> 93390 bytes gui/themes/scummclassic/THEMERC | 2 +- gui/themes/scummmodern.zip | Bin 1449894 -> 1449870 bytes gui/themes/scummmodern/THEMERC | 2 +- gui/themes/scummmodern/scummmodern_gfx.stx | 4 +- 10 files changed, 403 insertions(+), 410 deletions(-) (limited to 'gui') diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index be0a5db601..1bf7ad3c85 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -454,7 +454,7 @@ void ThemeEngine::refresh() { if (_useCursor) { CursorMan.replaceCursorPalette(_cursorPal, 0, _cursorPalSize); - CursorMan.replaceCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, _cursorTargetScale); + CursorMan.replaceCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, true); } } } @@ -465,7 +465,7 @@ void ThemeEngine::enable() { if (_useCursor) { CursorMan.pushCursorPalette(_cursorPal, 0, _cursorPalSize); - CursorMan.pushCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, _cursorTargetScale); + CursorMan.pushCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, true); CursorMan.showMouse(true); } @@ -1287,7 +1287,7 @@ void ThemeEngine::openDialog(bool doBuffer, ShadingStyle style) { _vectorRenderer->setSurface(&_screen); } -bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int hotspotY, int scale) { +bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int hotspotY) { if (!_system->hasFeature(OSystem::kFeatureCursorPalette)) return true; @@ -1305,7 +1305,6 @@ bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int // Set up the cursor parameters _cursorHotspotX = hotspotX; _cursorHotspotY = hotspotY; - _cursorTargetScale = scale; _cursorWidth = cursor->w; _cursorHeight = cursor->h; diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h index acded085f5..67221d98ce 100644 --- a/gui/ThemeEngine.h +++ b/gui/ThemeEngine.h @@ -35,7 +35,7 @@ #include "graphics/pixelformat.h" -#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.12" +#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.13" class OSystem; @@ -495,9 +495,8 @@ public: * @param filename File name of the bitmap to load. * @param hotspotX X Coordinate of the bitmap which does the cursor click. * @param hotspotY Y Coordinate of the bitmap which does the cursor click. - * @param scale Scale at which the bitmap is supposed to be used. */ - bool createCursor(const Common::String &filename, int hotspotX, int hotspotY, int scale); + bool createCursor(const Common::String &filename, int hotspotX, int hotspotY); /** * Wrapper for restoring data from the Back Buffer to the screen. @@ -669,7 +668,6 @@ protected: bool _useCursor; int _cursorHotspotX, _cursorHotspotY; - int _cursorTargetScale; enum { MAX_CURS_COLORS = 255 }; diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp index 9ccdedd564..9a85399ed1 100644 --- a/gui/ThemeParser.cpp +++ b/gui/ThemeParser.cpp @@ -218,15 +218,12 @@ bool ThemeParser::parserCallback_cursor(ParserNode *node) { return true; } - int spotx, spoty, scale; + int spotx, spoty; if (!parseIntegerKey(node->values["hotspot"], 2, &spotx, &spoty)) return parserError("Error parsing cursor Hot Spot coordinates."); - if (!parseIntegerKey(node->values["scale"], 1, &scale)) - return parserError("Error parsing cursor scale."); - - if (!_theme->createCursor(node->values["file"], spotx, spoty, scale)) + if (!_theme->createCursor(node->values["file"], spotx, spoty)) return parserError("Error creating Bitmap Cursor."); return true; diff --git a/gui/ThemeParser.h b/gui/ThemeParser.h index 4b7e88cbf3..82f774b803 100644 --- a/gui/ThemeParser.h +++ b/gui/ThemeParser.h @@ -85,7 +85,6 @@ protected: XML_KEY(cursor) XML_PROP(file, true) XML_PROP(hotspot, true) - XML_PROP(scale, true) XML_PROP(resolution, false) KEY_END() diff --git a/gui/themes/default.inc b/gui/themes/default.inc index 5ee9b9202a..86d0061e1b 100644 --- a/gui/themes/default.inc +++ b/gui/themes/default.inc @@ -610,50 +610,48 @@ "/> " " " " " -" " +" " " " -" " -" " -" " -" " +" " +" " +" " +" " " " " " " " -" " -" " -" " -" " -" " -" " -" " -" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " " " " " -" " -" " -" " " " " " " " " " " " " " " " " " " " " " " " -" " +" " " " -" " +" " " " @@ -701,39 +699,38 @@ " " " " " " -" " +" " " " " " " " " " " " -" " -" " +" " " " " " " " " " " " " " " " -" " -" " +" " +" " " " @@ -741,7 +738,7 @@ "height='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -755,10 +752,10 @@ " " " " " " -" " +" " " " " " -" " +" " " " " " " " " " -" " +" " " " @@ -779,7 +776,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -797,7 +794,7 @@ " " " " " " -" " +" " " " @@ -805,7 +802,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -813,7 +810,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -821,7 +818,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -835,7 +832,7 @@ "type='Radiobutton' " "/> " " " -" " +" " " " @@ -849,9 +846,8 @@ " " " " " " -" " -" " -" " +" " +" " " " @@ -862,7 +858,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -873,7 +869,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -884,8 +880,8 @@ "type='SmallLabel' " "/> " " " -" " -" " +" " +" " " " @@ -894,7 +890,7 @@ " " " " " " -" " +" " " " @@ -902,7 +898,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -917,7 +913,7 @@ " " -" " +" " " " @@ -933,7 +929,7 @@ " " " " " " -" " +" " " " @@ -951,7 +947,7 @@ " " " " " " -" " +" " " " @@ -963,7 +959,7 @@ "width='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -975,7 +971,7 @@ "width='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -999,7 +995,7 @@ " " " " " " -" " +" " " " @@ -1007,25 +1003,31 @@ "height='Globals.Line.Height' " "/> " " " -" " +" " " " " " " " -" " +" " " " " " " " -" " +" " " " " " " " " " -" " +" " " " " " -" " +" " " " " " " " " " -" " +" " " " @@ -1083,7 +1085,7 @@ " " " " " " -" " +" " " " @@ -1091,7 +1093,7 @@ " " " " " " -" " +" " " " @@ -1099,7 +1101,7 @@ " " " " " " -" " +" " " " @@ -1107,7 +1109,7 @@ " " " " " " -" " +" " " " @@ -1115,34 +1117,43 @@ " " " " " " -" " -" " +" " +" " " " " " " " -" " +" " " " " " " " -" " +" " +" " " " " " " " -" " +" " " " " " " " " " -" " -" " +" " +" " " " @@ -1164,7 +1175,7 @@ "width='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -1176,7 +1187,7 @@ "width='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -1187,7 +1198,7 @@ " " " " " " -" " +" " " " @@ -1212,57 +1223,55 @@ " " " " " " -" " +" " " " " " -" " -" " +" " " " " " -" " +" " " " " " " " +" " +" " -" " " " " " " " " " " " " " -" " -" " -" " +" " " " @@ -1273,7 +1282,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -1284,7 +1293,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -1295,33 +1304,34 @@ "type='SmallLabel' " "/> " " " -" " -" " +" " +" " " " " " -" " -" " -" " +" " " " +" " " " " " " " " " -" " +" " +" " +" " " " @@ -1332,8 +1342,8 @@ "type='SmallLabel' " "/> " " " -" " -" " +" " +" " " " @@ -1348,23 +1358,15 @@ " " " " " " -" " -" " -" " +" " +" " " " -" " -" " -" " +" " " " " " -" " +" " " " @@ -1374,16 +1376,16 @@ " " " " " " -" " -" " +" " +" " " " " " -" " +" " " " @@ -1400,7 +1402,7 @@ " " " " " " " " " " " " -" " +" " " " " " " " -" " +" " " " @@ -1442,20 +1444,20 @@ " " " " " " -" " +" " " " " " " " " " " " " " " " " " -" " +" " " " -" " +" " " " " " " " -" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " -" " +" " " " " " " " " " -" " -" " +" " +" " " " -" " " " " " " " " " " " " " -" " +" " " " -" " -" " -" " -" " +" " +" " +" " +" " " " " " " " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " +" " +" " +" " +" " +" " +" " +" " +" " " " " " +" " +" " +" " " " " " " " " " " " " " " " " " " " " " " " -" " +" " " " -" " +" " " " @@ -1644,38 +1646,39 @@ " " " " " " -" " +" " " " " " " " " " " " -" " +" " +" " " " " " " " " " " " " " " " -" " -" " +" " +" " " " @@ -1683,7 +1686,7 @@ "height='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -1697,10 +1700,10 @@ " " " " " " -" " +" " " " " " -" " +" " " " " " " " " " -" " +" " " " @@ -1721,7 +1724,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -1739,7 +1742,7 @@ " " " " " " -" " +" " " " @@ -1747,7 +1750,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -1755,7 +1758,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -1763,7 +1766,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -1777,7 +1780,7 @@ "type='Radiobutton' " "/> " " " -" " +" " " " @@ -1791,8 +1794,9 @@ " " " " " " -" " -" " +" " +" " +" " " " @@ -1803,7 +1807,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -1814,7 +1818,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -1825,8 +1829,8 @@ "type='SmallLabel' " "/> " " " -" " -" " +" " +" " " " @@ -1835,7 +1839,7 @@ " " " " " " -" " +" " " " @@ -1843,7 +1847,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -1858,7 +1862,7 @@ " " -" " +" " " " @@ -1874,7 +1878,7 @@ " " " " " " -" " +" " " " @@ -1892,7 +1896,7 @@ " " " " " " -" " +" " " " @@ -1904,7 +1908,7 @@ "width='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -1916,7 +1920,7 @@ "width='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -1940,7 +1944,7 @@ " " " " " " -" " +" " " " @@ -1948,31 +1952,25 @@ "height='Globals.Line.Height' " "/> " " " -" " +" " " " " " " " -" " +" " " " " " " " -" " +" " " " " " " " " " -" " +" " " " " " -" " +" " " " " " " " " " -" " +" " " " @@ -2030,7 +2028,7 @@ " " " " " " -" " +" " " " @@ -2038,7 +2036,7 @@ " " " " " " -" " +" " " " @@ -2046,7 +2044,7 @@ " " " " " " -" " +" " " " @@ -2054,7 +2052,7 @@ " " " " " " -" " +" " " " @@ -2062,43 +2060,34 @@ " " " " " " -" " -" " +" " +" " " " " " " " -" " +" " " " " " " " -" " -" " +" " " " " " " " -" " +" " " " " " " " " " -" " -" " +" " +" " " " @@ -2120,7 +2109,7 @@ "width='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -2132,7 +2121,7 @@ "width='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -2143,7 +2132,7 @@ " " " " " " -" " +" " " " @@ -2168,55 +2157,57 @@ " " " " " " -" " +" " " " " " -" " +" " +" " " " " " -" " +" " " " " " " " -" " -" " +" " " " " " " " " " " " " " -" " +" " +" " +" " " " @@ -2227,7 +2218,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -2238,7 +2229,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -2249,34 +2240,33 @@ "type='SmallLabel' " "/> " " " -" " -" " +" " +" " " " " " -" " +" " +" " +" " " " -" " " " " " " " " " -" " -" " -" " +" " " " @@ -2287,8 +2277,8 @@ "type='SmallLabel' " "/> " " " -" " -" " +" " +" " " " @@ -2303,15 +2293,23 @@ " " " " " " -" " -" " +" " +" " +" " " " -" " +" " +" " +" " " " " " -" " +" " " " @@ -2321,16 +2319,16 @@ " " " " " " -" " -" " +" " +" " " " " " -" " +" " " " @@ -2347,7 +2345,7 @@ " " " " " " " " " " " " -" " +" " " " " " " " -" " +" " " " @@ -2389,20 +2387,20 @@ " " " " " " -" " +" " " " " " " " " " " " " " " " " " -" " +" " " " -" " +" " " " " " " " +" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " -" " +" " " " " " " " " " -" " -" " +" " +" " " " +" " " " " " " " " " diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip index ec1728b778..d126ed0774 100644 Binary files a/gui/themes/scummclassic.zip and b/gui/themes/scummclassic.zip differ diff --git a/gui/themes/scummclassic/THEMERC b/gui/themes/scummclassic/THEMERC index 7cbed97e40..d4bed29cf8 100644 --- a/gui/themes/scummclassic/THEMERC +++ b/gui/themes/scummclassic/THEMERC @@ -1 +1 @@ -[SCUMMVM_STX0.8.12:ScummVM Classic Theme:No Author] +[SCUMMVM_STX0.8.13:ScummVM Classic Theme:No Author] diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip index deae315e30..db116325e2 100644 Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ diff --git a/gui/themes/scummmodern/THEMERC b/gui/themes/scummmodern/THEMERC index 326993e98d..60744d386f 100644 --- a/gui/themes/scummmodern/THEMERC +++ b/gui/themes/scummmodern/THEMERC @@ -1 +1 @@ -[SCUMMVM_STX0.8.12:ScummVM Modern Theme:No Author] +[SCUMMVM_STX0.8.13:ScummVM Modern Theme:No Author] diff --git a/gui/themes/scummmodern/scummmodern_gfx.stx b/gui/themes/scummmodern/scummmodern_gfx.stx index 970d78a5ae..037c327235 100644 --- a/gui/themes/scummmodern/scummmodern_gfx.stx +++ b/gui/themes/scummmodern/scummmodern_gfx.stx @@ -187,8 +187,8 @@ - - + + -- cgit v1.2.3