aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
authormogguh <mogguh@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-03-08 19:25:09 +0000
committermogguh <mogguh@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-03-08 19:25:09 +0000
commitbf3e7b8550e40daeb5db5b75f49e784109fbc145 (patch)
tree60616b528e3c55bbdb9d170efa4457f9e841ad1e /Game
parent565617fa1554ef7d2aeee4d5d0089b67f820544a (diff)
downloadusdx-bf3e7b8550e40daeb5db5b75f49e784109fbc145.tar.gz
usdx-bf3e7b8550e40daeb5db5b75f49e784109fbc145.tar.xz
usdx-bf3e7b8550e40daeb5db5b75f49e784109fbc145.zip
Removed GeTickCount in favour to multiplatform available SDL_GetTicks, added new constant - this should help to make the animations more serious
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@939 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Screens/UScreenScore.pas26
1 files changed, 16 insertions, 10 deletions
diff --git a/Game/Code/Screens/UScreenScore.pas b/Game/Code/Screens/UScreenScore.pas
index ff0c87e0..1473f897 100644
--- a/Game/Code/Screens/UScreenScore.pas
+++ b/Game/Code/Screens/UScreenScore.pas
@@ -28,6 +28,8 @@ const
EaseOut_MaxSteps : real = 40; // that's the speed of the bars (10 is fast | 100 is slower)
+ BarRaiseSpeed : integer = 100; // This is given in MilliSeconds; -> one frame every 100 milliseconds, IE 10 frames per second
+
type
TPlayerScoreScreenTexture = record // holds all colorized textures for up to 6 players
//Bar textures
@@ -53,7 +55,7 @@ type
BarGolden_ActualHeight : Real;
end;
- TPlayerScoreRatingPics = record // a fine array of the rating pictures
+ TPlayerScoreRatingPics = record // a fine array of the rating pictures
RatePic_X :Real;
RatePic_Y :Real;
RatePic_Height :Real;
@@ -253,13 +255,13 @@ end;
procedure TScreenScore.onShow;
var
P: integer; // player
- PP: integer; // another player variable
+ PP: integer; // players_play
S: string;
I: integer;
Lev: real;
Skip: integer;
V: array[1..6] of boolean; // visibility array
- MaxH: real; // maximum height of score bar
+ MaxH: real; // maximum height of score bar
Wsp: real;
ArrayStartModifier :integer;
begin
@@ -451,7 +453,7 @@ begin
end;
}
inherited Draw;
- {*
+
player[0].ScoreI := 7000;
player[0].ScoreLineI := 2000;
player[0].ScoreGoldenI := 1000;
@@ -461,14 +463,18 @@ inherited Draw;
player[1].ScoreLineI := 1100;
player[1].ScoreGoldenI := 900;
player[1].ScoreTotalI := 4500;
- *}
// Let's arise the bars
- CurrentTime := GetTickCount div 33; // TODO: use cross-plattform SDL_GetTicks() instead
- if ((CurrentTime <> OldTime) and ShowFinish ) then
- begin
- OldTime := CurrentTime;
+
+
+// Ask SDL for the time in milliseconds
+CurrentTime := SDL_GetTicks();
+
+if (((CurrentTime - OldTime) > BarRaiseSpeed) and ShowFinish ) then
+begin
+// set next frame as current frame
+OldTime := CurrentTime;
for PlayerCounter := 1 to PlayersPlay do
begin
@@ -654,7 +660,7 @@ begin
end;
end;
{{$ELSE}{
- case (Player[P].ScoreTotalI-1) of
+ case (Player[Playernumber-1].ScoreTotalI-1) of
0..2000: Text[TextScore[fu]].Text := 'Tone Deaf';
2010..4000: Text[TextScore[fu]].Text := 'Amateur';
4010..6000: Text[TextScore[fu]].Text := 'Rising Star';