aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens/UScreenSing.pas
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-03-29 12:40:11 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-03-29 12:40:11 +0000
commit8d591b8344e0cb87e1a987961b3790fa26d323a6 (patch)
treeb18a29024b31aa4d04283b6692b116c539ba6bc1 /Game/Code/Screens/UScreenSing.pas
parent92f5f8a835d4a5e6d68bd64057bd5198bf5ca63d (diff)
downloadusdx-8d591b8344e0cb87e1a987961b3790fa26d323a6.tar.gz
usdx-8d591b8344e0cb87e1a987961b3790fa26d323a6.tar.xz
usdx-8d591b8344e0cb87e1a987961b3790fa26d323a6.zip
Fixed Some Bugs in JumpTo Screen:
Now plays correct music Space Bug is gone Added onSentenceChange Procedure to ScreenSing git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@48 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Screens/UScreenSing.pas116
1 files changed, 62 insertions, 54 deletions
diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas
index 7b96e273..201b97fa 100644
--- a/Game/Code/Screens/UScreenSing.pas
+++ b/Game/Code/Screens/UScreenSing.pas
@@ -50,6 +50,8 @@ type
//OnSentenceEnd for LineBonus + Singbar
procedure onSentenceEnd(S: Cardinal);
+ //OnSentenceChange (for Golden Notes)
+ procedure onSentenceChange(S: Cardinal);
end;
implementation
@@ -1055,73 +1057,73 @@ A: Real;
B: integer; //Max Points for Notes
begin
-//Check for Empty Sentence
-if (Czesci[0].Czesc[S].TotalNotes<=0) then
- exit;
+ //Check for Empty Sentence
+ if (Czesci[0].Czesc[S].TotalNotes<=0) then
+ exit;
-//Set Max Note Points
-if (Ini.LineBonus > 0) then
- B := 9000
-else
- B := 10000;
+ //Set Max Note Points
+ if (Ini.LineBonus > 0) then
+ B := 9000
+ else
+ B := 10000;
-for I := 0 to High(Player) do begin
- A := Player[I].Score + Player[I].ScoreGolden - Player[I].ScoreLast + 2;
+ for I := 0 to High(Player) do begin
+ A := Player[I].Score + Player[I].ScoreGolden - Player[I].ScoreLast + 2;
- //SingBar Mod
- If ({(Ini.Oscilloscope = 2) and }(Czesci[0].Czesc[S].TotalNotes>0)) then
- begin
- Player[I].ScorePercentTarget := Player[I].ScorePercentTarget + floor(A / (B * Czesci[0].Czesc[S].TotalNotes / Czesci[0].Wartosc) * 40 - 26);
- if Player[I].ScorePercentTarget < 0 then Player[I].ScorePercentTarget := 0;
- if Player[I].ScorePercentTarget > 99 then Player[I].ScorePercentTarget := 99;
+ //SingBar Mod
+ If ({(Ini.Oscilloscope = 2) and }(Czesci[0].Czesc[S].TotalNotes>0)) then
+ begin
+ Player[I].ScorePercentTarget := Player[I].ScorePercentTarget + floor(A / (B * Czesci[0].Czesc[S].TotalNotes / Czesci[0].Wartosc) * 40 - 26);
+ if Player[I].ScorePercentTarget < 0 then Player[I].ScorePercentTarget := 0;
+ if Player[I].ScorePercentTarget > 99 then Player[I].ScorePercentTarget := 99;
//end Singbar Mod
- end;
+ end;
//PhrasenBonus - Line Bonus Mod
- If (Ini.LineBonus > 0) then
- begin
-
- //Generate Steps 0 to 8
- A := Floor(A / (B * Czesci[0].Czesc[S].TotalNotes / Czesci[0].Wartosc) * 8);
- if A >= 8 then
- Player[I].LineBonus_Text := Language.Translate('LINEBONUS_PERFECT')
- else if (A = 6) or (A = 7) then
- Player[I].LineBonus_Text := Language.Translate('LINEBONUS_BETTER')
- else if A = 5 then
- Player[I].LineBonus_Text := Language.Translate('LINEBONUS_GOOD')
- else if (A = 3) or (A = 4) then
- Player[I].LineBonus_Text := Language.Translate('LINEBONUS_NORMAL')
- else if A = 2 then
- Player[I].LineBonus_Text := Language.Translate('LINEBONUS_BAD')
- else
- Player[I].LineBonus_Text := Language.Translate('LINEBONUS_WORST');
-
- //PhrasenBonus give Points
- Player[I].ScoreLine := Player[I].ScoreLine + (1000 / (Length(Czesci[0].Czesc) - NumEmptySentences) * A / 8);
- Player[I].ScoreLineI := Round(Player[I].ScoreLine / 10) * 10;
- //Update Total Score
- Player[I].ScoreTotalI := Player[I].ScoreI + Player[I].ScoreGoldenI + Player[I].ScoreLineI;
-
- //Color
- Player[I].LineBonus_Color.B := 0;
- Player[I].LineBonus_Color.R := (8-A)/8;
- Player[I].LineBonus_Color.G := A/10;
-
- Player[I].LineBonus_PosX := Player[I].LineBonus_StartX;
- Player[I].LineBonus_PosY := Player[I].LineBonus_StartY;
- Player[I].LineBonus_Alpha := 0.92;
- Player[I].LineBonus_Visible := True;
+ If (Ini.LineBonus > 0) then
+ begin
+
+ //Generate Steps 0 to 8
+ A := Floor(A / (B * Czesci[0].Czesc[S].TotalNotes / Czesci[0].Wartosc) * 8);
+ if A >= 8 then
+ Player[I].LineBonus_Text := Language.Translate('LINEBONUS_PERFECT')
+ else if (A = 6) or (A = 7) then
+ Player[I].LineBonus_Text := Language.Translate('LINEBONUS_BETTER')
+ else if A = 5 then
+ Player[I].LineBonus_Text := Language.Translate('LINEBONUS_GOOD')
+ else if (A = 3) or (A = 4) then
+ Player[I].LineBonus_Text := Language.Translate('LINEBONUS_NORMAL')
+ else if A = 2 then
+ Player[I].LineBonus_Text := Language.Translate('LINEBONUS_BAD')
+ else
+ Player[I].LineBonus_Text := Language.Translate('LINEBONUS_WORST');
+
+ //PhrasenBonus give Points
+ Player[I].ScoreLine := Player[I].ScoreLine + (1000 / (Length(Czesci[0].Czesc) - NumEmptySentences) * A / 8);
+ Player[I].ScoreLineI := Round(Player[I].ScoreLine / 10) * 10;
+ //Update Total Score
+ Player[I].ScoreTotalI := Player[I].ScoreI + Player[I].ScoreGoldenI + Player[I].ScoreLineI;
+
+ //Color
+ Player[I].LineBonus_Color.B := 0;
+ Player[I].LineBonus_Color.R := (8-A)/8;
+ Player[I].LineBonus_Color.G := A/10;
+
+ Player[I].LineBonus_PosX := Player[I].LineBonus_StartX;
+ Player[I].LineBonus_PosY := Player[I].LineBonus_StartY;
+ Player[I].LineBonus_Alpha := 0.92;
+ Player[I].LineBonus_Visible := True;
- end;
+ end;
-//Refresh LastScore
-Player[I].ScoreLast := Player[I].Score + Player[I].ScoreGolden;
+ //Refresh LastScore
+ Player[I].ScoreLast := Player[I].Score + Player[I].ScoreGolden;
-end;
+ end;
//PhrasenBonus - Line Bonus Mod End// }
//GoldenStarsTwinkle Mod
@@ -1129,4 +1131,10 @@ end;
//GoldenStarsTwinkle Mod End
end;
+//Called on Sentence Change S= New Current Sentence
+procedure TScreenSing.onSentenceChange(S: Cardinal);
+begin
+ //Dummy
+end;
+
end.