Spellforce-Spell-framework
Loading...
Searching...
No Matches
sf_hooks.h
Go to the documentation of this file.
1#ifndef HOOKS_H
2#define HOOKS_H
3
4#include "../../api/sfsf.h"
5#include "../../asi/sf_asi.h"
7
8#define DEFINE_FUNCTION(group, name, address) \
9 name ## _ptr name = (name ## _ptr)(ASI::AddrOf(address)); \
10 group ## API.name = name;
11
12#define INCLUDE_FUNCTION(group, name, pointer) \
13 group ## API.name = pointer;
14
21extern AiFunctions aiAPI;
22
23extern SFSpell *__thiscall registerSpell(uint16_t spell_id);
24extern void __thiscall applySpellTag(SFSpell *spell, SpellTag tag);
25
26extern void __thiscall linkTypeHandler(SFSpell *spell, handler_ptr typeHandler);
27
28extern void __thiscall linkEffectHandler(SFSpell *spell,
29 uint16_t spell_effect_id,
30 handler_ptr effectHandler);
31
32extern void __thiscall linkEndHandler(SFSpell *spell, handler_ptr endHandler);
33
34extern void __thiscall linkSubEffectHandler(SFSpell *spell,
36
37extern void __thiscall linkRefreshHandler(SFSpell *spell,
38 refresh_handler_ptr handler);
39
40extern void __thiscall linkDealDamageHandler(SFSpell *spell,
41 damage_handler_ptr handler,
42 SpellDamagePhase phase);
43
44extern void __thiscall linkOnHitHandler(SFSpell *spell,
45 onhit_handler_ptr handler,
46 OnHitPhase phase);
47
48extern void __thiscall linkSingleTargetAIHandler(SFSpell *spell,
49 ai_single_handler_ptr handler);
50
51extern void __thiscall linkAOEAIHandler(SFSpell *spell,
52 ai_aoe_handler_ptr handler);
53
54extern void __thiscall linkAvoidanceAIHandler(SFSpell *spell,
56
57extern SFMod *createModInfo(const char *mod_id, const char *mod_version,
58 const char *mod_author,
59 const char *mod_description);
60
63
64#endif
void initialize_data_hooks()
Used to initialize all disparate hooks in one place.
Definition sf_hooks.c:51
EffectFunctions effectAPI
Definition sf_hooks.c:37
void initialize_beta_hooks()
Definition sf_hooks.c:502
IteratorFunctions iteratorAPI
Definition sf_hooks.c:40
ToolboxFunctions toolboxAPI
Definition TestMod.cpp:12
AiFunctions aiAPI
Definition sf_hooks.c:41
SpellFunctions spellAPI
Definition TestMod.cpp:11
FigureFunctions figureAPI
Definition TestMod.cpp:13
RegistrationFunctions registrationAPI
Definition TestMod.cpp:14
SFMod * createModInfo(const char *mod_id, const char *mod_version, const char *mod_author, const char *mod_description)
void(__thiscall * sub_effect_handler_ptr)(SF_CGDEffect *, uint16_t effect_index)
void __thiscall linkAOEAIHandler(SFSpell *spell, ai_aoe_handler_ptr handler)
void __thiscall linkEndHandler(SFSpell *spell, handler_ptr endHandler)
void __thiscall linkDealDamageHandler(SFSpell *spell, damage_handler_ptr handler, SpellDamagePhase phase)
void __thiscall applySpellTag(SFSpell *spell, SpellTag tag)
void __thiscall linkTypeHandler(SFSpell *spell, handler_ptr typeHandler)
void __thiscall linkRefreshHandler(SFSpell *spell, refresh_handler_ptr handler)
void __thiscall linkEffectHandler(SFSpell *spell, uint16_t spell_effect_id, handler_ptr effectHandler)
void __thiscall linkSingleTargetAIHandler(SFSpell *spell, ai_single_handler_ptr handler)
void __thiscall linkAvoidanceAIHandler(SFSpell *spell, ai_avoidance_handler_ptr handler)
void __thiscall linkOnHitHandler(SFSpell *spell, onhit_handler_ptr handler, OnHitPhase phase)
void __thiscall linkSubEffectHandler(SFSpell *spell, sub_effect_handler_ptr handler)
SFSpell *__thiscall registerSpell(uint16_t spell_id)
uint16_t(__thiscall * damage_handler_ptr)(SF_CGdFigureToolbox *_toolbox, uint16_t source, uint16_t target, uint16_t current_damage, uint16_t is_spell_damage, uint32_t is_ranged_damage, uint16_t spell_id)
int(__thiscall * refresh_handler_ptr)(SF_CGdSpell *, uint16_t)
uint32_t(__thiscall * ai_single_handler_ptr)(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t(__thiscall * ai_aoe_handler_ptr)(SF_CGdBattleDevelopment *_this, SF_Coord *position, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
void(__thiscall * handler_ptr)(SF_CGdSpell *, uint16_t)
uint32_t(__thiscall * ai_avoidance_handler_ptr)(CGdAIBattleData *_this, uint16_t figure_index, uint16_t spell_line)
uint16_t(__thiscall * onhit_handler_ptr)(SF_CGdFigureJobs *, uint16_t source, uint16_t target, uint16_t damage)
Group of functions related to AI manipulation.
Group of functions related to Effect manipulation.
Group of functions to manipulate the behavior and statistics of the game figures (units)
Group of functions related to Iteration, Often used for AOE or Chain Like Spells.
A structure dedicated to the registration of spells This structure holds functions that are used to c...
Represents a collection of function pointers for managing spell-related operations.
Holds most of the Toolbox Functions relevent for custom spells. Includes functions for the manipulati...