aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-05-18 10:57:17 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-05-18 10:57:17 +0000
commit7bf5487faf2b099ced0b2126c2cca164be80acf1 (patch)
treebb963e1e86b231097ef0e639f96f975a4372f303 /Game/Code
parent4f7f9544e5dbf992599865243aee4c6e2a5b5f8e (diff)
downloadusdx-7bf5487faf2b099ced0b2126c2cca164be80acf1.tar.gz
usdx-7bf5487faf2b099ced0b2126c2cca164be80acf1.tar.xz
usdx-7bf5487faf2b099ced0b2126c2cca164be80acf1.zip
Some changes mode on ModiSDK and Depending Files(Plugin Loader, Party SingScreen and Plugins)
Changes make the Pluginsystem more extendable with backwards compatibility in further Versions. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@220 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code')
-rw-r--r--Game/Code/Classes/UDLLManager.pas22
-rw-r--r--Game/Code/Screens/UScreenSingModi.pas2
2 files changed, 16 insertions, 8 deletions
diff --git a/Game/Code/Classes/UDLLManager.pas b/Game/Code/Classes/UDLLManager.pas
index 59c75d5b..4b8838b9 100644
--- a/Game/Code/Classes/UDLLManager.pas
+++ b/Game/Code/Classes/UDLLManager.pas
@@ -25,7 +25,7 @@ type
function LoadPlugin(No: Cardinal): boolean;
procedure UnLoadPlugin;
- function PluginInit (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const LoadTex: fModi_LoadTex; const Print: fModi_Print; LoadSound: fModi_LoadSound; PlaySound: fModi_PlaySound): boolean;
+ function PluginInit (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const LoadTex: fModi_LoadTex; const Print: fModi_Print; LoadSound: fModi_LoadSound; PlaySound: pModi_PlaySound): boolean;
function PluginDraw (var Playerinfo: TPlayerinfo; const CurSentence: Cardinal): boolean;
function PluginFinish (var Playerinfo: TPlayerinfo): byte;
procedure PluginRData (handle: HSTREAM; buffer: Pointer; len: DWORD; user: DWORD);
@@ -75,6 +75,9 @@ end;
procedure TDLLMan.ClearPluginInfo(No: Cardinal);
begin
+ //Set to Party Modi Plugin
+ Plugins[No].Typ := 8;
+
Plugins[No].Name := 'unknown';
Plugins[No].NumPlayers := 0;
@@ -183,12 +186,19 @@ if (hLib <> 0) then
@P_RData := nil;
end;
-function TDLLMan.PluginInit (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const LoadTex: fModi_LoadTex; const Print: fModi_Print; LoadSound: fModi_LoadSound; PlaySound: fModi_PlaySound): boolean;
+function TDLLMan.PluginInit (const TeamInfo: TTeamInfo; var Playerinfo: TPlayerinfo; const Sentences: TSentences; const LoadTex: fModi_LoadTex; const Print: fModi_Print; LoadSound: fModi_LoadSound; PlaySound: pModi_PlaySound): boolean;
+var
+ Methods: TMethodRec;
begin
-if (@P_Init <> nil) then
- Result := P_Init (TeamInfo, PlayerInfo, Sentences, LoadTex, Print, LoadSound, PlaySound)
-else
- Result := False
+ Methods.LoadTex := LoadTex;
+ Methods.Print := Print;
+ Methods.LoadSound := LoadSound;
+ Methods.PlaySound := PlaySound;
+
+ if (@P_Init <> nil) then
+ Result := P_Init (TeamInfo, PlayerInfo, Sentences, Methods)
+ else
+ Result := False
end;
function TDLLMan.PluginDraw (var Playerinfo: TPlayerinfo; const CurSentence: Cardinal): boolean;
diff --git a/Game/Code/Screens/UScreenSingModi.pas b/Game/Code/Screens/UScreenSingModi.pas
index 93ede980..0b9ab893 100644
--- a/Game/Code/Screens/UScreenSingModi.pas
+++ b/Game/Code/Screens/UScreenSingModi.pas
@@ -1061,8 +1061,6 @@ begin
Result.TexNum := Tex.TexNum;
Result.W := Tex.W;
Result.H := Tex.H;
- Result.ScaleW := Tex.ScaleW;
- Result.ScaleH := Tex.ScaleH;
end;
{
function Translate (const Name: PChar): PChar; stdcall;