aboutsummaryrefslogtreecommitdiff
path: root/backends/PalmOS
diff options
context:
space:
mode:
authorChris Apers2005-10-12 20:20:26 +0000
committerChris Apers2005-10-12 20:20:26 +0000
commit3e9419db51b1a59daa785575c8c30fc51c252118 (patch)
treed561dc8d55f4afdbd510b16473b150ce27d28a28 /backends/PalmOS
parent8ab08763adf4cb7666189f4f3dfc14048a928ed7 (diff)
downloadscummvm-rg350-3e9419db51b1a59daa785575c8c30fc51c252118.tar.gz
scummvm-rg350-3e9419db51b1a59daa785575c8c30fc51c252118.tar.bz2
scummvm-rg350-3e9419db51b1a59daa785575c8c30fc51c252118.zip
Added grabPalette
svn-id: r19044
Diffstat (limited to 'backends/PalmOS')
-rwxr-xr-xbackends/PalmOS/Src/base_gfx.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/backends/PalmOS/Src/base_gfx.cpp b/backends/PalmOS/Src/base_gfx.cpp
index 39555433e0..9496a175b7 100755
--- a/backends/PalmOS/Src/base_gfx.cpp
+++ b/backends/PalmOS/Src/base_gfx.cpp
@@ -113,6 +113,17 @@ void OSystem_PalmBase::setPalette(const byte *colors, uint start, uint num) {
_paletteDirtyEnd = start + num;
}
+void OSystem_PalmBase::grabPalette(byte *colors, uint start, uint num) {
+ const RGBColorType *base = _currentPalette + start;
+
+ for (uint i = 0; i < num; ++i) {
+ colors[i * 4] = base[i].r;
+ colors[i * 4 + 1] = base[i].g;
+ colors[i * 4 + 2] = base[i].b;
+ colors[i * 4 + 3] = 0xFF;
+ }
+}
+
/*
* Screen
*