summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc27
4 files changed, 34 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 0c63a98b6..5412f6138 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -6608,6 +6608,8 @@ typedef bool (*HPMHOOK_pre_script_config_read) (const char **filename, bool *imp
typedef bool (*HPMHOOK_post_script_config_read) (bool retVal___, const char *filename, bool imported);
typedef int (*HPMHOOK_pre_script_add_str) (const char **p);
typedef int (*HPMHOOK_post_script_add_str) (int retVal___, const char *p);
+typedef int (*HPMHOOK_pre_script_add_variable) (const char **varname);
+typedef int (*HPMHOOK_post_script_add_variable) (int retVal___, const char *varname);
typedef const char* (*HPMHOOK_pre_script_get_str) (int *id);
typedef const char* (*HPMHOOK_post_script_get_str) (const char* retVal___, int id);
typedef int (*HPMHOOK_pre_script_search_str) (const char **p);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index c4394d7f4..a4fdc7da0 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -5130,6 +5130,8 @@ struct {
struct HPMHookPoint *HP_script_config_read_post;
struct HPMHookPoint *HP_script_add_str_pre;
struct HPMHookPoint *HP_script_add_str_post;
+ struct HPMHookPoint *HP_script_add_variable_pre;
+ struct HPMHookPoint *HP_script_add_variable_post;
struct HPMHookPoint *HP_script_get_str_pre;
struct HPMHookPoint *HP_script_get_str_post;
struct HPMHookPoint *HP_script_search_str_pre;
@@ -11681,6 +11683,8 @@ struct {
int HP_script_config_read_post;
int HP_script_add_str_pre;
int HP_script_add_str_post;
+ int HP_script_add_variable_pre;
+ int HP_script_add_variable_post;
int HP_script_get_str_pre;
int HP_script_get_str_post;
int HP_script_search_str_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index e5584cc43..00d932689 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -2628,6 +2628,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(script->setarray_pc, HP_script_setarray_pc) },
{ HP_POP(script->config_read, HP_script_config_read) },
{ HP_POP(script->add_str, HP_script_add_str) },
+ { HP_POP(script->add_variable, HP_script_add_variable) },
{ HP_POP(script->get_str, HP_script_get_str) },
{ HP_POP(script->search_str, HP_script_search_str) },
{ HP_POP(script->setd_sub, HP_script_setd_sub) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index f2ce1505c..d93557fe6 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -68339,6 +68339,33 @@ int HP_script_add_str(const char *p) {
}
return retVal___;
}
+int HP_script_add_variable(const char *varname) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_script_add_variable_pre > 0) {
+ int (*preHookFunc) (const char **varname);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_variable_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_script_add_variable_pre[hIndex].func;
+ retVal___ = preHookFunc(&varname);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.script.add_variable(varname);
+ }
+ if (HPMHooks.count.HP_script_add_variable_post > 0) {
+ int (*postHookFunc) (int retVal___, const char *varname);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_variable_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_script_add_variable_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, varname);
+ }
+ }
+ return retVal___;
+}
const char* HP_script_get_str(int id) {
int hIndex = 0;
const char* retVal___ = NULL;