Spellforce-Spell-framework
Loading...
Searching...
No Matches
sf_wrappers.h
Go to the documentation of this file.
1#ifndef UTILITY_H
2#define UTILITY_H
3
4#include "../../api/sfsf.h"
5#include "../../asi/sf_asi.h"
6
7typedef SF_String *(__thiscall *SF_String_ctor_ptr)(SF_String *, const char *);
8typedef void (__thiscall *SF_String_dtor_ptr)(SF_String *);
9typedef bool (__thiscall *has_spell_effect_ptr)(SF_CGdFigureToolbox *_this,
10 uint16_t param_1,
11 uint16_t param_2);
12void log_message(const char *filename, const char *message);
13
15
16extern bool __thiscall hasAuraActive(SF_CGdFigureToolbox *_this,
17 uint16_t figure_id);
18extern bool __thiscall isActionMelee(SF_SGtFigureAction *_this);
19extern bool __thiscall hasSpellTag(uint16_t spell_id, SpellTag tag);
20extern void __thiscall setupFigureIterator(CGdFigureIterator *iterator,
21 SF_CGdSpell *spell);
22extern void __thiscall disposeFigureIterator(CGdFigureIterator *iterator);
23
24extern void __thiscall spellEffectCallback(SF_CGdSpell *_this,
25 uint16_t source_index,
26 uint16_t spell_index,
27 bool (*condition)(SF_CGdSpell *_this,
28 uint16_t
29 spell_index,
30 uint16_t
31 walked_index),
32 void (*callback)(SF_CGdSpell *_this,
33 uint16_t
34 source_index,
35 uint16_t
36 walked_index,
37 uint16_t spell_index));
38
39extern void __thiscall addBonusMultToStatistic(SF_CGdFigure *figure,
41 uint16_t target, int8_t value);
42extern void __thiscall spellClearFigureFlag(SF_CGdSpell *spell,
43 uint16_t spell_index,
44 SpellFlagKey key);
45extern uint16_t __thiscall sf_get_spell_id(SF_CGdSpell *_this,
46 uint16_t spell_index);
47extern uint32_t getDistance(SF_Coord *pointA, SF_Coord *pointB);
48extern SFLog *setup_logger();
49
50
51typedef void (__thiscall *vfunction_2_ptr)(void *_this, void *input);
52typedef void (__thiscall *vfunction_ptr)(void *_this, char p1);
53typedef void (__thiscall *vfunction12_ptr)(void *container, void *test,
54 char p1);
55typedef void (__thiscall *attach_string_ptr)(void *container, void *string);
56typedef void (__thiscall *set_button_flag_ptr)(void *container, char flag);
57typedef void (__thiscall *set_btn_index_ptr)(void *container, int index);
58typedef void (__thiscall *create_button_ptr)(CMnuSmpButton *smpButton,
59 float x_pos, float y_pos,
60 float width, float height,
61 SF_String *default_mesh,
62 SF_String *unkn_mesh_string,
63 SF_String *pressed_mesh,
64 SF_String *disable_mesh);
65typedef void (__thiscall *set_label_color_ptr)(CMnuLabel *_this, float r,
66 float g, float b, char flag);
67typedef void (__thiscall *set_btn_name_ptr)(void *button, SF_String *string);
69 CMnuSmpButton *btn);
70typedef void (__thiscall *vfunction2_callback_attach_ptr)(void *, void *,void *,
71 void *);
72typedef void (__thiscall *initialize_menu_container_ptr)(CMnuContainer *_this);
73typedef void (__thiscall *setup_menu_container_data_ptr)(CMnuContainer *_this,
74 float x, float y,
75 float width,
76 float height,
77 SF_String *background,
78 SF_String *border);
79typedef void (__thiscall *container_alpha_ptr)(CMnuContainer *_this,
80 float alpha);
81typedef void (__thiscall *CMnuBase_setname_ptr)(CMnuBase *_this,
82 SF_String *name);
83
85extern fidfree_ptr fidFree;
105
106extern "C" void log_warning(const char *message);
107extern "C" void log_info(const char *message);
108extern "C" void log_error(const char *message);
109
110#endif
void __thiscall addBonusMultToStatistic(SF_CGdFigure *figure, StatisticDataKey key, uint16_t target, int8_t value)
initialize_menu_container_ptr initialize_menu_container
Definition sf_wrappers.c:35
uint32_t getDistance(SF_Coord *pointA, SF_Coord *pointB)
void log_info(const char *message)
Definition sf_wrappers.c:89
container_alpha_ptr set_container_alpha
Definition sf_wrappers.c:37
void __thiscall setupFigureIterator(CGdFigureIterator *iterator, SF_CGdSpell *spell)
create_button_ptr create_button_func
Definition sf_wrappers.c:28
vfunction_ptr vfunction176
Definition sf_wrappers.c:30
vfunction_ptr vfunction16_attach_callback
Definition sf_wrappers.c:43
void log_warning(const char *message)
Definition sf_wrappers.c:81
has_spell_effect_ptr has_spell_effect
Definition sf_wrappers.c:27
vfunction2_callback_attach_ptr attach_callback
Definition sf_wrappers.c:42
initialize_smp_button_ptr initialize_smp_button
Definition sf_wrappers.c:33
set_btn_name_ptr set_button_name
Definition sf_wrappers.c:34
set_label_color_ptr set_label_color
Definition sf_wrappers.c:36
set_button_flag_ptr set_menu_button_flag
Definition sf_wrappers.c:41
void log_error(const char *message)
Definition sf_wrappers.c:97
bool __thiscall hasSpellTag(uint16_t spell_id, SpellTag tag)
bool __thiscall hasAuraActive(SF_CGdFigureToolbox *_this, uint16_t figure_id)
SF_String_ctor_ptr g_create_sf_string
Definition sf_wrappers.c:25
void __thiscall spellClearFigureFlag(SF_CGdSpell *spell, uint16_t spell_index, SpellFlagKey key)
void __thiscall disposeFigureIterator(CGdFigureIterator *iterator)
fidfree_ptr fidFree
Definition sf_wrappers.c:24
void log_message(const char *filename, const char *message)
Definition sf_wrappers.c:71
FUN_0069eaf0_ptr FUN_0069eaf0
Definition sf_wrappers.c:23
vfunction_2_ptr set_font
Definition sf_wrappers.c:39
SFLog * setup_logger()
void initialize_wrapper_data_hooks()
Definition sf_wrappers.c:46
SF_String_dtor_ptr g_destroy_sf_string
Definition sf_wrappers.c:26
uint16_t __thiscall sf_get_spell_id(SF_CGdSpell *_this, uint16_t spell_index)
attach_string_ptr vfunction_apply_string
Definition sf_wrappers.c:29
set_btn_index_ptr set_button_index
Definition sf_wrappers.c:40
vfunction_ptr vfunction25
Definition sf_wrappers.c:31
bool __thiscall isActionMelee(SF_SGtFigureAction *_this)
setup_menu_container_data_ptr setup_menu_container_data
Definition sf_wrappers.c:38
vfunction12_ptr vfunction12
Definition sf_wrappers.c:32
StatisticDataKey
void(* fidfree_ptr)(uint32_t *memory_ptr)
uint32_t(__thiscall * FUN_0069eaf0_ptr)(void *ac69, void *ac69_2, void *ac69_3, void *ac69_4)
SpellFlagKey
void __thiscall spellEffectCallback(SF_CGdSpell *_this, uint16_t source_index, uint16_t spell_index, bool(*condition)(SF_CGdSpell *_this, uint16_t spell_index, uint16_t walked_index), void(*callback)(SF_CGdSpell *_this, uint16_t source_index, uint16_t walked_index, uint16_t spell_index))
bool(__thiscall * has_spell_effect_ptr)(SF_CGdFigureToolbox *_this, uint16_t param_1, uint16_t param_2)
Definition sf_wrappers.h:9
SF_String *(__thiscall * SF_String_ctor_ptr)(SF_String *, const char *)
Definition sf_wrappers.h:7
void(__thiscall * SF_String_dtor_ptr)(SF_String *)
Definition sf_wrappers.h:8
void(__thiscall * container_alpha_ptr)(CMnuContainer *_this, float alpha)
Definition sf_wrappers.h:79
void(__thiscall * set_button_flag_ptr)(void *container, char flag)
Definition sf_wrappers.h:56
void(__thiscall * set_btn_index_ptr)(void *container, int index)
Definition sf_wrappers.h:57
void(__thiscall * vfunction_2_ptr)(void *_this, void *input)
Definition sf_wrappers.h:51
void(__thiscall * vfunction2_callback_attach_ptr)(void *, void *, void *, void *)
Definition sf_wrappers.h:70
void(__thiscall * set_label_color_ptr)(CMnuLabel *_this, float r, float g, float b, char flag)
Definition sf_wrappers.h:65
void(__thiscall * set_btn_name_ptr)(void *button, SF_String *string)
Definition sf_wrappers.h:67
void(__thiscall * CMnuBase_setname_ptr)(CMnuBase *_this, SF_String *name)
Definition sf_wrappers.h:81
void(__thiscall * setup_menu_container_data_ptr)(CMnuContainer *_this, float x, float y, float width, float height, SF_String *background, SF_String *border)
Definition sf_wrappers.h:73
void(__thiscall * initialize_menu_container_ptr)(CMnuContainer *_this)
Definition sf_wrappers.h:72
void(__thiscall * create_button_ptr)(CMnuSmpButton *smpButton, float x_pos, float y_pos, float width, float height, SF_String *default_mesh, SF_String *unkn_mesh_string, SF_String *pressed_mesh, SF_String *disable_mesh)
Definition sf_wrappers.h:58
void(__thiscall * vfunction12_ptr)(void *container, void *test, char p1)
Definition sf_wrappers.h:53
void(__thiscall * attach_string_ptr)(void *container, void *string)
Definition sf_wrappers.h:55
CMnuSmpButton *(__thiscall * initialize_smp_button_ptr)(CMnuSmpButton *btn)
Definition sf_wrappers.h:68
void(__thiscall * vfunction_ptr)(void *_this, char p1)
Definition sf_wrappers.h:52
A structure for the global list of figures and related statistics for them.