summaryrefslogtreecommitdiff
path: root/src/video/cocoa
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2010-12-21 15:48:43 +0000
committerplanetmaker <planetmaker@openttd.org>2010-12-21 15:48:43 +0000
commit0d3a0bb1c7a7031eff4803bfe8f89cc578e98137 (patch)
tree74103b5450c6d6f0274d8d6cf378eedcf975e7eb /src/video/cocoa
parentb633ffaa1d58a8ad0f0e9aa34982877c8cf552a2 (diff)
downloadopenttd-0d3a0bb1c7a7031eff4803bfe8f89cc578e98137.tar.xz
(svn r21572) -Codechange: [OSX] One palette is enough, we cannot use two colour depths at once
Diffstat (limited to 'src/video/cocoa')
-rw-r--r--src/video/cocoa/wnd_quickdraw.mm11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/video/cocoa/wnd_quickdraw.mm b/src/video/cocoa/wnd_quickdraw.mm
index 370ff3d00..abf38599f 100644
--- a/src/video/cocoa/wnd_quickdraw.mm
+++ b/src/video/cocoa/wnd_quickdraw.mm
@@ -92,8 +92,7 @@ class WindowQuickdrawSubdriver: public CocoaSubdriver {
Rect dirty_rects[MAX_DIRTY_RECTS];
int num_dirty_rects;
- uint16 palette16[256];
- uint32 palette32[256];
+ uint32 palette[256];
public:
bool active;
@@ -448,7 +447,7 @@ void WindowQuickdrawSubdriver::Blit32ToView32(int left, int top, int right, int
void WindowQuickdrawSubdriver::BlitIndexedToView32(int left, int top, int right, int bottom)
{
- const uint32 *pal = this->palette32;
+ const uint32 *pal = this->palette;
const uint8 *src = (uint8*)this->pixel_buffer;
uint32 *dst = (uint32*)this->window_buffer;
uint width = this->window_width;
@@ -463,7 +462,7 @@ void WindowQuickdrawSubdriver::BlitIndexedToView32(int left, int top, int right,
void WindowQuickdrawSubdriver::BlitIndexedToView16(int left, int top, int right, int bottom)
{
- const uint16 *pal = this->palette16;
+ const uint32 *pal = this->palette;
const uint8 *src = (uint8*)this->pixel_buffer;
uint16 *dst = (uint16*)this->window_buffer;
uint width = this->window_width;
@@ -609,7 +608,7 @@ void WindowQuickdrawSubdriver::UpdatePalette(uint first_color, uint num_colors)
clr32 |= (uint32)_cur_palette[i].r << 16;
clr32 |= (uint32)_cur_palette[i].g << 8;
clr32 |= (uint32)_cur_palette[i].b;
- this->palette32[i] = clr32;
+ this->palette[i] = clr32;
}
break;
case 16:
@@ -618,7 +617,7 @@ void WindowQuickdrawSubdriver::UpdatePalette(uint first_color, uint num_colors)
clr16 |= (uint16)((_cur_palette[i].r >> 3) & 0x1f) << 10;
clr16 |= (uint16)((_cur_palette[i].g >> 3) & 0x1f) << 5;
clr16 |= (uint16)((_cur_palette[i].b >> 3) & 0x1f);
- this->palette16[i] = clr16;
+ this->palette[i] = clr16;
}
break;
}