mirror of
https://github.com/Ragora/T2-CPP.git
synced 2026-03-09 07:20:27 +00:00
Begin transition to the new ModLoader paradigm. Begin cleaning up code.
This commit is contained in:
parent
015a9f4dc8
commit
cb9895a38e
39 changed files with 1429 additions and 967 deletions
39
CommonAPI/Common/include/ModLoader/ModLoader.h
Normal file
39
CommonAPI/Common/include/ModLoader/ModLoader.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/**
|
||||
* @brief ModLoader main include file.
|
||||
*/
|
||||
|
||||
namespace ModLoader
|
||||
{
|
||||
//! A pointer type for a server process function.
|
||||
typedef void (*ServerProcessPointer)(unsigned int);
|
||||
|
||||
typedef void (*InitializeModPointer)();
|
||||
|
||||
typedef void (*DeinitializeModPointer)();
|
||||
|
||||
typedef const char* (*GetManagementNamePointer)();
|
||||
|
||||
//! A pointer type for reading the supported mod loader version for this mod.
|
||||
typedef unsigned int (*GetModLoaderVersionPointer)();
|
||||
|
||||
class ModLoaderCallables
|
||||
{
|
||||
public:
|
||||
//! Hook function that is called when the mod is loaded.
|
||||
InitializeModPointer mInitializeModPointer;
|
||||
|
||||
//! Hook function that is called when the mod is unloaded.
|
||||
DeinitializeModPointer mDeinitializeModPointer;
|
||||
|
||||
//! Hook function for the server update loop.
|
||||
ServerProcessPointer mServerProcessPointer;
|
||||
|
||||
//! Function called to get the name of the script object to use for registering mod management functions.
|
||||
GetManagementNamePointer mGetManagementName;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Returns the hook information from the loaded mod.
|
||||
*/
|
||||
typedef ModLoaderCallables* (*GetModCallablesPointer)();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue