aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/UDraw.pas1
-rw-r--r--Game/Code/Classes/UIni.pas4
-rw-r--r--Game/Code/Classes/ULanguage.pas18
-rw-r--r--Game/Code/Classes/UThemes.pas9
-rw-r--r--Game/Code/Screens/UScreenSingModi.pas41
-rw-r--r--Game/Code/UltraStar.dpr76
6 files changed, 83 insertions, 66 deletions
diff --git a/Game/Code/Classes/UDraw.pas b/Game/Code/Classes/UDraw.pas
index 4e4691ad..31291788 100644
--- a/Game/Code/Classes/UDraw.pas
+++ b/Game/Code/Classes/UDraw.pas
@@ -71,6 +71,7 @@ begin
if ScreenSing.Tex_Background.TexNum >= 1 then begin
glClearColor (1, 1, 1, 1);
+ glColor4f (1, 1, 1, 1);
if (Ini.MovieSize = 0) then //HalfSize BG
begin
diff --git a/Game/Code/Classes/UIni.pas b/Game/Code/Classes/UIni.pas
index beadabb6..a17ba52d 100644
--- a/Game/Code/Classes/UIni.pas
+++ b/Game/Code/Classes/UIni.pas
@@ -483,11 +483,11 @@ begin
for Pet := 0 to High(IJoypad) do
if Tekst = IJoypad[Pet] then Ini.Joypad := Pet;
- // SoundCard
+ {// SoundCard
for I := 0 to 7 do begin
Ini.SoundCard[I, 1] := IniFile.ReadInteger('SoundCards', 'SoundCard'+IntToStr(I+1)+'L', Ini.SoundCard[I, 1]);
Ini.SoundCard[I, 2] := IniFile.ReadInteger('SoundCards', 'SoundCard'+IntToStr(I+1)+'R', Ini.SoundCard[I, 2]);
- end;
+ end; }
// LCD
Tekst := IniFile.ReadString('Devices', 'LPT', ILPT[0]);
diff --git a/Game/Code/Classes/ULanguage.pas b/Game/Code/Classes/ULanguage.pas
index bc3793e3..afdac87c 100644
--- a/Game/Code/Classes/ULanguage.pas
+++ b/Game/Code/Classes/ULanguage.pas
@@ -14,7 +14,7 @@ type
end;
TLanguage = class
- private
+ public
Entry: array of TLanguageEntry; //Entrys of Chosen Language
SEntry: array of TLanguageEntry; //Entrys of Standard Language
CEntry: array of TLanguageEntry; //Constant Entrys e.g. Version
@@ -68,6 +68,8 @@ begin
SEntry[J] := Entry[J];
SetLength(Entry, 0);
+
+ Break;
end;
if (I = high(List)) then
@@ -139,6 +141,9 @@ var
E: integer; // entry
begin
Result := Text;
+ Text := Uppercase(Result);
+
+ Log.LogError('Text: "' + Text + '" L: ' + InttoStr(Length(Entry)));
//Const Mod
for E := 0 to high(CEntry) do
@@ -158,14 +163,11 @@ begin
//Standard Language (If a Language File is Incomplete)
//Then use Standard Language
- if Text = Result then
+ for E := low(SEntry) to high(SEntry) do
+ if Text = SEntry[E].ID then
begin
- for E := low(SEntry) to high(SEntry) do
- if Text = SEntry[E].ID then
- begin
- Result := SEntry[E].Text;
- exit;
- end;
+ Result := SEntry[E].Text;
+ Break;
end;
//Standard Language END
end;
diff --git a/Game/Code/Classes/UThemes.pas b/Game/Code/Classes/UThemes.pas
index 29647db6..c4b83d8b 100644
--- a/Game/Code/Classes/UThemes.pas
+++ b/Game/Code/Classes/UThemes.pas
@@ -2,7 +2,11 @@ unit UThemes;
interface
-uses IniFiles, SysUtils, Classes;
+uses
+{$IFDEF TRANSLATE}
+ ULanguage,
+{$ENDIF}
+IniFiles, SysUtils, Classes;
type
TRGB = record
@@ -576,9 +580,6 @@ var
implementation
uses
-{$IFDEF TRANSLATE}
- ULanguage,
-{$ENDIF}
USkins, UIni;
constructor TTheme.Create(FileName: string);
diff --git a/Game/Code/Screens/UScreenSingModi.pas b/Game/Code/Screens/UScreenSingModi.pas
index 88034f61..ec47dc60 100644
--- a/Game/Code/Screens/UScreenSingModi.pas
+++ b/Game/Code/Screens/UScreenSingModi.pas
@@ -585,16 +585,16 @@ begin
Log.LogStatus('End', 'onShow'); }
-PlayersPlay := TeamInfo.NumTeams;
+ PlayersPlay := TeamInfo.NumTeams;
-if DLLMan.Selected.LoadSong then //Start with Song
-begin
- inherited;
-end
-else //Start Without Song
-begin
- Music.CaptureStart;
-end;
+ if DLLMan.Selected.LoadSong then //Start with Song
+ begin
+ inherited;
+ end
+ else //Start Without Song
+ begin
+ Music.CaptureStart;
+ end;
//Set Playerinfo
PlayerInfo.NumPlayers := PlayersPlay;
@@ -648,16 +648,21 @@ end;
//Music.CaptureStart;
//Music.MoveTo(AktSong.Start);
-//Init Plugin
-if not DLLMan.PluginInit(TeamInfo, PlayerInfo, ToSentences(Czesci[0]), LoadTex, Print, LoadSound, PlaySound) then
-begin
-//Fehler
-Log.LogError('Could not Init Plugin');
-Halt;
-end;
+ //Init Plugin
+ if not DLLMan.PluginInit(TeamInfo, PlayerInfo, ToSentences(Czesci[0]), LoadTex, Print, LoadSound, PlaySound) then
+ begin
+ //Fehler
+ Log.LogError('Could not Init Plugin');
+ Halt;
+ end;
+
+ // Set Background (Little Workaround, maybe change sometime)
+ if (DLLMan.Selected.LoadBack) AND (DLLMan.Selected.LoadSong) then
+ ScreenSing.Tex_Background := Tex_Background;
+
+ Winner := 0;
-Winner := 0;
-//Set Score Visibility
+ //Set Score Visibility
if PlayersPlay = 1 then begin
Text[TextP1Score].Visible := DLLMan.Selected.ShowScore;
Static[StaticP1ScoreBG].Visible := DLLMan.Selected.ShowScore;
diff --git a/Game/Code/UltraStar.dpr b/Game/Code/UltraStar.dpr
index b0d49610..1bc19dcf 100644
--- a/Game/Code/UltraStar.dpr
+++ b/Game/Code/UltraStar.dpr
@@ -6,16 +6,9 @@
{$R 'UltraStar.res' 'UltraStar.rc'}
uses
- {//Earlyer in Code Dir.. Now in SearchDir
- DDKint in '..\ZLPortIO\ddkint.pas',
- ZLPortIO in '..\ZLPortIO\zlportio.pas',
- SQLiteTable3 in '..\SQLite\SQLiteTable3.pas',
- SQLite3 in '..\SQLite\SQLite3.pas',}
- Windows,
- SDL,
- SysUtils,
-
- //Menu Objects
+ //------------------------------
+ //Includes - Menu System
+ //------------------------------
UDisplay in 'Menu\UDisplay.pas',
UMenu in 'Menu\UMenu.pas',
UMenuStatic in 'Menu\UMenuStatic.pas',
@@ -26,11 +19,14 @@ uses
UMenuSelectSlide in 'Menu\UMenuSelectSlide.pas',
UDrawTexture in 'Menu\UDrawTexture.pas',
- //Classes
+ //------------------------------
+ //Includes - Classes
+ //------------------------------
UGraphic in 'Classes\UGraphic.pas',
UTexture in 'Classes\UTexture.pas',
UMusic in 'Classes\UMusic.pas',
UPliki in 'Classes\UPliki.pas',
+ ULanguage in 'Classes\ULanguage.pas',
UMain in 'Classes\UMain.pas',
UDraw in 'Classes\UDraw.pas',
URecord in 'Classes\URecord.pas',
@@ -47,7 +43,6 @@ uses
ULCD in 'Classes\ULCD.pas',
ULight in 'Classes\ULight.pas',
UScores in 'Classes\UScores.pas',
- ULanguage in 'Classes\ULanguage.pas',
UCovers in 'Classes\UCovers.pas',
UCatCovers in 'Classes\UCatCovers.pas',
UFiles in 'Classes\UFiles.pas',
@@ -55,7 +50,9 @@ uses
UDLLManager in 'Classes\UDLLManager.pas',
UParty in 'Classes\UParty.pas',
- //Screens
+ //------------------------------
+ //Includes - Screens
+ //------------------------------
UScreenLoading in 'Screens\UScreenLoading.pas',
UScreenWelcome in 'Screens\UScreenWelcome.pas',
UScreenMain in 'Screens\UScreenMain.pas',
@@ -78,7 +75,10 @@ uses
UScreenOpen in 'Screens\UScreenOpen.pas',
UScreenTop5 in 'Screens\UScreenTop5.pas',
UScreenSongMenu in 'Screens\UScreenSongMenu.pas',
- //PartyMode
+
+ //------------------------------
+ //Includes - Screens PartyMode
+ //------------------------------
UScreenSingModi in 'Screens\UScreenSingModi.pas',
UScreenPartyNewRound in 'Screens\UScreenPartyNewRound.pas',
UScreenPartyScore in 'Screens\UScreenPartyScore.pas',
@@ -86,8 +86,17 @@ uses
UScreenPartyOptions in 'Screens\UScreenPartyOptions.pas',
UScreenPartyWin in 'Screens\UScreenPartyWin.pas',
- //Modi SDK
- ModiSDK in '..\..\Modis\SDK\ModiSDK.pas';
+ //------------------------------
+ //Includes - Modi SDK
+ //------------------------------
+ ModiSDK in '..\..\Modis\SDK\ModiSDK.pas',
+
+ //------------------------------
+ //Includes - Delphi
+ //------------------------------
+ Windows,
+ SDL,
+ SysUtils;
const
Version = 'UltraStar Deluxe V 0.90 Beta';
@@ -100,7 +109,9 @@ var
begin
WndTitle := Version;
+ //------------------------------
//Start more than One Time Prevention
+ //------------------------------
hWnd:= FindWindow(nil, PChar(WndTitle));
//Programm already started
if (hWnd <> 0) then
@@ -120,15 +131,15 @@ begin
Exit;
end;
-
-
+ //------------------------------
+ //StartUp - Create Classes and Load Files
+ //------------------------------
USTime := TTime.Create;
// Log + Benchmark
Log := TLog.Create;
Log.Title := WndTitle;
Log.BenchmarkStart(0);
-// Log.LogError(IntToStr(DayOfTheYear(Date)));
// Language
Log.BenchmarkStart(1);
@@ -152,8 +163,6 @@ begin
Log.BenchmarkEnd(1);
Log.LogBenchmark('Loading Skin List', 1);
- //Log.LogBenchmark(inttostr(Skin.), 1);
-
// Sound Card List
Log.BenchmarkStart(1);
Log.LogStatus('Loading Soundcard list', 'Initialization');
@@ -187,7 +196,6 @@ begin
Log.LogStatus('Load Light', 'Initialization'); Light := TLight.Create;
if Ini.LPT = 2 then begin
Light.Enable;
-// Light.LightOne(0, 1000);
end;
Log.BenchmarkEnd(1);
Log.LogBenchmark('Loading Light', 1);
@@ -223,9 +231,6 @@ begin
Log.BenchmarkStart(1);
Log.LogStatus('PluginManager', 'Initialization');
DLLMan := TDLLMan.Create; //Load PluginList
-
- Log.LogError(inttostr(Length(DLLMan.Plugins)) + ' Plugins Loaded');
-
Log.BenchmarkEnd(1);
Log.LogBenchmark('Loading PluginManager', 1);
@@ -260,10 +265,10 @@ begin
//GoldenStarsTwinkleMod
Log.BenchmarkStart(1);
- Log.LogStatus('GoldenStars', 'Initialization');
+ Log.LogStatus('Effect Manager', 'Initialization');
GoldenRec := TEffectManager.Create;
Log.BenchmarkEnd(1);
- Log.LogBenchmark('Loading GoldenStars', 1);
+ Log.LogBenchmark('Loading Particel System', 1);
// Joypad
if Ini.Joypad = 1 then begin
@@ -277,15 +282,18 @@ begin
Log.LogBenchmark('Loading Time', 0);
-// Music.SetLoop(true);
-// Music.SetVolume(50);
-// Music.Open(SkinPath + 'Menu Music 3.mp3');
-// Music.Play;
+ //------------------------------
+ //Start- Mainloop
+ //------------------------------
+ //Music.SetLoop(true);
+ //Music.SetVolume(50);
+ //Music.Open(SkinPath + 'Menu Music 3.mp3');
+ //Music.Play;
Log.LogStatus('Main Loop', 'Initialization'); MainLoop;
-// sleep(3000);
-
- // finish
+ //------------------------------
+ //Finish Application
+ //------------------------------
if Ini.LPT = 1 then LCD.Clear;
if Ini.LPT = 2 then Light.TurnOff;