aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/UFiles.pas
diff options
context:
space:
mode:
authorjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-09-24 13:31:43 +0000
committerjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-09-24 13:31:43 +0000
commit739ad9a6dee57375f05dcd20dc59ba2d619f11fa (patch)
treefb82b095cd5dca1bb06aaca59e1936008fac3490 /Game/Code/Classes/UFiles.pas
parent1f9fd791bbe68741b8273a64eb5c0abe928e431c (diff)
downloadusdx-739ad9a6dee57375f05dcd20dc59ba2d619f11fa.tar.gz
usdx-739ad9a6dee57375f05dcd20dc59ba2d619f11fa.tar.xz
usdx-739ad9a6dee57375f05dcd20dc59ba2d619f11fa.zip
fixed song loading in Lazarus..
cant assume variables are initialized as 0 :) in UFile "Done: byte;" was no initialized on lazarus compiler. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@431 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/UFiles.pas13
1 files changed, 8 insertions, 5 deletions
diff --git a/Game/Code/Classes/UFiles.pas b/Game/Code/Classes/UFiles.pas
index 34342e26..565c5ee3 100644
--- a/Game/Code/Classes/UFiles.pas
+++ b/Game/Code/Classes/UFiles.pas
@@ -137,11 +137,12 @@ end;
//--------------------
function ReadTXTHeader(var Song: TSong): boolean;
var
-Line, Identifier, Value: String;
-Temp: word;
-Done: byte;
+ Line, Identifier, Value: String;
+ Temp: word;
+ Done: byte;
begin
Result := true;
+ Done := 0;
//Read first Line
ReadLn (SongFile, Line);
@@ -167,6 +168,8 @@ begin
Identifier := Uppercase(Trim(Copy(Line, 2, Temp - 2))); //Uppercase is for Case Insensitive Checks
Value := Trim(Copy(Line, Temp + 1,Length(Line) - Temp));
+ Log.LogError('Identifier: '+Identifier+' - '+ Value );
+
//Check the Identifier (If Value is given)
if (Length(Value) <> 0) then
begin
@@ -332,7 +335,7 @@ begin
else
begin
Result := False;
- Log.LogError('File Incomplete or not Ultrastar TxT: ' + Song.FileName);
+ Log.LogError('File Incomplete or not Ultrastar TxT (A): ' + Song.FileName);
break;
end;
@@ -354,7 +357,7 @@ begin
else if (Done and 1) = 0 then //No Title Flag
Log.LogError('Title Tag Missing: ' + Song.FileName)
else //unknown Error
- Log.LogError('File Incomplete or not Ultrastar TxT: ' + Song.FileName);
+ Log.LogError('File Incomplete or not Ultrastar TxT (B - '+ inttostr(Done) +'): ' + Song.FileName);
end;
end;