diff options
author | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-03-04 17:17:04 +0000 |
---|---|---|
committer | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-03-04 17:17:04 +0000 |
commit | 44446b49ca05fe78ed74e2187c60d9810a2f737b (patch) | |
tree | 9901a7099c27f7294f262b8f7e81a82e9797b1ab /Game/Code | |
parent | f49e651a56c73287942335b46b0bbf06f439c806 (diff) | |
download | usdx-44446b49ca05fe78ed74e2187c60d9810a2f737b.tar.gz usdx-44446b49ca05fe78ed74e2187c60d9810a2f737b.tar.xz usdx-44446b49ca05fe78ed74e2187c60d9810a2f737b.zip |
fixed lineNo in error reporting;
fixed videopreview after singing or editing
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2171 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code')
-rw-r--r-- | Game/Code/Classes/UFiles.pas | 15 | ||||
-rw-r--r-- | Game/Code/Screens/UScreenSong.pas | 10 |
2 files changed, 15 insertions, 10 deletions
diff --git a/Game/Code/Classes/UFiles.pas b/Game/Code/Classes/UFiles.pas index 358bc6bf..1af6e3a8 100644 --- a/Game/Code/Classes/UFiles.pas +++ b/Game/Code/Classes/UFiles.pas @@ -813,7 +813,7 @@ begin ReadLn(SongFile, Tekst);
Inc(FileLineNo);
- if (EoF(SongFile)) then
+ if (EoF(SongFile)) or (Length(Tekst)=0) then
begin //Song File Corrupted - No Notes
CloseFile(SongFile);
FileMode := fmOpenReadWrite;
@@ -821,9 +821,11 @@ begin Result := False;
Exit;
end;
+
Read(SongFile, TempC);
until ((TempC = ':') or (TempC = 'F') or (TempC = '*'));
-
+ Inc(FileLineNo);
+
SetLength(Czesci, 0);
SetLength(Czesci, 2);
for Pet := 0 to High(Czesci) do begin
@@ -837,8 +839,6 @@ begin Czesci[Pet].Czesc[0].HighNut := -1;
end;
-// TempC := ':';
-// TempC := Tekst[1]; // read from backup variable, don't use default ':' value
isNewSentence := false;
while (TempC <> 'E') AND (not EOF(SongFile)) do begin
if (TempC = ':') or (TempC = '*') or (TempC = 'F') then begin
@@ -919,7 +919,10 @@ begin end;
end;
- Read(SongFile, TempC);
+ Repeat
+ Read(SongFile, TempC);
+ Until ((TempC <> #13) AND (TempC <> #10)) or (TempC = 'E') or (EOF(SongFile));
+
Inc(FileLineNo);
end; // while}
@@ -933,7 +936,7 @@ begin end;
Result := false;
- Log.LogError('Error Loading File: "' + Name + '" in Line ' + inttostr(FileLineNo+1));
+ Log.LogError('Error Loading File: "' + Name + '" in Line ' + inttostr(FileLineNo));
exit;
end;
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas index 9751b042..52e679b5 100644 --- a/Game/Code/Screens/UScreenSong.pas +++ b/Game/Code/Screens/UScreenSong.pas @@ -1807,7 +1807,7 @@ begin (PlaylistMan.Mode=0) then
begin
CatSongs.ShowCategoryList;
- SelectNext;
+ //SelectNext;
//Show Cat in Top Left Mod
HideCatTL;
end else if (PlaylistMan.Mode=0) and (Ini.Tabs_at_startup = 1) AND (CatSongs.CatNumShow = -3) then
@@ -1944,11 +1944,13 @@ begin if Length(CatSongs.Song) > 0 then begin
if SongIndex<>Interaction then
- ChangeMusic
- else
begin
- StartVideoPreview;
CoverTime := 0;
+ ChangeMusic;
+ end else
+ begin
+ CoverTime := 0;
+ StartVideoPreview;
LoadTop;
end;
|