From e3c7a77b4066f00f3248e390184da874bd20d7ee Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 14 Jul 2009 16:43:45 +0000 Subject: (svn r16827) -Codechange: make OSX specific files include stdafx.h always as the first file. Also unify OSX specific stuff into osx_stdafx.h and remove unused includes. --- src/os/macosx/macos.mm | 12 +++++++----- src/os/macosx/osx_stdafx.h | 14 +++++++++++++- 2 files changed, 20 insertions(+), 6 deletions(-) (limited to 'src/os') diff --git a/src/os/macosx/macos.mm b/src/os/macosx/macos.mm index a79626026..13d826259 100644 --- a/src/os/macosx/macos.mm +++ b/src/os/macosx/macos.mm @@ -1,17 +1,19 @@ /* $Id$ */ -#include +#include "../../stdafx.h" +#include "../../core/bitmath_func.hpp" +#include "../../rev.h" +#define Rect OTTDRect +#define Point OTTDPoint #include +#undef Rect +#undef Point #include #include #include #include -#include -#include "../../stdafx.h" -#include "../../core/bitmath_func.hpp" -#include "../../rev.h" #ifndef CPU_SUBTYPE_POWERPC_970 #define CPU_SUBTYPE_POWERPC_970 ((cpu_subtype_t) 100) diff --git a/src/os/macosx/osx_stdafx.h b/src/os/macosx/osx_stdafx.h index 9255ae3c0..ee150dd8b 100644 --- a/src/os/macosx/osx_stdafx.h +++ b/src/os/macosx/osx_stdafx.h @@ -20,15 +20,27 @@ # error "Compiling 64 bits without _SQ64 set! (or vice versa)" #endif +#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_3 +#include + +/* Name conflict */ +#define Rect OTTDRect +#define Point OTTDPoint +#define WindowClass OTTDWindowClass + #include +#undef Rect +#undef Point +#undef WindowClass + /* remove the variables that CoreServices defines, but we define ourselves too */ #undef bool #undef false #undef true /* Name conflict */ -#define GetTime OTTD_GetTime +#define GetTime OTTD_GetTime #define SL_ERROR OSX_SL_ERROR -- cgit v1.2.3-70-g09d2