From 7403bb1fc38a74c25a636666681a42d663d27512 Mon Sep 17 00:00:00 2001 From: tobigun Date: Tue, 13 May 2008 18:45:37 +0000 Subject: - fixed video-background - fixed buggy SkipTime (using TRelativeTimer now) - TLineState is a class now. TLineState.CurrentTime is now automatically updated using TRelativeTimer git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1088 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenSing.pas | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Game/Code/Screens/UScreenSing.pas') diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas index 1b089eaf..c97bc691 100644 --- a/Game/Code/Screens/UScreenSing.pas +++ b/Game/Code/Screens/UScreenSing.pas @@ -31,7 +31,6 @@ type TScreenSing = class(TMenu) protected paused: boolean; //Pause Mod - PauseTime: Real; NumEmptySentences: integer; public //TextTime: integer; @@ -216,9 +215,10 @@ begin if not paused then //enable Pause begin // pause Time - PauseTime := LineState.CurrentTime; Paused := true; + LineState.Pause(); + // pause Music AudioPlayback.Pause; @@ -229,12 +229,12 @@ begin end else //disable Pause begin - LineState.CurrentTime := PauseTime; //Position of Notes + LineState.Resume(); // Position of Music // FIXME: remove this and provide LineState.CurrentTime as sync-source instead // so every stream can synch itself - AudioPlayback.Position := PauseTime; + AudioPlayback.Position := LineState.CurrentTime; // Play Music AudioPlayback.Play; @@ -528,7 +528,9 @@ begin // CountSkipTimeSet; LineState.CurrentTime := CurrentSong.Start; LineState.TotalTime := AudioPlayback.Length; - if (CurrentSong.Finish > 0) then LineState.TotalTime := CurrentSong.Finish / 1000; + + if (CurrentSong.Finish > 0) then + LineState.TotalTime := CurrentSong.Finish / 1000; LineState.OldBeat := -1; for P := 0 to High(Player) do ClearScores(P); -- cgit v1.2.3