From d65bbe1d7a5efbcf04831dbb68a45ca833db1ae1 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Fri, 5 Jun 2009 23:59:40 +0000 Subject: Fixes ScummEngine_v70he::setDefaultCursor to work in 16-bit, using a temporary hack. svn-id: r41204 --- gui/ThemeEngine.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gui/ThemeEngine.cpp') diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index fe93a1f7d6..c8d960f014 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -462,8 +462,12 @@ void ThemeEngine::disable() { _system->hideOverlay(); if (_useCursor) { +#ifdef ENABLE_16BIT + CursorMan.popCursor16(); +#else CursorMan.popCursorPalette(); CursorMan.popCursor(); +#endif } _enabled = false; -- cgit v1.2.3 From 56e5920bba753820c457c078237a8c06241302ed Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Sat, 6 Jun 2009 01:16:04 +0000 Subject: Corrected cursor display errors introduced by revision 41204, reimplemented 16-bit cursor support in a less hacky, but still temporary way. svn-id: r41209 --- gui/ThemeEngine.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'gui/ThemeEngine.cpp') diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index c8d960f014..fe93a1f7d6 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -462,12 +462,8 @@ void ThemeEngine::disable() { _system->hideOverlay(); if (_useCursor) { -#ifdef ENABLE_16BIT - CursorMan.popCursor16(); -#else CursorMan.popCursorPalette(); CursorMan.popCursor(); -#endif } _enabled = false; -- cgit v1.2.3 From 350dc4290fd5dd8f28af9e63713b48ef2c131f09 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Sat, 13 Jun 2009 10:24:52 +0000 Subject: Fixed cursor code to keep track of cursor formats so that ThemeEngine and/or GuiManager cursors will render properly over the game (on spacebar hit, for instance) svn-id: r41491 --- gui/ThemeEngine.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'gui/ThemeEngine.cpp') diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index fe93a1f7d6..5ce7c3dc60 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -434,6 +434,9 @@ void ThemeEngine::refresh() { _system->showOverlay(); if (_useCursor) { +#ifdef ENABLE_16BIT + CursorMan.replaceCursorFormat(_cursorFormat); +#endif CursorMan.replaceCursorPalette(_cursorPal, 0, _cursorPalSize); CursorMan.replaceCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, _cursorTargetScale); } @@ -445,6 +448,9 @@ void ThemeEngine::enable() { return; if (_useCursor) { +#ifdef ENABLE_16BIT + CursorMan.pushCursorFormat(_system->getScreenFormat()); +#endif CursorMan.pushCursorPalette(_cursorPal, 0, _cursorPalSize); CursorMan.pushCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, _cursorTargetScale); CursorMan.showMouse(true); @@ -462,6 +468,9 @@ void ThemeEngine::disable() { _system->hideOverlay(); if (_useCursor) { +#ifdef ENABLE_16BIT + CursorMan.popCursorFormat(); +#endif CursorMan.popCursorPalette(); CursorMan.popCursor(); } @@ -1165,6 +1174,12 @@ bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int if (!cursor) return false; +#ifdef ENABLE_16BIT + _cursorFormat.bytesPerPixel = 1; + _cursorFormat.rLoss = _cursorFormat.gLoss = _cursorFormat.bLoss = _cursorFormat.aLoss = 8; + _cursorFormat.rShift = _cursorFormat.gShift = _cursorFormat.bShift = _cursorFormat.aShift = 0; +#endif + // Set up the cursor parameters _cursorHotspotX = hotspotX; _cursorHotspotY = hotspotY; -- cgit v1.2.3 From 6f2b46964bd3bee3ee12f2c3cd19b62bbb8aa9b6 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Thu, 18 Jun 2009 07:31:09 +0000 Subject: Fixed error with non-animated 8-bit GUI cursors being drawn incorrectly in debug console of 16-bit games. svn-id: r41627 --- gui/ThemeEngine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui/ThemeEngine.cpp') diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 5ce7c3dc60..d8e368581c 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -449,7 +449,7 @@ void ThemeEngine::enable() { if (_useCursor) { #ifdef ENABLE_16BIT - CursorMan.pushCursorFormat(_system->getScreenFormat()); + CursorMan.pushCursorFormat(_cursorFormat); #endif CursorMan.pushCursorPalette(_cursorPal, 0, _cursorPalSize); CursorMan.pushCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, _cursorTargetScale); -- cgit v1.2.3 From f7dd1c15ed38418a0371032966144eb6c2e004cb Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Sat, 20 Jun 2009 05:23:09 +0000 Subject: renamed ENABLE_16BIT define to more accurate ENABLE_RGB_COLOR svn-id: r41696 --- gui/ThemeEngine.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gui/ThemeEngine.cpp') diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index d8e368581c..70b295b989 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -434,7 +434,7 @@ void ThemeEngine::refresh() { _system->showOverlay(); if (_useCursor) { -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR CursorMan.replaceCursorFormat(_cursorFormat); #endif CursorMan.replaceCursorPalette(_cursorPal, 0, _cursorPalSize); @@ -448,7 +448,7 @@ void ThemeEngine::enable() { return; if (_useCursor) { -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR CursorMan.pushCursorFormat(_cursorFormat); #endif CursorMan.pushCursorPalette(_cursorPal, 0, _cursorPalSize); @@ -468,7 +468,7 @@ void ThemeEngine::disable() { _system->hideOverlay(); if (_useCursor) { -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR CursorMan.popCursorFormat(); #endif CursorMan.popCursorPalette(); @@ -1174,7 +1174,7 @@ bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int if (!cursor) return false; -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR _cursorFormat.bytesPerPixel = 1; _cursorFormat.rLoss = _cursorFormat.gLoss = _cursorFormat.bLoss = _cursorFormat.aLoss = 8; _cursorFormat.rShift = _cursorFormat.gShift = _cursorFormat.bShift = _cursorFormat.aShift = 0; -- cgit v1.2.3 From 865129a5630017f05d08e778ba1ef430c23cd55a Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Wed, 24 Jun 2009 06:44:30 +0000 Subject: made the cursor's pixel format a member of the cursor object, merged ____CursorFormat functions into equivalent ____Cursor functions. svn-id: r41825 --- gui/ThemeEngine.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'gui/ThemeEngine.cpp') diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 70b295b989..6041fb8858 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -434,9 +434,6 @@ void ThemeEngine::refresh() { _system->showOverlay(); if (_useCursor) { -#ifdef ENABLE_RGB_COLOR - CursorMan.replaceCursorFormat(_cursorFormat); -#endif CursorMan.replaceCursorPalette(_cursorPal, 0, _cursorPalSize); CursorMan.replaceCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, _cursorTargetScale); } @@ -448,9 +445,6 @@ void ThemeEngine::enable() { return; if (_useCursor) { -#ifdef ENABLE_RGB_COLOR - CursorMan.pushCursorFormat(_cursorFormat); -#endif CursorMan.pushCursorPalette(_cursorPal, 0, _cursorPalSize); CursorMan.pushCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, _cursorTargetScale); CursorMan.showMouse(true); @@ -468,9 +462,6 @@ void ThemeEngine::disable() { _system->hideOverlay(); if (_useCursor) { -#ifdef ENABLE_RGB_COLOR - CursorMan.popCursorFormat(); -#endif CursorMan.popCursorPalette(); CursorMan.popCursor(); } -- cgit v1.2.3 From 007f68366fd55a519753bf533c7c3a80db3754f0 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Fri, 21 Aug 2009 18:16:37 +0000 Subject: Renamed ENABLE_RGB_COLOR to USE_RGB_COLOR, and added it to config.h to guarantee a consistent build. svn-id: r43604 --- gui/ThemeEngine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui/ThemeEngine.cpp') diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 417a1f714c..41447d2a88 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -1234,7 +1234,7 @@ bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int if (!cursor) return false; -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR _cursorFormat.bytesPerPixel = 1; _cursorFormat.rLoss = _cursorFormat.gLoss = _cursorFormat.bLoss = _cursorFormat.aLoss = 8; _cursorFormat.rShift = _cursorFormat.gShift = _cursorFormat.bShift = _cursorFormat.aShift = 0; -- cgit v1.2.3