From c33620b856f5106ba95638106c5a55ff88e5290c Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Thu, 22 Mar 2007 19:59:00 +0000 Subject: Fixed Bug: No BG in Party Mode and little Code clean up git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@16 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UDraw.pas | 1 + Game/Code/Classes/UIni.pas | 4 ++-- Game/Code/Classes/ULanguage.pas | 18 ++++++++++-------- Game/Code/Classes/UThemes.pas | 9 +++++---- 4 files changed, 18 insertions(+), 14 deletions(-) (limited to 'Game/Code/Classes') 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); -- cgit v1.2.3