diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-08-08 13:05:43 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-08-08 13:05:43 +0000 |
commit | 4da33e2068a8896b9fa77f25ecbbc35be09bde24 (patch) | |
tree | 87f3579211ad0e939f439e7ebc61435e9c5e6989 /Game/Code/Classes | |
parent | 3096103682304690d58970e41e1832d3acc34c0f (diff) | |
download | usdx-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/Classes')
-rw-r--r-- | Game/Code/Classes/UCatCovers.pas | 3 | ||||
-rw-r--r-- | Game/Code/Classes/UCore.pas | 11 | ||||
-rw-r--r-- | Game/Code/Classes/ULyrics.pas | 8 | ||||
-rw-r--r-- | Game/Code/Classes/USingScores.pas | 5 |
4 files changed, 17 insertions, 10 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; |