aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Game/Code/UltraStar.dpr66
-rw-r--r--Game/Code/UltraStar.lpr77
-rw-r--r--Game/Code/switches.inc192
3 files changed, 193 insertions, 142 deletions
diff --git a/Game/Code/UltraStar.dpr b/Game/Code/UltraStar.dpr
index 18a825eb..788b1018 100644
--- a/Game/Code/UltraStar.dpr
+++ b/Game/Code/UltraStar.dpr
@@ -18,17 +18,19 @@ uses
sdl_ttf in 'lib\JEDI-SDL\SDL_ttf\Pas\sdl_ttf.pas',
sdlutils in 'lib\JEDI-SDL\SDL\Pas\sdlutils.pas',
- {$ifdef UseBass}
- bass in 'lib\bass\delphi\bass.pas',
- {$endif}
- {$ifdef UsePortaudio}
- portaudio in 'lib\portaudio\delphi\portaudio.pas',
- {$endif}
- {$ifdef UsePortmixer}
- portmixer in 'lib\portmixer\delphi\portmixer.pas',
- {$endif}
-
- {$ifdef delphi}
+ {$IFDEF UseBass}
+ bass in 'lib\bass\delphi\bass.pas',
+ //UAudioCore_Bass in 'Classes\UAudioCore_Bass.pas',
+ {$ENDIF}
+ {$IFDEF UsePortaudio}
+ portaudio in 'lib\portaudio\delphi\portaudio.pas',
+ {$ENDIF}
+ {$IFDEF UsePortmixer}
+ portmixer in 'lib\portmixer\delphi\portmixer.pas',
+ {$ENDIF}
+
+ //{$IFDEF MSWINDOWS}
+ {$IFDEF Delphi}
midiout in 'lib\midi\midiout.pas',
midiin in 'lib\midi\midiin.pas',
CIRCBUF in 'lib\midi\CIRCBUF.PAS',
@@ -39,8 +41,9 @@ uses
Delphmcb in 'lib\midi\Delphmcb.PAS',
DirWatch in 'lib\other\DirWatch.pas',
- {$endif}
+ {$ENDIF}
+ {$IFDEF UseFFMpeg}
avcodec in 'lib\ffmpeg\avcodec.pas',
avformat in 'lib\ffmpeg\avformat.pas',
avutil in 'lib\ffmpeg\avutil.pas',
@@ -48,14 +51,17 @@ uses
opt in 'lib\ffmpeg\opt.pas',
avio in 'lib\ffmpeg\avio.pas',
mathematics in 'lib\ffmpeg\mathematics.pas',
-// swscale in 'lib\ffmpeg\swscale.pas',
+ {$ENDIF}
+ {$IFDEF UseSWScale}
+ swscale in 'lib\ffmpeg\swscale.pas',
+ {$ENDIF}
- {$ifdef UseProjectM_0_9}
+ {$IFDEF UseProjectM_0_9}
projectM in 'lib\projectM\0.9\projectM.pas',
- {$endif}
- {$ifdef UseProjectM_1_0}
+ {$ENDIF}
+ {$IFDEF UseProjectM_1_0}
projectM in 'lib\projectM\1.0\projectM.pas',
- {$endif}
+ {$ENDIF}
SQLiteTable3 in 'lib\SQLite\SQLiteTable3.pas',
SQLite3 in 'lib\SQLite\SQLite3.pas',
@@ -145,22 +151,24 @@ uses
{$IFDEF UseProjectM}
UVisualizer in 'Classes\UVisualizer.pas', // MUST be before Video... so video can override...
{$ENDIF}
+{$IFDEF UseFFMpegVideo}
UVideo in 'Classes\UVideo.pas',
-{$ifdef UseFFMpegDecoder}
+{$ENDIF}
+{$IFDEF UseFFMpegDecoder}
UAudioDecoder_FFMpeg in 'Classes\UAudioDecoder_FFMpeg.pas', // MUST be before Playback-classes
-{$endif}
-{$ifdef UseBASSInput}
+{$ENDIF}
+{$IFDEF UseBASSInput}
UAudioInput_Bass in 'Classes\UAudioInput_Bass.pas',
-{$endif}
-{$ifdef UseBASSPlayback}
+{$ENDIF}
+{$IFDEF UseBASSPlayback}
UAudioPlayback_Bass in 'Classes\UAudioPlayback_Bass.pas',
-{$endif}
-{$ifdef UsePortaudioInput}
+{$ENDIF}
+{$IFDEF UsePortaudioInput}
UAudioInput_Portaudio in 'Classes\UAudioInput_Portaudio.pas',
-{$endif}
-{$ifdef UsePortaudioPlayback}
+{$ENDIF}
+{$IFDEF UsePortaudioPlayback}
UAudioPlayback_Portaudio in 'Classes\UAudioPlayback_Portaudio.pas',
-{$endif}
+{$ENDIF}
//------------------------------
@@ -204,7 +212,7 @@ uses
UScreenPartyWin in 'Screens\UScreenPartyWin.pas',
- //------------------------------
+ //------------------------------
//Includes - Modi SDK
//------------------------------
ModiSDK in '..\..\Modis\SDK\ModiSDK.pas', //Old SDK, will be deleted soon
@@ -213,7 +221,7 @@ uses
{$IFDEF win32}
Windows,
- {$ENDIF}
+ {$ENDIF}
SysUtils;
const
diff --git a/Game/Code/UltraStar.lpr b/Game/Code/UltraStar.lpr
index 01cd7f87..cbb44adf 100644
--- a/Game/Code/UltraStar.lpr
+++ b/Game/Code/UltraStar.lpr
@@ -1,36 +1,41 @@
-program UltraStar;
-
-{$DEFINE TRANSLATE}
-{$MODE DELPHI}
-{$I switches.inc}
-
-uses
- {$ifdef unix} // http://wiki.lazarus.freepascal.org/Multithreaded_Application_Tutorial
- cthreads, // THIS MUST be the first used unit !!
- {$endif}
-
- // ***************************************************************************
- //
- // Developers PLEASE NOTE !!!!!!!
- //
- // As of september 2007, I am working towards porting Ultrastar-DX to run
- // on Linux. I will be modifiying the source to make it compile in lazarus
- // on windows & linux and I will make sure that it compiles in delphi still
- // To help me in this endevour, please can you make a point of remembering
- // that linux is CASE SENSATIVE, and file / unit names must be as per
- // the filename exactly.
- //
- // EG : opengl12.pas must not be OpenGL in the uses cluase.
- //
- // thanks for your help...
- //
- // ***************************************************************************
-
- // Interesting stuff... :)
- // http://burningsmell.org/sdl_audioin/
-
- {$I UltraStar.dpr}
-
-begin
- main();
-end.
+program UltraStar;
+
+{$DEFINE TRANSLATE}
+{$MODE DELPHI}
+{$I switches.inc}
+
+uses
+ {$ifdef unix} // http://wiki.lazarus.freepascal.org/Multithreaded_Application_Tutorial
+ cthreads, // THIS MUST be the first used unit !!
+ {$endif}
+ {$ifdef MSWINDOWS}
+ {$ifdef LCL}
+ Interfaces, // Initialize Lazarus LCL (necessary for usage of LCLIntf, etc.)
+ {$endif}
+ {$endif}
+
+ {$I UltraStar.dpr}
+
+ // ***************************************************************************
+ //
+ // Developers PLEASE NOTE !!!!!!!
+ //
+ // As of september 2007, I am working towards porting Ultrastar-DX to run
+ // on Linux. I will be modifiying the source to make it compile in lazarus
+ // on windows & linux and I will make sure that it compiles in delphi still
+ // To help me in this endevour, please can you make a point of remembering
+ // that linux is CASE SENSATIVE, and file / unit names must be as per
+ // the filename exactly.
+ //
+ // EG : opengl12.pas must not be OpenGL in the uses cluase.
+ //
+ // thanks for your help...
+ //
+ // ***************************************************************************
+
+ // Interesting stuff... :)
+ // http://burningsmell.org/sdl_audioin/
+
+begin
+ main();
+end.
diff --git a/Game/Code/switches.inc b/Game/Code/switches.inc
index 29828712..a50c759b 100644
--- a/Game/Code/switches.inc
+++ b/Game/Code/switches.inc
@@ -1,77 +1,115 @@
-{$DEFINE DEBUG} // to-do : Remove b4 release
-
-// 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}
- {$IFDEF DARWIN}
- {$H+}
- {$R-}
- {$DEFINE WIN32}
- {$DEFINE TRANSLATE}
- {$DEFINE UTF8_FILENAMES}
- {$ELSE}
- {$DEFINE LAZARUS}
- {$ENDIF}
-
- {$DEFINE DLL_CDECL}
- {$UNDEF UseSerialPort}
- {$UNDEF UseMIDIPort}
-{$ELSE}
- {$DEFINE Delphi}
- {$DEFINE DLL_STDCALL}
- {$UNDEF UseSerialPort}
- {$DEFINE UseMIDIPort}
-{$ENDIF}
-
-
-{$IFDEF win32}
- {$I config-win.inc}
-
- {$DEFINE UseBASSPlayback}
- {$DEFINE UseBASSInput}
-
- //{$DEFINE UseFFMpegDecoder}
- //{$DEFINE UsePortaudioPlayback}
- //{$DEFINE UsePortaudioInput}
- //{$DEFINE UsePortmixer}
-
- {$IF Defined(HaveProjectM_0_9)}
- {$DEFINE UseProjectM_0_9}
- {$ELSEIF Defined(HaveProjectM_1_0_PLUS)}
- {$DEFINE UseProjectM_1_0}
- {$IFEND}
-
- {$IFDEF DEBUG}
- {$IFNDEF DARWIN}
- {$APPTYPE CONSOLE}
- {$ENDIF}
- {$ENDIF}
-{$ELSE}
- {$DEFINE UseFFMpegAudio}
- {$DEFINE UsePortaudio}
- {$DEFINE UseProjectM_0_9}
-{$ENDIF}
-
-{$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)}
- {$DEFINE UseProjectM}
-{$IFEND}
-
-// I had to add these (jay)... but maybe henny has some way that the config script is meant to do this ?
-// Ill need to check with him.
-//{$DEFINE FPC_V220}
-//{$DEFINE LAZARUS_V0924}
+// 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}
+ {$IFDEF DARWIN}
+ {$H+}
+ {$R-}
+ {$DEFINE WIN32}
+ {$DEFINE TRANSLATE}
+ {$DEFINE UTF8_FILENAMES}
+ {$ELSE}
+ {$DEFINE LAZARUS}
+ {$IFNDEF LCL}
+ // LCL should be defined already
+ {$MESSAGE Warn 'LCL undefined, compile with "fpc -dLCL ..."!'}
+ {$DEFINE LCL}
+ {$ENDIF}
+ {$ENDIF}
+
+ {$DEFINE DLL_CDECL}
+ {$UNDEF UseSerialPort}
+ {$UNDEF UseMIDIPort}
+{$ELSE}
+ {$DEFINE Delphi}
+ {$DEFINE DLL_STDCALL}
+ {$UNDEF UseSerialPort}
+ {$DEFINE UseMIDIPort}
+{$ENDIF}
+
+
+{$IF Defined(win32)}
+ {$I config-win.inc}
+
+ // audio config
+ {$DEFINE WinAudioLib_BASS}
+ {$IFDEF WinAudioLib_BASS}
+ {$DEFINE UseBASSPlayback}
+ {$DEFINE UseBASSInput}
+ {$ELSE}
+ {$DEFINE UseFFMpegDecoder}
+ {$DEFINE HaveAvcodecDecodeAudio2}
+ {$DEFINE UsePortaudioPlayback}
+ {$DEFINE UsePortaudioInput}
+ {$DEFINE UsePortmixer}
+ {$ENDIF}
+ {$UNDEF WinAudioLib_BASS}
+
+ // video config
+ {$IFDEF HaveFFMpeg}
+ {$DEFINE UseFFMpegVideo}
+ {$ENDIF}
+ {$IFDEF HaveSWScale}
+ {$DEFINE UseSWScale}
+ {$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}
+ {$APPTYPE CONSOLE}
+ {$ENDIF}
+ {$ENDIF}
+{$ELSEIF Defined(Linux)}
+ {$I config-linux.inc}
+
+ // audio config
+ {$IFDEF HaveFFMpeg}
+ {$DEFINE UseFFMpegDecoder}
+ {$IFDEF HavePortaudio}
+ {$DEFINE UsePortaudioPlayback}
+ {$DEFINE UsePortaudioInput}
+ {$ENDIF}
+ {$ENDIF}
+
+ // video config
+ {$IFDEF HaveFFMpeg}
+ {$DEFINE UseFFMpegVideo}
+ {$ENDIF}
+ {$IFDEF HaveSWScale}
+ {$DEFINE UseSWScale}
+ {$ENDIF}
+
+ // misc defines
+ {$IFDEF HaveProjectM}
+ {$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}
+