From d520f9f6ed8a3a0cb8e3063040db19758b7c6f38 Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Sun, 30 Mar 2008 16:44:20 +0000 Subject: Prepared some classes for enhanced Song loading. Commited to work with s_alexander in this task. Song loading doesn't work at this point git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@983 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenSing.pas | 48 +++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'Game/Code/Screens/UScreenSing.pas') diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas index 859aeb52..5b185200 100644 --- a/Game/Code/Screens/UScreenSing.pas +++ b/Game/Code/Screens/UScreenSing.pas @@ -222,9 +222,9 @@ begin // pause Music AudioPlayback.Pause; - // pause Video - if (CurrentSong.Video <> '') and FileExists(CurrentSong.Path + CurrentSong.Video) then - fCurrentVideoPlaybackEngine.Pause; + // pause Video // to - do : new Song management + {if (CurrentSong.Video <> '') and FileExists(CurrentSong.Path + CurrentSong.Video) then + fCurrentVideoPlaybackEngine.Pause;} end else //disable Pause @@ -239,9 +239,9 @@ begin // Play Music AudioPlayback.Play; - // Video - if (CurrentSong.Video <> '') and FileExists(CurrentSong.Path + CurrentSong.Video) then - fCurrentVideoPlaybackEngine.Pause; + // Video // to - do : new Song management + {if (CurrentSong.Video <> '') and FileExists(CurrentSong.Path + CurrentSong.Video) then + fCurrentVideoPlaybackEngine.Pause; } Paused := false; end; @@ -461,14 +461,14 @@ begin CurrentSong := CatSongs.Song[CatSongs.Selected]; // FIXME: bad style, put the try-except into LoadSong() and not here - try + {try // to - do : new Song management //Check if File is XML if copy(CurrentSong.FileName,length(CurrentSong.FileName)-3,4) = '.xml' then success := CurrentSong.LoadXMLSong() else success := CurrentSong.LoadSong(); - except + except } success := false; - end; + //end; if (not success) then begin @@ -479,7 +479,7 @@ begin ScreenSong.SelectRandomSong(); ScreenPopupError.ShowPopup (Language.Translate('ERROR_CORRUPT_SONG')); // FIXME: do we need this? - CurrentSong.Path := CatSongs.Song[CatSongs.Selected].Path; + //CurrentSong.Path := CatSongs.Song[CatSongs.Selected].Path; Exit; end; @@ -492,8 +492,8 @@ begin fCurrentVideoPlaybackEngine.Close; fCurrentVideoPlaybackEngine := VideoPlayback; - // set movie - CurrentSong.VideoLoaded := false; + // set movie // to - do : new Song management + {CurrentSong.VideoLoaded := false; fShowVisualization := false; if (CurrentSong.Video <> '') and FileExists(CurrentSong.Path + CurrentSong.Video) then begin @@ -504,14 +504,14 @@ begin fCurrentVideoPlaybackEngine.position := CurrentSong.VideoGAP + CurrentSong.Start; CurrentSong.VideoLoaded := true; - end; + end; } // set background - if (CurrentSong.Background <> '') and (CurrentSong.VideoLoaded = false) then + if (CurrentSong.Background <> '') { and (CurrentSong.VideoLoaded = false)} then try - Tex_Background := Texture.LoadTexture(CurrentSong.Path + CurrentSong.Background); + Tex_Background := Texture.LoadTexture({CurrentSong.Path + }CurrentSong.Background); except - log.LogError('Background could not be loaded: ' + CurrentSong.Path + CurrentSong.Background); + log.LogError('Background could not be loaded: ' + {CurrentSong.Path + }CurrentSong.Background); Tex_Background.TexNum := -1; end else @@ -914,8 +914,8 @@ end; procedure TScreenSing.onShowFinish; begin // play movie (II) - - if CurrentSong.VideoLoaded then + // to - do : new Song management + {if CurrentSong.VideoLoaded then begin try fCurrentVideoPlaybackEngine.GetFrame(LineState.CurrentTime); @@ -939,7 +939,7 @@ begin end; end; end; - end; + end; } // play music (II) @@ -1184,8 +1184,8 @@ begin SingDrawBackground; // update and draw movie - if ShowFinish and - ( CurrentSong.VideoLoaded or fShowVisualization ) then + if ShowFinish and // to - do : new Song management + ( {CurrentSong.VideoLoaded or }fShowVisualization ) then // if ShowFinish then begin // try @@ -1303,13 +1303,13 @@ begin Log.BenchmarkEnd(0); Log.LogBenchmark('Creating files', 0); end; - - if CurrentSong.VideoLoaded then + // to - do : new Song management + {if CurrentSong.VideoLoaded then begin // CloseSmpeg; fCurrentVideoPlaybackEngine.Close; CurrentSong.VideoLoaded := false; // to prevent drawing closed video - end; + end; } SetFontItalic (False); end; -- cgit v1.2.3