aboutsummaryrefslogtreecommitdiffstats
path: root/Modis
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Modis/SDK/Plugin DLL Exports.txt11
-rw-r--r--Modis/SDK/Services.txt11
-rw-r--r--Modis/SDK/UPluginDefs.pas39
3 files changed, 52 insertions, 9 deletions
diff --git a/Modis/SDK/Plugin DLL Exports.txt b/Modis/SDK/Plugin DLL Exports.txt
index e69de29b..717ffacb 100644
--- a/Modis/SDK/Plugin DLL Exports.txt
+++ b/Modis/SDK/Plugin DLL Exports.txt
@@ -0,0 +1,11 @@
+Ultrastar Plugin DLL(Libary) Exports
+-----------------------------------
+This are the Procedurs and Functions that a UsDx Plugin has to export to get Loaded.
+
+
+USPlugin_Info(PInfo: PUS_PluginInfo); stdcall;
+-----------------------------------
+Ultrastar uses this Procedure to identify the Plugins.
+At the given Address there is a PUS_PluginInfo Record. cbSize
+attribut is already set. Please asure not to overwrite this assigned
+memory amount.
diff --git a/Modis/SDK/Services.txt b/Modis/SDK/Services.txt
index 7ed4be0e..2ab5cf20 100644
--- a/Modis/SDK/Services.txt
+++ b/Modis/SDK/Services.txt
@@ -10,4 +10,13 @@ Core/ReportDebug <- Calls the 'Core/NewDebugInfo' Chain. wParam: Pchar(Messag
Core/ShowMessage <- Shows a Message Dialog. (lParam: PChar Text, wParam: Symbol)
Core/Retranslate <- Calls Translate Hook
Core/ReloadTextures <- Calls LoadTextures Hook
-Core/GetModuleInfo <- If lParam = nil then get length of Moduleinfo Array. If lparam <> nil then write array of TModuleInfo to address at lparam \ No newline at end of file
+Core/GetModuleInfo <- If lParam = nil then get length of Moduleinfo Array. If lparam <> nil then write array of TModuleInfo to address at lparam
+Core/GetApplicationHandle <- Returns Main-Applications Handle (Win32 Only)
+
+--------------------
+PluginLoader
+--------------------
+PluginLoader/GetPluginInfo <- If wParam = -1 then (If lParam = nil then get length of Moduleinfo Array. If lparam <> nil then write array of TUS_PluginInfo to address at lparam) Else (Get PluginInfo of Plugin with Index(wParam) to Address at lParam)
+PluginLoader/GetPluginState <- If wParam = -1 then (If lParam = nil then get length of Moduleinfo Array. If lparam <> nil then write array of TUS_PluginInfo to address at lparam) Else (Return PluginInfo of Plugin with Index(wParam))
+PluginLoader/LoadPlugin <- wParam PChar(PluginName/PluginPath) | lParam (if wParam = nil) ID of the Plugin
+PluginLoader/UnloadPlugin <- wParam PChar(PluginName/PluginPath) | lParam (if wParam = nil) ID of the Plugin \ No newline at end of file
diff --git a/Modis/SDK/UPluginDefs.pas b/Modis/SDK/UPluginDefs.pas
index 8b964cc2..69c258fb 100644
--- a/Modis/SDK/UPluginDefs.pas
+++ b/Modis/SDK/UPluginDefs.pas
@@ -24,13 +24,15 @@ type
TUS_PluginInfo = record
cbSize: Integer; //Size of this record (usefull if record will be extended in the future)
- Name: PChar; //Name of the Plugin
- Version: DWord; //Version of the Plugin
- Description: PChar; //Description, what does this Plugin do
- Author: PChar; //Author of this Plugin
- AuthorEmail: PChar; //Authors Email
- Homepage: PChar; //Homepage of Plugin/Author
+ Name: Array [0..31] of Char; //Name of the Plugin
+ Version: DWord; //Version of the Plugin
+ Description: Array [0..127] of Char; //Description, what does this Plugin do
+ Author: Array [0..31] of Char; //Author of this Plugin
+ AuthorEmail: Array [0..63] of Char; //Authors Email
+ Homepage: Array [0..63] of Char; //Homepage of Plugin/Author
end;
+ AUS_PluginInfo = Array of TUS_PluginInfo;
+ PAUS_PluginInfo = ^AUS_PluginInfo;
//----------------
// TUS_Hook - Structure of the Hook Function
@@ -100,7 +102,9 @@ type
ServiceExists: Function (ServiceName: PChar): Integer; stdcall;
end;
- //TModuleInfo: Info about Modules
+ //----------------
+ //TModuleInfo: Info about Modules. Result of Core/GetModuleInfo
+ //----------------
PModuleInfo = ^TModuleInfo;
TModuleInfo = record
Name: String;
@@ -109,6 +113,25 @@ type
end;
AModuleInfo = array of TModuleInfo;
+ //----------------
+ // Procs that should be exported by Plugin Dlls
+ //----------------
+ //Procedure is called to check if this is USDx Plugin
+ //Info is Pointer to this Plugins Info. Size is already set. Don't write over this limit
+ Proc_PluginInfo = procedure (Info: PUS_PluginInfo); stdcall;
+
+ //Called on Plugins Load. If Non Zero is Returned => abort Loading
+ //PInterface is Pointer to PluginInterface
+ Func_Load = function (const PInterface: PUS_PluginInterface): Integer; stdcall;
+
+ //Called on Plugins Init. If Non Zero is Returned => abort Loading
+ //PInterface is Pointer to PluginInterface
+ Func_Init = function (const PInterface: PUS_PluginInterface): Integer; stdcall;
+
+ //Called on Plugins Deinit.
+ //PInterface is Pointer to PluginInterface
+ Proc_DeInit = procedure (const PInterface: PUS_PluginInterface); stdcall;
+
//----------------
// Some Default Constants
//----------------
@@ -116,6 +139,7 @@ const
{Returned if Service is not found from CallService}
SERVICE_NOT_FOUND=$80000000;
+ //for use in Service 'Core/ShowMessage' lParam(Symbol)
CORE_SM_NOSYMBOL= 0;
CORE_SM_ERROR = 1;
CORE_SM_WARNING = 2;
@@ -127,7 +151,6 @@ const
Function MakeVersion(const HeadRevision, SubVersion, SubVersion2: Byte; Letter: Char): DWord;
Function VersiontoSting(const Version: DWord): String;
-
implementation
//--------------