From 3e9419db51b1a59daa785575c8c30fc51c252118 Mon Sep 17 00:00:00 2001 From: Chris Apers Date: Wed, 12 Oct 2005 20:20:26 +0000 Subject: Added grabPalette svn-id: r19044 --- backends/PalmOS/Src/base_gfx.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'backends/PalmOS') 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 * -- cgit v1.2.3