aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes
diff options
context:
space:
mode:
Diffstat (limited to 'Game/Code/Classes')
-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
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;