mirror of
https://github.com/wiiu-env/WiiUPluginSystem.git
synced 2025-01-11 17:19:06 +01:00
Format the function_patcher.h
This commit is contained in:
parent
3a82b76d60
commit
c959e86226
@ -40,15 +40,15 @@ struct rpl_handling {
|
|||||||
#define MAXIMUM_FUNCTION_NAME_LENGTH 61
|
#define MAXIMUM_FUNCTION_NAME_LENGTH 61
|
||||||
|
|
||||||
struct replacement_data_function_t {
|
struct replacement_data_function_t {
|
||||||
uint32_t replaceAddr; /* [needs to be filled] Address of our replacement function */
|
uint32_t replaceAddr; /* [needs to be filled] Address of our replacement function */
|
||||||
uint32_t replaceCall; /* [needs to be filled] Address to access the real_function */
|
uint32_t replaceCall; /* [needs to be filled] Address to access the real_function */
|
||||||
wups_loader_library_type_t library; /* [needs to be filled] rpl where the function we want to replace is. */
|
wups_loader_library_type_t library; /* [needs to be filled] rpl where the function we want to replace is. */
|
||||||
char function_name[MAXIMUM_FUNCTION_NAME_LENGTH]; /* [needs to be filled] name of the function we want to replace */
|
char function_name[MAXIMUM_FUNCTION_NAME_LENGTH]; /* [needs to be filled] name of the function we want to replace */
|
||||||
uint32_t realAddr; /* [will be filled] Address of the real function we want to replace. */
|
uint32_t realAddr; /* [will be filled] Address of the real function we want to replace. */
|
||||||
volatile uint32_t replace_data [FUNCTION_PATCHER_METHOD_STORE_SIZE]; /* [will be filled] Space for us to store some jump instructions */
|
volatile uint32_t replace_data [FUNCTION_PATCHER_METHOD_STORE_SIZE]; /* [will be filled] Space for us to store some jump instructions */
|
||||||
uint32_t restoreInstruction; /* [will be filled] Copy of the instruction we replaced to jump to our code. */
|
uint32_t restoreInstruction; /* [will be filled] Copy of the instruction we replaced to jump to our code. */
|
||||||
uint8_t functionType; /* [will be filled] */
|
uint8_t functionType; /* [will be filled] */
|
||||||
uint8_t alreadyPatched; /* [will be filled] */
|
uint8_t alreadyPatched; /* [will be filled] */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct replacement_data_hook_t {
|
struct replacement_data_hook_t {
|
||||||
@ -62,18 +62,18 @@ struct replacement_data_hook_t {
|
|||||||
struct replacement_data_plugin_t {
|
struct replacement_data_plugin_t {
|
||||||
char path[MAXIMUM_PLUGIN_PATH_NAME_LENGTH] = ""; // Path where the plugin is stored
|
char path[MAXIMUM_PLUGIN_PATH_NAME_LENGTH] = ""; // Path where the plugin is stored
|
||||||
char plugin_name[MAXIMUM_PLUGIN_NAME_LENGTH] = ""; // Name of this plugin
|
char plugin_name[MAXIMUM_PLUGIN_NAME_LENGTH] = ""; // Name of this plugin
|
||||||
int32_t priority; // Priority of this plugin
|
int32_t priority; // Priority of this plugin
|
||||||
int32_t number_used_functions; // Number of used function. Maximum is MAXIMUM_FUNCTION_PER_PLUGIN
|
int32_t number_used_functions; // Number of used function. Maximum is MAXIMUM_FUNCTION_PER_PLUGIN
|
||||||
replacement_data_function_t functions[MAXIMUM_FUNCTION_PER_PLUGIN]; // Replacement information for each function.
|
replacement_data_function_t functions[MAXIMUM_FUNCTION_PER_PLUGIN]; // Replacement information for each function.
|
||||||
|
|
||||||
int32_t number_used_hooks; // Number of used hooks. Maximum is MAXIMUM_HOOKS_PER_PLUGIN
|
int32_t number_used_hooks; // Number of used hooks. Maximum is MAXIMUM_HOOKS_PER_PLUGIN
|
||||||
replacement_data_hook_t hooks[MAXIMUM_HOOKS_PER_PLUGIN]; // Replacement information for each function.
|
replacement_data_hook_t hooks[MAXIMUM_HOOKS_PER_PLUGIN]; // Replacement information for each function.
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MAXIMUM_PLUGINS 32
|
#define MAXIMUM_PLUGINS 32
|
||||||
|
|
||||||
struct replacement_data_t {
|
struct replacement_data_t {
|
||||||
int32_t number_used_plugins = 0; // Number of used function. Maximum is MAXIMUM_FUNCTION_PER_PLUGIN
|
int32_t number_used_plugins = 0; // Number of used function. Maximum is MAXIMUM_FUNCTION_PER_PLUGIN
|
||||||
replacement_data_plugin_t plugin_data[MAXIMUM_PLUGINS];
|
replacement_data_plugin_t plugin_data[MAXIMUM_PLUGINS];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user