aboutsummaryrefslogtreecommitdiffstats
path: root/Modis
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Modis/5000Points/Until5000.dpr6
-rw-r--r--Modis/Blind/Blind.dpr11
-rw-r--r--Modis/Don't_Get_Worse/Hold_The_Line.dpr20
-rw-r--r--Modis/Duell/Duell.dpr8
-rw-r--r--Modis/SDK/ModiSDK.pas80
5 files changed, 71 insertions, 54 deletions
diff --git a/Modis/5000Points/Until5000.dpr b/Modis/5000Points/Until5000.dpr
index 8d66eb5f..b826d212 100644
--- a/Modis/5000Points/Until5000.dpr
+++ b/Modis/5000Points/Until5000.dpr
@@ -7,12 +7,14 @@ uses
procedure PluginInfo (var Info: TPluginInfo); stdcall;
begin
Info.Name := 'PLUGIN_UNTIL5000_NAME';
- Info.NumPlayers := 31;
Info.Creator := 'Whiteshark';
Info.PluginDesc := 'PLUGIN_UNTIL5000_DESC';
+ //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:
@@ -38,7 +40,7 @@ begin
end;
//Executed on Game Start //If True Game begins, else Failure
-function Init (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const LoadTex: fModi_LoadTex; const Print: fModi_Print; LoadSound: fModi_LoadSound; PlaySound: fModi_PlaySound): boolean; stdcall;
+function Init (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const Methods: TMethodRec): boolean; stdcall;
begin
Result := True;
end;
diff --git a/Modis/Blind/Blind.dpr b/Modis/Blind/Blind.dpr
index ab440e67..c806171d 100644
--- a/Modis/Blind/Blind.dpr
+++ b/Modis/Blind/Blind.dpr
@@ -7,11 +7,14 @@ uses
procedure PluginInfo (var Info: TPluginInfo); stdcall;
begin
Info.Name := 'PLUGIN_BLIND_NAME';
- Info.NumPlayers := 31;
Info.Creator := 'Whiteshark';
Info.PluginDesc := 'PLUGIN_BLIND_DESC';
+ //Set to Party Modi Plugin
+ Info.Typ := 8;
+
+ Info.NumPlayers := 31;
//Options
Info.LoadSong := True; //Whether or not a Song should be Loaded
@@ -38,7 +41,7 @@ begin
end;
//Executed on Game Start //If True Game begins, else Failure
-function Init (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const LoadTex: fModi_LoadTex; const Print: fModi_Print; LoadSound: fModi_LoadSound; PlaySound: fModi_PlaySound): boolean; stdcall;
+function Init (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const Methods: TMethodRec): boolean; stdcall;
begin
Result := True;
end;
@@ -86,7 +89,9 @@ begin
end;
end;
end;
-
+ //If everybody has 0 Points nobody Wins
+ If (MaxScore = 0) then
+ Result := 0;
end;
exports
diff --git a/Modis/Don't_Get_Worse/Hold_The_Line.dpr b/Modis/Don't_Get_Worse/Hold_The_Line.dpr
index ef7a16f7..de19858b 100644
--- a/Modis/Don't_Get_Worse/Hold_The_Line.dpr
+++ b/Modis/Don't_Get_Worse/Hold_The_Line.dpr
@@ -10,8 +10,7 @@ var
PointerTex: TSmallTexture;
CountSentences: Cardinal;
Limit: Byte;
- fPrint: fModi_Print;
- fPlaySound: fModi_PlaySound;
+ MethodRec: TMethodRec;
Frame: Integer;
PlayerTimes: array[0..5] of Integer;
LastTick: Cardinal;
@@ -23,12 +22,14 @@ var
procedure PluginInfo (var Info: TPluginInfo); stdcall;
begin
Info.Name := 'PLUGIN_HDL_NAME';
- Info.NumPlayers := 31;
Info.Creator := 'Whiteshark';
Info.PluginDesc := 'PLUGIN_HDL_DESC';
+ //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:
@@ -54,28 +55,27 @@ begin
end;
//Executed on Game Start //If True Game begins, else Failure
-function Init (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const LoadTex: fModi_LoadTex; const Print: fModi_Print; LoadSound: fModi_LoadSound; PlaySound: fModi_PlaySound): boolean; stdcall;
+function Init (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const Methods: TMethodRec): boolean; stdcall;
var
I: Integer;
Texname, TexType: PChar;
begin
TexName := CreateStr(PChar('HDL_Pointer'));
TexType := CreateStr(PChar('Font Black'));
- PointerTex := LoadTex(TexName, TexType);
+ PointerTex := Methods.LoadTex(TexName, TexType);
FreeStr(TexName);
FreeStr(TexType);
TexName := CreateStr(PChar('dismissed.mp3'));
- DismissedSound := LoadSound (TexName);
+ DismissedSound := Methods.LoadSound (TexName);
FreeStr(TexName);
CountSentences := Sentences.High;
Limit := 0;
Frame := 0;
- fPrint := Print;
- fPlaySound := PlaySound;
+ MethodRec := Methods;
for I := 0 to PlayerInfo.NumPlayers-1 do
begin
@@ -138,7 +138,7 @@ begin
Inc(C);
PlayerTimes[I] := CurSentence; //Save Time of Dismission
//PlaySound
- fPlaySound (DismissedSound);
+ MethodRec.PlaySound (DismissedSound);
end;
//Draw Pointer
@@ -172,7 +172,7 @@ begin
glColor4f (0.8, 0.8, 0.8, 1);
- fPrint (1, 6, PlayerInfo.Playerinfo[I].PosX, PlayerInfo.Playerinfo[I].PosY-8, Text);
+ MethodRec.Print (1, 6, PlayerInfo.Playerinfo[I].PosX, PlayerInfo.Playerinfo[I].PosY-8, Text);
FreeStr(Text);
end;
end;
diff --git a/Modis/Duell/Duell.dpr b/Modis/Duell/Duell.dpr
index 4a22a5d7..cff9d4ef 100644
--- a/Modis/Duell/Duell.dpr
+++ b/Modis/Duell/Duell.dpr
@@ -7,12 +7,13 @@ uses
procedure PluginInfo (var Info: TPluginInfo); stdcall;
begin
Info.Name := 'PLUGIN_DUELL_NAME';
- Info.NumPlayers := 31;
Info.Creator := 'Whiteshark';
Info.PluginDesc := 'PLUGIN_DUELL_DESC';
+ Info.Typ := 8;
+ Info.NumPlayers := 31;
//Options
Info.LoadSong := True; //Whether or not a Song should be Loaded
//Only When Song is Loaded:
@@ -38,7 +39,7 @@ begin
end;
//Executed on Game Start //If True Game begins, else Failure
-function Init (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const LoadTex: fModi_LoadTex; const Print: fModi_Print; LoadSound: fModi_LoadSound; PlaySound: fModi_PlaySound): boolean; stdcall;
+function Init (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const Methods: TMethodRec): boolean; stdcall;
begin
Result := True;
end;
@@ -85,6 +86,9 @@ begin
end;
end;
+ //When nobody has Points -> Everybody loose
+ if (MaxScore = 0) then
+ Result := 0;
end;
exports
diff --git a/Modis/SDK/ModiSDK.pas b/Modis/SDK/ModiSDK.pas
index dc3b74c0..d8bad0d2 100644
--- a/Modis/SDK/ModiSDK.pas
+++ b/Modis/SDK/ModiSDK.pas
@@ -9,37 +9,41 @@ type //PluginInfo, for Init
Creator: Array [0..32] of Char; //Name of the Author
PluginDesc: Array [0..64] of Char; //Plugin Description
- //Options
- LoadSong: boolean; //Whether or not a Song should be Loaded
- //Only When Song is Loaded:
- ShowNotes: boolean; //Whether the Note Lines should be displayed
- LoadVideo: boolean; //Should the Video be loaded ?
- LoadBack: boolean; //Should the Background be loaded ?
-
- ShowRateBar: boolean; //Whether the Bar that shows how good the player was sould be displayed
- ShowRateBar_O: boolean; //Load from Ini whether the Bar should be Displayed
-
- EnLineBonus: boolean; //Whether LineBonus Should be enabled
- EnLineBonus_O: boolean; //Load from Ini whether LineBonus Should be enabled
-
- BGShowFull: boolean; //Whether the Background or the Video should be shown Fullsize
- BGShowFull_O: boolean; //Whether the Background or the Video should be shown Fullsize
-
- //Options -> everytime
- ShowScore: boolean; //Whether or not the Score should be shown
- ShowBars: boolean; //Whether the White Bars on Top and Bottom should be Drawn
- TeamModeOnly: boolean; //If True the Plugin can only be Played in Team Mode
- GetSoundData: boolean; //If True the RData Procedure is called when new SoundData is available
- Dummy: boolean; //Should be Set to False... for Updateing Plugin Interface
-
- NumPlayers: Byte; //Number of Available Players for Modi
- //Set different Bits
- //1 -> One Player
- //2 -> Two Players
- //4 -> Three Players
- //8 -> Four Players
- //16-> Six Players
- //e.g. : 10 -> Playable with 2 and 4 Players
+ //Plugin Typ, atm: 8 only for PartyMode Modi
+ Case Typ: byte of
+ 8: (
+ //Options
+ LoadSong: boolean; //Whether or not a Song should be Loaded
+ //Only When Song is Loaded:
+ ShowNotes: boolean; //Whether the Note Lines should be displayed
+ LoadVideo: boolean; //Should the Video be loaded ?
+ LoadBack: boolean; //Should the Background be loaded ?
+
+ ShowRateBar: boolean; //Whether the Bar that shows how good the player was sould be displayed
+ ShowRateBar_O: boolean; //Load from Ini whether the Bar should be Displayed
+
+ EnLineBonus: boolean; //Whether LineBonus Should be enabled
+ EnLineBonus_O: boolean; //Load from Ini whether LineBonus Should be enabled
+
+ BGShowFull: boolean; //Whether the Background or the Video should be shown Fullsize
+ BGShowFull_O: boolean; //Whether the Background or the Video should be shown Fullsize
+
+ //Options -> everytime
+ ShowScore: boolean; //Whether or not the Score should be shown
+ ShowBars: boolean; //Whether the White Bars on Top and Bottom should be Drawn
+ TeamModeOnly: boolean; //If True the Plugin can only be Played in Team Mode
+ GetSoundData: boolean; //If True the RData Procedure is called when new SoundData is available
+ Dummy: boolean; //Should be Set to False... for Updateing Plugin Interface
+
+ NumPlayers: Byte //Number of Available Players for Modi
+ //Set different Bits
+ //1 -> One Player
+ //2 -> Two Players
+ //4 -> Three Players
+ //8 -> Four Players
+ //16-> Six Players
+ //e.g. : 10 -> Playable with 2 and 4 Players
+ );
end;
@@ -76,8 +80,6 @@ type //PluginInfo, for Init
TexNum: integer;
W: real;
H: real;
- ScaleW: real; // for dynamic scalling while leaving width constant
- ScaleH: real; // for dynamic scalling while leaving height constant
end;
TSentences = record
@@ -110,8 +112,6 @@ type //PluginInfo, for Init
end;
end;
- //AChar = array [0..254] of Char;
-
DWORD = Longword;
HSTREAM = DWORD;
@@ -120,13 +120,19 @@ type //PluginInfo, for Init
//fModi_Translate = function (const Name, Translation: AChar): Integer; stdcall; //Pointer to Translator
fModi_Print = procedure (const Style, Size: Byte; const X, Y: Real; const Text: PChar); stdcall; //Procedure to Print Text //Now translated automatically
fModi_LoadSound = function (const Name: PChar): Cardinal; stdcall; //Procedure that loads a Custom Sound
- fModi_PlaySound = procedure (const Index: Cardinal); stdcall; //Plays a Custom Sound
+ pModi_PlaySound = procedure (const Index: Cardinal); stdcall; //Plays a Custom Sound
+ TMethodRec = record
+ LoadTex: fModi_LoadTex;
+ Print: fModi_Print;
+ LoadSound: fModi_LoadSound;
+ PlaySound: pModi_PlaySound;
+ end;
//DLL Funktionen
//Gave the Plugins Info
pModi_PluginInfo = procedure (var Info: TPluginInfo); stdcall;
//Executed on Game Start //If True Game begins, else Failure
- fModi_Init = function (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const LoadTex: fModi_LoadTex; const Print: fModi_Print; LoadSound: fModi_LoadSound; PlaySound: fModi_PlaySound): boolean; stdcall;
+ fModi_Init = function (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const Methods: TMethodRec): boolean; stdcall;
//Executed everytime the Screen is Drawed //If False The Game finishes
fModi_Draw = function (var Playerinfo: TPlayerinfo; const CurSentence: Cardinal): boolean; stdcall;
//Is Executed on Finish, Returns the Playernum of the Winner