From e2b979737b34d2eb30524fd3e886971ff1f65eb9 Mon Sep 17 00:00:00 2001 From: jaybinks Date: Tue, 19 Feb 2008 11:03:19 +0000 Subject: fix for editor bug ( http://trac2.assembla.com/usdx/ticket/37 ) also fixed windows platform.halt , it didnt perform as expected. ( it would keep loading, instead of halting immediately ) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@862 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenEditSub.pas | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'Game/Code/Screens') diff --git a/Game/Code/Screens/UScreenEditSub.pas b/Game/Code/Screens/UScreenEditSub.pas index 60e27245..689a12d9 100644 --- a/Game/Code/Screens/UScreenEditSub.pas +++ b/Game/Code/Screens/UScreenEditSub.pas @@ -21,6 +21,7 @@ uses UTexture, UMenuText, ULyrics_bak, + ULyrics, Math, OpenGL12, {$IFDEF UseMIDIPort} @@ -320,7 +321,8 @@ begin Click := true; AudioPlayback.Stop; R := GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].StartNote); - if R <= AudioPlayback.Length then begin + if R <= AudioPlayback.Length then + begin AudioPlayback.Position := R; PlayStopTime := GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].Koniec); PlaySentence := true; @@ -340,9 +342,9 @@ begin end; if SDL_ModState = KMOD_LSHIFT or KMOD_LCTRL then begin PlaySentenceMidi := true; - MidiTime := USTime.GetTime; + MidiTime := USTime.GetTime; MidiStart := GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].StartNote); - MidiStop := GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].Koniec); + MidiStop := GetTimeFromBeat(Czesci[0].Czesc[Czesci[0].Akt].Koniec); LastClick := -100; PlaySentence := true; @@ -1070,7 +1072,9 @@ procedure TScreenEditSub.CopySentences(Src, Dst, Num: integer); var C: integer; begin - Lyric := TLyric.Create; +// Lyric := TLyric.Create; + + // create place for new sentences SetLength(Czesci[0].Czesc, Czesci[0].Ilosc + Num - 1); @@ -1156,6 +1160,7 @@ end; procedure TScreenEditSub.onShow; begin Log.LogStatus('Initializing', 'TEditScreen.onShow'); + Lyric := TLyric.Create; ResetSingTemp; @@ -1190,7 +1195,7 @@ begin AudioPlayback.Open(CurrentSong.Path + CurrentSong.Mp3); //Set Down Music Volume for Better hearability of Midi Sounds //Music.SetVolume(40); - + Lyric.Clear; Lyric.X := 400; Lyric.Y := 500; -- cgit v1.2.3