aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-03-23 07:25:11 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-03-23 07:25:11 +0000
commit33e2d48448f358f165f910a047d901772e6e5e81 (patch)
tree0eb9a9650ccb029533aeeea435ca96e75b578be7
parent53ffb1c4bfc26bf65fdca79a8e6d20a1e2ba846d (diff)
downloadusdx-33e2d48448f358f165f910a047d901772e6e5e81.tar.gz
usdx-33e2d48448f358f165f910a047d901772e6e5e81.tar.xz
usdx-33e2d48448f358f165f910a047d901772e6e5e81.zip
cosmetics
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1650 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r--plugins/5000Points/Until5000.dpr106
-rw-r--r--plugins/Blind/Blind.dpr103
-rw-r--r--plugins/Don't_Get_Worse/Hold_The_Line.dpr198
-rw-r--r--plugins/Duell/Duell.dpr44
-rw-r--r--plugins/Team_Duell/TeamDuell.dpr290
5 files changed, 391 insertions, 350 deletions
diff --git a/plugins/5000Points/Until5000.dpr b/plugins/5000Points/Until5000.dpr
index df79bfe2..83bc1007 100644
--- a/plugins/5000Points/Until5000.dpr
+++ b/plugins/5000Points/Until5000.dpr
@@ -7,81 +7,87 @@ library Until5000;
uses
ModiSDK in '..\SDK\ModiSDK.pas';
-//Gave the Plugins Info
+// give the plugin's info
procedure PluginInfo (var Info: TPluginInfo); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
begin
- Info.Name := 'PLUGIN_UNTIL5000_NAME';
+ Info.Name := 'PLUGIN_UNTIL5000_NAME';
Info.Creator := 'Whiteshark';
Info.PluginDesc := 'PLUGIN_UNTIL5000_DESC';
- //Set to Party Modi Plugin
- Info.Typ := 8;
+ // set to party modus plugin
+ Info.Typ := 8;
Info.NumPlayers := 31;
- //Options
- Info.LoadSong := True; //Whether or not a Song should be Loaded
- //Only When Song is Loaded:
- Info.ShowScore := True; //Whether or not the Score should be shown
- Info.ShowNotes := True; //Whether the Note Lines should be displayed
- Info.LoadVideo := True; //Should the Video be loaded ?
- Info.LoadBack := True; //Should the Background be loaded ?
-
- Info.BGShowFull := False; //Whether the Background or the Video should be shown Fullsize
- Info.BGShowFull_O := True; //Whether the Background or the Video should be shown Fullsize
-
- Info.ShowRateBar:= True; //Whether the Bar that shows how good the player was sould be displayed
- Info.ShowRateBar_O := True; //Load from Ini whether the Bar should be Displayed
-
- Info.EnLineBonus := False; //Whether LineBonus Should be enabled
- Info.EnLineBonus_O := True; //Load from Ini whether LineBonus Should be enabled
-
- //Options even when song is Not loaded
- Info.ShowBars := False; //Whether the White Bars on Top and Bottom should be Drawn
- Info.TeamModeOnly := False; //If True the Plugin can only be Played in Team Mode
- Info.GetSoundData := False; //If True the RData Procedure is called when new SoundData is available
- Info.Dummy := False; //Should be Set to False... for Updateing Plugin Interface
+ // options
+ Info.LoadSong := true; // whether or not a song should be loaded
+ // only when song is loaded:
+ Info.ShowScore := true; // whether or not the score should be shown
+ Info.ShowNotes := true; // whether the note lines should be displayed
+ Info.LoadVideo := true; // should the video be loaded?
+ Info.LoadBack := true; // should the background be loaded?
+
+ Info.BGShowFull := false; // whether the background or the video should be shown full size
+ Info.BGShowFull_O := true; // whether the background or the video should be shown full size
+
+ Info.ShowRateBar := true; // whether the bar that shows how good the player was should be displayed
+ Info.ShowRateBar_O := true; // load from ini whether the bar should be displayed
+
+ Info.EnLineBonus := false; // whether line bonus should be enabled
+ Info.EnLineBonus_O := true; // load from ini whether line bonus should be enabled
+
+ // options even when song is not loaded
+ Info.ShowBars := false; // whether the white bars on top and bottom should be drawn
+ Info.TeamModeOnly := false; // if true the plugin can only be played in team mode
+ Info.GetSoundData := false; // if true the rdata procedure is called when new sound data is available
+ Info.Dummy := false; // should be set to false... for updateing plugin interface
end;
-//Executed on Game Start //If True Game begins, else Failure
-function Init (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const Methods: TMethodRec): boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+// executed on game start; if true game begins, else failure
+function Init (const TeamInfo: TTeamInfo;
+ var Playerinfo: TPlayerinfo;
+ const Sentences: TSentences;
+ const Methods: TMethodRec)
+ : boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
begin
-Result := True;
+ Result := true;
end;
-//Executed everytime the Screen is Drawed //If False The Game finishes
-function Draw (var Playerinfo: TPlayerinfo; const CurSentence: Cardinal): boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+// executed everytime the screen is drawn; if false the game finishes
+function Draw (var Playerinfo: TPlayerinfo;
+ const CurSentence: cardinal)
+ : boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
var
-I: Integer;
+ Index: integer;
begin
-Result := False;
- for I := 0 to PlayerInfo.NumPlayers-1 do
+ Result := false;
+ for Index := 0 to PlayerInfo.NumPlayers-1 do
begin
- PlayerInfo.Playerinfo[I].Bar := PlayerInfo.Playerinfo[I].Score div 50;
- PlayerInfo.Playerinfo[I].Percentage := PlayerInfo.Playerinfo[I].Bar;
- if (PlayerInfo.Playerinfo[I].Score >=5000) then
+ PlayerInfo.Playerinfo[Index].Bar := PlayerInfo.Playerinfo[Index].Score div 50;
+ PlayerInfo.Playerinfo[Index].Percentage := PlayerInfo.Playerinfo[Index].Bar;
+ if (PlayerInfo.Playerinfo[Index].Score >= 5000) then
Exit;
end;
-Result := True;
+ Result := true;
end;
-//Is Executed on Finish, Returns the Playernum of the Winner
+// is executed on finish, returns the player number of the winner
function Finish (var Playerinfo: TPlayerinfo): byte; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
var
- I:Integer;
+ Index: integer;
begin
-Result := 0;
-for I := 0 to PlayerInfo.NumPlayers-1 do
+ Result := 0;
+ for Index := 0 to PlayerInfo.NumPlayers-1 do
begin
- if (PlayerInfo.Playerinfo[I].Score >=5000) then
+ if (PlayerInfo.Playerinfo[Index].Score >= 5000) then
begin
- Case I of
- 0: Result := Result OR 1;
- 1: Result := Result OR 2;
- 2: Result := Result OR 4;
- 3: Result := Result OR 8;
- 4: Result := Result OR 16;
- 5: Result := Result OR 32;
+ case Index of
+ 0: Result := Result or 1;
+ 1: Result := Result or 2;
+ 2: Result := Result or 4;
+ 3: Result := Result or 8;
+ 4: Result := Result or 16;
+ 5: Result := Result or 32;
end;
end;
end;
diff --git a/plugins/Blind/Blind.dpr b/plugins/Blind/Blind.dpr
index 79d87031..534767f3 100644
--- a/plugins/Blind/Blind.dpr
+++ b/plugins/Blind/Blind.dpr
@@ -7,72 +7,75 @@ library Blind;
uses
ModiSDK in '..\SDK\ModiSDK.pas';
-//Gave the Plugins Info
+// give the plugin's info
procedure PluginInfo (var Info: TPluginInfo); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
begin
- Info.Name := 'PLUGIN_BLIND_NAME';
-
+ Info.Name := 'PLUGIN_BLIND_NAME';
Info.Creator := 'Whiteshark';
Info.PluginDesc := 'PLUGIN_BLIND_DESC';
- //Set to Party Modi Plugin
- Info.Typ := 8;
+ // set to party modus plugin
+ Info.Typ := 8;
Info.NumPlayers := 31;
- //Options
- Info.LoadSong := True; //Whether or not a Song should be Loaded
- //Only When Song is Loaded:
- Info.ShowScore := True; //Whether or not the Score should be shown
- Info.ShowNotes := False; //Whether the Note Lines should be displayed
- Info.LoadVideo := True; //Should the Video be loaded ?
- Info.LoadBack := True; //Should the Background be loaded ?
+ // options
+ Info.LoadSong := true; // whether or not a song should be loaded
+ // only when song is loaded:
+ Info.ShowScore := true; // whether or not the score should be shown
+ Info.ShowNotes := false; // whether the note lines should be displayed
+ Info.LoadVideo := true; // should the video be loaded?
+ Info.LoadBack := true; // should the background be loaded?
- Info.BGShowFull := False; //Whether the Background or the Video should be shown Fullsize
- Info.BGShowFull_O := True; //Whether the Background or the Video should be shown Fullsize
+ Info.BGShowFull := false; // whether the background or the video should be shown in full size
+ Info.BGShowFull_O := true; // whether the background or the video should be shown in full size
- Info.ShowRateBar:= False; //Whether the Bar that shows how good the player was sould be displayed
- Info.ShowRateBar_O := True; //Load from Ini whether the Bar should be Displayed
+ Info.ShowRateBar := false; // whether the bar that shows how good the player was should be displayed
+ Info.ShowRateBar_O := true; // load from ini whether the bar should be displayed
- Info.EnLineBonus := False; //Whether LineBonus Should be enabled
- Info.EnLineBonus_O := True; //Load from Ini whether LineBonus Should be enabled
+ Info.EnLineBonus := false; // whether line bonus should be enabled
+ Info.EnLineBonus_O := true; // load from ini whether line bonus should be enabled
- //Options even when song is Not loaded
- Info.ShowBars := False; //Whether the White Bars on Top and Bottom should be Drawn
- Info.TeamModeOnly := False; //If True the Plugin can only be Played in Team Mode
- Info.GetSoundData := False; //If True the RData Procedure is called when new SoundData is available
- Info.Dummy := False; //Should be Set to False... for Updateing Plugin Interface
+ // options even when song is not loaded
+ Info.ShowBars := false; // whether the white bars on top and bottom should be drawn
+ Info.TeamModeOnly := false; // if true the plugin can only be played in team mode
+ Info.GetSoundData := false; // if true the rdata procedure is called when new sound data is available
+ Info.Dummy := false; // should be set to false... for updating plugin interface
end;
-//Executed on Game Start //If True Game begins, else Failure
-function Init (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const Methods: TMethodRec): boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+// executed on game start. if true game begins, else failure
+function Init (const TeamInfo: TTeamInfo;
+ var Playerinfo: TPlayerinfo;
+ const Sentences: TSentences;
+ const Methods: TMethodRec)
+ : boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
begin
-Result := True;
+ Result := true;
end;
-//Executed everytime the Screen is Drawed //If False The Game finishes
-function Draw (var Playerinfo: TPlayerinfo; const CurSentence: Cardinal): boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-var
-I: Integer;
+// executed everytime the screen is drawed. if false the game finishes
+function Draw (var Playerinfo: TPlayerinfo;
+ const CurSentence: cardinal)
+ : boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
begin
-Result := True;
+ Result := true;
end;
-//Is Executed on Finish, Returns the Playernum of the Winner
+// is executed on finish, returns the player number of the winner
function Finish (var Playerinfo: TPlayerinfo): byte; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
var
- I:Integer;
- MaxScore: Word;
+ Index: integer;
+ MaxScore: word;
begin
- Result := 0;
+ Result := 0;
MaxScore := 0;
- for I := 0 to PlayerInfo.NumPlayers-1 do
+ for Index := 0 to PlayerInfo.NumPlayers-1 do
begin
- PlayerInfo.Playerinfo[I].Percentage := PlayerInfo.Playerinfo[I].Score div 9999;
- if (PlayerInfo.Playerinfo[I].Score > MaxScore) then
+ PlayerInfo.Playerinfo[Index].Percentage := PlayerInfo.Playerinfo[Index].Score div 9999;
+ if (PlayerInfo.Playerinfo[Index].Score > MaxScore) then
begin
- MaxScore := PlayerInfo.Playerinfo[I].Score;
- Case I of
+ MaxScore := PlayerInfo.Playerinfo[Index].Score;
+ case Index of
0: Result := 1;
1: Result := 2;
2: Result := 4;
@@ -81,20 +84,20 @@ begin
5: Result := 32;
end;
end
- else if (PlayerInfo.Playerinfo[I].Score = MaxScore) AND (PlayerInfo.Playerinfo[I].Score <> 0) then
+ else if (PlayerInfo.Playerinfo[Index].Score = MaxScore) and (PlayerInfo.Playerinfo[Index].Score <> 0) then
begin
- Case I of
- 0: Result := Result OR 1;
- 1: Result := Result OR 2;
- 2: Result := Result OR 4;
- 3: Result := Result OR 8;
- 4: Result := Result OR 16;
- 5: Result := Result OR 32;
+ case Index of
+ 0: Result := Result or 1;
+ 1: Result := Result or 2;
+ 2: Result := Result or 4;
+ 3: Result := Result or 8;
+ 4: Result := Result or 16;
+ 5: Result := Result or 32;
end;
end;
end;
- //If everybody has 0 Points nobody Wins
- If (MaxScore = 0) then
+ // if everybody has 0 points nobody wins
+ if (MaxScore = 0) then
Result := 0;
end;
diff --git a/plugins/Don't_Get_Worse/Hold_The_Line.dpr b/plugins/Don't_Get_Worse/Hold_The_Line.dpr
index 8bfb292c..ca59cbdb 100644
--- a/plugins/Don't_Get_Worse/Hold_The_Line.dpr
+++ b/plugins/Don't_Get_Worse/Hold_The_Line.dpr
@@ -5,64 +5,68 @@ library Hold_The_Line;
{$ENDIF}
uses
- ModiSDK in '..\SDK\ModiSDK.pas',
- StrUtils in '..\SDK\StrUtils.pas',
+ ModiSDK in '..\SDK\ModiSDK.pas',
+ StrUtils in '..\SDK\StrUtils.pas',
sdl in '..\..\src\lib\JEDI-SDL\SDL\Pas\sdl.pas',
moduleloader in '..\..\src\lib\JEDI-SDL\SDL\Pas\moduleloader.pas',
gl in '..\..\src\lib\JEDI-SDL\OpenGL\Pas\gl.pas';
var
- PointerTex: TSmallTexture;
- CountSentences: Cardinal;
- Limit: Byte;
- MethodRec: TMethodRec;
- Frame: Integer;
- PlayerTimes: array[0..5] of Integer;
- LastTick: Cardinal;
- PointerVisible: Boolean;
-
- DismissedSound: Cardinal;
-
-//Gave the Plugins Info
-procedure PluginInfo (var Info: TPluginInfo); stdcall;
+ PointerTex: TSmallTexture;
+ CountSentences: cardinal;
+ Limit: byte;
+ MethodRec: TMethodRec;
+ Frame: integer;
+ PlayerTimes: array[0..5] of integer;
+ LastTick: cardinal;
+ PointerVisible: boolean;
+
+ DismissedSound: cardinal;
+
+// Gave the Plugins Info
+procedure PluginInfo (var Info: TPluginInfo); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
begin
- Info.Name := 'PLUGIN_HDL_NAME';
+ Info.Name := 'PLUGIN_HDL_NAME';
Info.Creator := 'Whiteshark';
Info.PluginDesc := 'PLUGIN_HDL_DESC';
- //Set to Party Modi Plugin
- Info.Typ := 8;
+ // Set to Party Modi Plugin
+ Info.Typ := 8;
Info.NumPlayers := 31;
- //Options
- Info.LoadSong := True; //Whether or not a Song should be Loaded
- //Only When Song is Loaded:
- Info.ShowScore := True; //Whether or not the Score should be shown
- Info.ShowNotes := True; //Whether the Note Lines should be displayed
- Info.LoadVideo := True; //Should the Video be loaded ?
- Info.LoadBack := True; //Should the Background be loaded ?
-
- Info.BGShowFull := False; //Whether the Background or the Video should be shown Fullsize
- Info.BGShowFull_O := True; //Whether the Background or the Video should be shown Fullsize
-
- Info.ShowRateBar:= True; //Whether the Bar that shows how good the player was sould be displayed
- Info.ShowRateBar_O := False; //Load from Ini whether the Bar should be Displayed
-
- Info.EnLineBonus := False; //Whether LineBonus Should be enabled
- Info.EnLineBonus_O := True; //Load from Ini whether LineBonus Should be enabled
-
- //Options even when song is Not loaded
- Info.ShowBars := False; //Whether the White Bars on Top and Bottom should be Drawn
- Info.TeamModeOnly := False; //If True the Plugin can only be Played in Team Mode
- Info.GetSoundData := False; //If True the RData Procedure is called when new SoundData is available
- Info.Dummy := False; //Should be Set to False... for Updateing Plugin Interface
+ // Options
+ Info.LoadSong := true; // Whether or not a Song should be Loaded
+ // Only When Song is Loaded:
+ Info.ShowScore := true; // Whether or not the Score should be shown
+ Info.ShowNotes := true; // Whether the Note Lines should be displayed
+ Info.LoadVideo := true; // Should the Video be loaded?
+ Info.LoadBack := true; // Should the Background be loaded?
+
+ Info.BGShowFull := false; // Whether the Background or the Video should be shown Full size
+ Info.BGShowFull_O := true; // Whether the Background or the Video should be shown Full size
+
+ Info.ShowRateBar := true; // Whether the Bar that shows how good the player was should be displayed
+ Info.ShowRateBar_O := false; // Load from Ini whether the Bar should be Displayed
+
+ Info.EnLineBonus := false; // Whether LineBonus Should be enabled
+ Info.EnLineBonus_O := true; // Load from Ini whether LineBonus Should be enabled
+
+ // Options even when song is Not loaded
+ Info.ShowBars := false; // Whether the White Bars on Top and Bottom should be Drawn
+ Info.TeamModeOnly := false; // if true the Plugin can only be Played in Team Mode
+ Info.GetSoundData := false; // if true the RData Procedure is called when new Sound Data is available
+ Info.Dummy := false; // Should be Set to false... for Updating Plugin Interface
end;
-//Executed on Game Start //If True Game begins, else Failure
-function Init (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const Methods: TMethodRec): boolean; stdcall;
+// Executed on Game Start; if true Game begins, else Failure
+function Init (const TeamInfo: TTeamInfo;
+ var Playerinfo: TPlayerinfo;
+ const Sentences: TSentences;
+ const Methods: TMethodRec)
+ : boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
var
- I: Integer;
+ Index: integer;
Texname: PChar;
TexType: TTextureType;
begin
@@ -82,43 +86,44 @@ begin
MethodRec := Methods;
- for I := 0 to PlayerInfo.NumPlayers-1 do
+ for Index := 0 to PlayerInfo.NumPlayers-1 do
begin
- PlayerInfo.Playerinfo[I].Enabled := True;
- PlayerInfo.Playerinfo[I].Percentage := 100;
- PlayerTimes[I] := 0;
+ PlayerInfo.Playerinfo[Index].Enabled := true;
+ PlayerInfo.Playerinfo[Index].Percentage := 100;
+ PlayerTimes[Index] := 0;
end;
- Result := True;
+ Result := true;
end;
-//Executed everytime the Screen is Drawed //If False The Game finishes
-function Draw (var Playerinfo: TPlayerinfo; const CurSentence: Cardinal): boolean; stdcall;
+function Draw (var Playerinfo: TPlayerinfo;
+ const CurSentence: cardinal)
+ : boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
var
- I: Integer;
- L: Byte;
- C: Byte;
- Text: PChar;
- Blink: Boolean;
- tick: Cardinal;
+ Index: integer;
+ L: byte;
+ C: byte;
+ Text: PChar;
+ Blink: boolean;
+ Tick: cardinal;
begin
- //Aktivate Blink
- If (CurSentence = CountSentences div 5 * 2 - 1) OR (CurSentence = CountSentences div 3 * 2 - 1) then
+ // activate blink
+ if (CurSentence = CountSentences div 5 * 2 - 1) or (CurSentence = CountSentences div 3 * 2 - 1) then
begin
Tick := SDL_GetTicks() div 400;
- If (Tick <> LastTick) then
+ if (Tick <> LastTick) then
begin
LastTick := Tick;
- PointerVisible := Not PointerVisible;
+ PointerVisible := not PointerVisible;
end;
end
else
- PointerVisible := True;
+ PointerVisible := true;
- //Inc Limit
- if (Limit = 0) And (CurSentence >= CountSentences div 5 * 2) then
+ // inc limit
+ if (Limit = 0) and (CurSentence >= CountSentences div 5 * 2) then
Inc(Limit)
- else if (Limit = 1) And (CurSentence >= CountSentences div 3 * 2) then
+ else if (Limit = 1) and (CurSentence >= CountSentences div 3 * 2) then
Inc(Limit);
case Limit of
@@ -129,22 +134,22 @@ begin
C:= 0;
- Result := True;
+ Result := true;
- for I := 0 to PlayerInfo.NumPlayers-1 do
+ for Index := 0 to PlayerInfo.NumPlayers-1 do
begin
- if PlayerInfo.Playerinfo[I].Enabled then
+ if PlayerInfo.Playerinfo[Index].Enabled then
begin
- if PlayerInfo.Playerinfo[I].Bar < L then
+ if PlayerInfo.Playerinfo[Index].Bar < L then
begin
- PlayerInfo.Playerinfo[I].Enabled := False;
+ PlayerInfo.Playerinfo[Index].Enabled := false;
Inc(C);
- PlayerTimes[I] := CurSentence; //Save Time of Dismission
- //PlaySound
+ PlayerTimes[Index] := CurSentence; // Save Time of Dismission
+ // PlaySound
MethodRec.PlaySound (DismissedSound);
end;
- //Draw Pointer
+ // Draw Pointer
if (PointerVisible) then
begin
glColor4f (0.2, 0.8, 0.1, 1);
@@ -156,10 +161,10 @@ begin
glBindTexture(GL_TEXTURE_2D, PointerTex.TexNum);
glBegin(GL_QUADS);
- glTexCoord2f(1/32, 0); glVertex2f(PlayerInfo.Playerinfo[I].PosX + L - 3, PlayerInfo.Playerinfo[I].PosY - 4);
- glTexCoord2f(1/32, 1); glVertex2f(PlayerInfo.Playerinfo[I].PosX + L - 3, PlayerInfo.Playerinfo[I].PosY + 12);
- glTexCoord2f(31/32, 1); glVertex2f(PlayerInfo.Playerinfo[I].PosX+ L + 3, PlayerInfo.Playerinfo[I].PosY + 12);
- glTexCoord2f(31/32, 0); glVertex2f(PlayerInfo.Playerinfo[I].PosX+ L + 3, PlayerInfo.Playerinfo[I].PosY - 4);
+ glTexCoord2f(1/32, 0); glVertex2f(PlayerInfo.Playerinfo[Index].PosX + L - 3, PlayerInfo.Playerinfo[Index].PosY - 4);
+ glTexCoord2f(1/32, 1); glVertex2f(PlayerInfo.Playerinfo[Index].PosX + L - 3, PlayerInfo.Playerinfo[Index].PosY + 12);
+ glTexCoord2f(31/32, 1); glVertex2f(PlayerInfo.Playerinfo[Index].PosX+ L + 3, PlayerInfo.Playerinfo[Index].PosY + 12);
+ glTexCoord2f(31/32, 0); glVertex2f(PlayerInfo.Playerinfo[Index].PosX+ L + 3, PlayerInfo.Playerinfo[Index].PosY - 4);
glEnd;
glDisable(GL_TEXTURE_2D);
@@ -170,45 +175,48 @@ begin
else
begin
Inc(C);
- //Draw Dismissed
+ // Draw Dismissed
Text := CreateStr(PChar('PARTY_DISMISSED'));
glColor4f (0.8, 0.8, 0.8, 1);
- MethodRec.Print (1, 18, PlayerInfo.Playerinfo[I].PosX, PlayerInfo.Playerinfo[I].PosY-8, Text);
+ MethodRec.Print (1, 18, PlayerInfo.Playerinfo[Index].PosX, PlayerInfo.Playerinfo[Index].PosY-8, Text);
FreeStr(Text);
end;
end;
if (C >= PlayerInfo.NumPlayers-1) then
- Result := False;
+ Result := false;
end;
-//Is Executed on Finish, Returns the Playernum of the Winner
-function Finish (var Playerinfo: TPlayerinfo): byte; stdcall;
+// Is Executed on Finish, Returns the Playernum of the Winner
+function Finish (var Playerinfo: TPlayerinfo): byte; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
var
- I:Integer;
+ Index: integer;
begin
-Result := 0;
-for I := 0 to PlayerInfo.NumPlayers-1 do
+ Result := 0;
+ for Index := 0 to PlayerInfo.NumPlayers-1 do
begin
- PlayerInfo.Playerinfo[I].Percentage := (PlayerTimes[I] * 100) div CountSentences;
- if (PlayerInfo.Playerinfo[I].Enabled) then
+ PlayerInfo.Playerinfo[Index].Percentage := (PlayerTimes[Index] * 100) div CountSentences;
+ if (PlayerInfo.Playerinfo[Index].Enabled) then
begin
- PlayerInfo.Playerinfo[I].Percentage := 100;
- Case I of
- 0: Result := Result OR 1;
- 1: Result := Result OR 2;
- 2: Result := Result OR 4;
- 3: Result := Result OR 8;
- 4: Result := Result OR 16;
- 5: Result := Result OR 32;
+ PlayerInfo.Playerinfo[Index].Percentage := 100;
+ case Index of
+ 0: Result := Result or 1;
+ 1: Result := Result or 2;
+ 2: Result := Result or 4;
+ 3: Result := Result or 8;
+ 4: Result := Result or 16;
+ 5: Result := Result or 32;
end;
end;
end;
end;
exports
-PluginInfo, Init, Draw, Finish;
+ PluginInfo,
+ Init,
+ Draw,
+ Finish;
begin
diff --git a/plugins/Duell/Duell.dpr b/plugins/Duell/Duell.dpr
index 93c87d0e..f54edea8 100644
--- a/plugins/Duell/Duell.dpr
+++ b/plugins/Duell/Duell.dpr
@@ -8,56 +8,56 @@ uses
ModiSDK in '..\SDK\ModiSDK.pas';
//Gave the Plugins Info
-procedure PluginInfo (var Info: TPluginInfo); stdcall;
+procedure PluginInfo (var Info: TPluginInfo); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
begin
- Info.Name := 'PLUGIN_DUELL_NAME';
+ Info.Name := 'PLUGIN_DUELL_NAME';
Info.Creator := 'Whiteshark';
Info.PluginDesc := 'PLUGIN_DUELL_DESC';
- Info.Typ := 8;
+ Info.Typ := 8;
Info.NumPlayers := 31;
//Options
- Info.LoadSong := True; //Whether or not a Song should be Loaded
+ Info.LoadSong := True; //Whether or not a Song should be Loaded
//Only When Song is Loaded:
- Info.ShowScore := True; //Whether or not the Score should be shown
- Info.ShowNotes := True; //Whether the Note Lines should be displayed
- Info.LoadVideo := True; //Should the Video be loaded ?
- Info.LoadBack := True; //Should the Background be loaded ?
+ Info.ShowScore := True; //Whether or not the Score should be shown
+ Info.ShowNotes := True; //Whether the Note Lines should be displayed
+ Info.LoadVideo := True; //Should the Video be loaded ?
+ Info.LoadBack := True; //Should the Background be loaded ?
- Info.BGShowFull := False; //Whether the Background or the Video should be shown Fullsize
- Info.BGShowFull_O := True; //Whether the Background or the Video should be shown Fullsize
+ Info.BGShowFull := False; //Whether the Background or the Video should be shown Fullsize
+ Info.BGShowFull_O := True; //Whether the Background or the Video should be shown Fullsize
- Info.ShowRateBar:= False; //Whether the Bar that shows how good the player was sould be displayed
+ Info.ShowRateBar := False; //Whether the Bar that shows how good the player was sould be displayed
Info.ShowRateBar_O := True; //Load from Ini whether the Bar should be Displayed
- Info.EnLineBonus := False; //Whether LineBonus Should be enabled
+ Info.EnLineBonus := False; //Whether LineBonus Should be enabled
Info.EnLineBonus_O := True; //Load from Ini whether LineBonus Should be enabled
//Options even when song is Not loaded
- Info.ShowBars := False; //Whether the White Bars on Top and Bottom should be Drawn
- Info.TeamModeOnly := False; //If True the Plugin can only be Played in Team Mode
- Info.GetSoundData := False; //If True the RData Procedure is called when new SoundData is available
- Info.Dummy := False; //Should be Set to False... for Updateing Plugin Interface
+ Info.ShowBars := False; //Whether the White Bars on Top and Bottom should be Drawn
+ Info.TeamModeOnly := False; //If True the Plugin can only be Played in Team Mode
+ Info.GetSoundData := False; //If True the RData Procedure is called when new SoundData is available
+ Info.Dummy := False; //Should be Set to False... for Updateing Plugin Interface
end;
//Executed on Game Start //If True Game begins, else Failure
-function Init (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const Methods: TMethodRec): boolean; stdcall;
+function Init (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const Methods: TMethodRec): boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
begin
-Result := True;
+ Result := True;
end;
//Executed everytime the Screen is Drawed //If False The Game finishes
-function Draw (var Playerinfo: TPlayerinfo; const CurSentence: Cardinal): boolean; stdcall;
+function Draw (var Playerinfo: TPlayerinfo; const CurSentence: Cardinal): boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
begin
-Result := True;
+ Result := True;
end;
//Is Executed on Finish, Returns the Playernum of the Winner
-function Finish (var Playerinfo: TPlayerinfo): byte; stdcall;
+function Finish (var Playerinfo: TPlayerinfo): byte; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
var
- I:Integer;
+ I: Integer;
MaxScore: Word;
begin
Result := 0;
diff --git a/plugins/Team_Duell/TeamDuell.dpr b/plugins/Team_Duell/TeamDuell.dpr
index cb0e6349..6b8f4c30 100644
--- a/plugins/Team_Duell/TeamDuell.dpr
+++ b/plugins/Team_Duell/TeamDuell.dpr
@@ -13,105 +13,114 @@ uses
sysutils;
var
- TeamPlayer: array of array of String;
- StartPoints: array of integer;
- CurSinger, NextSinger: array[0..2] of Integer;
- MethodRec: TMethodRec;
- SPT, PlayerSelected: array[0..2] of Integer;
- TtoNextChange, starttick, endtick, ChangeOnSentence : Cardinal;
- bps, RTtoNextChange: Double;
- firsttime, secondtime: boolean;
-
-
-//Gave the Plugins Info
-procedure PluginInfo (var Info: TPluginInfo); stdcall;
+ TeamPlayer: array of array of string;
+ StartPoints: array of integer;
+ CurSinger, NextSinger: array[0..2] of integer;
+ MethodRec: TMethodRec;
+ SPT, PlayerSelected: array[0..2] of integer;
+ TtoNextChange, starttick, endtick, ChangeOnSentence: cardinal;
+ bps, RTtoNextChange: double;
+ firsttime, secondtime: boolean;
+
+
+// Give the Plugin's Info
+procedure PluginInfo (var Info: TPluginInfo); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
begin
- Info.Name := 'PLUGIN_TEAMDUELL_NAME';
+ Info.Name := 'PLUGIN_TEAMDUELL_NAME';
Info.Creator := 'jekatt';
Info.PluginDesc := 'PLUGIN_TEAMDUELL_DESC';
- Info.Typ := 8;
+ Info.Typ := 8;
Info.NumPlayers := 31;
- //Options
- Info.LoadSong := True; //Whether or not a Song should be Loaded
- //Only When Song is Loaded:
- Info.ShowScore := True; //Whether or not the Score should be shown
- Info.ShowNotes := True; //Whether the Note Lines should be displayed
- Info.LoadVideo := True; //Should the Video be loaded ?
- Info.LoadBack := True; //Should the Background be loaded ?
-
- Info.BGShowFull := False; //Whether the Background or the Video should be shown Fullsize
- Info.BGShowFull_O := True; //Whether the Background or the Video should be shown Fullsize
-
- Info.ShowRateBar:= True; //Whether the Bar that shows how good the player was sould be displayed
- Info.ShowRateBar_O := false; //Load from Ini whether the Bar should be Displayed
-
- Info.EnLineBonus := False; //Whether LineBonus Should be enabled
- Info.EnLineBonus_O := True; //Load from Ini whether LineBonus Should be enabled
-
- //Options even when song is Not loaded
- Info.ShowBars := False; //Whether the White Bars on Top and Bottom should be Drawn
- Info.TeamModeOnly := True; //If True the Plugin can only be Played in Team Mode
- Info.GetSoundData := False; //If True the RData Procedure is called when new SoundData is available
- Info.Dummy := False; //Should be Set to False... for Updateing Plugin Interface
+ // Options
+ Info.LoadSong := true; // Whether or not a Song should be Loaded
+ // Only When Song is Loaded:
+ Info.ShowScore := true; // Whether or not the Score should be shown
+ Info.ShowNotes := true; // Whether the Note Lines should be displayed
+ Info.LoadVideo := true; // Should the Video be loaded ?
+ Info.LoadBack := true; // Should the Background be loaded ?
+
+ Info.BGShowFull := false; // Whether the Background or the Video should be shown Full size
+ Info.BGShowFull_O := true; // Whether the Background or the Video should be shown Full size
+
+ Info.ShowRateBar := true; // Whether the Bar that shows how good the player was should be displayed
+ Info.ShowRateBar_O := false; // Load from Ini whether the Bar should be Displayed
+
+ Info.EnLineBonus := false; // Whether Line Bonus Should be enabled
+ Info.EnLineBonus_O := true; // Load from Ini whether Line Bonus Should be enabled
+
+ // Options even when song is Not loaded
+ Info.ShowBars := false; // Whether the White Bars on Top and Bottom should be Drawn
+ Info.TeamModeOnly := true; // if true the Plugin can only be Played in Team Mode
+ Info.GetSoundData := false; // if true the RData Procedure is called when new SoundData is available
+ Info.Dummy := false; // Should be Set to false... for Updating Plugin Interface
end;
-//Executed on Game Start //If True Game begins, else Failure
-function Init (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const Methods: TMethodRec): boolean; stdcall;
+// Executed on Game Start; if true Game begins, else Failure
+function Init (const TeamInfo: TTeamInfo;
+ var Playerinfo: TPlayerinfo;
+ const Sentences: TSentences;
+ const Methods: TMethodRec)
+ : boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
var
-I,J: Integer;
+ Index, J: integer;
begin
// Get beginning of sentences
- for I := 0 to Sentences.High do begin
- SetLength(Startpoints, I+1);
- Startpoints[I]:=Sentences.Sentence[I].Start;
+ for Index := 0 to Sentences.High do
+ begin
+ SetLength(Startpoints, Index+1);
+ Startpoints[Index]:=Sentences.Sentence[Index].Start;
end;
// Get Teams and Players
- for I := 0 to TeamInfo.NumTeams-1 do
+ for Index := 0 to TeamInfo.NumTeams-1 do
+ begin
+ SetLength(TeamPlayer, Index+1);
+ for J := 0 to TeamInfo.Teaminfo[Index].NumPlayers-1 do
begin
- SetLength(TeamPlayer, I+1);
- for J := 0 to TeamInfo.Teaminfo[I].NumPlayers-1 do
- begin
- SetLength(TeamPlayer[I], J+1);
- TeamPlayer[I,J] := Copy(String(TeamInfo.Teaminfo[I].Playerinfo[J].Name),1,8);
- If (NOT(TeamPlayer[I,J] = (String(TeamInfo.Teaminfo[I].Playerinfo[J].Name)))) THEN TeamPlayer[I,J] := TeamPlayer[I,J]+'.';
- SPT[I]:=J+1;
- end;
- CurSinger[I] := TeamInfo.Teaminfo[I].CurPlayer;
- repeat
- NextSinger[I] := random(SPT[I]);
- until NOT(NextSinger[I] = CurSinger[I]) OR (SPT[I] = 1) ;
+ SetLength(TeamPlayer[Index], J+1);
+ TeamPlayer[Index,J] := Copy(string(TeamInfo.Teaminfo[Index].Playerinfo[J].Name), 1, 8);
+ if (not(TeamPlayer[Index,J] = (string(TeamInfo.Teaminfo[Index].Playerinfo[J].Name)))) then
+ TeamPlayer[Index,J] := TeamPlayer[Index,J]+'.';
+ SPT[Index]:=J+1;
end;
+ CurSinger[Index] := TeamInfo.Teaminfo[Index].CurPlayer;
+ repeat
+ NextSinger[Index] := random(SPT[Index]);
+ until not(NextSinger[Index] = CurSinger[Index]) or (SPT[Index] = 1);
+ end;
ChangeOnSentence := 8;
starttick := SDL_GetTicks();
firsttime := true;
secondtime := true;
bps := 1;
MethodRec := Methods;
- Result := True;
+ Result := true;
end;
-//Executed everytime the Screen is Drawed //If False The Game finishes
-function Draw (var Playerinfo: TPlayerinfo; const CurSentence: Cardinal): boolean; stdcall;
+// Executed everytime the Screen is Drawed; if false The Game finishes
+function Draw (var Playerinfo: TPlayerinfo;
+ const CurSentence: cardinal)
+ : boolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
var
- I,timeline,x,y: Integer;
- display: PChar;
- start: boolean;
+ Index, timeline, x, y: integer;
+ display: PChar;
+ start: boolean;
begin
// TickCount(firstSentence) (not zero!)
- If (CurSentence = ChangeOnSentence - 7) AND (firsttime) then
+ if (CurSentence = ChangeOnSentence - 7) and (firsttime) then
begin
firsttime := false;
starttick := SDL_GetTicks();
end;
start := false;
// show first singers for 5sec
- if (CurSentence < 1) AND ((starttick + 5000) > SDL_GetTicks()) then begin start := true; end;
+ if (CurSentence < 1) and ((starttick + 5000) > SDL_GetTicks()) then
+ start := true;
// TickCount(thirdSentence)
- If (CurSentence = 3) AND (secondtime) then
+ if (CurSentence = 3) and (secondtime) then
begin
secondtime := false;
firsttime := true;
@@ -124,87 +133,99 @@ begin
TtoNextChange := Trunc(RTtoNextChange) +1;
// Next Singer for Team I
- for I := 0 to High(TeamPlayer) do begin
- if (CurSentence = ChangeOnSentence) AND NOT(PlayerSelected[I] = CurSentence) then begin
- PlayerSelected[I] := CurSentence;
- CurSinger[I] := NextSinger[I];
+ for Index := 0 to High(TeamPlayer) do
+ begin
+ if (CurSentence = ChangeOnSentence) and not(PlayerSelected[Index] = CurSentence) then
+ begin
+ PlayerSelected[Index] := CurSentence;
+ CurSinger[Index] := NextSinger[Index];
repeat
- NextSinger[I] := random(SPT[I]);
- until NOT(NextSinger[I] = CurSinger[I]) OR (SPT[I] = 1) ;
+ NextSinger[Index] := random(SPT[Index]);
+ until not(NextSinger[Index] = CurSinger[Index]) or (SPT[Index] = 1) ;
end;
// display bg
glColor4f (0.8, 0.8, 0.8, 1);
- display := PChar(TeamPlayer[I,CurSinger[I]]);
- if (TtoNextChange <= 11) OR (start = true) Then begin
- glEnable(GL_TEXTURE_2D);
- glDisable(GL_BLEND);
- glColor4f (0, 0, 0, 1);
- glBegin(GL_QUADS);
- glVertex2f(PlayerInfo.Playerinfo[I].PosX, PlayerInfo.Playerinfo[I].PosY+8);
- glVertex2f(PlayerInfo.Playerinfo[I].PosX, PlayerInfo.Playerinfo[I].PosY + 30);
- glVertex2f(PlayerInfo.Playerinfo[I].PosX + 100, PlayerInfo.Playerinfo[I].PosY + 30);
- glVertex2f(PlayerInfo.Playerinfo[I].PosX + 100, PlayerInfo.Playerinfo[I].PosY+8);
- glEnd;
- display := 'Next Singer';
+ display := PChar(TeamPlayer[Index,CurSinger[Index]]);
+ if (TtoNextChange <= 11) or (start = true) then
+ begin
+ glEnable(GL_TEXTURE_2D);
+ glDisable(GL_BLEND);
+ glColor4f (0, 0, 0, 1);
+ glBegin(GL_QUADS);
+ glVertex2f(PlayerInfo.Playerinfo[Index].PosX, PlayerInfo.Playerinfo[Index].PosY+8);
+ glVertex2f(PlayerInfo.Playerinfo[Index].PosX, PlayerInfo.Playerinfo[Index].PosY + 30);
+ glVertex2f(PlayerInfo.Playerinfo[Index].PosX + 100, PlayerInfo.Playerinfo[Index].PosY + 30);
+ glVertex2f(PlayerInfo.Playerinfo[Index].PosX + 100, PlayerInfo.Playerinfo[Index].PosY+8);
+ glEnd;
+ display := 'Next Singer';
// timeline
- x:= 270; y:= 472;
- if (TtoNextChange <= 5) AND (RTtoNextChange > 0) then begin
- timeline := Trunc(RTtoNextChange*50);
- glColor3f (0, 0, 0);
- glBegin(GL_QUADS);
- glVertex2f(x, y);
- glVertex2f(x, y+18);
- glVertex2f(x+6+250, y+18);
- glVertex2f(x+6+250, y);
- glEnd;
- glColor3f (0.2, 0.2, 0.2);
- glBegin(GL_QUADS);
- glVertex2f(x+3, y+3);
- glVertex2f(x+3, y+15);
- glVertex2f(x+3+250, y+15);
- glVertex2f(x+3+250, y+3);
- glEnd;
- glColor3f (0.8, 0.2, 0.2);
- glBegin(GL_QUADS);
- glColor3f (0.9, 0, 0); glVertex2f(x+3, y+3);
- glColor3f (0.8, 0.3, 0.3); glVertex2f(x+3, y+15);
- glColor3f (0.8, 0.3, 0.3); glVertex2f(x+3+timeline, y+15);
- glColor3f (0.9, 0, 0); glVertex2f(x+3+timeline, y+3);
- glEnd;
- end;
- glDisable(GL_TEXTURE_2D);
+ x:= 270;
+ y:= 472;
+ if (TtoNextChange <= 5) and (RTtoNextChange > 0) then
+ begin
+ timeline := Trunc(RTtoNextChange*50);
+ glColor3f (0, 0, 0);
+ glBegin(GL_QUADS);
+ glVertex2f(x, y);
+ glVertex2f(x, y+18);
+ glVertex2f(x+6+250, y+18);
+ glVertex2f(x+6+250, y);
+ glEnd;
+ glColor3f (0.2, 0.2, 0.2);
+ glBegin(GL_QUADS);
+ glVertex2f(x+3, y+3);
+ glVertex2f(x+3, y+15);
+ glVertex2f(x+3+250, y+15);
+ glVertex2f(x+3+250, y+3);
+ glEnd;
+ glColor3f (0.8, 0.2, 0.2);
+ glBegin(GL_QUADS);
+ glColor3f (0.9, 0, 0); glVertex2f(x+3, y+3);
+ glColor3f (0.8, 0.3, 0.3); glVertex2f(x+3, y+15);
+ glColor3f (0.8, 0.3, 0.3); glVertex2f(x+3+timeline, y+15);
+ glColor3f (0.9, 0, 0); glVertex2f(x+3+timeline, y+3);
+ glEnd;
+ end;
+ glDisable(GL_TEXTURE_2D);
end;
// Names, Timer
- if (TtoNextChange <= 9) Then begin display := PChar(TeamPlayer[I,NextSinger[I]]);
+ if (TtoNextChange <= 9) then
+ begin display := PChar(TeamPlayer[Index,NextSinger[Index]]);
glColor4f (0.8, 0.1, 0.2, 1);
- MethodRec.Print (1, 18, PlayerInfo.Playerinfo[I].PosX+85, PlayerInfo.Playerinfo[I].PosY+10, CreateStr(PChar(IntToStr(Trunc(TtoNextChange)))));
+ MethodRec.Print (1, 18, PlayerInfo.Playerinfo[Index].PosX+85, PlayerInfo.Playerinfo[Index].PosY+10, CreateStr(PChar(IntToStr(Trunc(TtoNextChange)))));
end;
glColor4f (0.8, 0.8, 0.8, 1);
- if (CurSentence = 0) then display := PChar(TeamPlayer[I,CurSinger[I]]);
- if (TtoNextChange <= 11) OR (start) Then MethodRec.Print (1, 18, PlayerInfo.Playerinfo[I].PosX+5, PlayerInfo.Playerinfo[I].PosY+10, display);
+ if (CurSentence = 0) then
+ display := PChar(TeamPlayer[Index,CurSinger[Index]]);
+ if (TtoNextChange <= 11) or (start) then
+ MethodRec.Print (1, 18, PlayerInfo.Playerinfo[Index].PosX+5, PlayerInfo.Playerinfo[Index].PosY+10, display);
+ end;
+ if (CurSentence = ChangeOnSentence) then
+ begin
+ ChangeOnSentence := CurSentence + 7;
+ firsttime := true;
end;
- if (CurSentence = ChangeOnSentence) then begin ChangeOnSentence := CurSentence + 7; firsttime := true; end;
-Result := True;
+ Result := true;
end;
-//Is Executed on Finish, Returns the Playernum of the Winner
-function Finish (var Playerinfo: TPlayerinfo): byte; stdcall;
+// Is Executed on Finish, Returns the Playernum of the Winner
+function Finish (var Playerinfo: TPlayerinfo): byte; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
var
- I:Integer;
- MaxScore: Word;
+ Index: integer;
+ MaxScore: word;
begin
Result := 0;
MaxScore := 0;
- for I := 0 to PlayerInfo.NumPlayers-1 do
+ for Index := 0 to PlayerInfo.NumPlayers-1 do
begin
- PlayerInfo.Playerinfo[I].Percentage := PlayerInfo.Playerinfo[I].Score div 9999;
- if (PlayerInfo.Playerinfo[I].Score > MaxScore) then
+ PlayerInfo.Playerinfo[Index].Percentage := PlayerInfo.Playerinfo[Index].Score div 9999;
+ if (PlayerInfo.Playerinfo[Index].Score > MaxScore) then
begin
- MaxScore := PlayerInfo.Playerinfo[I].Score;
- Case I of
+ MaxScore := PlayerInfo.Playerinfo[Index].Score;
+ case Index of
0: Result := 1;
1: Result := 2;
2: Result := 4;
@@ -213,26 +234,29 @@ begin
5: Result := 32;
end;
end
- else if (PlayerInfo.Playerinfo[I].Score = MaxScore) AND (PlayerInfo.Playerinfo[I].Score <> 0) then
+ else if (PlayerInfo.Playerinfo[Index].Score = MaxScore) and (PlayerInfo.Playerinfo[Index].Score <> 0) then
begin
- Case I of
- 0: Result := Result OR 1;
- 1: Result := Result OR 2;
- 2: Result := Result OR 4;
- 3: Result := Result OR 8;
- 4: Result := Result OR 16;
- 5: Result := Result OR 32;
+ case Index of
+ 0: Result := Result or 1;
+ 1: Result := Result or 2;
+ 2: Result := Result or 4;
+ 3: Result := Result or 8;
+ 4: Result := Result or 16;
+ 5: Result := Result or 32;
end;
end;
end;
- //When nobody has Points -> Everybody loose
+ // When nobody has Points -> Everybody loose
if (MaxScore = 0) then
Result := 0;
end;
exports
-PluginInfo, Init, Draw, Finish;
+ PluginInfo,
+ Init,
+ Draw,
+ Finish;
begin