diff options
author | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-10-10 17:50:05 +0000 |
---|---|---|
committer | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-10-10 17:50:05 +0000 |
commit | 621bfb05407a169f6511f5b115d0622e5ec8bdd5 (patch) | |
tree | 7edbf5de48b2914978b8575030c2d0a72dcf6011 /Modis/SDK | |
parent | e64a9f34e7c08377990a8b3f11c24e9e9c5b8cc3 (diff) | |
download | usdx-621bfb05407a169f6511f5b115d0622e5ec8bdd5.tar.gz usdx-621bfb05407a169f6511f5b115d0622e5ec8bdd5.tar.xz usdx-621bfb05407a169f6511f5b115d0622e5ec8bdd5.zip |
Added Hook and Service Class for new Plugin System to Trunc
Added Core and CoreModule. That maybe will be used for new Core management.
Core needs many code to write
Some Info to Plugin SDK added
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@497 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Modis/SDK')
-rw-r--r-- | Modis/SDK/Hooks.txt | 19 | ||||
-rw-r--r-- | Modis/SDK/Plugin DLL Exports.txt | 0 | ||||
-rw-r--r-- | Modis/SDK/Services.txt | 9 | ||||
-rw-r--r-- | Modis/SDK/UPluginDefs.pas | 45 |
4 files changed, 69 insertions, 4 deletions
diff --git a/Modis/SDK/Hooks.txt b/Modis/SDK/Hooks.txt new file mode 100644 index 00000000..32237694 --- /dev/null +++ b/Modis/SDK/Hooks.txt @@ -0,0 +1,19 @@ +Ultrastar Deluxe Hook List
+-----------------------------------
+Here you can find the Events the Core offers to you:
+
+--------------------
+Core:
+--------------------
+Core/LoadingFinished <- Hook is called after all Modules and Plugins are loaded completely, before MainLoop
+Core/MainLoop <- Hook is called once in MainLoop before Drawing
+Core/LoadTextures <- Hook is called when Textures should be Loaded. This will be called in Ogl Thread. If Textures are Reloaded (e.g. on Display ReInit) LParam is non Zero.
+Core/ExitQuery <- Hook is called if someone querys an exit. (e.g. X is pressed). Not called on ForcedExit. If Chain is breaked the exit will be aborted.
+Core/Exit <- Hook is called before Module a. Plugin unload.
+Core/NewDebugInfo <- Hook is called everytime there is Debug Info to Output(only if Debug Mode is enabled). wParam: Pchar(Message), lParam: PChar(Reportername)
+Core/NewError <- Hook is called everytime an error is reported. wParam: Pchar(Message), lParam: PChar(Reportername)
+
+--------------------
+Display
+--------------------
+Display/onScreenChange <-Hook is called when there is an attemp to change Screen. wParam is address to Screens Name(Null Terminated). If Chain is breaked Screenchange will be aborted.
\ No newline at end of file diff --git a/Modis/SDK/Plugin DLL Exports.txt b/Modis/SDK/Plugin DLL Exports.txt new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/Modis/SDK/Plugin DLL Exports.txt diff --git a/Modis/SDK/Services.txt b/Modis/SDK/Services.txt new file mode 100644 index 00000000..ae8f4097 --- /dev/null +++ b/Modis/SDK/Services.txt @@ -0,0 +1,9 @@ +Ultrastar Deluxe Hook List
+-----------------------------------
+Here you can find the Services the Core offers to you:
+
+--------------------
+Core:
+--------------------
+Core/ReportError <- Calls the 'Core/NewError' Chain. wParam: Pchar(Message), lParam: PChar(Reportername)
+Core/ReportDebug <- Calls the 'Core/NewDebugInfo' Chain. wParam: Pchar(Message), lParam: PChar(Reportername)
\ No newline at end of file diff --git a/Modis/SDK/UPluginDefs.pas b/Modis/SDK/UPluginDefs.pas index 7428ae2e..42f888e4 100644 --- a/Modis/SDK/UPluginDefs.pas +++ b/Modis/SDK/UPluginDefs.pas @@ -13,6 +13,12 @@ type //----------------
// TUS_PluginInfo - Some Infos from Plugin to Core.
// Send when Plugininfo procedure is Called
+ // ---
+ // Version Structure:
+ // First Byte: Head Revison
+ // Second Byte: Sub Revison
+ // Third Byte: Sub Revision 2
+ // Fourth Byte: Letter (For Bug Fix releases. 0 or 'a' .. 'z')
//----------------
PUS_PluginInfo = ^TUS_PluginInfo;
TUS_PluginInfo = record
@@ -30,7 +36,7 @@ type // TUS_Hook - Structure of the Hook Function
// Return 0 if the Hook should be continue,
// or a non zero Value, if the Hook should be Interuped
- // In this Case the Caller of the Notivier gets the Return Value
+ // In this Case the Caller of the Notifier gets the Return Value
// Return Value Should not be -1
//----------------
TUS_Hook = Function (wParam, lParam: DWord): integer; stdcall;
@@ -54,7 +60,7 @@ type {Function Creates a new Hookable Event and Returns the Handle
or 0 on Failure. (Name already exists)}
CreateHookableEvent: Function (EventName: PChar): THandle; stdcall;
-
+
{Function Destroys an Event and Unhooks all Hooks to this Event.
0 on success, not 0 on Failure}
DestroyHookableEvent: Function (hEvent: THandle): integer; stdcall;
@@ -80,7 +86,7 @@ type {Function Creates a new Service and Returns the Services Handle
or 0 on Failure. (Name already exists)}
CreateService: Function (ServiceName: PChar; ServiceProc: TUS_Service): THandle; stdcall;
-
+
{Function Destroys a Service.
0 on success, not 0 on Failure}
DestroyService: Function (hService: THandle): integer; stdcall;
@@ -98,10 +104,41 @@ type // Some Default Constants
//----------------
const
- {Returned if Service is not Found from CallService}
+ {Returned if Service is not found from CallService}
SERVICE_NOT_FOUND=$80000000;
+ CORE_SM_NOSYMBOL= 0;
+ CORE_SM_ERROR = 1;
+ CORE_SM_WARNING = 2;
+ CORE_SM_INFO = 3;
+
+//----------------
+// Some Functions to Handle Version DWords
+//----------------
+Function MakeVersion(const HeadRevision, SubVersion, SubVersion2: Byte; Letter: Char): DWord;
+Function VersiontoSting(const Version: DWord): String;
+
implementation
+//--------------
+// MakeVersion - Converts 4 Values to a valid Version DWord
+//--------------
+Function MakeVersion(const HeadRevision, SubVersion, SubVersion2: Byte; Letter: Char): DWord;
+begin
+ If (letter < 'a') or (Letter > 'z') then
+ letter := chr(0);
+
+ Result := (HeadRevision shl 24) or (SubVersion shl 16) or (SubVersion2 shl 8) or Ord(Letter);
+end;
+
+//--------------
+// VersiontoString - Returns some beauty '1.0.2a' like String
+//--------------
+Function VersiontoSting(const Version: DWord): String;
+begin // to-do : Write VersiontoString without SysUtils depencies
+ //Result := InttoStr((ver and $FF000000) shr 24);
+ Result := '1.0.1
+end;
+
end.
|