diff options
Diffstat (limited to 'src/video/cocoa')
-rw-r--r-- | src/video/cocoa/cocoa_v.mm | 42 | ||||
-rw-r--r-- | src/video/cocoa/event.mm | 40 | ||||
-rw-r--r-- | src/video/cocoa/fullscreen.mm | 33 | ||||
-rw-r--r-- | src/video/cocoa/wnd_quartz.mm | 38 | ||||
-rw-r--r-- | src/video/cocoa/wnd_quickdraw.mm | 40 |
5 files changed, 66 insertions, 127 deletions
diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index f04ae8a63..8f4894c7d 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -8,13 +8,25 @@ #ifdef WITH_COCOA -#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_3 -#include <AvailabilityMacros.h> +#include "../../stdafx.h" +#define Rect OTTDRect +#define Point OTTDPoint #import <Cocoa/Cocoa.h> -#import <sys/time.h> /* gettimeofday */ +#undef Rect +#undef Point + +#include "../../openttd.h" +#include "../../debug.h" +#include "../../variables.h" +#include "../../core/geometry_type.hpp" +#include "cocoa_v.h" +#include "../../blitter/factory.hpp" +#include "../../fileio_func.h" +#include "../../gfx_func.h" +#include "../../functions.h" + #import <sys/param.h> /* for MAXPATHLEN */ -#import <unistd.h> /** * Important notice regarding all modifications!!!!!!! @@ -43,28 +55,6 @@ extern "C" OSErr CPSSetFrontProcess(CPSProcessSerNum *psn); #endif -/* Defined in stdbool.h */ -#ifndef __cplusplus -# ifndef __BEOS__ -# undef bool -# undef false -# undef true -# endif -#endif - - -#include "../../stdafx.h" -#include "../../openttd.h" -#include "../../debug.h" -#include "../../variables.h" -#include "../../core/geometry_type.hpp" -#include "cocoa_v.h" -#include "../../blitter/factory.hpp" -#include "../../fileio_func.h" -#include "../../gfx_func.h" -#include "../../functions.h" - - @interface OTTDMain : NSObject @end diff --git a/src/video/cocoa/event.mm b/src/video/cocoa/event.mm index dea4eb8b5..db5f7b893 100644 --- a/src/video/cocoa/event.mm +++ b/src/video/cocoa/event.mm @@ -8,34 +8,14 @@ #ifdef WITH_COCOA -#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_3 -#include <AvailabilityMacros.h> +#include "../../stdafx.h" +#define Rect OTTDRect +#define Point OTTDPoint #import <Cocoa/Cocoa.h> -#import <sys/time.h> /* gettimeofday */ -#import <sys/param.h> /* for MAXPATHLEN */ -#import <unistd.h> - -/** - * Important notice regarding all modifications!!!!!!! - * There are certain limitations because the file is objective C++. - * gdb has limitations. - * C++ and objective C code can't be joined in all cases (classes stuff). - * Read http://developer.apple.com/releasenotes/Cocoa/Objective-C++.html for more information. - */ - - -/* Defined in stdbool.h */ -#ifndef __cplusplus -# ifndef __BEOS__ -# undef bool -# undef false -# undef true -# endif -#endif +#undef Rect +#undef Point - -#include "../../stdafx.h" #include "../../openttd.h" #include "../../debug.h" #include "../../os/macosx/splash.h" @@ -50,6 +30,16 @@ #include "../../core/random_func.hpp" #include "../../texteff.hpp" +#import <sys/time.h> /* gettimeofday */ + +/** + * Important notice regarding all modifications!!!!!!! + * There are certain limitations because the file is objective C++. + * gdb has limitations. + * C++ and objective C code can't be joined in all cases (classes stuff). + * Read http://developer.apple.com/releasenotes/Cocoa/Objective-C++.html for more information. + */ + /* Right Mouse Button Emulation enum */ enum { diff --git a/src/video/cocoa/fullscreen.mm b/src/video/cocoa/fullscreen.mm index 5cc7784ab..727e85f4d 100644 --- a/src/video/cocoa/fullscreen.mm +++ b/src/video/cocoa/fullscreen.mm @@ -8,13 +8,18 @@ #ifdef WITH_COCOA -#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_3 -#include <AvailabilityMacros.h> +#include "../../stdafx.h" +#define Rect OTTDRect +#define Point OTTDPoint #import <Cocoa/Cocoa.h> -#import <sys/time.h> /* gettimeofday */ -#import <sys/param.h> /* for MAXPATHLEN */ -#import <unistd.h> +#undef Rect +#undef Point + +#include "../../debug.h" +#include "../../core/geometry_type.hpp" +#include "cocoa_v.h" +#include "../../gfx_func.h" /** * Important notice regarding all modifications!!!!!!! @@ -29,24 +34,6 @@ extern "C" void ShowMenuBar(); extern "C" void HideMenuBar(); -/* Defined in stdbool.h */ -#ifndef __cplusplus -# ifndef __BEOS__ -# undef bool -# undef false -# undef true -# endif -#endif - - -#include "../../stdafx.h" -#include "../../debug.h" -#include "../../core/geometry_type.hpp" -#include "cocoa_v.h" -#include "../../gfx_func.h" - -#undef Rect - /* Structure for rez switch gamma fades * We can hide the monitor flicker by setting the gamma tables to 0 diff --git a/src/video/cocoa/wnd_quartz.mm b/src/video/cocoa/wnd_quartz.mm index aa09db1b0..3ad0c32b9 100644 --- a/src/video/cocoa/wnd_quartz.mm +++ b/src/video/cocoa/wnd_quartz.mm @@ -9,35 +9,16 @@ #ifdef WITH_COCOA #ifdef ENABLE_COCOA_QUARTZ -#include <AvailabilityMacros.h> +#include "../../stdafx.h" #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 +#define Rect OTTDRect +#define Point OTTDPoint #import <Cocoa/Cocoa.h> -#import <sys/time.h> /* gettimeofday */ -#import <sys/param.h> /* for MAXPATHLEN */ -#import <unistd.h> - -/** - * Important notice regarding all modifications!!!!!!! - * There are certain limitations because the file is objective C++. - * gdb has limitations. - * C++ and objective C code can't be joined in all cases (classes stuff). - * Read http://developer.apple.com/releasenotes/Cocoa/Objective-C++.html for more information. - */ - - -/* Defined in stdbool.h */ -#ifndef __cplusplus -# ifndef __BEOS__ -# undef bool -# undef false -# undef true -# endif -#endif - +#undef Rect +#undef Point -#include "../../stdafx.h" #include "../../debug.h" #include "../../rev.h" #include "../../core/geometry_type.hpp" @@ -46,8 +27,13 @@ #include "../../gfx_func.h" #include "../../functions.h" -#undef Rect - +/** + * Important notice regarding all modifications!!!!!!! + * There are certain limitations because the file is objective C++. + * gdb has limitations. + * C++ and objective C code can't be joined in all cases (classes stuff). + * Read http://developer.apple.com/releasenotes/Cocoa/Objective-C++.html for more information. + */ class WindowQuartzSubdriver; diff --git a/src/video/cocoa/wnd_quickdraw.mm b/src/video/cocoa/wnd_quickdraw.mm index ed6a4d6df..0b6434838 100644 --- a/src/video/cocoa/wnd_quickdraw.mm +++ b/src/video/cocoa/wnd_quickdraw.mm @@ -9,35 +9,15 @@ #ifdef WITH_COCOA #ifdef ENABLE_COCOA_QUICKDRAW -#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_3 -#define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_3 -#include <AvailabilityMacros.h> +#define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_3 +#include "../../stdafx.h" +#define Rect OTTDRect +#define Point OTTDPoint #import <Cocoa/Cocoa.h> -#import <sys/time.h> /* gettimeofday */ -#import <sys/param.h> /* for MAXPATHLEN */ -#import <unistd.h> - -/** - * Important notice regarding all modifications!!!!!!! - * There are certain limitations because the file is objective C++. - * gdb has limitations. - * C++ and objective C code can't be joined in all cases (classes stuff). - * Read http://developer.apple.com/releasenotes/Cocoa/Objective-C++.html for more information. - */ - - -/* Defined in stdbool.h */ -#ifndef __cplusplus -# ifndef __BEOS__ -# undef bool -# undef false -# undef true -# endif -#endif - +#undef Rect +#undef Point -#include "../../stdafx.h" #include "../../debug.h" #include "../../rev.h" #include "../../core/geometry_type.hpp" @@ -46,7 +26,13 @@ #include "../../gfx_func.h" #include "../../functions.h" -#undef Rect +/** + * Important notice regarding all modifications!!!!!!! + * There are certain limitations because the file is objective C++. + * gdb has limitations. + * C++ and objective C code can't be joined in all cases (classes stuff). + * Read http://developer.apple.com/releasenotes/Cocoa/Objective-C++.html for more information. + */ class WindowQuickdrawSubdriver; |