aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-02-05 21:33:30 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-02-05 21:33:30 +0000
commitd22d5070d1b847611786ca483055ea7348cda132 (patch)
treea145d6336e54d0cfb651ab063b1fac4270b0c9c0
parentdee94f5dae9e6b5ae6c7b54a12a567745abc8dc3 (diff)
downloadusdx-d22d5070d1b847611786ca483055ea7348cda132.tar.gz
usdx-d22d5070d1b847611786ca483055ea7348cda132.tar.xz
usdx-d22d5070d1b847611786ca483055ea7348cda132.zip
cleanup
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@828 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r--Game/Code/Screens/UScreenSing.pas30
1 files changed, 14 insertions, 16 deletions
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas
index 6a5b4e90..2342d371 100644
--- a/Game/Code/Screens/UScreenSing.pas
+++ b/Game/Code/Screens/UScreenSing.pas
@@ -325,6 +325,8 @@ var
NR: TRecR; //Line Bonus Mod
Color: TRGB;
+
+ success: boolean;
begin
Log.LogStatus('Begin', 'onShow');
FadeOut := false; // 0.5.0: early 0.5.0 problems were by this line commented
@@ -433,34 +435,30 @@ begin
{Static[StaticP3RScoreBG].Visible := V3R;
Text[TextP3RScore].Visible := V3R; }
+ // FIXME: sets Path and Filename to ''
ResetSingTemp;
-// Log.LogWarning(CatSongs.Song[CatSongs.Selected].Path + CatSongs.Song[CatSongs.Selected].FileName, '!!!');
+
CurrentSong := CatSongs.Song[CatSongs.Selected];
+ // FIXME: bad style, put the try-except into LoadSong() and not here
try
- if not CurrentSong.LoadSong then
-// if not LoadSong(CatSongs.Song[CatSongs.Selected].Path + CatSongs.Song[CatSongs.Selected].FileName) then
- begin
- //Error Loading Song -> Go back to Song Screen and Show some Error Message
- FadeTo(@ScreenSong);
- //Select New Song in Party Mode
- if ScreenSong.Mode = smPartyMode then
- ScreenSong.SelectRandomSong;
- ScreenPopupError.ShowPopup (Language.Translate('ERROR_CORRUPT_SONG'));
- Exit;
- end;
+ success := CurrentSong.LoadSong();
except
+ success := false;
+ end;
+ if (not success) then
+ begin
//Error Loading Song -> Go back to Song Screen and Show some Error Message
FadeTo(@ScreenSong);
//Select New Song in Party Mode
if ScreenSong.Mode = smPartyMode then
- ScreenSong.SelectRandomSong;
+ ScreenSong.SelectRandomSong();
ScreenPopupError.ShowPopup (Language.Translate('ERROR_CORRUPT_SONG'));
+ // FIXME: do we need this?
+ CurrentSong.Path := CatSongs.Song[CatSongs.Selected].Path;
Exit;
end;
- CurrentSong.Path := CatSongs.Song[CatSongs.Selected].Path;
-// CurrentSong.GAP := CurrentSong.GAP + 40 {4096 = 100ms for buffer} + 20 {microphone} + 60000 / CurrentSong.BPM[0].BPM / 2; // temporary until UMain will be fixed
-
+
// set movie
if (CurrentSong.Video <> '') and FileExists(CurrentSong.Path + CurrentSong.Video) then
begin