aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/base/UMain.pas20
-rw-r--r--src/screens/UScreenSing.pas30
2 files changed, 23 insertions, 27 deletions
diff --git a/src/base/UMain.pas b/src/base/UMain.pas
index ededb6e5..7e935c70 100644
--- a/src/base/UMain.pas
+++ b/src/base/UMain.pas
@@ -134,7 +134,6 @@ procedure NewBeatDetect(Screen: TScreenSing); // executed when on then new beat
procedure NewNote(Screen: TScreenSing); // detect note
function GetMidBeat(Time: real): real;
function GetTimeFromBeat(Beat: integer): real;
-procedure ClearScores(PlayerNum: integer);
type
TMainThreadExecProc = procedure(Data: Pointer);
@@ -1053,25 +1052,6 @@ begin
end;
-procedure ClearScores(PlayerNum: integer);
-begin
- with Player[PlayerNum] do
- begin
- Score := 0;
- ScoreLine := 0;
- ScoreGolden := 0;
-
- ScoreInt := 0;
- ScoreLineInt := 0;
- ScoreGoldenInt := 0;
- ScoreTotalInt := 0;
-
- ScoreLast := 0;
-
- LastSentencePerfect := false;
- end;
-end;
-
procedure AddSpecialPath(var PathList: TStringList; const Path: string);
var
I: integer;
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');