aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/UDLLManager.pas9
-rw-r--r--Game/Code/Classes/UDataBase.pas5
-rw-r--r--Game/Code/Classes/UDraw.pas10
-rw-r--r--Game/Code/Classes/UGraphic.pas76
-rw-r--r--Game/Code/Classes/UIni.pas7
-rw-r--r--Game/Code/Classes/ULanguage.pas5
-rw-r--r--Game/Code/Classes/ULight.pas28
-rw-r--r--Game/Code/Classes/UMain.pas5
-rw-r--r--Game/Code/Classes/UParty.pas5
-rw-r--r--Game/Code/Classes/UPlaylist.pas5
-rw-r--r--Game/Code/Classes/URecord.pas117
-rw-r--r--Game/Code/Classes/USkins.pas5
-rw-r--r--Game/Code/Classes/UTexture.pas5
-rw-r--r--Game/Code/Classes/UVideo.pas27
-rw-r--r--Game/Code/Menu/UDisplay.pas7
-rw-r--r--Game/Code/Menu/UMenu.pas4
-rw-r--r--Game/Code/Menu/UMenuSelectSlide.pas10
-rw-r--r--Game/Code/Menu/UMenuText.pas5
-rw-r--r--Game/Code/Screens/UScreenCredits.pas19
-rw-r--r--Game/Code/Screens/UScreenEditConvert.pas41
-rw-r--r--Game/Code/Screens/UScreenEditSub.pas30
-rw-r--r--Game/Code/Screens/UScreenMain.pas24
-rw-r--r--Game/Code/Screens/UScreenPartyNewRound.pas5
-rw-r--r--Game/Code/Screens/UScreenPartyOptions.pas4
-rw-r--r--Game/Code/Screens/UScreenScore.pas18
-rw-r--r--Game/Code/Screens/UScreenSingModi.pas479
-rw-r--r--Game/Code/Screens/UScreenSongMenu.pas6
-rw-r--r--Game/Code/Screens/UScreenStatMain.pas7
-rw-r--r--Game/Code/UltraStar.lpi422
-rw-r--r--Game/Code/UltraStar.lpr25
-rw-r--r--Game/Code/switches.inc2
31 files changed, 726 insertions, 691 deletions
diff --git a/Game/Code/Classes/UDLLManager.pas b/Game/Code/Classes/UDLLManager.pas
index 4b8838b9..0d328c37 100644
--- a/Game/Code/Classes/UDLLManager.pas
+++ b/Game/Code/Classes/UDLLManager.pas
@@ -1,7 +1,14 @@
unit UDLLManager;
+{$IFDEF FPC}
+ {$MODE DELPHI}
+{$ENDIF}
+
+
interface
-uses ModiSDK, UFiles;
+
+uses ModiSDK,
+ UFiles;
type
TDLLMan = class
diff --git a/Game/Code/Classes/UDataBase.pas b/Game/Code/Classes/UDataBase.pas
index b8b41bc1..009d0d63 100644
--- a/Game/Code/Classes/UDataBase.pas
+++ b/Game/Code/Classes/UDataBase.pas
@@ -2,6 +2,11 @@ unit UDataBase;
interface
+{$IFDEF FPC}
+ {$MODE DELPHI}
+{$ENDIF}
+
+
uses USongs, SQLiteTable3;
//--------------------
diff --git a/Game/Code/Classes/UDraw.pas b/Game/Code/Classes/UDraw.pas
index 94617583..cbfafbe6 100644
--- a/Game/Code/Classes/UDraw.pas
+++ b/Game/Code/Classes/UDraw.pas
@@ -1,7 +1,15 @@
unit UDraw;
interface
-uses UThemes, ModiSDK, UGraphicClasses, dialogs;
+
+{$IFDEF FPC}
+ {$MODE DELPHI}
+{$ENDIF}
+
+uses UThemes,
+ ModiSDK,
+ UGraphicClasses;
+ // dialogs;
procedure SingDraw;
procedure SingModiDraw (PlayerInfo: TPlayerInfo);
diff --git a/Game/Code/Classes/UGraphic.pas b/Game/Code/Classes/UGraphic.pas
index 0c022b8f..eb7dde8e 100644
--- a/Game/Code/Classes/UGraphic.pas
+++ b/Game/Code/Classes/UGraphic.pas
@@ -1,16 +1,59 @@
unit UGraphic;
interface
+
+{$IFDEF FPC}
+ {$MODE DELPHI}
+{$ENDIF}
+
uses
- SDL, OpenGL12, UTexture, TextGL, ULog, SysUtils, ULyrics, UScreenLoading,
- UScreenWelcome, UScreenMain, UScreenName, UScreenLevel, UScreenOptions, UScreenOptionsGame,
- UScreenOptionsGraphics, UScreenOptionsSound, UScreenOptionsLyrics, UScreenOptionsThemes, UScreenOptionsRecord, UScreenOptionsAdvanced,
- UScreenSong, UScreenSing, UScreenScore, UScreenTop5, UScreenEditSub,
- UScreenEdit, UScreenEditConvert, UScreenEditHeader, UScreenOpen, UThemes, USkins, UScreenSongMenu, UScreenSongJumpto,
- {Party Screens} UScreenSingModi, UScreenPartyNewRound, UScreenPartyScore, UScreenPartyOptions, UScreenPartyWin, UScreenPartyPlayer,
- {Stats Screens} UScreenStatMain, UScreenStatDetail,
- {CreditsScreen} UScreenCredits,
- {Popup for errors, etc.} UScreenPopup;
+ SDL,
+ OpenGL12,
+ UTexture,
+ TextGL,
+ ULog,
+ SysUtils,
+ ULyrics,
+ UScreenLoading,
+ UScreenWelcome,
+ UScreenMain,
+ UScreenName,
+ UScreenLevel,
+ UScreenOptions,
+ UScreenOptionsGame,
+ UScreenOptionsGraphics,
+ UScreenOptionsSound,
+ UScreenOptionsLyrics,
+ UScreenOptionsThemes,
+ UScreenOptionsRecord,
+ UScreenOptionsAdvanced,
+ UScreenSong,
+ UScreenSing,
+ UScreenScore,
+ UScreenTop5,
+ UScreenEditSub,
+ UScreenEdit,
+ UScreenEditConvert,
+ UScreenEditHeader,
+ UScreenOpen,
+ UThemes,
+ USkins,
+ UScreenSongMenu,
+ UScreenSongJumpto,
+ {Party Screens}
+ UScreenSingModi,
+ UScreenPartyNewRound,
+ UScreenPartyScore,
+ UScreenPartyOptions,
+ UScreenPartyWin,
+ UScreenPartyPlayer,
+ {Stats Screens}
+ UScreenStatMain,
+ UScreenStatDetail,
+ {CreditsScreen}
+ UScreenCredits,
+ {Popup for errors, etc.}
+ UScreenPopup;
type
TRecR = record
@@ -188,9 +231,20 @@ function LoadingThreadFunction: integer;
implementation
-uses UMain, UIni, UDisplay, UCommandLine, Graphics, Classes, Windows;
+
+uses UMain,
+ UIni,
+ UDisplay,
+ UCommandLine,
+ {$IFNDEF FPC}
+ Graphics,
+ {$ENDIF}
+ Classes,
+ Windows;
procedure LoadTextures;
+
+
var
P: integer;
R, G, B: real;
@@ -253,7 +307,7 @@ end;
procedure Initialize3D (Title: string);
var
- Icon: TIcon;
+// Icon: TIcon;
Res: TResourceStream;
ISurface: PSDL_Surface;
Pixel: PByteArray;
diff --git a/Game/Code/Classes/UIni.pas b/Game/Code/Classes/UIni.pas
index 67649a51..cd5c3716 100644
--- a/Game/Code/Classes/UIni.pas
+++ b/Game/Code/Classes/UIni.pas
@@ -1,6 +1,11 @@
unit UIni;
interface
+
+{$IFDEF FPC}
+ {$MODE DELPHI}
+{$ENDIF}
+
uses IniFiles, ULog, SysUtils;
type
@@ -768,4 +773,4 @@ begin
end;
end;
-end. \ No newline at end of file
+end.
diff --git a/Game/Code/Classes/ULanguage.pas b/Game/Code/Classes/ULanguage.pas
index 5deed1f7..f693694b 100644
--- a/Game/Code/Classes/ULanguage.pas
+++ b/Game/Code/Classes/ULanguage.pas
@@ -2,6 +2,11 @@ unit ULanguage;
interface
+{$IFDEF FPC}
+ {$MODE DELPHI}
+{$ENDIF}
+
+
type
TLanguageEntry = record
ID: string;
diff --git a/Game/Code/Classes/ULight.pas b/Game/Code/Classes/ULight.pas
index b9c7af9e..74681a85 100644
--- a/Game/Code/Classes/ULight.pas
+++ b/Game/Code/Classes/ULight.pas
@@ -36,6 +36,32 @@ uses
zlportio,
{$ENDIF}
UTime;
+
+{$IFDEF FPC}
+ function GetTime: TDateTime;
+ {$IFDEF MSWINDOWS}
+ var
+ SystemTime: TSystemTime;
+ begin
+ GetLocalTime(SystemTime);
+ with SystemTime do
+ Result := EncodeTime(wHour, wMinute, wSecond, wMilliSeconds);
+ end;
+ {$ENDIF}
+ {$IFDEF LINUX}
+ var
+ T: TTime_T;
+ TV: TTimeVal;
+ UT: TUnixTime;
+ begin
+ gettimeofday(TV, nil);
+ T := TV.tv_sec;
+ localtime_r(@T, UT);
+ Result := EncodeTime(UT.tm_hour, UT.tm_min, UT.tm_sec, TV.tv_usec div 1000);
+ end;
+ {$ENDIF}
+{$ENDIF}
+
constructor TLight.Create;
begin
@@ -44,7 +70,7 @@ end;
procedure TLight.Enable;
begin
- Enabled := true;
+ Enabled := true;
LastTime := GetTime;
end;
diff --git a/Game/Code/Classes/UMain.pas b/Game/Code/Classes/UMain.pas
index e89b4785..646724df 100644
--- a/Game/Code/Classes/UMain.pas
+++ b/Game/Code/Classes/UMain.pas
@@ -1,6 +1,11 @@
unit UMain;
interface
+
+{$IFDEF FPC}
+ {$MODE Delphi}
+{$ENDIF}
+
{$I switches.inc}
uses SDL, UGraphic, UMusic, URecord, UTime, SysUtils, UDisplay, UIni, ULog, ULyrics, UScreenSing,
diff --git a/Game/Code/Classes/UParty.pas b/Game/Code/Classes/UParty.pas
index 7bf3dd1b..9be0df3e 100644
--- a/Game/Code/Classes/UParty.pas
+++ b/Game/Code/Classes/UParty.pas
@@ -2,6 +2,11 @@ unit UParty;
interface
+{$IFDEF FPC}
+ {$MODE DELPHI}
+{$ENDIF}
+
+
uses ModiSDK;
type
diff --git a/Game/Code/Classes/UPlaylist.pas b/Game/Code/Classes/UPlaylist.pas
index 1e517ef7..3f89ffed 100644
--- a/Game/Code/Classes/UPlaylist.pas
+++ b/Game/Code/Classes/UPlaylist.pas
@@ -2,6 +2,11 @@ unit UPlaylist;
interface
+{$IFDEF FPC}
+ {$MODE DELPHI}
+{$ENDIF}
+
+
type
TPlaylistItem = record
Artist: String;
diff --git a/Game/Code/Classes/URecord.pas b/Game/Code/Classes/URecord.pas
index 6ce83c0a..03c87a35 100644
--- a/Game/Code/Classes/URecord.pas
+++ b/Game/Code/Classes/URecord.pas
@@ -1,7 +1,13 @@
unit URecord;
interface
-uses Classes, Math, SysUtils, {DXSounds, Wave, }UMusic, UIni, BASS;
+
+uses Classes,
+ Math,
+ SysUtils,
+ UMusic,
+ UIni,
+ BASS;
type
TSound = class
@@ -11,8 +17,6 @@ type
Num: integer;
n: integer; // length of Signal to analyze
-// Spectrum: array[1..8192] of single; // sound buffer from above as FFT
-// Spektogram: array[0..100] of TSpekt; // FFT(t)
// pitch detection
SzczytJest: boolean; // czy jest szczyt
@@ -63,7 +67,7 @@ var
Recording: TRecord;
implementation
-uses UMain, ULog;
+uses UMain;
procedure TSound.ProcessNewBuffer;
var
@@ -87,7 +91,8 @@ begin
BufferNew.ReadBuffer(BufferArray[1+n-L], 2*L);
// process BufferLong
- if Ini.SavePlayback = 1 then begin
+ if Ini.SavePlayback = 1 then
+ begin
BufferNew.Seek(0, soBeginning);
BufferLong[0].CopyFrom(BufferNew, BufferNew.Size);
end;
@@ -110,32 +115,29 @@ var
S: integer; // Signal
Threshold: real; // threshold
begin
-// Log.LogAnalyze('[Analyze by Autocorrelation]');
SzczytJest := false;
// find maximum volume of first 1024 words of signal
MaxV := 0;
- for S := 1 to 1024 do begin // 0.5.2: fix. was from 0 to 1023
-// Log.LogDebug('1');
-// Log.LogDebug(IntTostr(S));
+ for S := 1 to 1024 do // 0.5.2: fix. was from 0 to 1023
+ begin
V := Abs(BufferArray[S]) / $10000;
-// Log.LogDebug('2');
-// Log.LogDebug(IntTostr(S) + ': ' + FloatToStr(V) + ', MaxV='+floattostr(maxv)+', buf='+inttostr(length(BufferArray)));
- if V > MaxV then MaxV := V;
-// Log.LogDebug('3');
-// Log.LogDebug(IntTostr(S) + ': ' + FloatToStr(V) + ', MaxV='+floattostr(maxv)+', buf='+inttostr(length(BufferArray)));
- end;
+ if V > MaxV then
+ MaxV := V;
+ end;
// prepare to analyze
MaxW := 0;
// analyze all 12 halftones
- for T := 0 to 35 do begin // to 11, then 23, now 35 (for Whitney and my high voice)
+ for T := 0 to 35 do // to 11, then 23, now 35 (for Whitney and my high voice)
+ begin
F := 130.81*Power(1.05946309436, T)/2; // let's analyze below 130.81
Wages[T] := AnalyzeAutocorrelationFreq(F);
- if Wages[T] > MaxW then begin // this frequency has better wage
+ if Wages[T] > MaxW then
+ begin // this frequency has better wage
MaxW := Wages[T];
MaxT := T;
end;
@@ -149,20 +151,13 @@ begin
3: Threshold := 0.2;
end;
- //Log.LogDebug('Sound -> AnalyzeByAutocorrelation: MaxV='+floattostr(maxv)+', Threshold='+floattostr(threshold));
- if MaxV >= Threshold then begin // found acceptable volume // 0.1
+ if MaxV >= Threshold then
+ begin // found acceptable volume // 0.1
SzczytJest := true;
TonGamy := MaxT mod 12;
Ton := MaxT mod 12;
end;
-// Log.LogAnalyze('--> Weight: ')
-// Log.LogAnalyze('--> Selected: ' + BoolToStr(SzczytJest, true) +
-// ', TonGamy: ' + IntToStr(Ton) +
-// ', MaxV: ' + FloatToStr(MaxV));
-// Log.LogAnalyze('');
-
-
end;
function TSound.AnalyzeAutocorrelationFreq(Freq: real): real; // result medium difference
@@ -175,25 +170,14 @@ var
begin
// we use Signal as source
Count := 0;
- Il := 0;
- Src := 1;
- Move := Round(44100/Freq);
- Dst := Src + Move;
-
- // ver 1 - sample 1 and compare n-times
-{ while (Src <= Move) do begin // process by moving Src by one
- while (Dst < n) do begin // process up to n (4KB) of Signal
- Count := Count + Abs(Signal[Src] - Signal[Dst]) / $10000;
- Inc(Dst, Move);
- Inc(Il);
- end;
-
- Inc(Src);
- Dst := Src + Move;
- end;}
+ Il := 0;
+ Src := 1;
+ Move := Round(44100/Freq);
+ Dst := Src + Move;
// ver 2 - compare in vertical
- while (Dst < n) do begin // process up to n (4KB) of Signal
+ while (Dst < n) do
+ begin // process up to n (4KB) of Signal
Count := Count + Abs(BufferArray[Src] - BufferArray[Dst]) / $10000;
Inc(Src);
Inc(Dst);
@@ -208,8 +192,6 @@ var
L: integer;
S: integer;
PB: pbytearray;
- PW: pwordarray;
- SI: smallintarray;
PSI: psmallintarray;
I: integer;
Skip: integer;
@@ -217,8 +199,6 @@ var
P2: integer;
Boost: byte;
begin
-// Log.LogDebug('Record -> GetMicrophone: len='+inttstr(len));
-
// set boost
case Ini.MicBoost of
0: Boost := 1;
@@ -230,7 +210,8 @@ begin
// boost buffer
L := Len div 2; // number of samples
PSI := Buffer;
- for S := 0 to L-1 do begin
+ for S := 0 to L-1 do
+ begin
I := PSI^[S] * Boost;
if I > 32767 then I := 32767; // 0.5.0: limit
if I < -32768 then I := -32768; // 0.5.0: limit
@@ -241,37 +222,36 @@ begin
P1 := (user and 255) - 1;
P2 := (user div 256) - 1;
-// Log.LogDebug('Record -> GetMicrophone: P1='+inttostr(p1)+', P2='+inttostr(p2));
// 2 players USB mic, left channel
- if P1 >= 0 then begin
- L := Len div 4; // number of samples
+ if P1 >= 0 then
+ begin
+ L := Len div 4; // number of samples
PB := Buffer;
-// Log.LogDebug('Record -> GetMicrophone -> Sound[P1].BufferNew.Clear');
+
Sound[P1].BufferNew.Clear; // 0.5.2: problem on exiting
- for S := 1 to L do begin
+ for S := 1 to L do
+ begin
Sound[P1].BufferNew.Write(PB[(S-1)*4], 2);
end;
Sound[P1].ProcessNewBuffer;
end;
// 2 players USB mic, right channel
-// if Ini.Debug = 0 then Skip := 2
-// else Skip := 0;
Skip := 2;
- if P2 >= 0 then begin
+ if P2 >= 0 then
+ begin
L := Len div 4; // number of samples
PB := Buffer;
Sound[P2].BufferNew.Clear;
- for S := 1 to L do begin
+ for S := 1 to L do
+ begin
Sound[P2].BufferNew.Write(PB[Skip + (S-1)*4], 2);
end;
Sound[P2].ProcessNewBuffer;
end;
-// Log.LogDebug('Record -> GetMicrophone -> Finish');
-
Result := true;
end;
@@ -283,6 +263,7 @@ var
InputName: PChar;
Flags: integer;
No: integer;
+
function isDuplicate(Desc: String): Boolean;
var
I: Integer;
@@ -306,15 +287,17 @@ begin
SC := 0;
Descr := BASS_RecordGetDeviceDescription(SC);
- while (Descr <> '') do begin
+ while (Descr <> '') do
+ begin
//If there is another SoundCard with the Same ID, Search an available Name
if (IsDuplicate(Descr)) then
begin
No:= 1; //Count of SoundCards with same Name
Repeat
- Inc(No)
+ Inc(No)
Until not IsDuplicate(Descr + ' (' + InttoStr(No) + ')');
+
//Set Description
Descr := Descr + ' (' + InttoStr(No) + ')';
end;
@@ -333,12 +316,12 @@ begin
SoundCard[SC].Input[SCI].Name := InputName;
// process each input
- while (InputName <> nil) do begin
+ while (InputName <> nil) do
+ begin
Flags := BASS_RecordGetInput(SCI);
- if (SCI >= 1) {AND (Flags AND BASS_INPUT_OFF = 0)} then begin
-
+ if (SCI >= 1) {AND (Flags AND BASS_INPUT_OFF = 0)} then
+ begin
SetLength(SoundCard[SC].Input, SCI+1);
-
SoundCard[SC].Input[SCI].Name := InputName;
end;
@@ -346,18 +329,18 @@ begin
if ((Flags and BASS_INPUT_TYPE_MIC) = 1) then
SoundCard[SC].MicInput := SCI;
-
Inc(SCI);
InputName := BASS_RecordGetInputName(SCI);
end;
-
BASS_RecordFree;
Inc(SC);
Descr := BASS_RecordGetDeviceDescription(SC);
end; // while
end;
+
+
end.
diff --git a/Game/Code/Classes/USkins.pas b/Game/Code/Classes/USkins.pas
index 3bcd9357..a5f618ff 100644
--- a/Game/Code/Classes/USkins.pas
+++ b/Game/Code/Classes/USkins.pas
@@ -1,5 +1,10 @@
unit USkins;
+{$IFDEF FPC}
+ {$MODE DELPHI}
+{$ENDIF}
+
+
interface
type
diff --git a/Game/Code/Classes/UTexture.pas b/Game/Code/Classes/UTexture.pas
index f79f66d6..d1ca0917 100644
--- a/Game/Code/Classes/UTexture.pas
+++ b/Game/Code/Classes/UTexture.pas
@@ -1,5 +1,10 @@
unit UTexture;
+{$IFDEF FPC}
+ {$MODE DELPHI}
+{$ENDIF}
+
+
// Plain (alpha = 1)
// Transparent
// Transparent Range
diff --git a/Game/Code/Classes/UVideo.pas b/Game/Code/Classes/UVideo.pas
index 8e2fc446..c97057ac 100644
--- a/Game/Code/Classes/UVideo.pas
+++ b/Game/Code/Classes/UVideo.pas
@@ -5,6 +5,10 @@
# based on 'An ffmpeg and SDL Tutorial' (http://www.dranger.com/ffmpeg/) #
#############################################################################}
+{$IFDEF FPC}
+ {$MODE DELPHI}
+{$ENDIF}
+
//{$define DebugDisplay} // uncomment if u want to see the debug stuff
{$define DebugFrames}
{$define Info}
@@ -13,7 +17,20 @@
unit UVideo;
interface
-uses SDL, UGraphicClasses, textgl, avcodec, avformat, avutil, math, OpenGL12, SysUtils, UIni, dialogs;
+
+uses SDL,
+ UGraphicClasses,
+ textgl,
+ avcodec,
+ avformat,
+ avutil,
+ math,
+ OpenGL12,
+ SysUtils,
+ {$ifdef DebugDisplay}
+ dialogs,
+ {$ENDIF}
+ UIni;
procedure Init;
procedure FFmpegOpenFile(FileName: pAnsiChar);
@@ -64,6 +81,7 @@ begin
errnum:=av_open_input_file(VideoFormatContext, FileName, Nil, 0, Nil);
if(errnum <> 0)
then begin
+{$ifdef DebugDisplay}
case errnum of
AVERROR_UNKNOWN: showmessage('failed to open file '+Filename+#13#10+'AVERROR_UNKNOWN');
AVERROR_IO: showmessage('failed to open file '+Filename+#13#10+'AVERROR_IO');
@@ -74,6 +92,7 @@ begin
AVERROR_NOTSUPP: showmessage('failed to open file '+Filename+#13#10+'AVERROR_NOTSUPP');
else showmessage('failed to open file '+Filename+#13#10+'Error number: '+inttostr(Errnum));
end;
+{$ENDIF}
Exit;
end
else begin
@@ -90,7 +109,9 @@ begin
VideoCodecContext:=VideoFormatContext^.streams[VideoStreamIndex]^.codec;
VideoCodec:=avcodec_find_decoder(VideoCodecContext^.codec_id);
end else begin
+{$ifdef DebugDisplay}
showmessage('found no video stream');
+{$ENDIF}
av_close_input_file(VideoFormatContext);
Exit;
end;
@@ -98,7 +119,9 @@ begin
begin
errnum:=avcodec_open(VideoCodecContext, VideoCodec);
end else begin
+{$ifdef DebugDisplay}
showmessage('no matching codec found');
+{$ENDIF}
avcodec_close(VideoCodecContext);
av_close_input_file(VideoFormatContext);
Exit;
@@ -125,7 +148,9 @@ begin
if myBuffer <> Nil then errnum:=avpicture_fill(PAVPicture(AVFrameRGB), myBuffer, PIX_FMT_RGB24,
VideoCodecContext^.width, VideoCodecContext^.height)
else begin
+{$ifdef DebugDisplay}
showmessage('failed to allocate video buffer');
+{$endif}
av_free(AVFrameRGB);
av_free(AVFrame);
avcodec_close(VideoCodecContext);
diff --git a/Game/Code/Menu/UDisplay.pas b/Game/Code/Menu/UDisplay.pas
index 2af1dfa0..6ad01406 100644
--- a/Game/Code/Menu/UDisplay.pas
+++ b/Game/Code/Menu/UDisplay.pas
@@ -52,8 +52,11 @@ var
implementation
-uses Graphics,
- Jpeg,
+uses
+ {$IFNDEF FPC}
+ Graphics,
+ JPEG,
+ {$ENDIF}
TextGL,
// UFiles,
UMain,
diff --git a/Game/Code/Menu/UMenu.pas b/Game/Code/Menu/UMenu.pas
index b0622d4b..3c50967d 100644
--- a/Game/Code/Menu/UMenu.pas
+++ b/Game/Code/Menu/UMenu.pas
@@ -2,6 +2,10 @@ unit UMenu;
interface
+{$IFDEF FPC}
+ {$MODE Delphi}
+{$ENDIF}
+
uses OpenGL12, SysUtils, UTexture, UMenuStatic, UMenuText, UMenuButton, UMenuSelect, UMenuSelectSlide,
UMenuInteract, UThemes, UMenuButtonCollection, Math;
diff --git a/Game/Code/Menu/UMenuSelectSlide.pas b/Game/Code/Menu/UMenuSelectSlide.pas
index 3659c00d..bb9b5809 100644
--- a/Game/Code/Menu/UMenuSelectSlide.pas
+++ b/Game/Code/Menu/UMenuSelectSlide.pas
@@ -1,7 +1,15 @@
unit UMenuSelectSlide;
interface
-uses TextGL, UTexture, OpenGL12, UMenuText;
+
+{$IFDEF FPC}
+ {$MODE Delphi}
+{$ENDIF}
+
+uses TextGL,
+ UTexture,
+ OpenGL12,
+ UMenuText;
type
PSelectSlide = ^TSelectSlide;
diff --git a/Game/Code/Menu/UMenuText.pas b/Game/Code/Menu/UMenuText.pas
index 4713962e..cba237b8 100644
--- a/Game/Code/Menu/UMenuText.pas
+++ b/Game/Code/Menu/UMenuText.pas
@@ -1,6 +1,11 @@
unit UMenuText;
interface
+
+{$IFDEF FPC}
+ {$MODE Delphi}
+{$ENDIF}
+
uses TextGL, UTexture, OpenGL12, SysUtils;
type
diff --git a/Game/Code/Screens/UScreenCredits.pas b/Game/Code/Screens/UScreenCredits.pas
index 067414bd..21e164b9 100644
--- a/Game/Code/Screens/UScreenCredits.pas
+++ b/Game/Code/Screens/UScreenCredits.pas
@@ -104,7 +104,24 @@ const
implementation
-uses Dialogs,Windows, UGraphic, UMain, UIni, USongs, Textgl, opengl, ULanguage, Math;
+uses // Dialogs,
+ Windows,
+ UGraphic,
+ UMain,
+ UIni,
+ USongs,
+ Textgl,
+// opengl,
+ ULanguage,
+ Math;
+
+{$IFDEF FPC}
+// TODO : JB - move this to a lazarus common file for ultrastar
+function RandomRange(aMin: Integer; aMax: Integer) : Integer;
+begin
+RandomRange := Random(aMax-aMin) + aMin ;
+end;
+{$ENDIF}
function TScreenCredits.ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean;
begin
diff --git a/Game/Code/Screens/UScreenEditConvert.pas b/Game/Code/Screens/UScreenEditConvert.pas
index 791f8e50..cb6aef6d 100644
--- a/Game/Code/Screens/UScreenEditConvert.pas
+++ b/Game/Code/Screens/UScreenEditConvert.pas
@@ -2,7 +2,18 @@ unit UScreenEditConvert;
interface
-uses UMenu, SDL, MidiFile, MidiOut, ULog, USongs, UMusic, UThemes;
+{$I switches.inc}
+
+uses UMenu,
+ SDL,
+ {$IFDEF UseMIDIPort}
+ MidiFile,
+ MidiOut,
+ {$ENDIF}
+ ULog,
+ USongs,
+ UMusic,
+ UThemes;
type
TNote = record
@@ -45,10 +56,14 @@ type
Sel: integer;
Selected: boolean;
// FileName: string;
+
+ {$IFDEF UseMIDIPort}
MidiFile: TMidiFile;
MidiTrack: TMidiTrack;
MidiEvent: pMidiEvent;
MidiOut: TMidiOutput;
+ {$ENDIF}
+
Song: TSong;
Czesc: TCzesci;
BPM: real;
@@ -58,7 +73,10 @@ type
procedure AddLyric(Start: integer; Tekst: string);
procedure Extract;
+ {$IFDEF UseMIDIPort}
procedure MidiFile1MidiEvent(event: PMidiEvent);
+ {$ENDIF}
+
function SelectedNumber: integer;
constructor Create; override;
procedure onShow; override;
@@ -68,7 +86,15 @@ type
end;
implementation
-uses UGraphic, SysUtils, UDrawTexture, TextGL, UFiles, UMain, UIni, OpenGL, USkins;
+uses UGraphic,
+ SysUtils,
+ UDrawTexture,
+ TextGL,
+ UFiles,
+ UMain,
+ UIni,
+ OpenGL12,
+ USkins;
function TScreenEditConvert.ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean;
var
@@ -87,7 +113,9 @@ begin
SDLK_ESCAPE,
SDLK_BACKSPACE :
begin
+ {$IFDEF UseMIDIPort}
MidiFile.StopPlaying;
+ {$ENDIF}
Music.PlayBack;
FadeTo(@ScreenEdit);
end;
@@ -102,14 +130,18 @@ begin
if Interaction = 1 then begin
Selected := false;
+ {$IFDEF UseMIDIPort}
MidiFile.OnMidiEvent := MidiFile1MidiEvent;
// MidiFile.GoToTime(MidiFile.GetTrackLength div 2);
MidiFile.StartPlaying;
+ {$ENDIF}
end;
if Interaction = 2 then begin
Selected := true;
+ {$IFDEF UseMIDIPort}
MidiFile.OnMidiEvent := nil;
+ {$ENDIF}
{for T := 0 to High(ATrack) do begin
if ATrack[T].Hear then begin
MidiTrack := MidiFile.GetTrack(T);
@@ -356,7 +388,9 @@ begin
// MidiOut.SetVolume(100, 100); // temporary}
FileName := GamePath + 'file.mid';
+ {$IFDEF UseMIDIPort}
MidiFile := TMidiFile.Create(nil);
+ {$ENDIF}
for P := 0 to 100 do begin
ColR[P] := Random(10)/10;
@@ -380,7 +414,8 @@ begin
MidiOut.Open;
- if FileExists(FileName) then begin
+ if FileExists(FileName) then
+ begin
MidiFile.Filename := FileName;
MidiFile.ReadFile;
diff --git a/Game/Code/Screens/UScreenEditSub.pas b/Game/Code/Screens/UScreenEditSub.pas
index 6eef8509..7184b0b6 100644
--- a/Game/Code/Screens/UScreenEditSub.pas
+++ b/Game/Code/Screens/UScreenEditSub.pas
@@ -2,8 +2,27 @@ unit UScreenEditSub;
interface
-uses UMenu, UMusic, SDL, SysUtils, UFiles, UTime, USongs, UIni, ULog, UTexture, UMenuText,
- ULyrics, Math, OpenGL12, UThemes, MidiOut;
+{$I switches.inc}
+
+uses
+ UMenu,
+ UMusic,
+ SDL,
+ SysUtils,
+ UFiles,
+ UTime,
+ USongs,
+ UIni,
+ ULog,
+ UTexture,
+ UMenuText,
+ ULyrics,
+ Math,
+ OpenGL12,
+ {$IFDEF UseMIDIPort}
+ MidiOut,
+ {$ENDIF}
+ UThemes;
type
TScreenEditSub = class(TMenu)
@@ -31,7 +50,10 @@ type
Click: boolean;
CopySrc: integer;
+ {$IFDEF UseMIDIPort}
MidiOut: TMidiOutput;
+ {$endif}
+
MidiStart: real;
MidiStop: real;
MidiTime: real;
@@ -470,6 +492,7 @@ begin
SDLK_DOWN:
begin
+ {$IFDEF UseMIDIPort}
// skip to next sentence
if SDL_ModState = 0 then begin
MidiOut.PutShort($81, Czesci[0].Czesc[Czesci[0].Akt].Nuta[MidiLastNote].Ton + 60, 127);
@@ -491,11 +514,13 @@ begin
if SDL_ModState = KMOD_LCTRL then begin
TransposeNote(-1);
end;
+ {$endif}
end;
SDLK_UP:
begin
+ {$IFDEF UseMIDIPort}
// skip to previous sentence
if SDL_ModState = 0 then begin
MidiOut.PutShort($81, Czesci[0].Czesc[Czesci[0].Akt].Nuta[MidiLastNote].Ton + 60, 127);
@@ -517,6 +542,7 @@ begin
if SDL_ModState = KMOD_LCTRL then begin
TransposeNote(1);
end;
+ {$endif}
end;
// Golden Note Patch
diff --git a/Game/Code/Screens/UScreenMain.pas b/Game/Code/Screens/UScreenMain.pas
index 3d591a5c..5af3d4a6 100644
--- a/Game/Code/Screens/UScreenMain.pas
+++ b/Game/Code/Screens/UScreenMain.pas
@@ -3,7 +3,15 @@ unit UScreenMain;
interface
uses
- UMenu, SDL, UDisplay, UMusic, UFiles, SysUtils, UThemes, ULCD, ULight;
+ UMenu,
+ SDL,
+ UDisplay,
+ UMusic,
+ UFiles,
+ SysUtils,
+ UThemes,
+ ULCD,
+ ULight;
type
TScreenMain = class(TMenu)
@@ -25,7 +33,19 @@ type
implementation
-uses Windows, UGraphic, UMain, UIni, UTexture, USongs, Textgl, opengl, ULanguage, UParty, UDLLManager, UScreenCredits, USkins;
+uses Windows,
+ UGraphic,
+ UMain,
+ UIni,
+ UTexture,
+ USongs,
+ Textgl,
+// opengl,
+ ULanguage,
+ UParty,
+ UDLLManager,
+ UScreenCredits,
+ USkins;
function TScreenMain.ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean;
diff --git a/Game/Code/Screens/UScreenPartyNewRound.pas b/Game/Code/Screens/UScreenPartyNewRound.pas
index 938aacfb..30a1f8f0 100644
--- a/Game/Code/Screens/UScreenPartyNewRound.pas
+++ b/Game/Code/Screens/UScreenPartyNewRound.pas
@@ -2,6 +2,11 @@ unit UScreenPartyNewRound;
interface
+{$IFDEF FPC}
+ {$MODE DELPHI}
+{$ENDIF}
+
+
uses
UMenu, SDL, UDisplay, UMusic, UFiles, SysUtils, UThemes;
diff --git a/Game/Code/Screens/UScreenPartyOptions.pas b/Game/Code/Screens/UScreenPartyOptions.pas
index 493f3939..ab6bd733 100644
--- a/Game/Code/Screens/UScreenPartyOptions.pas
+++ b/Game/Code/Screens/UScreenPartyOptions.pas
@@ -2,6 +2,10 @@ unit UScreenPartyOptions;
interface
+{$IFDEF FPC}
+ {$MODE DELPHI}
+{$ENDIF}
+
uses
UMenu, SDL, UDisplay, UMusic, UFiles, SysUtils, UThemes;
diff --git a/Game/Code/Screens/UScreenScore.pas b/Game/Code/Screens/UScreenScore.pas
index 2fdccf8e..19e934f4 100644
--- a/Game/Code/Screens/UScreenScore.pas
+++ b/Game/Code/Screens/UScreenScore.pas
@@ -3,7 +3,15 @@ unit UScreenScore;
interface
uses
- UMenu, SDL, SysUtils, UDisplay, UMusic, USongs, UThemes, ULCD, OpenGL;
+ UMenu,
+ SDL,
+ SysUtils,
+ UDisplay,
+ UMusic,
+ USongs,
+ UThemes,
+ ULCD;
+// OpenGL;
type
TScreenScore = class(TMenu)
@@ -49,11 +57,11 @@ type
implementation
-{{$IFDEF TRANSLATE}
+//{$IFDEF TRANSLATE}
uses UGraphic, UScreenSong, UMenuStatic, UTime, UMain, UIni, ULanguage;
-{{$ELSE}{
-uses UGraphic, UScreenSong, UMenuStatic, UTime, UMain, UIni;
-{{$ENDIF}
+//{$ELSE}
+//uses UGraphic, UScreenSong, UMenuStatic, UTime, UMain, UIni;
+//{$ENDIF}
function TScreenScore.ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean;
begin
Result := true;
diff --git a/Game/Code/Screens/UScreenSingModi.pas b/Game/Code/Screens/UScreenSingModi.pas
index 20ad0957..6d3add87 100644
--- a/Game/Code/Screens/UScreenSingModi.pas
+++ b/Game/Code/Screens/UScreenSingModi.pas
@@ -2,8 +2,28 @@ unit UScreenSingModi;
interface
-uses UMenu, UMusic, SDL, SysUtils, UFiles, UTime, USongs, UIni, ULog, UTexture, ULyrics,
- TextGL, OpenGL12, BASS, UThemes, ULCD, UScreenSing, ModiSDK;
+{$IFDEF FPC}
+ {$MODE DELPHI}
+{$ENDIF}
+
+uses UMenu,
+ UMusic,
+ SDL,
+ SysUtils,
+ UFiles,
+ UTime,
+ USongs,
+ UIni,
+ ULog,
+ UTexture,
+ ULyrics,
+ TextGL,
+ OpenGL12,
+ BASS,
+ UThemes,
+ ULCD,
+ UScreenSing,
+ ModiSDK;
type
TScreenSingModi = class(TScreenSing)
@@ -134,459 +154,10 @@ begin
end;
procedure TScreenSingModi.onShow;
-{var
- P: integer;
- V1: boolean;
- V2R: boolean;
- V2M: boolean;
- V3R: boolean;
- NR: TRecR; //Line Bonus Mod }
var
I: Integer;
begin
- { Log.LogStatus('Begin', 'onShow');
- FadeOut := false; // 0.5.0: early 0.5.0 problems were by this line commented
-
- // prepare players
- SetLength(Player, PlayersPlay);
-// Player[0].ScoreTotalI := 0;
-
-
- case PlayersPlay of
- 1: begin
- V1 := true;
- V2R := false;
- V2M := false;
- V3R := false;
- end;
- 2: begin
- V1 := true;
- V2R := true;
- V2M := false;
- V3R := false;
- end;
- 3: begin
- V1 := true;
- V2R := false;
- V2M := true;
- V3R := true;
- end;
- 4: begin // double screen
- V1 := true;
- V2R := true;
- V2M := false;
- V3R := false;
- end;
- 6: begin // double screen
- V1 := true;
- V2R := false;
- V2M := true;
- V3R := true;
- end;
-
- end;
-
-
-
- Static[StaticP2R].Visible := V2R;
- Static[StaticP2RScoreBG].Visible := V2R;
- Text[TextP2R].Visible := V2R;
- Text[TextP2RScore].Visible := V2R;
-
- Static[StaticP2M].Visible := V2M;
- Static[StaticP2MScoreBG].Visible := V2M;
- Text[TextP2M].Visible := V2M;
- Text[TextP2MScore].Visible := V2M;
-
- Static[StaticP3R].Visible := V3R;
- Static[StaticP3RScoreBG].Visible := V3R;
- Text[TextP3R].Visible := V3R;
- Text[TextP3RScore].Visible := V3R;
-
-
-
- // load notes
- CzyscNuty;
-// Log.LogWarning(CatSongs.Song[CatSongs.Selected].Path + CatSongs.Song[CatSongs.Selected].FileName, '!!!');
- AktSong := CatSongs.Song[CatSongs.Selected];
-
- WczytajCzesci(CatSongs.Song[CatSongs.Selected].Path + CatSongs.Song[CatSongs.Selected].FileName);
- AktSong.Path := CatSongs.Song[CatSongs.Selected].Path;
-// AktSong.GAP := AktSong.GAP + 40 {4096 = 100ms for buffer}{ + 20 {microphone}{ + 60000 / AktSong.BPM[0].BPM / 2; // temporary until UMain will be fixed
-
- // set movie
- if (AktSong.Video <> '') and FileExists(AktSong.Path + AktSong.Video) then begin
- OpenSmpeg(AktSong.Path + AktSong.Video);
- SkipSmpeg(AktSong.VideoGAP + AktSong.Start);
- AktSong.VideoLoaded := true;
- end;
-
- // set background
- if (AktSong.Background <> '') and (AktSong.VideoLoaded = false) then
- Tex_Background := Texture.LoadTexture(AktSong.Path + AktSong.Background)
- else
- Tex_Background.TexNum := -1;
-
- // play music (I)
- //Music.CaptureStart;
- Music.MoveTo(AktSong.Start);
-// Music.Play;
-
- // prepare timer (I)
-// CountSkipTimeSet;
- Czas.Teraz := AktSong.Start;
- Czas.Razem := Music.Length;
- if (AktSong.Finish > 0) then Czas.Razem := AktSong.Finish / 1000;
- Czas.OldBeat := -1;
- for P := 0 to High(Player) do
- ClearScores(P);
-
- // main text
- LyricMain.Clear;
- LyricMain.X := 400;
- LyricMain.Y := Skin_LyricsT;
- LyricMain.Scale := 1.4; //1.4
- LyricMain.Align := 1;
-
- // sub text
- LyricSub.Clear;
- LyricSub.X := 400;
- LyricSub.Y := Skin_LyricsT + 42; //40
- LyricSub.Align := 1;
-
- // set custom options
- case Ini.LyricsFont of
- 0:
- begin
- LyricMain.FontStyle := 0;
- LyricSub.FontStyle := 0;
- LyricMain.Size := 14; // 13
- LyricSub.Size := 14; // 13
- LyricMain.ColR := Skin_FontR;
- LyricMain.ColG := Skin_FontG;
- LyricMain.ColB := Skin_FontB; //Change für Crazy Joker
- {LyricMain.ColSR := Skin_FontHighlightR;
- LyricMain.ColSG := Skin_FontHighlightG;
- LyricMain.ColSB := Skin_FontHighlightB;1aa5dc} {
- LyricMain.ColSR := 26/255;
- LyricMain.ColSG := 165/255;
- LyricMain.ColSB := 220/255;
-
- LyricSub.ColR := 0.6;
- LyricSub.ColG := 0.6;
- LyricSub.ColB := 0.6;
- end;
- 1:
- begin
- LyricMain.FontStyle := 2;
- LyricSub.FontStyle := 2;
- LyricMain.Size := 14;
- LyricSub.Size := 14;
- LyricMain.ColR := 0.75;
- LyricMain.ColG := 0.75;
- LyricMain.ColB := 1;
- LyricMain.ColSR := 0.5;
- LyricMain.ColSG := 0.5;
- LyricMain.ColSB := 1;
- LyricSub.ColR := 0.8;
- LyricSub.ColG := 0.8;
- LyricSub.ColB := 0.8;
- end;
- 2:
- begin
- LyricMain.FontStyle := 3;
- LyricSub.FontStyle := 3;
- LyricMain.Size := 12;
- LyricSub.Size := 12;
- LyricMain.ColR := 0.75;
- LyricMain.ColG := 0.75;
- LyricMain.ColB := 1;
- LyricMain.ColSR := 0.5;
- LyricMain.ColSG := 0.5;
- LyricMain.ColSB := 1;
- LyricSub.ColR := 0.8;
- LyricSub.ColG := 0.8;
- LyricSub.ColB := 0.8;
- end;
- end; // case
-
- case Ini.LyricsEffect of
- 0: LyricMain.Style := 1; // 0 - one selected, 1 - selected all to the current
- 1: LyricMain.Style := 2;
- 2: LyricMain.Style := 3;
- 3: LyricMain.Style := 4;
- end; // case
-
- // fill texts
- LyricMain.AddCzesc(0);
- LyricMain.Selected := -1;
- LyricSub.AddCzesc(1);
- LyricSub.Selected := -1;
-
- UpdateLCD;
-
- //Deactivate Pause
- Paused := False;
-
- {Static[StaticP2R].Visible := V2R;
- Static[StaticP2RScoreBG].Visible := V2R;
- Text[TextP2R].Visible := V2R;
- Text[TextP2RScore].Visible := V2R;
-
- Static[StaticP2M].Visible := V2M;
- Static[StaticP2MScoreBG].Visible := V2M;
- Text[TextP2M].Visible := V2M;
- Text[TextP2MScore].Visible := V2M;
-
- Static[StaticP3R].Visible := V3R;
- Static[StaticP3RScoreBG].Visible := V3R;
- Text[TextP3R].Visible := V3R;
- Text[TextP3RScore].Visible := V3R;} {
-
- //Set Position of Line Bonus - PhrasenBonus
- if (Ini.LineBonus = 1) then //Show Line Bonus at Scores
- begin
- Case PlayersPlay of
- 1: begin
- Player[0].LineBonus_TargetX := Theme.Sing.StaticP1ScoreBG.x;
- Player[0].LineBonus_TargetY := Theme.Sing.TextP1Score.Y;
- Player[0].LineBonus_StartX := Theme.Sing.StaticP1ScoreBG.x;
- Player[0].LineBonus_StartY := Theme.Sing.TextP1Score.Y + 65;
- end;
-
- 2: begin
- //P1
- Player[0].LineBonus_TargetX := Theme.Sing.StaticP1ScoreBG.x;
- Player[0].LineBonus_TargetY := Theme.Sing.TextP1Score.Y;
- Player[0].LineBonus_StartX := Theme.Sing.StaticP1ScoreBG.X;
- Player[0].LineBonus_StartY := Theme.Sing.TextP1Score.Y + 65;
-
- //P2
- Player[1].LineBonus_TargetX := Theme.Sing.StaticP2RScoreBG.X;
- Player[1].LineBonus_TargetY := Theme.Sing.TextP2RScore.Y;
- Player[1].LineBonus_StartX := Theme.Sing.StaticP2RScoreBG.X;
- Player[1].LineBonus_StartY := Theme.Sing.TextP2RScore.Y + 65;
- end;
-
- 3: begin
- //P1
- Player[0].LineBonus_TargetX := Theme.Sing.StaticP1ScoreBG.x;
- Player[0].LineBonus_TargetY := Theme.Sing.TextP1Score.Y;
- Player[0].LineBonus_StartX := Theme.Sing.StaticP1ScoreBG.x;
- Player[0].LineBonus_StartY := Theme.Sing.TextP1Score.Y + 65;
-
- //P2
- Player[1].LineBonus_TargetX := Theme.Sing.StaticP2MScoreBG.x;
- Player[1].LineBonus_TargetY := Theme.Sing.TextP2MScore.Y;
- Player[1].LineBonus_StartX := Theme.Sing.StaticP2MScoreBG.x;
- Player[1].LineBonus_StartY := Theme.Sing.TextP2MScore.Y + 65;
-
- //P3
- Player[2].LineBonus_TargetX := Theme.Sing.StaticP3RScoreBG.x;
- Player[2].LineBonus_TargetY := Theme.Sing.TextP3RScore.Y;
- Player[2].LineBonus_StartX := Theme.Sing.StaticP3RScoreBG.x;
- Player[2].LineBonus_StartY := Theme.Sing.TextP3RScore.Y + 65;
- end;
-
- 4: begin
- //P1
- Player[0].LineBonus_TargetX := Theme.Sing.StaticP1ScoreBG.x;
- Player[0].LineBonus_TargetY := Theme.Sing.TextP1Score.Y;
- Player[0].LineBonus_StartX := Theme.Sing.StaticP1ScoreBG.x;
- Player[0].LineBonus_StartY := Theme.Sing.TextP1Score.Y + 65;
-
- //P2
- Player[1].LineBonus_TargetX := Theme.Sing.StaticP2RScoreBG.x;
- Player[1].LineBonus_TargetY := Theme.Sing.TextP2RScore.Y;
- Player[1].LineBonus_StartX := Theme.Sing.StaticP2RScoreBG.x;
- Player[1].LineBonus_StartY := Theme.Sing.TextP2RScore.Y + 65;
-
- //P3
- Player[2].LineBonus_TargetX := Theme.Sing.StaticP1ScoreBG.x;
- Player[2].LineBonus_TargetY := Theme.Sing.TextP1Score.Y;
- Player[2].LineBonus_StartX := Theme.Sing.StaticP1ScoreBG.x;
- Player[2].LineBonus_StartY := Theme.Sing.TextP1Score.Y + 65;
-
- //P4
- Player[3].LineBonus_TargetX := Theme.Sing.StaticP2RScoreBG.x;
- Player[3].LineBonus_TargetY := Theme.Sing.TextP2RScore.Y;
- Player[3].LineBonus_StartX := Theme.Sing.StaticP2RScoreBG.x;
- Player[3].LineBonus_StartY := Theme.Sing.TextP2RScore.Y + 65;
- end;
-
- 6: begin
- //P1
- Player[0].LineBonus_TargetX := Theme.Sing.StaticP1ScoreBG.x;
- Player[0].LineBonus_TargetY := Theme.Sing.TextP1Score.Y;
- Player[0].LineBonus_StartX := Theme.Sing.StaticP1ScoreBG.x;
- Player[0].LineBonus_StartY := Theme.Sing.TextP1Score.Y + 65;
-
- //P2
- Player[1].LineBonus_TargetX := Theme.Sing.StaticP2MScoreBG.x;
- Player[1].LineBonus_TargetY := Theme.Sing.TextP2MScore.Y;
- Player[1].LineBonus_StartX := Theme.Sing.StaticP2MScoreBG.x;
- Player[1].LineBonus_StartY := Theme.Sing.TextP2MScore.Y + 65;
-
- //P3
- Player[2].LineBonus_TargetX := Theme.Sing.StaticP3RScoreBG.x;
- Player[2].LineBonus_TargetY := Theme.Sing.TextP3RScore.Y;
- Player[2].LineBonus_StartX := Theme.Sing.StaticP3RScoreBG.x;
- Player[2].LineBonus_StartY := Theme.Sing.TextP3RScore.Y + 65;
-
- //P4
- Player[3].LineBonus_TargetX := Theme.Sing.StaticP1ScoreBG.x;
- Player[3].LineBonus_TargetY := Theme.Sing.TextP1Score.Y;
- Player[3].LineBonus_StartX := Theme.Sing.StaticP1ScoreBG.x;
- Player[3].LineBonus_StartY := Theme.Sing.TextP1Score.Y + 65;
-
- //P5
- Player[4].LineBonus_TargetX := Theme.Sing.StaticP2MScoreBG.x;
- Player[4].LineBonus_TargetY := Theme.Sing.TextP2MScore.Y;
- Player[4].LineBonus_StartX := Theme.Sing.StaticP2MScoreBG.x;
- Player[4].LineBonus_StartY := Theme.Sing.TextP2MScore.Y + 65;
-
- //P6
- Player[5].LineBonus_TargetX := Theme.Sing.StaticP3RScoreBG.x;
- Player[5].LineBonus_TargetY := Theme.Sing.TextP3RScore.Y;
- Player[5].LineBonus_StartX := Theme.Sing.StaticP3RScoreBG.x;
- Player[5].LineBonus_StartY := Theme.Sing.TextP3RScore.Y + 65;
- end;
- end;
- end
- else if (Ini.LineBonus = 2) then //Show Line Bonus at Notes
- begin
- //SingDrawNoteLines(Nr.Left + 10*ScreenX, 120, Nr.Right + 10*ScreenX, 12);
- //SingDrawNoteLines(Nr.Left + 10*ScreenX, 245, Nr.Right + 10*ScreenX, 12);
- //SingDrawNoteLines(Nr.Left + 10*ScreenX, 370, Nr.Right + 10*ScreenX, 12);
-
- // positions
- if Ini.SingWindow = 0 then begin
- NR.Left := 120;
- end else begin
- NR.Left := 20;
- end;
- NR.Right := 780;
-
- NR.Width := NR.Right - NR.Left;
- NR.WMid := NR.Width / 2;
- NR.Mid := NR.Left + NR.WMid;
-
- Case PlayersPlay of
- 1: begin
- Player[0].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 87);
- Player[0].LineBonus_TargetY := Skin_P2_NotesB - 105 - 65;
- Player[0].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 87);
- Player[0].LineBonus_StartY := Skin_P2_NotesB - 105;
- end;
-
- 2: begin
- //P1
- Player[0].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 87);
- Player[0].LineBonus_TargetY := Skin_P1_NotesB - 105 - 65 + 28;
- Player[0].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 87);
- Player[0].LineBonus_StartY := Skin_P1_NotesB - 105 + 28;
-
- //P2
- Player[1].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 87);
- Player[1].LineBonus_TargetY := Skin_P2_NotesB - 105 - 65 + 28;
- Player[1].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 87);
- Player[1].LineBonus_StartY := Skin_P2_NotesB - 105 + 28;
- end;
-
- 3: begin
- //P1
- Player[0].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 87);
- Player[0].LineBonus_TargetY := 120 - 65 + 28;
- Player[0].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 87);
- Player[0].LineBonus_StartY := 120 + 28;
-
- //P2
- Player[1].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 87);
- Player[1].LineBonus_TargetY := 245 - 65 + 28;
- Player[1].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 87);
- Player[1].LineBonus_StartY := 245 + 28;
-
- //P3
- Player[2].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 87);
- Player[2].LineBonus_TargetY := 370 - 65 + 28;
- Player[2].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 87);
- Player[2].LineBonus_StartY := 370 + 28;
- end;
-
- 4: begin
- //P1
- Player[0].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 87);
- Player[0].LineBonus_TargetY := Skin_P1_NotesB - 105 - 65 + 28;
- Player[0].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 87);
- Player[0].LineBonus_StartY := Skin_P1_NotesB - 105 + 28;
-
- //P2
- Player[1].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 87);
- Player[1].LineBonus_TargetY := Skin_P2_NotesB - 105 - 65 + 28;
- Player[1].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 87);
- Player[1].LineBonus_StartY := Skin_P2_NotesB - 105 + 28;
-
- //P3
- Player[2].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 87);
- Player[2].LineBonus_TargetY := Skin_P1_NotesB - 105 - 65 + 28;
- Player[2].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 87);
- Player[2].LineBonus_StartY := Skin_P1_NotesB - 105 + 28;
-
- //P4
- Player[3].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 87);
- Player[3].LineBonus_TargetY := Skin_P2_NotesB - 105 - 65 + 28;
- Player[3].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 87);
- Player[3].LineBonus_StartY := Skin_P2_NotesB - 105 + 28;
- end;
-
- 6: begin
- //P1
- Player[0].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 87);
- Player[0].LineBonus_TargetY := 120 - 65 + 28;
- Player[0].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 87);
- Player[0].LineBonus_StartY := 120 + 28;
-
- //P2
- Player[1].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 87);
- Player[1].LineBonus_TargetY := 245 - 65 + 28;
- Player[1].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 87);
- Player[1].LineBonus_StartY := 245 + 28;
-
- //P3
- Player[2].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 87);
- Player[2].LineBonus_TargetY := 370 - 65 + 28;
- Player[2].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 87);
- Player[2].LineBonus_StartY := 370 + 28;
-
- //P4
- Player[3].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 87);
- Player[3].LineBonus_TargetY := 120 - 65 + 28;
- Player[3].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 87);
- Player[3].LineBonus_StartY := 120 + 28;
-
- //P5
- Player[4].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 87);
- Player[4].LineBonus_TargetY := 245 - 65 + 28;
- Player[4].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 87);
- Player[4].LineBonus_StartY := 245 + 28;
-
- //P6
- Player[5].LineBonus_TargetX := Round(Nr.Right + 10*ScreenX - 87);
- Player[5].LineBonus_TargetY := 370 - 65 + 28;
- Player[5].LineBonus_StartX := Round(Nr.Right + 10*ScreenX - 87);
- Player[5].LineBonus_StartY := 370 + 28;
- end;
- end;
- end;
- //Set Position of Line Bonus - PhrasenBonus End
- //Set Num of Empty Sentences for Phrasen Bonus
- NumEmptySentences := 0;
- for P := low(Czesci[0].Czesc) to high(Czesci[0].Czesc) do
- if Czesci[0].Czesc[P].TotalNotes = 0 then Inc(NumEmptySentences);
-
- Log.LogStatus('End', 'onShow'); }
-
PlayersPlay := TeamInfo.NumTeams;
if DLLMan.Selected.LoadSong then //Start with Song
@@ -602,9 +173,9 @@ begin
PlayerInfo.NumPlayers := PlayersPlay;
for I := 0 to PlayerInfo.NumPlayers-1 do
begin
- PlayerInfo.Playerinfo[I].Name := PChar(Ini.Name[I]);
- PlayerInfo.Playerinfo[I].Score:= 0;
- PlayerInfo.Playerinfo[I].Bar := 50;
+ PlayerInfo.Playerinfo[I].Name := PChar(Ini.Name[I]);
+ PlayerInfo.Playerinfo[I].Score := 0;
+ PlayerInfo.Playerinfo[I].Bar := 50;
PlayerInfo.Playerinfo[I].Enabled := True;
end;
diff --git a/Game/Code/Screens/UScreenSongMenu.pas b/Game/Code/Screens/UScreenSongMenu.pas
index 9fe70522..41432356 100644
--- a/Game/Code/Screens/UScreenSongMenu.pas
+++ b/Game/Code/Screens/UScreenSongMenu.pas
@@ -2,6 +2,10 @@ unit UScreenSongMenu;
interface
+{$IFDEF FPC}
+ {$MODE DELPHI}
+{$ENDIF}
+
uses
UMenu, SDL, UDisplay, UMusic, UFiles, SysUtils, UThemes;
@@ -612,4 +616,4 @@ begin
end;
end.
- \ No newline at end of file
+
diff --git a/Game/Code/Screens/UScreenStatMain.pas b/Game/Code/Screens/UScreenStatMain.pas
index 86d7d561..f7961727 100644
--- a/Game/Code/Screens/UScreenStatMain.pas
+++ b/Game/Code/Screens/UScreenStatMain.pas
@@ -2,6 +2,11 @@ unit UScreenStatMain;
interface
+{$IFDEF FPC}
+ {$MODE DELPHI}
+{$ENDIF}
+
+
uses
UMenu, SDL, SysUtils, UDisplay, UMusic, UIni, UThemes;
@@ -223,4 +228,4 @@ begin
Button[I].Texture.ScaleW := Progress;
end;
-end. \ No newline at end of file
+end.
diff --git a/Game/Code/UltraStar.lpi b/Game/Code/UltraStar.lpi
index 9d260f69..43d4cd5c 100644
--- a/Game/Code/UltraStar.lpi
+++ b/Game/Code/UltraStar.lpi
@@ -12,7 +12,7 @@
<MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=".exe"/>
- <ActiveEditorIndexAtStart Value="1"/>
+ <ActiveEditorIndexAtStart Value="3"/>
</General>
<VersionInfo>
<ProjectVersion Value=""/>
@@ -31,50 +31,46 @@
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
- <Units Count="18">
+ <Units Count="43">
<Unit0>
<Filename Value="UltraStar.lpr"/>
<IsPartOfProject Value="True"/>
- <CursorPos X="1" Y="69"/>
- <TopLine Value="53"/>
+ <CursorPos X="6" Y="70"/>
+ <TopLine Value="50"/>
<EditorIndex Value="0"/>
- <UsageCount Value="21"/>
+ <UsageCount Value="22"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
<Filename Value="lib\JEDI-SDLv1.0\OpenGL\Pas\opengl12.pas"/>
<UnitName Value="opengl12"/>
- <CursorPos X="47" Y="248"/>
- <TopLine Value="228"/>
- <EditorIndex Value="9"/>
- <UsageCount Value="10"/>
- <Loaded Value="True"/>
+ <CursorPos X="2" Y="256"/>
+ <TopLine Value="236"/>
+ <UsageCount Value="11"/>
</Unit1>
<Unit2>
<Filename Value="Classes\UTexture.pas"/>
<UnitName Value="UTexture"/>
- <CursorPos X="19" Y="20"/>
+ <CursorPos X="1" Y="20"/>
<TopLine Value="1"/>
- <EditorIndex Value="4"/>
- <UsageCount Value="10"/>
- <Loaded Value="True"/>
+ <UsageCount Value="11"/>
</Unit2>
<Unit3>
<Filename Value="Classes\UCommandLine.pas"/>
<UnitName Value="UCommandLine"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
- <EditorIndex Value="12"/>
- <UsageCount Value="10"/>
+ <EditorIndex Value="7"/>
+ <UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit3>
<Unit4>
<Filename Value="Classes\UIni.pas"/>
<UnitName Value="UIni"/>
- <CursorPos X="1" Y="1"/>
+ <CursorPos X="9" Y="7"/>
<TopLine Value="1"/>
- <EditorIndex Value="11"/>
- <UsageCount Value="10"/>
+ <EditorIndex Value="1"/>
+ <UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit4>
<Unit5>
@@ -82,27 +78,21 @@
<UnitName Value="ULog"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
- <EditorIndex Value="13"/>
- <UsageCount Value="10"/>
- <Loaded Value="True"/>
+ <UsageCount Value="11"/>
</Unit5>
<Unit6>
<Filename Value="Classes\UFiles.pas"/>
<UnitName Value="UFiles"/>
<CursorPos X="1" Y="38"/>
<TopLine Value="1"/>
- <EditorIndex Value="14"/>
- <UsageCount Value="10"/>
- <Loaded Value="True"/>
+ <UsageCount Value="11"/>
</Unit6>
<Unit7>
<Filename Value="Classes\USongs.pas"/>
<UnitName Value="USongs"/>
<CursorPos X="57" Y="115"/>
<TopLine Value="91"/>
- <EditorIndex Value="15"/>
- <UsageCount Value="10"/>
- <Loaded Value="True"/>
+ <UsageCount Value="11"/>
</Unit7>
<Unit8>
<Filename Value="..\..\..\..\..\lazarus\fpc\2.0.4\source\rtl\objpas\sysutils\sysinth.inc"/>
@@ -113,205 +103,395 @@
<Unit9>
<Filename Value="Classes\UMain.pas"/>
<UnitName Value="UMain"/>
- <CursorPos X="1" Y="764"/>
- <TopLine Value="725"/>
- <EditorIndex Value="10"/>
- <UsageCount Value="10"/>
- <Loaded Value="True"/>
+ <CursorPos X="1" Y="1"/>
+ <TopLine Value="1"/>
+ <UsageCount Value="11"/>
</Unit9>
<Unit10>
<Filename Value="Classes\UGraphic.pas"/>
<UnitName Value="UGraphic"/>
- <CursorPos X="75" Y="5"/>
- <TopLine Value="1"/>
- <EditorIndex Value="16"/>
- <UsageCount Value="10"/>
+ <CursorPos X="3" Y="56"/>
+ <TopLine Value="19"/>
+ <EditorIndex Value="8"/>
+ <UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit10>
<Unit11>
<Filename Value="Classes\UThemes.pas"/>
<UnitName Value="UThemes"/>
- <CursorPos X="17" Y="6"/>
- <TopLine Value="1"/>
- <EditorIndex Value="8"/>
- <UsageCount Value="10"/>
- <Loaded Value="True"/>
+ <CursorPos X="24" Y="379"/>
+ <TopLine Value="359"/>
+ <UsageCount Value="11"/>
</Unit11>
<Unit12>
<Filename Value="Classes\UCovers.pas"/>
<UnitName Value="UCovers"/>
- <CursorPos X="14" Y="12"/>
+ <CursorPos X="14" Y="11"/>
<TopLine Value="1"/>
- <EditorIndex Value="5"/>
- <UsageCount Value="10"/>
- <Loaded Value="True"/>
+ <UsageCount Value="11"/>
</Unit12>
<Unit13>
<Filename Value="Classes\UMusic.pas"/>
<UnitName Value="UMusic"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
- <EditorIndex Value="6"/>
- <UsageCount Value="10"/>
- <Loaded Value="True"/>
+ <UsageCount Value="11"/>
</Unit13>
<Unit14>
<Filename Value="Classes\ULyrics.pas"/>
<UnitName Value="ULyrics"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
- <EditorIndex Value="7"/>
- <UsageCount Value="10"/>
- <Loaded Value="True"/>
+ <UsageCount Value="11"/>
</Unit14>
<Unit15>
<Filename Value="Screens\UScreenLoading.pas"/>
<UnitName Value="UScreenLoading"/>
<CursorPos X="8" Y="6"/>
<TopLine Value="1"/>
- <EditorIndex Value="3"/>
- <UsageCount Value="10"/>
- <Loaded Value="True"/>
+ <UsageCount Value="11"/>
</Unit15>
<Unit16>
<Filename Value="Menu\UMenu.pas"/>
<UnitName Value="UMenu"/>
- <CursorPos X="34" Y="5"/>
+ <CursorPos X="9" Y="7"/>
<TopLine Value="1"/>
- <EditorIndex Value="2"/>
- <UsageCount Value="10"/>
- <Loaded Value="True"/>
+ <UsageCount Value="11"/>
</Unit16>
<Unit17>
<Filename Value="Menu\UMenuText.pas"/>
<UnitName Value="UMenuText"/>
- <CursorPos X="39" Y="36"/>
- <TopLine Value="22"/>
- <EditorIndex Value="1"/>
+ <CursorPos X="1" Y="8"/>
+ <TopLine Value="1"/>
+ <UsageCount Value="11"/>
+ </Unit17>
+ <Unit18>
+ <Filename Value="Menu\UMenuSelectSlide.pas"/>
+ <UnitName Value="UMenuSelectSlide"/>
+ <CursorPos X="6" Y="12"/>
+ <TopLine Value="2"/>
+ <UsageCount Value="10"/>
+ </Unit18>
+ <Unit19>
+ <Filename Value="Screens\UScreenMain.pas"/>
+ <UnitName Value="UScreenMain"/>
+ <CursorPos X="3" Y="14"/>
+ <TopLine Value="1"/>
+ <EditorIndex Value="4"/>
<UsageCount Value="10"/>
+ <Bookmarks Count="1">
+ <Item0 X="6" Y="43" ID="1"/>
+ </Bookmarks>
<Loaded Value="True"/>
- </Unit17>
+ </Unit19>
+ <Unit20>
+ <Filename Value="Menu\UDisplay.pas"/>
+ <UnitName Value="UDisplay"/>
+ <CursorPos X="1" Y="60"/>
+ <TopLine Value="35"/>
+ <UsageCount Value="10"/>
+ </Unit20>
+ <Unit21>
+ <Filename Value="Classes\ULight.pas"/>
+ <UnitName Value="ULight"/>
+ <CursorPos X="81" Y="55"/>
+ <TopLine Value="51"/>
+ <UsageCount Value="10"/>
+ </Unit21>
+ <Unit22>
+ <Filename Value="Screens\UScreenSing.pas"/>
+ <UnitName Value="UScreenSing"/>
+ <CursorPos X="65" Y="6"/>
+ <TopLine Value="1"/>
+ <UsageCount Value="10"/>
+ </Unit22>
+ <Unit23>
+ <Filename Value="Classes\UVideo.pas"/>
+ <UnitName Value="UVideo"/>
+ <CursorPos X="9" Y="10"/>
+ <TopLine Value="1"/>
+ <UsageCount Value="10"/>
+ </Unit23>
+ <Unit24>
+ <Filename Value="Screens\UScreenScore.pas"/>
+ <UnitName Value="UScreenScore"/>
+ <CursorPos X="1" Y="1"/>
+ <TopLine Value="1"/>
+ <UsageCount Value="10"/>
+ </Unit24>
+ <Unit25>
+ <Filename Value="Screens\UScreenEditSub.pas"/>
+ <UnitName Value="UScreenEditSub"/>
+ <CursorPos X="19" Y="545"/>
+ <TopLine Value="505"/>
+ <UsageCount Value="10"/>
+ </Unit25>
+ <Unit26>
+ <Filename Value="switches.inc"/>
+ <CursorPos X="10" Y="3"/>
+ <TopLine Value="1"/>
+ <UsageCount Value="10"/>
+ </Unit26>
+ <Unit27>
+ <Filename Value="lib\midi\Midiout.pas"/>
+ <UnitName Value="MidiOut"/>
+ <CursorPos X="110" Y="20"/>
+ <TopLine Value="1"/>
+ <UsageCount Value="10"/>
+ </Unit27>
+ <Unit28>
+ <Filename Value="Screens\UScreenEditConvert.pas"/>
+ <UnitName Value="UScreenEditConvert"/>
+ <CursorPos X="48" Y="356"/>
+ <TopLine Value="336"/>
+ <EditorIndex Value="3"/>
+ <UsageCount Value="10"/>
+ <Loaded Value="True"/>
+ </Unit28>
+ <Unit29>
+ <Filename Value="Screens\UScreenSingModi.pas"/>
+ <UnitName Value="UScreenSingModi"/>
+ <CursorPos X="6" Y="26"/>
+ <TopLine Value="6"/>
+ <EditorIndex Value="6"/>
+ <UsageCount Value="10"/>
+ <Loaded Value="True"/>
+ </Unit29>
+ <Unit30>
+ <Filename Value="Screens\UScreenCredits.pas"/>
+ <UnitName Value="UScreenCredits"/>
+ <CursorPos X="64" Y="119"/>
+ <TopLine Value="96"/>
+ <EditorIndex Value="11"/>
+ <UsageCount Value="10"/>
+ <Loaded Value="True"/>
+ </Unit30>
+ <Unit31>
+ <Filename Value="Classes\URecord.pas"/>
+ <UnitName Value="URecord"/>
+ <CursorPos X="1" Y="1"/>
+ <TopLine Value="1"/>
+ <EditorIndex Value="18"/>
+ <UsageCount Value="10"/>
+ <Loaded Value="True"/>
+ </Unit31>
+ <Unit32>
+ <Filename Value="lib\JEDI-SDLv1.0\SDL\Pas\jedi-sdl.inc"/>
+ <CursorPos X="4" Y="237"/>
+ <TopLine Value="217"/>
+ <UsageCount Value="10"/>
+ </Unit32>
+ <Unit33>
+ <Filename Value="..\..\Modis\SDK\ModiSDK.pas"/>
+ <UnitName Value="ModiSDK"/>
+ <CursorPos X="41" Y="8"/>
+ <TopLine Value="1"/>
+ <EditorIndex Value="5"/>
+ <UsageCount Value="10"/>
+ <Loaded Value="True"/>
+ </Unit33>
+ <Unit34>
+ <Filename Value="Classes\UDLLManager.pas"/>
+ <UnitName Value="UDLLManager"/>
+ <CursorPos X="12" Y="5"/>
+ <TopLine Value="1"/>
+ <EditorIndex Value="9"/>
+ <UsageCount Value="10"/>
+ <Loaded Value="True"/>
+ </Unit34>
+ <Unit35>
+ <Filename Value="Classes\UPlaylist.pas"/>
+ <UnitName Value="UPlaylist"/>
+ <CursorPos X="1" Y="1"/>
+ <TopLine Value="1"/>
+ <EditorIndex Value="10"/>
+ <UsageCount Value="10"/>
+ <Loaded Value="True"/>
+ </Unit35>
+ <Unit36>
+ <Filename Value="Classes\UDataBase.pas"/>
+ <UnitName Value="UDataBase"/>
+ <CursorPos X="1" Y="8"/>
+ <TopLine Value="1"/>
+ <EditorIndex Value="17"/>
+ <UsageCount Value="10"/>
+ <Loaded Value="True"/>
+ </Unit36>
+ <Unit37>
+ <Filename Value="Screens\UScreenStatMain.pas"/>
+ <UnitName Value="UScreenStatMain"/>
+ <CursorPos X="1" Y="8"/>
+ <TopLine Value="1"/>
+ <EditorIndex Value="12"/>
+ <UsageCount Value="10"/>
+ <Loaded Value="True"/>
+ </Unit37>
+ <Unit38>
+ <Filename Value="Screens\UScreenPartyOptions.pas"/>
+ <UnitName Value="UScreenPartyOptions"/>
+ <CursorPos X="42" Y="233"/>
+ <TopLine Value="213"/>
+ <EditorIndex Value="13"/>
+ <UsageCount Value="10"/>
+ <Loaded Value="True"/>
+ </Unit38>
+ <Unit39>
+ <Filename Value="Screens\UScreenPartyNewRound.pas"/>
+ <UnitName Value="UScreenPartyNewRound"/>
+ <CursorPos X="5" Y="422"/>
+ <TopLine Value="382"/>
+ <EditorIndex Value="14"/>
+ <UsageCount Value="10"/>
+ <Loaded Value="True"/>
+ </Unit39>
+ <Unit40>
+ <Filename Value="Classes\UParty.pas"/>
+ <UnitName Value="UParty"/>
+ <CursorPos X="1" Y="8"/>
+ <TopLine Value="1"/>
+ <EditorIndex Value="15"/>
+ <UsageCount Value="10"/>
+ <Loaded Value="True"/>
+ </Unit40>
+ <Unit41>
+ <Filename Value="Classes\UDraw.pas"/>
+ <UnitName Value="UDraw"/>
+ <CursorPos X="22" Y="11"/>
+ <TopLine Value="1"/>
+ <EditorIndex Value="16"/>
+ <UsageCount Value="10"/>
+ <Loaded Value="True"/>
+ </Unit41>
+ <Unit42>
+ <Filename Value="Screens\UScreenSongMenu.pas"/>
+ <UnitName Value="UScreenSongMenu"/>
+ <CursorPos X="9" Y="7"/>
+ <TopLine Value="1"/>
+ <EditorIndex Value="2"/>
+ <UsageCount Value="10"/>
+ <Loaded Value="True"/>
+ </Unit42>
</Units>
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
- <Filename Value="lib\JEDI-SDLv1.0\OpenGL\Pas\opengl12.pas"/>
- <Caret Line="15" Column="8" TopLine="1"/>
+ <Filename Value="Screens\UScreenPartyNewRound.pas"/>
+ <Caret Line="11" Column="51" TopLine="1"/>
</Position1>
<Position2>
- <Filename Value="lib\JEDI-SDLv1.0\OpenGL\Pas\opengl12.pas"/>
- <Caret Line="248" Column="47" TopLine="228"/>
+ <Filename Value="Classes\UParty.pas"/>
+ <Caret Line="1" Column="1" TopLine="1"/>
</Position2>
<Position3>
- <Filename Value="lib\JEDI-SDLv1.0\OpenGL\Pas\opengl12.pas"/>
- <Caret Line="7065" Column="15" TopLine="7045"/>
+ <Filename Value="Classes\UParty.pas"/>
+ <Caret Line="322" Column="33" TopLine="297"/>
</Position3>
<Position4>
- <Filename Value="lib\JEDI-SDLv1.0\OpenGL\Pas\opengl12.pas"/>
- <Caret Line="1" Column="1" TopLine="1"/>
+ <Filename Value="Classes\UParty.pas"/>
+ <Caret Line="294" Column="3" TopLine="274"/>
</Position4>
<Position5>
- <Filename Value="Classes\UTexture.pas"/>
- <Caret Line="14" Column="6" TopLine="1"/>
+ <Filename Value="Classes\UDraw.pas"/>
+ <Caret Line="1" Column="1" TopLine="1"/>
</Position5>
<Position6>
- <Filename Value="Classes\UTexture.pas"/>
- <Caret Line="15" Column="45" TopLine="1"/>
+ <Filename Value="Screens\UScreenSingModi.pas"/>
+ <Caret Line="1" Column="1" TopLine="1"/>
</Position6>
<Position7>
- <Filename Value="Classes\UTexture.pas"/>
- <Caret Line="14" Column="1" TopLine="1"/>
+ <Filename Value="Screens\UScreenSingModi.pas"/>
+ <Caret Line="1110" Column="1" TopLine="1070"/>
</Position7>
<Position8>
- <Filename Value="Classes\UTexture.pas"/>
- <Caret Line="22" Column="14" TopLine="1"/>
+ <Filename Value="Screens\UScreenSingModi.pas"/>
+ <Caret Line="152" Column="33" TopLine="681"/>
</Position8>
<Position9>
- <Filename Value="Classes\UThemes.pas"/>
+ <Filename Value="Screens\UScreenSingModi.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position9>
<Position10>
- <Filename Value="Classes\UThemes.pas"/>
- <Caret Line="694" Column="50" TopLine="674"/>
+ <Filename Value="Screens\UScreenSingModi.pas"/>
+ <Caret Line="165" Column="18" TopLine="139"/>
</Position10>
<Position11>
- <Filename Value="Classes\UTexture.pas"/>
- <Caret Line="23" Column="14" TopLine="1"/>
+ <Filename Value="Screens\UScreenSingModi.pas"/>
+ <Caret Line="9" Column="9" TopLine="1"/>
</Position11>
<Position12>
- <Filename Value="Classes\UCovers.pas"/>
- <Caret Line="1" Column="1" TopLine="1"/>
+ <Filename Value="Screens\UScreenSingModi.pas"/>
+ <Caret Line="7" Column="9" TopLine="1"/>
</Position12>
<Position13>
- <Filename Value="Classes\UMusic.pas"/>
- <Caret Line="1" Column="1" TopLine="1"/>
+ <Filename Value="Screens\UScreenSingModi.pas"/>
+ <Caret Line="176" Column="52" TopLine="156"/>
</Position13>
<Position14>
- <Filename Value="Classes\UMusic.pas"/>
- <Caret Line="6" Column="3" TopLine="1"/>
+ <Filename Value="UltraStar.lpr"/>
+ <Caret Line="106" Column="34" TopLine="86"/>
</Position14>
<Position15>
- <Filename Value="Classes\UMusic.pas"/>
- <Caret Line="12" Column="14" TopLine="1"/>
+ <Filename Value="UltraStar.lpr"/>
+ <Caret Line="1" Column="1" TopLine="1"/>
</Position15>
<Position16>
- <Filename Value="Classes\UMusic.pas"/>
- <Caret Line="1" Column="1" TopLine="1"/>
+ <Filename Value="UltraStar.lpr"/>
+ <Caret Line="70" Column="6" TopLine="50"/>
</Position16>
<Position17>
- <Filename Value="Classes\ULyrics.pas"/>
+ <Filename Value="Screens\UScreenSongMenu.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position17>
<Position18>
- <Filename Value="Classes\ULyrics.pas"/>
- <Caret Line="11" Column="6" TopLine="1"/>
+ <Filename Value="Screens\UScreenSongMenu.pas"/>
+ <Caret Line="166" Column="71" TopLine="146"/>
</Position18>
<Position19>
- <Filename Value="Classes\ULyrics.pas"/>
- <Caret Line="96" Column="88" TopLine="58"/>
+ <Filename Value="Screens\UScreenEditConvert.pas"/>
+ <Caret Line="1" Column="1" TopLine="1"/>
</Position19>
<Position20>
- <Filename Value="Classes\ULyrics.pas"/>
- <Caret Line="67" Column="95" TopLine="48"/>
+ <Filename Value="Screens\UScreenEditConvert.pas"/>
+ <Caret Line="118" Column="14" TopLine="86"/>
</Position20>
<Position21>
- <Filename Value="Classes\UGraphic.pas"/>
- <Caret Line="5" Column="16" TopLine="1"/>
+ <Filename Value="Screens\UScreenEditConvert.pas"/>
+ <Caret Line="137" Column="21" TopLine="113"/>
</Position21>
<Position22>
- <Filename Value="UltraStar.lpr"/>
- <Caret Line="19" Column="1" TopLine="1"/>
+ <Filename Value="Screens\UScreenEditConvert.pas"/>
+ <Caret Line="144" Column="21" TopLine="122"/>
</Position22>
<Position23>
- <Filename Value="UltraStar.lpr"/>
- <Caret Line="1" Column="1" TopLine="1"/>
+ <Filename Value="Screens\UScreenEditConvert.pas"/>
+ <Caret Line="147" Column="38" TopLine="127"/>
</Position23>
<Position24>
- <Filename Value="Screens\UScreenLoading.pas"/>
- <Caret Line="1" Column="1" TopLine="1"/>
+ <Filename Value="Screens\UScreenEditConvert.pas"/>
+ <Caret Line="148" Column="50" TopLine="128"/>
</Position24>
<Position25>
- <Filename Value="UltraStar.lpr"/>
- <Caret Line="109" Column="1" TopLine="43"/>
+ <Filename Value="Screens\UScreenEditConvert.pas"/>
+ <Caret Line="151" Column="21" TopLine="131"/>
</Position25>
<Position26>
- <Filename Value="UltraStar.lpr"/>
- <Caret Line="1" Column="1" TopLine="1"/>
+ <Filename Value="Screens\UScreenEditConvert.pas"/>
+ <Caret Line="169" Column="34" TopLine="149"/>
</Position26>
<Position27>
- <Filename Value="Menu\UMenu.pas"/>
- <Caret Line="1" Column="1" TopLine="1"/>
+ <Filename Value="Screens\UScreenEditConvert.pas"/>
+ <Caret Line="171" Column="48" TopLine="151"/>
</Position27>
<Position28>
- <Filename Value="UltraStar.lpr"/>
- <Caret Line="47" Column="29" TopLine="29"/>
+ <Filename Value="Screens\UScreenEditConvert.pas"/>
+ <Caret Line="356" Column="38" TopLine="336"/>
</Position28>
<Position29>
- <Filename Value="UltraStar.lpr"/>
- <Caret Line="1" Column="1" TopLine="1"/>
+ <Filename Value="Screens\UScreenEditConvert.pas"/>
+ <Caret Line="393" Column="11" TopLine="371"/>
</Position29>
<Position30>
- <Filename Value="Menu\UMenuText.pas"/>
- <Caret Line="1" Column="1" TopLine="1"/>
+ <Filename Value="Screens\UScreenEditConvert.pas"/>
+ <Caret Line="409" Column="28" TopLine="433"/>
</Position30>
</JumpHistory>
</ProjectOptions>
diff --git a/Game/Code/UltraStar.lpr b/Game/Code/UltraStar.lpr
index 793cc21a..aebf549c 100644
--- a/Game/Code/UltraStar.lpr
+++ b/Game/Code/UltraStar.lpr
@@ -8,6 +8,8 @@ program UltraStar;
{$R 'UltraStar.res' 'UltraStar.rc'}
+{$I switches.inc}
+
uses
//------------------------------
@@ -19,7 +21,7 @@ uses
bass in 'lib\bass\delphi\bass.pas',
-(*
+ {$IFDEF UseMIDIPort}
midiout in 'lib\midi\midiout.pas',
midiin in 'lib\midi\midiin.pas',
Circbuf in 'lib\midi\CIRCBUF.PAS',
@@ -28,7 +30,7 @@ uses
MidiCons in 'lib\midi\MidiCons.PAS',
MidiFile in 'lib\midi\MidiFile.PAS',
Delphmcb in 'lib\midi\Delphmcb.PAS',
-*)
+ {$ENDIF}
avcodec in 'lib\ffmpeg\avcodec.pas',
avformat in 'lib\ffmpeg\avformat.pas',
@@ -45,7 +47,6 @@ uses
//Includes - Menu System
//------------------------------
UMenu in 'Menu\UMenu.pas',
-(*
UDisplay in 'Menu\UDisplay.pas',
UMenuStatic in 'Menu\UMenuStatic.pas',
UMenuText in 'Menu\UMenuText.pas',
@@ -55,7 +56,7 @@ uses
UMenuSelectSlide in 'Menu\UMenuSelectSlide.pas',
UDrawTexture in 'Menu\UDrawTexture.pas',
UMenuButtonCollection in 'Menu\UMenuButtonCollection.pas',
-*)
+
//------------------------------
//Includes - Classes
@@ -68,11 +69,10 @@ uses
UIni in 'Classes\UIni.pas',
UTexture in 'Classes\UTexture.pas',
-(*
+
UGraphic in 'Classes\UGraphic.pas',
UMusic in 'Classes\UMusic.pas',
ULanguage in 'Classes\ULanguage.pas',
- UMain in 'Classes\UMain.pas',
UDraw in 'Classes\UDraw.pas',
URecord in 'Classes\URecord.pas',
TextGL in 'Classes\TextGL.pas',
@@ -91,20 +91,17 @@ uses
UDLLManager in 'Classes\UDLLManager.pas',
UParty in 'Classes\UParty.pas',
UPlaylist in 'Classes\UPlaylist.pas',
-*)
//------------------------------
//Includes - Video Support
//------------------------------
-(*
UVideo in 'Classes\UVideo.pas',
-*)
+
//------------------------------
//Includes - Screens
//------------------------------
UScreenLoading in 'Screens\UScreenLoading.pas',
-(*
UScreenWelcome in 'Screens\UScreenWelcome.pas',
UScreenMain in 'Screens\UScreenMain.pas',
UScreenName in 'Screens\UScreenName.pas',
@@ -132,26 +129,24 @@ uses
UScreenStatDetail in 'Screens\UScreenStatDetail.pas',
UScreenCredits in 'Screens\UScreenCredits.pas',
UScreenPopup in 'Screens\UScreenPopup.pas',
-*)
+
//------------------------------
//Includes - Screens PartyMode
//------------------------------
-(*
UScreenSingModi in 'Screens\UScreenSingModi.pas',
UScreenPartyNewRound in 'Screens\UScreenPartyNewRound.pas',
UScreenPartyScore in 'Screens\UScreenPartyScore.pas',
UScreenPartyPlayer in 'Screens\UScreenPartyPlayer.pas',
UScreenPartyOptions in 'Screens\UScreenPartyOptions.pas',
UScreenPartyWin in 'Screens\UScreenPartyWin.pas',
-*)
+
//------------------------------
//Includes - Modi SDK
//------------------------------
-(*
ModiSDK in '..\..\Modis\SDK\ModiSDK.pas',
-*)
+
//------------------------------
//Includes - Delphi
diff --git a/Game/Code/switches.inc b/Game/Code/switches.inc
index b980e754..8bfbff34 100644
--- a/Game/Code/switches.inc
+++ b/Game/Code/switches.inc
@@ -1,5 +1,7 @@
{$IFDEF FPC}
{$UNDEF UseSerialPort}
+ {$UNDEF UseMIDIPort}
{$ELSE}
{$DEFINE UseSerialPort}
+ {$DEFINE UseMIDIPort}
{$ENDIF}