aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/ULanguage.pas
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-03-22 19:59:00 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-03-22 19:59:00 +0000
commitc33620b856f5106ba95638106c5a55ff88e5290c (patch)
tree3c77d4a382cbd23a05dfb4a59547e77a7af6c936 /Game/Code/Classes/ULanguage.pas
parent541b91c3f40f283411faebe83d7cc50e2507c66e (diff)
downloadusdx-c33620b856f5106ba95638106c5a55ff88e5290c.tar.gz
usdx-c33620b856f5106ba95638106c5a55ff88e5290c.tar.xz
usdx-c33620b856f5106ba95638106c5a55ff88e5290c.zip
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
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/ULanguage.pas18
1 files changed, 10 insertions, 8 deletions
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;