aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens/UScreenScore.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-08-08 13:05:43 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-08-08 13:05:43 +0000
commit4da33e2068a8896b9fa77f25ecbbc35be09bde24 (patch)
tree87f3579211ad0e939f439e7ebc61435e9c5e6989 /Game/Code/Screens/UScreenScore.pas
parent3096103682304690d58970e41e1832d3acc34c0f (diff)
downloadusdx-4da33e2068a8896b9fa77f25ecbbc35be09bde24.tar.gz
usdx-4da33e2068a8896b9fa77f25ecbbc35be09bde24.tar.xz
usdx-4da33e2068a8896b9fa77f25ecbbc35be09bde24.zip
some warnings removed
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1236 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Screens/UScreenScore.pas')
-rw-r--r--Game/Code/Screens/UScreenScore.pas77
1 files changed, 40 insertions, 37 deletions
diff --git a/Game/Code/Screens/UScreenScore.pas b/Game/Code/Screens/UScreenScore.pas
index fdebbb8b..57c37283 100644
--- a/Game/Code/Screens/UScreenScore.pas
+++ b/Game/Code/Screens/UScreenScore.pas
@@ -135,6 +135,7 @@ uses UGraphic,
UTime,
UMain,
UIni,
+ ULog,
ULanguage;
function TScreenScore.ParseInput(PressedKey: Cardinal; CharCode: WideChar; PressedDown: Boolean): Boolean;
@@ -624,61 +625,63 @@ var
lTmp : real;
Score : integer;
-
begin
-
-
MaxHeight := Theme.Score.StaticBackLevel[PlayerNumber + ArrayStartModifier].H;
// let's get the points according to the bar we draw
// score array starts at 0, which means the score for player 1 is in score[0]
// EaseOut_Step is the actual step in the raising process, like the 20iest step of EaseOut_MaxSteps
if (BarType = 'Note') then
- begin
- Score := Player[PlayerNumber - 1].ScoreInt;
- RaiseStep := BarScore_EaseOut_Step;
- BarStartPosY := Theme.Score.StaticBackLevel[PlayerNumber + ArrayStartModifier].Y + MaxHeight;
- end;
- if (BarType = 'Line') then
- begin
- Score := Player[PlayerNumber - 1].ScoreLineInt;
- RaiseStep := BarPhrase_EaseOut_Step;
- BarStartPosY := Theme.Score.StaticBackLevel[PlayerNumber + ArrayStartModifier].Y - aPlayerScoreScreenDatas[PlayerNumber].BarScore_ActualHeight + MaxHeight;
- end;
- if (BarType = 'Golden') then
- begin
- Score := Player[PlayerNumber - 1].ScoreGoldenInt;
- RaiseStep := BarGolden_EaseOut_Step;
- BarStartPosY := Theme.Score.StaticBackLevel[PlayerNumber + ArrayStartModifier].Y - aPlayerScoreScreenDatas[PlayerNumber].BarScore_ActualHeight - aPlayerScoreScreenDatas[PlayerNumber].BarLine_ActualHeight + MaxHeight;
- end;
+ begin
+ Score := Player[PlayerNumber - 1].ScoreInt;
+ RaiseStep := BarScore_EaseOut_Step;
+ BarStartPosY := Theme.Score.StaticBackLevel[PlayerNumber + ArrayStartModifier].Y + MaxHeight;
+ end
+ else if (BarType = 'Line') then
+ begin
+ Score := Player[PlayerNumber - 1].ScoreLineInt;
+ RaiseStep := BarPhrase_EaseOut_Step;
+ BarStartPosY := Theme.Score.StaticBackLevel[PlayerNumber + ArrayStartModifier].Y - aPlayerScoreScreenDatas[PlayerNumber].BarScore_ActualHeight + MaxHeight;
+ end
+ else if (BarType = 'Golden') then
+ begin
+ Score := Player[PlayerNumber - 1].ScoreGoldenInt;
+ RaiseStep := BarGolden_EaseOut_Step;
+ BarStartPosY := Theme.Score.StaticBackLevel[PlayerNumber + ArrayStartModifier].Y - aPlayerScoreScreenDatas[PlayerNumber].BarScore_ActualHeight - aPlayerScoreScreenDatas[PlayerNumber].BarLine_ActualHeight + MaxHeight;
+ end
+ else
+ begin
+ Log.LogCritical('Unknown bar-type: ' + BarType, 'TScreenScore.EaseBarIn');
+ Exit; // suppress warnings
+ end;
// the height dependend of the score
Height2Reach := (Score / MAX_SONG_SCORE) * MaxHeight;
- if (aPlayerScoreScreenDatas[PlayerNumber].Bar_Actual_Height < Height2Reach) then
- begin
- // Check http://proto.layer51.com/d.aspx?f=400 for more info on easing functions
- // Calculate the actual step according to the maxsteps
- RaiseStep := RaiseStep / EaseOut_MaxSteps;
+ if (aPlayerScoreScreenDatas[PlayerNumber].Bar_Actual_Height < Height2Reach) then
+ begin
+ // Check http://proto.layer51.com/d.aspx?f=400 for more info on easing functions
+ // Calculate the actual step according to the maxsteps
+ RaiseStep := RaiseStep / EaseOut_MaxSteps;
- // quadratic easing out - decelerating to zero velocity
- // -end_position * current_time * ( current_time - 2 ) + start_postion
- lTmp := (-Height2Reach * RaiseStep * (RaiseStep - 20) + BarStartPosY);
+ // quadratic easing out - decelerating to zero velocity
+ // -end_position * current_time * ( current_time - 2 ) + start_postion
+ lTmp := (-Height2Reach * RaiseStep * (RaiseStep - 20) + BarStartPosY);
- if ( RaiseSmoothness > 0 ) AND ( lTmp > 0 ) then
- NewHeight := lTmp / RaiseSmoothness;
+ if ( RaiseSmoothness > 0 ) and ( lTmp > 0 ) then
+ NewHeight := lTmp / RaiseSmoothness;
- end
- else
- NewHeight := Height2Reach;
+ end
+ else
+ NewHeight := Height2Reach;
DrawBar(BarType, PlayerNumber, BarStartPosY, NewHeight);
if (BarType = 'Note') then
- aPlayerScoreScreenDatas[PlayerNumber].BarScore_ActualHeight := NewHeight;
- if (BarType = 'Line') then
- aPlayerScoreScreenDatas[PlayerNumber].BarLine_ActualHeight := NewHeight;
- if (BarType = 'Golden') then
+ aPlayerScoreScreenDatas[PlayerNumber].BarScore_ActualHeight := NewHeight
+ else if (BarType = 'Line') then
+ aPlayerScoreScreenDatas[PlayerNumber].BarLine_ActualHeight := NewHeight
+ else if (BarType = 'Golden') then
aPlayerScoreScreenDatas[PlayerNumber].BarGolden_ActualHeight := NewHeight;
end;