From 90d5518f9c0153cddcdbe85e5143d9eef5bc0d76 Mon Sep 17 00:00:00 2001 From: brunzelchen Date: Tue, 5 Apr 2011 16:36:12 +0000 Subject: - bugfix: set correct start beat when playing midi or mp3 in editor - update: (editor) changing line in text-edit-mode by UP/DOWN, changing singer in text-edit-mode by pressing SHIFT+UP/DONW git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2813 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenEditSub.pas | 100 +++++++++++++++++++++++++++-------- Game/Code/UltraStar.dpr | 2 +- Installer/settings/variables.nsh | 2 +- 3 files changed, 81 insertions(+), 23 deletions(-) diff --git a/Game/Code/Screens/UScreenEditSub.pas b/Game/Code/Screens/UScreenEditSub.pas index 3a7a1546..184a0a6c 100644 --- a/Game/Code/Screens/UScreenEditSub.pas +++ b/Game/Code/Screens/UScreenEditSub.pas @@ -554,7 +554,7 @@ begin Czesci[0].Czesc[MedleyNotes.end_.line].Nuta[MedleyNotes.end_.note].Dlugosc); PlaySentence := true; Music.Play; - LastClick := -100; + LastClick := Czesci[0].Czesc[MedleyNotes.start.line].Nuta[MedleyNotes.start.note].Start-1; end; end; end; @@ -671,7 +671,7 @@ begin PlaySentence := true; PlayOneNote := false; Music.Play; - LastClick := -100; + LastClick := Czesci[CP].Czesc[Czesci[CP].Akt].StartNote-1; end; end; @@ -692,7 +692,7 @@ begin PlayOneSentence := false; PlayOneNote := false; Music.Play; - LastClick := -100; + LastClick := Czesci[CP].Czesc[Czesci[CP].Akt].StartNote-1; end; end; @@ -891,7 +891,7 @@ begin PlaySentence := true; PlayOneNote := false; Music.Play; - LastClick := -100; + LastClick := Czesci[CP].Czesc[Czesci[CP].Akt].StartNote-1; end; end; @@ -908,7 +908,7 @@ begin MidiStart := GetTimeFromBeat(Czesci[CP].Czesc[Czesci[CP].Akt].StartNote); MidiStop := GetTimeFromBeat(Czesci[CP].Czesc[Czesci[CP].Akt].Koniec); - LastClick := -100; + LastClick := Czesci[CP].Czesc[Czesci[CP].Akt].StartNote-1; end; // one line midi + mp3 @@ -920,16 +920,14 @@ begin MidiTime := USTime.GetTime; MidiStart := GetTimeFromBeat(Czesci[CP].Czesc[Czesci[CP].Akt].StartNote); MidiStop := GetTimeFromBeat(Czesci[CP].Czesc[Czesci[CP].Akt].Koniec); - LastClick := -100; PlaySentence := true; PlayOneNote := false; - //Click := true; Music.Stop; - Music.MoveTo(GetTimeFromBeat(Czesci[CP].Czesc[Czesci[CP].Akt].StartNote)+0{-0.10}); - PlayStopTime := GetTimeFromBeat(Czesci[CP].Czesc[Czesci[CP].Akt].Koniec)+0; + Music.MoveTo(GetTimeFromBeat(Czesci[CP].Czesc[Czesci[CP].Akt].StartNote)); + PlayStopTime := GetTimeFromBeat(Czesci[CP].Czesc[Czesci[CP].Akt].Koniec); Music.Play; - LastClick := -100; + LastClick := Czesci[CP].Czesc[Czesci[CP].Akt].StartNote-1; end; //new: play hole file + LALT @@ -949,7 +947,7 @@ begin PlaySentence := true; PlayOneNote := false; Music.Play; - LastClick := -100; + LastClick := Czesci[CP].Czesc[Czesci[CP].Akt].StartNote-1; end; end; @@ -964,7 +962,7 @@ begin MidiStart := GetTimeFromBeat(Czesci[CP].Czesc[Czesci[CP].Akt].StartNote); MidiStop := Music.Length; - LastClick := -100; + LastClick := Czesci[CP].Czesc[Czesci[CP].Akt].StartNote-1; end; if SDL_ModState = KMOD_LSHIFT or KMOD_LCTRL or KMOD_LALT then @@ -974,16 +972,14 @@ begin MidiTime := USTime.GetTime; MidiStart := GetTimeFromBeat(Czesci[CP].Czesc[Czesci[CP].Akt].StartNote); MidiStop := Music.Length; - LastClick := -100; PlaySentence := true; PlayOneNote := false; - //Click := true; Music.Stop; Music.MoveTo(GetTimeFromBeat(Czesci[CP].Czesc[Czesci[CP].Akt].StartNote)+0{-0.10}); PlayStopTime := Music.Length; Music.Play; - LastClick := -100; + LastClick := Czesci[CP].Czesc[Czesci[CP].Akt].StartNote-1; end; if PlaySentenceMidi or PlaySentence then @@ -1015,7 +1011,7 @@ begin MidiTime := USTime.GetTime; MidiStart := GetTimeFromBeat(Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Start); MidiStop := GetTimeFromBeat(Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Dlugosc); - LastClick := -100; + LastClick := Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Start-1; end else if SDL_ModState = KMOD_LSHIFT or KMOD_LCTRL then @@ -1026,7 +1022,6 @@ begin MidiTime := USTime.GetTime; MidiStart := GetTimeFromBeat(Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Start); MidiStop := GetTimeFromBeat(Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Dlugosc); - LastClick := -100; PlaySentence := false; PlayOneNote := true; @@ -1037,7 +1032,7 @@ begin Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Start + Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Dlugosc)); Music.Play; - LastClick := -100; + LastClick := Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Start-1; end Else @@ -1056,7 +1051,7 @@ begin Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Start + Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Dlugosc)); Music.Play; - LastClick := -100; + LastClick := Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Start-1; end; end; SDLK_RETURN: @@ -1487,6 +1482,7 @@ begin if AktNuta[CP] = Czesci[CP].Czesc[Czesci[CP].Akt].IlNut then AktNuta[CP] := 0; Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Color := 2; + EditorLyric[CP].Selected := AktNuta[CP]; editText := Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Tekst; end; @@ -1501,10 +1497,72 @@ begin if AktNuta[CP] = -1 then AktNuta[CP] := Czesci[CP].Czesc[Czesci[CP].Akt].HighNut; Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Color := 2; + EditorLyric[CP].Selected := AktNuta[CP]; editText := Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Tekst; end; - end; + end; + SDLK_UP: + begin + if SDL_ModState = 0 then + begin + Refresh; + Dec(Czesci[CP].Akt); + AktNuta[CP] := 0; + if Czesci[CP].Akt = -1 then + Czesci[CP].Akt := Czesci[CP].High; + + SelectPrevNote; + + EditorLyric[CP].Selected := AktNuta[CP]; + editText := Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Tekst; + end; + + // select singer 1 notes if possible + if (SDL_ModState = KMOD_LSHIFT) and AktSong.isDuet then + begin + if (Length(Czesci[0].Czesc[Czesci[0].Akt].Nuta)>0) then + begin + Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Color := 0; + CP := 0; + Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Color := 2; + + EditorLyric[CP].Selected := AktNuta[CP]; + editText := Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Tekst; + end; + end; + end; + SDLK_DOWN: + begin + if SDL_ModState = 0 then + begin + Refresh; + Inc(Czesci[CP].Akt); + AktNuta[CP] := 0; + //AktNuta[1] := 0; + if Czesci[CP].Akt > Czesci[CP].High then + Czesci[CP].Akt := 0; + + SelectNextNote; + + EditorLyric[CP].Selected := AktNuta[CP]; + editText := Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Tekst; + end; + + // select singer 2 notes if possible + if (SDL_ModState = KMOD_LSHIFT) and AktSong.isDuet then + begin + if (Length(Czesci[1].Czesc[Czesci[1].Akt].Nuta)>0) then + begin + Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Color := 0; + CP := 1; + Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Color := 2; + + EditorLyric[CP].Selected := AktNuta[CP]; + editText := Czesci[CP].Czesc[Czesci[CP].Akt].Nuta[AktNuta[CP]].Tekst; + end; + end; + end; end; end; end; @@ -1698,7 +1756,7 @@ begin PlaySentence := true; PlayOneNote := false; Music.Play; - LastClick := -100; + LastClick := Czesci[CP].Czesc[Czesci[CP].Akt].StartNote-1; end; noteStart := AktNuta[CP]; diff --git a/Game/Code/UltraStar.dpr b/Game/Code/UltraStar.dpr index 37b69d2f..21cbb978 100644 --- a/Game/Code/UltraStar.dpr +++ b/Game/Code/UltraStar.dpr @@ -123,7 +123,7 @@ uses const VersionName = 'UltraStar Deluxe Challenge, Medley & Duet Edition'; - VersionNumber = 'r9.14'; + VersionNumber = 'r9.17'; var WndTitle: string; diff --git a/Installer/settings/variables.nsh b/Installer/settings/variables.nsh index 1b50c8e0..5507732f 100644 --- a/Installer/settings/variables.nsh +++ b/Installer/settings/variables.nsh @@ -1,7 +1,7 @@ ; These are the common used variables ; for the USdx Challenge, Medley & Duet Edition Installation Wizard -!define version "r9.14" ; Current version of UltraStar Deluxe Challenge, Medley & Duet Edition +!define version "r9.17" ; Current version of UltraStar Deluxe Challenge, Medley & Duet Edition !define p_name "UltraStar Deluxe CMD Edition" ; Just the name of the program !define publisher "USDX Team" ; Publisher !define homepage "http://www.ultrastardeluxe.org/" ; Project Homepage -- cgit v1.2.3