aboutsummaryrefslogtreecommitdiffstats
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
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 '')
-rw-r--r--Game/Code/Classes/UCatCovers.pas3
-rw-r--r--Game/Code/Classes/UCore.pas11
-rw-r--r--Game/Code/Classes/ULyrics.pas8
-rw-r--r--Game/Code/Classes/USingScores.pas5
-rw-r--r--Game/Code/Screens/UScreenScore.pas77
5 files changed, 57 insertions, 47 deletions
diff --git a/Game/Code/Classes/UCatCovers.pas b/Game/Code/Classes/UCatCovers.pas
index 36a69b8e..8e7a2f62 100644
--- a/Game/Code/Classes/UCatCovers.pas
+++ b/Game/Code/Classes/UCatCovers.pas
@@ -51,6 +51,9 @@ var
I, J: Integer;
Name, Filename, Temp: string;
begin
+ Ini := nil;
+ List := nil;
+
try
Ini := TMemIniFile.Create(CoversPath + 'covers.ini');
List := TStringlist.Create;
diff --git a/Game/Code/Classes/UCore.pas b/Game/Code/Classes/UCore.pas
index 2e8ad5b2..fe23a68e 100644
--- a/Game/Code/Classes/UCore.pas
+++ b/Game/Code/Classes/UCore.pas
@@ -479,6 +479,8 @@ end;
// If lParam = nil then get length of Moduleinfo Array. If lparam <> nil then write array of TModuleInfo to address at lparam
//-------------
function TCore.GetModuleInfo(wParam: TwParam; lParam: TlParam): integer;
+var
+ I: integer;
begin
if (Pointer(lParam) = nil) then
begin
@@ -487,12 +489,13 @@ begin
else
begin
try
- for Result := 0 to High(Modules) do
+ for I := 0 to High(Modules) do
begin
- AModuleInfo(Pointer(lParam))[Result].Name := Modules[Result].Info.Name;
- AModuleInfo(Pointer(lParam))[Result].Version := Modules[Result].Info.Version;
- AModuleInfo(Pointer(lParam))[Result].Description := Modules[Result].Info.Description;
+ AModuleInfo(Pointer(lParam))[I].Name := Modules[I].Info.Name;
+ AModuleInfo(Pointer(lParam))[I].Version := Modules[I].Info.Version;
+ AModuleInfo(Pointer(lParam))[I].Description := Modules[I].Info.Description;
end;
+ Result := Length(Modules);
except
Result := -1;
end;
diff --git a/Game/Code/Classes/ULyrics.pas b/Game/Code/Classes/ULyrics.pas
index eced2991..dd433c4d 100644
--- a/Game/Code/Classes/ULyrics.pas
+++ b/Game/Code/Classes/ULyrics.pas
@@ -530,10 +530,10 @@ procedure TLyricEngine.DrawPlayerIcon(Player: Byte; Enabled: Boolean; X, Y, Size
var
IEnabled: Byte;
begin
- case Enabled of
- True: IEnabled := 0;
- False: IEnabled := 1;
- end;
+ if Enabled then
+ IEnabled := 0
+ else
+ IEnabled := 1;
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
diff --git a/Game/Code/Classes/USingScores.pas b/Game/Code/Classes/USingScores.pas
index 645f0f6e..77d40b84 100644
--- a/Game/Code/Classes/USingScores.pas
+++ b/Game/Code/Classes/USingScores.pas
@@ -523,19 +523,20 @@ var
end;
begin
+ MaxPlayersPerScreen := 0;
For I := 1 to 6 do
begin
//If there are enough Positions -> Write to MaxPlayers
If (GetPositionCountbyPlayerCount(I) = I) then
- MaxPlayersperScreen := I
+ MaxPlayersPerScreen := I
else
Break;
end;
//Split Players to both Screen or Display on One Screen
- if (Screens = 2) and (MaxPlayersperScreen < PlayerCount) then
+ if (Screens = 2) and (MaxPlayersPerScreen < PlayerCount) then
begin
PlC[0] := PlayerCount div 2 + PlayerCount mod 2;
PlC[1] := PlayerCount div 2;
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;