diff -r a1eddce45d35 backends/platform/iphone/osys_video.cpp
a
|
b
|
int16 OSystem_IPHONE::getWidth() {
|
86 | 86 | } |
87 | 87 | |
88 | 88 | void OSystem_IPHONE::setPalette(const byte *colors, uint start, uint num) { |
89 | | //printf("setPalette()\n"); |
| 89 | assert(start + num <= 256); |
90 | 90 | const byte *b = colors; |
91 | 91 | |
92 | 92 | for (uint i = start; i < start + num; ++i) { |
… |
… |
void OSystem_IPHONE::setPalette(const by
|
98 | 98 | } |
99 | 99 | |
100 | 100 | void OSystem_IPHONE::grabPalette(byte *colors, uint start, uint num) { |
101 | | //printf("grabPalette()\n"); |
| 101 | assert(start + num <= 256); |
| 102 | const byte *b = colors; |
| 103 | |
| 104 | for (uint i = start; i < start + num; ++i) { |
| 105 | Graphics::colorToRGB<Graphics::ColorMasks<565> >(_palette[i], b[0], b[1], b[2]); |
| 106 | b[3] = 0xFF; |
| 107 | b += 4; |
| 108 | } |
102 | 109 | } |
103 | 110 | |
104 | 111 | void OSystem_IPHONE::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) { |