diff options
author | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2016-01-02 00:21:32 +0000 |
---|---|---|
committer | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2016-01-02 00:21:32 +0000 |
commit | a258171e190e67b1a4025994ee96a972cba7ae1f (patch) | |
tree | a3228bd31c08162eae0ca5e07331d28a9f9111dc /src/base | |
parent | a1b79767e2f5ace3c97c010cde8670edfcb81166 (diff) | |
download | usdx-a258171e190e67b1a4025994ee96a972cba7ae1f.tar.gz usdx-a258171e190e67b1a4025994ee96a972cba7ae1f.tar.xz usdx-a258171e190e67b1a4025994ee96a972cba7ae1f.zip |
add some details
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3166 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/UNote.pas | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/src/base/UNote.pas b/src/base/UNote.pas index ae915115..e2f97d51 100644 --- a/src/base/UNote.pas +++ b/src/base/UNote.pas @@ -209,6 +209,7 @@ var CurBeat: real; CurBPM: integer; begin + try // static BPM if Length(CurrentSong.BPM) = 1 then begin @@ -232,6 +233,10 @@ begin begin Result := 0; end; + except + on E: Exception do + Result := 0; + end; end; function GetTimeFromBeat(Beat: integer; SelfSong: TSong = nil): real; @@ -244,6 +249,8 @@ begin else Song := CurrentSong; + Result := 0; + // static BPM if Length(Song.BPM) = 1 then begin @@ -295,11 +302,16 @@ var Count: integer; CountGr: integer; CP: integer; + PetGr: integer; begin LyricsState.UpdateBeats(); + PetGr := 0; + if (PlayersPlay <> 1) then + PetGr := 1; + // sentences routines - for CountGr := 0 to 0 do //High(Lines) + for CountGr := 0 to PetGr do //High(Lines) begin; CP := CountGr; // old parts @@ -379,6 +391,9 @@ var Count: integer; begin // beat click + + if (PlayersPlay = 1) then + begin if ((Ini.BeatClick = 1) and ((LyricsState.CurrentBeatC + Lines[0].Resolution + Lines[0].NotesGAP) mod Lines[0].Resolution = 0)) then begin @@ -387,6 +402,7 @@ begin for Count := 0 to Lines[0].Line[Lines[0].Current].HighNote do begin + //basisbit todo if (Lines[0].Line[Lines[0].Current].Note[Count].Start = LyricsState.CurrentBeatC) then begin // click assist @@ -403,12 +419,13 @@ begin *) end; end; + end; end; procedure NewBeatDetect(Screen: TScreenSing); var - CP, SentenceEnd: integer; - I: cardinal; + MaxCP, CP, SentenceEnd: integer; + I, J: cardinal; begin // check for sentence end // we check all lines here because a new sentence may @@ -421,10 +438,15 @@ begin // do it for most corrupt txt and for lines in // non-corrupt txts that start immediatly after the prev. // line ends + MaxCP := 0; + if (PlayersPlay <> 1) then + MaxCP := 1; if (assigned(Screen)) then begin - CP := 0; + for J := 0 to MaxCP do + begin + CP := J; NewNote(CP, Screen); @@ -441,6 +463,7 @@ begin end; end; end; + end; end; end; |