diff options
author | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-03-06 23:45:10 +0000 |
---|---|---|
committer | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-03-06 23:45:10 +0000 |
commit | 9be9439fce30028c619a401523793ec101dccaed (patch) | |
tree | da8f2db13433f42692b4924bb4dedbd8f6b4c037 /src/screens | |
parent | 91ff7f5775354c20bc5bc86672d8e4c22d0d47f5 (diff) | |
download | usdx-9be9439fce30028c619a401523793ec101dccaed.tar.gz usdx-9be9439fce30028c619a401523793ec101dccaed.tar.xz usdx-9be9439fce30028c619a401523793ec101dccaed.zip |
Clear Scores moved to UScreenSing and inlined. Reduce clutter in UMain
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1624 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/screens')
-rw-r--r-- | src/screens/UScreenSing.pas | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/src/screens/UScreenSing.pas b/src/screens/UScreenSing.pas index 4e977d66..f232bdc1 100644 --- a/src/screens/UScreenSing.pas +++ b/src/screens/UScreenSing.pas @@ -305,7 +305,7 @@ end; procedure TScreenSing.onShow; var - P: integer; + Index: integer; V1: boolean; V1TwoP: boolean; // position of score box in two player mode V1ThreeP: boolean; // position of score box in three player mode @@ -331,9 +331,9 @@ begin Color.B := 0; // dummy atm <- \(O.o)/? B like bummy? // add new players - for P := 0 to PlayersPlay - 1 do + for Index := 0 to PlayersPlay - 1 do begin - Scores.AddPlayer(Tex_ScoreBG[P], Color); + Scores.AddPlayer(Tex_ScoreBG[Index], Color); end; Scores.Init; // get positions for players @@ -534,8 +534,24 @@ begin // prepare and start voice-capture AudioInput.CaptureStart; - for P := 0 to High(Player) do - ClearScores(P); + // clear the scores of all players + + for Index := 0 to High(Player) do + with Player[Index] do + begin + Score := 0; + ScoreLine := 0; + ScoreGolden := 0; + + ScoreInt := 0; + ScoreLineInt := 0; + ScoreGoldenInt := 0; + ScoreTotalInt := 0; + + ScoreLast := 0; + + LastSentencePerfect := false; + end; // main text Lyrics.Clear(CurrentSong.BPM[0].BPM, CurrentSong.Resolution); @@ -598,8 +614,8 @@ begin // set position of line bonus - line bonus end // set number of empty sentences for line bonus NumEmptySentences := 0; - for P := Low(Lines[0].Line) to High(Lines[0].Line) do - if Lines[0].Line[P].TotalNotes = 0 then + for Index := Low(Lines[0].Line) to High(Lines[0].Line) do + if Lines[0].Line[Index].TotalNotes = 0 then Inc(NumEmptySentences); Log.LogStatus('End', 'onShow'); |