Spellforce-Spell-framework
Loading...
Searching...
No Matches
sf_registration_functions.h
Go to the documentation of this file.
1#pragma once
2#include <stdint.h>
3#include <stdbool.h>
6#include "sf_ai_functions.h"
7typedef uint16_t (__thiscall *damage_handler_ptr)(SF_CGdFigureToolbox *_toolbox,
8 uint16_t source,
9 uint16_t target,
10 uint16_t current_damage,
11 uint16_t is_spell_damage,
12 uint32_t is_ranged_damage,
13 uint16_t spell_id);
14
15typedef void (__thiscall *handler_ptr)(SF_CGdSpell *, uint16_t);
16typedef uint32_t (__thiscall *ai_aoe_handler_ptr)(
17 SF_CGdBattleDevelopment *_this, SF_Coord *position, uint16_t spell_line,
18 SF_CGdResourceSpell *spell_data);
19typedef uint32_t (__thiscall *ai_single_handler_ptr)(
20 SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line,
21 SF_CGdResourceSpell *spell_data);
22typedef uint32_t (__thiscall *ai_avoidance_handler_ptr)(CGdAIBattleData *_this,
23 uint16_t figure_index,
24 uint16_t spell_line);
25typedef uint16_t (__thiscall *onhit_handler_ptr)(SF_CGdFigureJobs *,
26 uint16_t source,
27 uint16_t target,
28 uint16_t damage);
29typedef int (__thiscall *refresh_handler_ptr)(SF_CGdSpell *, uint16_t);
30
50
51// Declare the function pointers for the RegistrationFunctions group
52DECLARE_FUNCTION(SFSpell *, registerSpell, uint16_t spell_id);
54 handler_ptr typeHandler);
56 uint16_t spell_effect_id, handler_ptr effectHandler);
59 onhit_handler_ptr onhitHandler, OnHitPhase phase);
67
74
Header file for defining AI-related battle functions for managing spellcasting, NPC behavior,...
void(__thiscall * sub_effect_handler_ptr)(SF_CGDEffect *, uint16_t effect_index)
Group of Structures and Enums used throught SFSF.
#define DECLARE_FUNCTION(type, name,...)
Declares a function with the specified return type, name, and arguments.
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)
void(__thiscall * linkAOEAIHandler_ptr)(SFSpell *spell, ai_aoe_handler_ptr handler)
void(__thiscall * linkDealDamageHandler_ptr)(SFSpell *spell, damage_handler_ptr handler, SpellDamagePhase phase)
void(__thiscall * linkEffectHandler_ptr)(SFSpell *spell, uint16_t spell_effect_id, handler_ptr effectHandler)
void(__thiscall * linkSingleTargetAIHandler_ptr)(SFSpell *spell, ai_single_handler_ptr handler)
void(__thiscall * applySpellTag_ptr)(SFSpell *spell, SpellTag tag)
void(__thiscall * linkRefreshHandler_ptr)(SFSpell *spell, refresh_handler_ptr handler)
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)
void(__thiscall * linkAvoidanceAIHandler_ptr)(SFSpell *spell, ai_avoidance_handler_ptr handler)
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 * linkTypeHandler_ptr)(SFSpell *spell, handler_ptr typeHandler)
SFSpell *(__thiscall * registerSpell_ptr)(uint16_t spell_id)
void(__thiscall * linkEndHandler_ptr)(SFSpell *spell, handler_ptr endHandler)
void(__thiscall * linkOnHitHandler_ptr)(SFSpell *spell, onhit_handler_ptr onhitHandler, OnHitPhase phase)
void(__thiscall * handler_ptr)(SF_CGdSpell *, uint16_t)
void(__thiscall * linkSubEffectHandler_ptr)(SFSpell *spell, sub_effect_handler_ptr handler)
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)
The main structure for handling AI battle data.
A structure dedicated to the registration of spells This structure holds functions that are used to c...
linkAOEAIHandler_ptr linkAOEAIHandler
linkSubEffectHandler_ptr linkSubEffectHandler
linkSingleTargetAIHandler_ptr linkSingleTargetAIHandler
linkTypeHandler_ptr linkTypeHandler
linkRefreshHandler_ptr linkRefreshHandler
linkAvoidanceAIHandler_ptr linkAvoidanceAIHandler
linkEffectHandler_ptr linkEffectHandler
linkOnHitHandler_ptr linkOnHitHandler
linkDealDamageHandler_ptr linkDealDamageHandler
High-level structure managing AI battle development.
handler_ptr spell_effect_handler
ai_avoidance_handler_ptr ai_avoidance_handler
damage_handler_ptr deal_damage_handler
ai_single_handler_ptr ai_single_handler
SpellDamagePhase damage_phase
refresh_handler_ptr spell_refresh_handler
handler_ptr spell_end_handler
sub_effect_handler_ptr sub_effect_handler
onhit_handler_ptr spell_onhit_handler
ai_aoe_handler_ptr ai_aoe_handler
handler_ptr spell_type_handler