mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r11688) -Fix [FS#1581]: Compilation was broken on OS X again.
This commit is contained in:
parent
fec9cd587c
commit
217539ee24
@ -10,6 +10,13 @@
|
||||
#define Point OTTD_Point
|
||||
#endif /* __AMIGA__ */
|
||||
|
||||
#if defined(__APPLE__)
|
||||
/* Mac OS X already has both Rect and Point declared */
|
||||
#define Rect OTTD_Rect
|
||||
#define Point OTTD_Point
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
|
||||
struct Point {
|
||||
int x;
|
||||
int y;
|
||||
|
@ -10,9 +10,7 @@
|
||||
#undef true
|
||||
|
||||
/* Name conflict */
|
||||
#define Rect OTTDRect
|
||||
#define Point OTTDPoint
|
||||
#define GetTime OTTDGetTime
|
||||
#define GetTime OTTD_GetTime
|
||||
|
||||
#define SL_ERROR OSX_SL_ERROR
|
||||
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
virtual void MakeDirty(int left, int top, int width, int height) = 0;
|
||||
virtual void UpdatePalette(uint first_color, uint num_colors) = 0;
|
||||
|
||||
virtual uint ListModes(OTTDPoint* modes, uint max_modes) = 0;
|
||||
virtual uint ListModes(OTTD_Point* modes, uint max_modes) = 0;
|
||||
|
||||
virtual bool ChangeResolution(int w, int h) = 0;
|
||||
|
||||
|
@ -57,12 +57,11 @@ extern "C" OSErr CPSSetFrontProcess(CPSProcessSerNum* psn);
|
||||
#include "../../openttd.h"
|
||||
#include "../../debug.h"
|
||||
#include "../../variables.h"
|
||||
#include "../../core/geometry_type.hpp"
|
||||
#include "cocoa_v.h"
|
||||
#include "../../blitter/factory.hpp"
|
||||
#include "../../fileio.h"
|
||||
|
||||
#undef Point
|
||||
#undef Rect
|
||||
#include "../../gfx_func.h"
|
||||
|
||||
|
||||
@interface OTTDMain : NSObject
|
||||
@ -199,7 +198,7 @@ static void setupApplication()
|
||||
static void QZ_UpdateVideoModes()
|
||||
{
|
||||
uint i, count;
|
||||
OTTDPoint modes[32];
|
||||
OTTD_Point modes[32];
|
||||
|
||||
assert(_cocoa_subdriver != NULL);
|
||||
|
||||
|
@ -40,12 +40,13 @@
|
||||
#include "../../debug.h"
|
||||
#include "../../os/macosx/splash.h"
|
||||
#include "../../variables.h"
|
||||
#include "../../core/geometry_type.hpp"
|
||||
#include "cocoa_v.h"
|
||||
#include "cocoa_keys.h"
|
||||
#include "../../blitter/factory.hpp"
|
||||
#include "../../gfx_func.h"
|
||||
#include "../../network/network.h"
|
||||
|
||||
#undef Point
|
||||
#undef Rect
|
||||
|
||||
/* Right Mouse Button Emulation enum */
|
||||
enum {
|
||||
|
@ -42,9 +42,10 @@ extern "C" void HideMenuBar();
|
||||
#include "../../stdafx.h"
|
||||
#include "../../debug.h"
|
||||
#include "../../variables.h"
|
||||
#include "../../core/geometry_type.hpp"
|
||||
#include "cocoa_v.h"
|
||||
#include "../../gfx_func.h"
|
||||
|
||||
#undef Point
|
||||
#undef Rect
|
||||
|
||||
|
||||
@ -447,7 +448,7 @@ public:
|
||||
CGDisplaySetPalette(display_id, palette);
|
||||
}
|
||||
|
||||
virtual uint ListModes(OTTDPoint* modes, uint max_modes)
|
||||
virtual uint ListModes(OTTD_Point* modes, uint max_modes)
|
||||
{
|
||||
CFArrayRef mode_list;
|
||||
CFIndex num_modes;
|
||||
|
@ -40,9 +40,12 @@
|
||||
#include "../../stdafx.h"
|
||||
#include "../../debug.h"
|
||||
#include "../../variables.h"
|
||||
#include "../../core/geometry_type.hpp"
|
||||
#include "cocoa_v.h"
|
||||
#include "../../functions.h"
|
||||
#include "../../core/math_func.hpp"
|
||||
#include "../../gfx_func.h"
|
||||
|
||||
#undef Point
|
||||
#undef Rect
|
||||
|
||||
|
||||
@ -136,7 +139,7 @@ public:
|
||||
virtual void MakeDirty(int left, int top, int width, int height);
|
||||
virtual void UpdatePalette(uint first_color, uint num_colors);
|
||||
|
||||
virtual uint ListModes(OTTDPoint* modes, uint max_modes);
|
||||
virtual uint ListModes(OTTD_Point* modes, uint max_modes);
|
||||
|
||||
virtual bool ChangeResolution(int w, int h);
|
||||
|
||||
@ -657,7 +660,7 @@ void WindowQuartzSubdriver::UpdatePalette(uint first_color, uint num_colors)
|
||||
num_dirty_rects = MAX_DIRTY_RECTS;
|
||||
}
|
||||
|
||||
uint WindowQuartzSubdriver::ListModes(OTTDPoint* modes, uint max_modes)
|
||||
uint WindowQuartzSubdriver::ListModes(OTTD_Point* modes, uint max_modes)
|
||||
{
|
||||
if (max_modes == 0) return 0;
|
||||
|
||||
|
@ -40,9 +40,12 @@
|
||||
#include "../../stdafx.h"
|
||||
#include "../../debug.h"
|
||||
#include "../../variables.h"
|
||||
#include "../../core/geometry_type.hpp"
|
||||
#include "cocoa_v.h"
|
||||
#include "../../functions.h"
|
||||
#include "../../core/math_func.hpp"
|
||||
#include "../../gfx_func.h"
|
||||
|
||||
#undef Point
|
||||
#undef Rect
|
||||
|
||||
|
||||
@ -151,7 +154,7 @@ public:
|
||||
virtual void MakeDirty(int left, int top, int width, int height);
|
||||
virtual void UpdatePalette(uint first_color, uint num_colors);
|
||||
|
||||
virtual uint ListModes(OTTDPoint* modes, uint max_modes);
|
||||
virtual uint ListModes(OTTD_Point* modes, uint max_modes);
|
||||
|
||||
virtual bool ChangeResolution(int w, int h);
|
||||
|
||||
@ -682,7 +685,7 @@ void WindowQuickdrawSubdriver::UpdatePalette(uint first_color, uint num_colors)
|
||||
num_dirty_rects = MAX_DIRTY_RECTS;
|
||||
}
|
||||
|
||||
uint WindowQuickdrawSubdriver::ListModes(OTTDPoint* modes, uint max_modes)
|
||||
uint WindowQuickdrawSubdriver::ListModes(OTTD_Point* modes, uint max_modes)
|
||||
{
|
||||
if (max_modes == 0) return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user