[Scummvm-git-logs] scummvm master -> 75023fcc085d57653779d423042d2181c8cd14fc
digitall
noreply at scummvm.org
Mon Aug 28 23:13:45 UTC 2023
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:
75023fcc08 WII: Move All Palette Code Implementation into OSystem Graphics Module
Commit: 75023fcc085d57653779d423042d2181c8cd14fc
https://github.com/scummvm/scummvm/commit/75023fcc085d57653779d423042d2181c8cd14fc
Author: D G Turner (digitall at scummvm.org)
Date: 2023-08-29T00:10:53+01:00
Commit Message:
WII: Move All Palette Code Implementation into OSystem Graphics Module
Changed paths:
backends/platform/wii/osystem.cpp
backends/platform/wii/osystem.h
backends/platform/wii/osystem_gfx.cpp
diff --git a/backends/platform/wii/osystem.cpp b/backends/platform/wii/osystem.cpp
index 84a4ae40329..d9b54826371 100644
--- a/backends/platform/wii/osystem.cpp
+++ b/backends/platform/wii/osystem.cpp
@@ -191,10 +191,7 @@ void OSystem_Wii::setFeatureState(Feature f, bool enable) {
break;
case kFeatureCursorPalette:
_cursorPaletteDisabled = !enable;
- if (_texMouse.palette && !enable) {
- memcpy(_texMouse.palette, _cursorPalette, 256 * 2);
- _cursorPaletteDirty = true;
- }
+ updateMousePalette();
break;
default:
break;
diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h
index def660562b2..4c568539940 100644
--- a/backends/platform/wii/osystem.h
+++ b/backends/platform/wii/osystem.h
@@ -116,6 +116,7 @@ private:
void updateScreenResolution();
void switchVideoMode(int mode);
bool needsScreenUpdate();
+ void updateMousePalette();
void initSfx();
void deinitSfx();
diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp
index 490bc8a0c03..8c93754316e 100644
--- a/backends/platform/wii/osystem_gfx.cpp
+++ b/backends/platform/wii/osystem_gfx.cpp
@@ -326,6 +326,13 @@ int16 OSystem_Wii::getHeight() {
return _gameHeight;
}
+void OSystem_Wii::updateMousePalette() {
+ if (_texMouse.palette && _cursorPaletteDisabled) {
+ memcpy(_texMouse.palette, _cursorPalette, 256 * 2);
+ _cursorPaletteDirty = true;
+ }
+}
+
void OSystem_Wii::setPalette(const byte *colors, uint start, uint num) {
#ifdef USE_RGB_COLOR
assert(_pfGame.bytesPerPixel == 1);
More information about the Scummvm-git-logs
mailing list