diff options
author | Tony Puccinelli | 2010-06-05 01:05:19 +0000 |
---|---|---|
committer | Tony Puccinelli | 2010-06-05 01:05:19 +0000 |
commit | 95e56f2052956e80a6319b2916a8f899340effaf (patch) | |
tree | f9525eb32e05f1a4746233fe3daf254d07cb83ab /backends/platform/iphone/osys_video.cpp | |
parent | 28e28a2fea9f6adf4967463024c609e6a01ac5b0 (diff) | |
parent | 3a5fe4ca002a85f7c4549c8d36203553553c53f9 (diff) | |
download | scummvm-rg350-95e56f2052956e80a6319b2916a8f899340effaf.tar.gz scummvm-rg350-95e56f2052956e80a6319b2916a8f899340effaf.tar.bz2 scummvm-rg350-95e56f2052956e80a6319b2916a8f899340effaf.zip |
merged trunk into branch and corrected __PS2__ to __PLAYSTATION2__ in a couple files
svn-id: r49435
Diffstat (limited to 'backends/platform/iphone/osys_video.cpp')
-rw-r--r-- | backends/platform/iphone/osys_video.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/backends/platform/iphone/osys_video.cpp b/backends/platform/iphone/osys_video.cpp index 6cb5e18d95..76c2031758 100644 --- a/backends/platform/iphone/osys_video.cpp +++ b/backends/platform/iphone/osys_video.cpp @@ -86,7 +86,7 @@ int16 OSystem_IPHONE::getWidth() { } void OSystem_IPHONE::setPalette(const byte *colors, uint start, uint num) { - //printf("setPalette()\n"); + assert(start + num <= 256); const byte *b = colors; for (uint i = start; i < start + num; ++i) { @@ -98,7 +98,14 @@ void OSystem_IPHONE::setPalette(const byte *colors, uint start, uint num) { } void OSystem_IPHONE::grabPalette(byte *colors, uint start, uint num) { - //printf("grabPalette()\n"); + assert(start + num <= 256); + byte *b = colors; + + for (uint i = start; i < start + num; ++i) { + Graphics::colorToRGB<Graphics::ColorMasks<565> >(_palette[i], b[0], b[1], b[2]); + b[3] = 0xFF; + b += 4; + } } void OSystem_IPHONE::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) { |