aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/switches.inc
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-04-22 16:18:08 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-04-22 16:18:08 +0000
commit0bf82c1d17814e6190033e79984801846be27b6c (patch)
treea93469706a90b61d1b5f60e65c2777be5971e46f /Game/Code/switches.inc
parentfe13131bbecd0d9da445a06ecfd6fc0733675dae (diff)
downloadusdx-0bf82c1d17814e6190033e79984801846be27b6c.tar.gz
usdx-0bf82c1d17814e6190033e79984801846be27b6c.tar.xz
usdx-0bf82c1d17814e6190033e79984801846be27b6c.zip
- new switches.inc layout
- support for projectM 1.1 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1033 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/switches.inc')
-rw-r--r--Game/Code/switches.inc242
1 files changed, 108 insertions, 134 deletions
diff --git a/Game/Code/switches.inc b/Game/Code/switches.inc
index 465aef09..c803b3f7 100644
--- a/Game/Code/switches.inc
+++ b/Game/Code/switches.inc
@@ -1,134 +1,108 @@
-// Comment by eddie:
-// The mac port currently also uses the WIN32 define.
-// Once I get the beast compiled, linked and running
-// I will change this.
-// There are some parts where the WIN32 define could not
-// be used. I changed the WIN32 to MSWINDOWS.
-// So, for Windows-only code use the MSWINDOWS define.
-
-{$IFDEF FPC}
- {$DEFINE CONSOLE}
- {$IFDEF DARWIN}
- {$H+}
- {$R-}
- {$DEFINE WIN32}
- {$DEFINE TRANSLATE}
- {$DEFINE UTF8_FILENAMES}
- {$ENDIF}
-
- {$DEFINE DLL_CDECL}
- {$DEFINE HasInline}
- {$UNDEF UseSerialPort}
-{$ELSE}
- {$UNDEF CONSOLE} // Delphi requires a special app type... no thanks ! :)
- // {$DEFINE CONSOLE} // -- use for development only !
- {$DEFINE Delphi}
-
- // Delphi version numbers (ignore versions released before Delphi 6 as they miss the $IF directive):
- // Delphi 6 (VER140), Delphi 7 (VER150), Delphi 8 (VER160)
- // Delphi 9/2005 (VER170), Delphi 10/2006 (VER180)
-
- // the inline-procedure directive was introduced with Delphi 2005
- {$IF not (Defined(VER140) or Defined(VER150) or Defined(VER160))}
- {$DEFINE HasInline}
- {$IFEND}
-
- {$DEFINE DLL_STDCALL}
- {$UNDEF UseSerialPort}
-{$ENDIF}
-
-
-{$IF Defined(win32)}
- // include defines but no constants
- {$IFDEF DARWIN}
- {$I config-macosx.inc}
- {$ELSE}
- {$I config-win.inc}
- {$ENDIF}
-
- // audio config
- {$DEFINE WinAudioLib_BASS}
- {$IFDEF WinAudioLib_BASS}
- {$DEFINE UseBASSPlayback}
- {$DEFINE UseBASSInput}
- {$ELSE}
- {$DEFINE UseFFMpegDecoder}
- //{$DEFINE UsePortaudioPlayback}
- {$DEFINE UseSDLPlayback}
- {$DEFINE UsePortaudioInput}
- {$DEFINE UsePortmixer}
- {$ENDIF}
- {$UNDEF WinAudioLib_BASS}
-
- // video config
- {$IFDEF HaveFFMpeg}
- {$DEFINE UseFFMpegVideo}
- {$IFDEF HaveSWScale}
- {$DEFINE UseSWScale}
- {$ENDIF}
- {$ENDIF}
-
- // misc defines
-
- {$IF Defined(HaveProjectM_0_9)}
- {$DEFINE UseProjectM_0_9}
- {$ELSEIF Defined(HaveProjectM_1_0_PLUS)}
- {$DEFINE UseProjectM_1_0_PLUS}
- {$IFEND}
-
- {$IFDEF DEBUG}
- {$IFNDEF DARWIN}
- {$IFDEF CONSOLE}
- {$APPTYPE CONSOLE}
- {$ENDIF}
- {$ENDIF}
- {$ENDIF}
-
- {$IFDEF MSWINDOWS}
- {$DEFINE UseMIDIPort}
- {$ENDIF}
-{$ELSEIF Defined(Linux)}
- // include defines but no constants
- {$I config-linux.inc}
-
- // audio config
- {$IFDEF HaveFFMpeg}
- {$DEFINE UseFFMpegDecoder}
- {$IFDEF HavePortaudio}
- //{$DEFINE UsePortaudioPlayback}
- {$DEFINE UseSDLPlayback}
- {$DEFINE UsePortaudioInput}
- {$ENDIF}
- {$ENDIF}
-
- // video config
- {$IFDEF HaveFFMpeg}
- {$DEFINE UseFFMpegVideo}
- {$IFDEF HaveSWScale}
- {$DEFINE UseSWScale}
- {$ENDIF}
- {$ENDIF}
-
- // misc defines
- {$IFDEF HaveProjectM}
- // this causes trouble at the moment
- //{$DEFINE UseProjectM_0_9}
- {$ENDIF}
-{$IFEND}
-
-{$IF Defined(UseFFMpegVideo) or Defined(UseFFMpegDecoder)}
- {$DEFINE UseFFMpeg}
-{$IFEND}
-
-{$IF Defined(UseBASSInput) or Defined(UseBASSPlayback)}
- {$DEFINE UseBASS}
-{$IFEND}
-
-{$IF Defined(UsePortaudioInput) or Defined(UsePortaudioPlayback)}
- {$DEFINE UsePortaudio}
-{$IFEND}
-
-{$IF Defined(UseProjectM_0_9) or Defined(UseProjectM_1_0_PLUS)}
- {$DEFINE UseProjectM}
-{$IFEND}
-
+// Comment by eddie:
+// The mac port currently also uses the WIN32 define.
+// Once I get the beast compiled, linked and running
+// I will change this.
+// There are some parts where the WIN32 define could not
+// be used. I changed the WIN32 to MSWINDOWS.
+// So, for Windows-only code use the MSWINDOWS define.
+
+// compiler/IDE dependent config
+{$IFDEF FPC}
+ {$DEFINE CONSOLE}
+ {$IFDEF DARWIN}
+ {$H+} // enables usage of AnsiString as String-type
+ {$R-} // disables range-checks
+ {$ENDIF}
+
+ // if -dDEBUG is specified on the command-line, FPC uses some default
+ // compiler-flags specified in fpc.cfg -> use -dDEBUG_MODE instead
+ {$IFDEF DEBUG_MODE}
+ {$DEFINE DEBUG}
+ {$ENDIF}
+
+ {$DEFINE DLL_CDECL}
+ {$DEFINE HasInline}
+{$ELSE}
+ {$UNDEF CONSOLE} // Delphi requires a special app type... no thanks ! :)
+ // {$DEFINE CONSOLE} // -- use for development only !
+ {$DEFINE Delphi}
+
+ // Delphi version numbers (ignore versions released before Delphi 6 as they miss the $IF directive):
+ // Delphi 6 (VER140), Delphi 7 (VER150), Delphi 8 (VER160)
+ // Delphi 9/2005 (VER170), Delphi 10/2006 (VER180)
+
+ // the inline-procedure directive was introduced with Delphi 2005
+ {$IF not (Defined(VER140) or Defined(VER150) or Defined(VER160))}
+ {$DEFINE HasInline}
+ {$IFEND}
+{$ENDIF}
+
+
+// platform dependent config
+{$IF Defined(MSWINDOWS)}
+ // include defines but no constants
+ {$I config-win.inc}
+
+ {$IFDEF DEBUG}
+ {$IFDEF CONSOLE}
+ {$APPTYPE CONSOLE}
+ {$ENDIF}
+ {$ENDIF}
+
+ {$DEFINE HaveBASS}
+ {$UNDEF UseSerialPort}
+ {$DEFINE UseMIDIPort}
+{$ELSEIF Defined(LINUX)}
+ // include defines but no constants
+ {$I config-linux.inc}
+{$ELSEIF Defined(DARWIN)}
+ // include defines but no constants
+ {$I config-macosx.inc}
+
+ {$DEFINE HaveBASS}
+ {$DEFINE DLL_CDECL}
+ {$DEFINE WIN32}
+ {$DEFINE UTF8_FILENAMES}
+{$IFEND}
+
+// audio config
+{$IF Defined(HaveBASS)}
+ {$DEFINE UseBASSPlayback}
+ {$DEFINE UseBASSInput}
+{$ELSEIF Defined(HavePortaudio)}
+ //{$DEFINE UsePortaudioPlayback}
+ {$DEFINE UseSDLPlayback}
+ {$DEFINE UsePortaudioInput}
+ {$IFDEF HavePortmixer}
+ {$DEFINE UsePortmixer}
+ {$ENDIF}
+{$IFEND}
+
+// ffmpeg config
+{$IFDEF HaveFFMpeg}
+ {$DEFINE UseFFMpegDecoder}
+ {$DEFINE UseFFMpegVideo}
+ {$IFDEF HaveSWScale}
+ {$DEFINE UseSWScale}
+ {$ENDIF}
+{$ENDIF}
+
+// projectM config
+{$IF Defined(HaveProjectM)}
+ {$DEFINE UseProjectM}
+{$IFEND}
+
+// specify some useful defines
+
+{$IF Defined(UseFFMpegVideo) or Defined(UseFFMpegDecoder)}
+ {$DEFINE UseFFMpeg}
+{$IFEND}
+
+{$IF Defined(UseBASSInput) or Defined(UseBASSPlayback)}
+ {$DEFINE UseBASS}
+{$IFEND}
+
+{$IF Defined(UsePortaudioInput) or Defined(UsePortaudioPlayback)}
+ {$DEFINE UsePortaudio}
+{$IFEND}
+