aboutsummaryrefslogtreecommitdiffstats
path: root/unicode/plugins/Blind
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-07-23 14:42:01 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-07-23 14:42:01 +0000
commit3dc26d2e5c5b360f844ea23c3f60ea4178f6f883 (patch)
tree2ddcbe47e8dd263197346d7fb523558455bef476 /unicode/plugins/Blind
parent94cefdb78044e0f9996e3032de34b690de98b708 (diff)
downloadusdx-3dc26d2e5c5b360f844ea23c3f60ea4178f6f883.tar.gz
usdx-3dc26d2e5c5b360f844ea23c3f60ea4178f6f883.tar.xz
usdx-3dc26d2e5c5b360f844ea23c3f60ea4178f6f883.zip
merge with current trunk revision 1827
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1855 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'unicode/plugins/Blind')
-rw-r--r--unicode/plugins/Blind/Blind.dpr107
1 files changed, 55 insertions, 52 deletions
diff --git a/unicode/plugins/Blind/Blind.dpr b/unicode/plugins/Blind/Blind.dpr
index d2824587..3c68374c 100644
--- a/unicode/plugins/Blind/Blind.dpr
+++ b/unicode/plugins/Blind/Blind.dpr
@@ -7,72 +7,75 @@ library Blind;
uses
ModiSDK in '..\SDK\ModiSDK.pas';
-//Gave the Plugins Info
-procedure PluginInfo (var Info: TPluginInfo); stdcall;
+// 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; 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}
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;
-var
-I: Integer;
+// executed every time the screen is drawn. 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
-function Finish (var Playerinfo: TPlayerinfo): byte; stdcall;
+// 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;