summaryrefslogtreecommitdiff
path: root/src/os
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-12-08 18:13:29 +0000
committerrubidium <rubidium@openttd.org>2011-12-08 18:13:29 +0000
commit2ccbd2a6f5d0e3b9000122fe1845482241334f41 (patch)
treed8a346dc40e1f7f85376c413a0c12065e277ae49 /src/os
parent9e8b76650a084bb26b32113317933217b1d99e42 (diff)
downloadopenttd-2ccbd2a6f5d0e3b9000122fe1845482241334f41.tar.xz
(svn r23446) -Codechange: move _cur_palette and it's related first/count dirty variables into a single structure
Diffstat (limited to 'src/os')
-rw-r--r--src/os/macosx/osx_stdafx.h5
-rw-r--r--src/os/macosx/splash.cpp20
2 files changed, 14 insertions, 11 deletions
diff --git a/src/os/macosx/osx_stdafx.h b/src/os/macosx/osx_stdafx.h
index ef09fb6a9..688762be9 100644
--- a/src/os/macosx/osx_stdafx.h
+++ b/src/os/macosx/osx_stdafx.h
@@ -42,14 +42,17 @@
#define Rect OTTDRect
#define Point OTTDPoint
#define WindowClass OTTDWindowClass
-#define ScriptOrder OTTDScriptOrder
+#define ScriptOrder OTTDScriptOrder
+#define Palette OTTDPalette
#include <CoreServices/CoreServices.h>
+#include <ApplicationServices/ApplicationServices.h>
#undef Rect
#undef Point
#undef WindowClass
#undef ScriptOrder
+#undef Palette
/* remove the variables that CoreServices defines, but we define ourselves too */
#undef bool
diff --git a/src/os/macosx/splash.cpp b/src/os/macosx/splash.cpp
index a711bfd80..79bb0a022 100644
--- a/src/os/macosx/splash.cpp
+++ b/src/os/macosx/splash.cpp
@@ -136,19 +136,19 @@ void DisplaySplashImage()
}
for (int i = 0; i < num_palette; i++) {
- _cur_palette[i].a = i == 0 ? 0 : 0xff;
- _cur_palette[i].r = palette[i].red;
- _cur_palette[i].g = palette[i].green;
- _cur_palette[i].b = palette[i].blue;
+ _cur_palette.palette[i].a = i == 0 ? 0 : 0xff;
+ _cur_palette.palette[i].r = palette[i].red;
+ _cur_palette.palette[i].g = palette[i].green;
+ _cur_palette.palette[i].b = palette[i].blue;
}
- _cur_palette[0xff].a = 0xff;
- _cur_palette[0xff].r = 0;
- _cur_palette[0xff].g = 0;
- _cur_palette[0xff].b = 0;
+ _cur_palette.palette[0xff].a = 0xff;
+ _cur_palette.palette[0xff].r = 0;
+ _cur_palette.palette[0xff].g = 0;
+ _cur_palette.palette[0xff].b = 0;
- _pal_first_dirty = 0;
- _pal_count_dirty = 256;
+ _cur_palette.first_dirty = 0;
+ _cur_palette.count_dirty = 256;
break;
}
case 32: {