summaryrefslogtreecommitdiff
path: root/os/macosx
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-02-12 14:31:33 +0000
committerbjarni <bjarni@openttd.org>2006-02-12 14:31:33 +0000
commit8744075a6cb64578f7e255220d76b77b26eb1a45 (patch)
tree69d0102238a85f5bd3d34ca4d93e1973a70ab771 /os/macosx
parent0dfc0ea76b079af9e84846848f348f0f717ab4a7 (diff)
downloadopenttd-8744075a6cb64578f7e255220d76b77b26eb1a45.tar.xz
(svn r3596) -Codechange: [OSX] changed to use Apple's macros instead of OTTD macros for endian conversion
This increases the execution speed a lot since GCC can't detect the OTTD macro as an endian conversion while Apple's code uses the instruction to convert endian instead of a series of instructions to produce the same result Since we don't have that many endian conversions in the game, overall performance should not increase noteworthy
Diffstat (limited to 'os/macosx')
-rw-r--r--os/macosx/osx_stdafx.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/os/macosx/osx_stdafx.h b/os/macosx/osx_stdafx.h
new file mode 100644
index 000000000..9567d70ba
--- /dev/null
+++ b/os/macosx/osx_stdafx.h
@@ -0,0 +1,19 @@
+/* $Id$ */
+
+#ifndef MACOS_STDAFX_H
+#define MACOS_STDAFX_H
+
+#include <CoreServices/CoreServices.h>
+// remove the variables that CoreServices defines, but we define ourselves too
+#undef bool
+#undef false
+#undef true
+
+/* Name conflict */
+#define Rect OTTDRect
+#define Point OTTDPoint
+#define GetTime OTTDGetTime
+
+#define SL_ERROR OSX_SL_ERROR
+
+#endif /* MACOS_STDAFX_H */