Spellforce-Spell-framework
Loading...
Searching...
No Matches
Framework Wrappers

Contains wrapper functions that streamline complex setups. More...

Collaboration diagram for Framework Wrappers:

Functions

void initialize_wrapper_data_hooks ()
 
void log_message (const char *filename, const char *message)
 
void log_warning (const char *message)
 
void log_info (const char *message)
 
void log_error (const char *message)
 
SFLogsetup_logger ()
 
bool __thiscall isActionMelee (SF_SGtFigureAction *_this)
 
void __thiscall setupFigureIterator (CGdFigureIterator *iterator, SF_CGdSpell *spell)
 
bool __thiscall hasSpellTag (uint16_t spell_id, SpellTag tag)
 
uint32_t getDistance (SF_Coord *pointA, SF_Coord *pointB)
 
void __thiscall disposeFigureIterator (CGdFigureIterator *iterator)
 
void __thiscall spellEffectCallback (SF_CGdSpell *_this, uint16_t source_index, uint16_t spell_index, bool(*condition)(SF_CGdSpell *_this, uint16_t source_index, uint16_t spell_index), void(*callback)(SF_CGdSpell *_this, uint16_t source_index, uint16_t spell_index))
 
void __thiscall addBonusMultToStatistic (SF_CGdFigure *figure, StatisticDataKey key, uint16_t target, int8_t value)
 
void __thiscall spellClearFigureFlag (SF_CGdSpell *_this, uint16_t spell_id, SpellFlagKey key)
 
bool __thiscall hasAuraActive (SF_CGdFigureToolbox *_this, uint16_t figure_id)
 
CMnuLabel *__thiscall attach_new_label (CMnuLabel *label_ptr, CMnuContainer *parent, char *label_chars, uint8_t font_index, uint16_t x_pos, uint16_t y_pos, uint16_t width, uint16_t height)
 
void wrap_text (const char *input, char *output, size_t max_width)
 
void attach_mod_labels (CMnuContainer *container, int mods_per_page, int page)
 
void __fastcall navigate_callback_left (CMnuSmpButton *button, int32_t *cui_menu_ptr_maybe)
 
void __fastcall navigate_callback_right (CMnuSmpButton *button, int32_t *cui_menu_ptr_maybe)
 
void __thiscall show_mod_list (CMnuSmpButton *button)
 
void __fastcall show_mod_list_callback (CMnuSmpButton *button, int32_t *cui_menu_ptr_maybe)
 
void __thiscall attach_new_button (CMnuContainer *parent, char *button_mesh_default, char *button_mesh_pressed, char *button_initial_load_mesh, char *button_mesh_disabled, char *label_char, uint8_t font_index, uint16_t x_pos, uint16_t y_pos, uint16_t width, uint16_t height, int button_index, uint32_t callback_func_ptr)
 
CMnuLabel *__thiscall attach_new_meshed_label (CMnuLabel *new_label, CMnuContainer *parent, char *mesh_char, char *label_char, uint8_t font_index, uint16_t x_pos, uint16_t y_pos, uint16_t width, uint16_t height)
 
uint16_t __thiscall sf_get_spell_id (SF_CGdSpell *_this, uint16_t spell_index)
 
SFModcreateModInfo (const char *mod_id, const char *mod_version, const char *mod_author, const char *mod_description)
 
void attachVideo (CAppMenu *CAppMenu_ptr, CMnuContainer *parent, char *video_loc_and_name_chars)
 

Variables

FUN_0069eaf0_ptr FUN_0069eaf0
 
fidfree_ptr fidFree
 
SF_String_ctor_ptr g_create_sf_string
 
SF_String_dtor_ptr g_destroy_sf_string
 
has_spell_effect_ptr has_spell_effect
 
create_button_ptr create_button_func
 
attach_string_ptr vfunction_apply_string
 
vfunction_ptr vfunction176
 
vfunction_ptr vfunction25
 
vfunction12_ptr vfunction12
 
initialize_smp_button_ptr initialize_smp_button
 
set_btn_name_ptr set_button_name
 
initialize_menu_container_ptr initialize_menu_container
 
set_label_color_ptr set_label_color
 
container_alpha_ptr set_container_alpha
 
setup_menu_container_data_ptr setup_menu_container_data
 
vfunction_2_ptr set_font
 
set_btn_index_ptr set_button_index
 
set_button_flag_ptr set_menu_button_flag
 
vfunction2_callback_attach_ptr attach_callback
 
vfunction_ptr vfunction16_attach_callback
 
CMnuBase_setname_ptr CMnuBase_setname
 
SFLog sf_logger
 
SFSF_ModlistStruct modinformation
 
CMnuContainermod_list
 

Detailed Description

Contains wrapper functions that streamline complex setups.

This file consolidates multiple setup steps into single functions for ease of use, handling the initialization of variables, flags, and resources required for specific tasks.

Function Documentation

◆ addBonusMultToStatistic()

void __thiscall addBonusMultToStatistic ( SF_CGdFigure * figure,
StatisticDataKey key,
uint16_t target,
int8_t value )

Definition at line 205 of file sf_wrappers.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ attach_mod_labels()

void attach_mod_labels ( CMnuContainer * container,
int mods_per_page,
int page )

Attaches mod labels to the container based on pagination settings

Parameters
containerThe menu container to attach labels to
mods_per_pageNumber of mods to display per page
pageCurrent page number (0-based)

Definition at line 402 of file sf_wrappers.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ attach_new_button()

void __thiscall attach_new_button ( CMnuContainer * parent,
char * button_mesh_default,
char * button_mesh_pressed,
char * button_initial_load_mesh,
char * button_mesh_disabled,
char * label_char,
uint8_t font_index,
uint16_t x_pos,
uint16_t y_pos,
uint16_t width,
uint16_t height,
int button_index,
uint32_t callback_func_ptr )

Definition at line 666 of file sf_wrappers.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ attach_new_label()

CMnuLabel *__thiscall attach_new_label ( CMnuLabel * label_ptr,
CMnuContainer * parent,
char * label_chars,
uint8_t font_index,
uint16_t x_pos,
uint16_t y_pos,
uint16_t width,
uint16_t height )

Definition at line 327 of file sf_wrappers.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ attach_new_meshed_label()

CMnuLabel *__thiscall attach_new_meshed_label ( CMnuLabel * new_label,
CMnuContainer * parent,
char * mesh_char,
char * label_char,
uint8_t font_index,
uint16_t x_pos,
uint16_t y_pos,
uint16_t width,
uint16_t height )

Definition at line 754 of file sf_wrappers.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ attachVideo()

void attachVideo ( CAppMenu * CAppMenu_ptr,
CMnuContainer * parent,
char * video_loc_and_name_chars )

Definition at line 825 of file sf_wrappers.c.

◆ createModInfo()

SFMod * createModInfo ( const char * mod_id,
const char * mod_version,
const char * mod_author,
const char * mod_description )

Definition at line 802 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ disposeFigureIterator()

void __thiscall disposeFigureIterator ( CGdFigureIterator * iterator)

Definition at line 166 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ getDistance()

uint32_t getDistance ( SF_Coord * pointA,
SF_Coord * pointB )

Definition at line 139 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ hasAuraActive()

bool __thiscall hasAuraActive ( SF_CGdFigureToolbox * _this,
uint16_t figure_id )

Definition at line 322 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ hasSpellTag()

bool __thiscall hasSpellTag ( uint16_t spell_id,
SpellTag tag )

Definition at line 134 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ initialize_wrapper_data_hooks()

void initialize_wrapper_data_hooks ( )

Definition at line 46 of file sf_wrappers.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isActionMelee()

bool __thiscall isActionMelee ( SF_SGtFigureAction * _this)

Definition at line 117 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ log_error()

void log_error ( const char * message)

Definition at line 97 of file sf_wrappers.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ log_info()

void log_info ( const char * message)

Definition at line 89 of file sf_wrappers.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ log_message()

void log_message ( const char * filename,
const char * message )

Definition at line 71 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ log_warning()

void log_warning ( const char * message)

Definition at line 81 of file sf_wrappers.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ navigate_callback_left()

void __fastcall navigate_callback_left ( CMnuSmpButton * button,
int32_t * cui_menu_ptr_maybe )

Definition at line 518 of file sf_wrappers.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ navigate_callback_right()

void __fastcall navigate_callback_right ( CMnuSmpButton * button,
int32_t * cui_menu_ptr_maybe )

Definition at line 538 of file sf_wrappers.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_logger()

SFLog * setup_logger ( )

Definition at line 108 of file sf_wrappers.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setupFigureIterator()

void __thiscall setupFigureIterator ( CGdFigureIterator * iterator,
SF_CGdSpell * spell )

Definition at line 126 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ sf_get_spell_id()

uint16_t __thiscall sf_get_spell_id ( SF_CGdSpell * _this,
uint16_t spell_index )

Definition at line 797 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ show_mod_list()

void __thiscall show_mod_list ( CMnuSmpButton * button)

Definition at line 560 of file sf_wrappers.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ show_mod_list_callback()

void __fastcall show_mod_list_callback ( CMnuSmpButton * button,
int32_t * cui_menu_ptr_maybe )

Definition at line 655 of file sf_wrappers.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ spellClearFigureFlag()

void __thiscall spellClearFigureFlag ( SF_CGdSpell * _this,
uint16_t spell_id,
SpellFlagKey key )

Definition at line 299 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ spellEffectCallback()

void __thiscall spellEffectCallback ( SF_CGdSpell * _this,
uint16_t source_index,
uint16_t spell_index,
bool(* condition )(SF_CGdSpell *_this, uint16_t source_index, uint16_t spell_index),
void(* callback )(SF_CGdSpell *_this, uint16_t source_index, uint16_t spell_index) )

Definition at line 175 of file sf_wrappers.c.

◆ wrap_text()

void wrap_text ( const char * input,
char * output,
size_t max_width )

Definition at line 339 of file sf_wrappers.c.

Here is the caller graph for this function:

Variable Documentation

◆ attach_callback

Definition at line 42 of file sf_wrappers.c.

◆ CMnuBase_setname

CMnuBase_setname_ptr CMnuBase_setname

Definition at line 44 of file sf_wrappers.c.

◆ create_button_func

create_button_ptr create_button_func

Definition at line 28 of file sf_wrappers.c.

◆ fidFree

fidfree_ptr fidFree

Definition at line 24 of file sf_wrappers.c.

◆ FUN_0069eaf0

FUN_0069eaf0_ptr FUN_0069eaf0

Definition at line 23 of file sf_wrappers.c.

◆ g_create_sf_string

SF_String_ctor_ptr g_create_sf_string

Definition at line 25 of file sf_wrappers.c.

◆ g_destroy_sf_string

SF_String_dtor_ptr g_destroy_sf_string

Definition at line 26 of file sf_wrappers.c.

◆ has_spell_effect

has_spell_effect_ptr has_spell_effect

Definition at line 27 of file sf_wrappers.c.

◆ initialize_menu_container

initialize_menu_container_ptr initialize_menu_container

Definition at line 35 of file sf_wrappers.c.

◆ initialize_smp_button

initialize_smp_button_ptr initialize_smp_button

Definition at line 33 of file sf_wrappers.c.

◆ mod_list

CMnuContainer* mod_list

Definition at line 556 of file sf_wrappers.c.

◆ modinformation

SFSF_ModlistStruct modinformation

Definition at line 555 of file sf_wrappers.c.

◆ set_button_index

set_btn_index_ptr set_button_index

Definition at line 40 of file sf_wrappers.c.

◆ set_button_name

set_btn_name_ptr set_button_name

Definition at line 34 of file sf_wrappers.c.

◆ set_container_alpha

container_alpha_ptr set_container_alpha

Definition at line 37 of file sf_wrappers.c.

◆ set_font

vfunction_2_ptr set_font

Definition at line 39 of file sf_wrappers.c.

◆ set_label_color

set_label_color_ptr set_label_color

Definition at line 36 of file sf_wrappers.c.

◆ set_menu_button_flag

set_button_flag_ptr set_menu_button_flag

Definition at line 41 of file sf_wrappers.c.

◆ setup_menu_container_data

setup_menu_container_data_ptr setup_menu_container_data

Definition at line 38 of file sf_wrappers.c.

◆ sf_logger

SFLog sf_logger

Definition at line 107 of file sf_wrappers.c.

◆ vfunction12

vfunction12_ptr vfunction12

Definition at line 32 of file sf_wrappers.c.

◆ vfunction16_attach_callback

vfunction_ptr vfunction16_attach_callback

Definition at line 43 of file sf_wrappers.c.

◆ vfunction176

vfunction_ptr vfunction176

Definition at line 30 of file sf_wrappers.c.

◆ vfunction25

vfunction_ptr vfunction25

Definition at line 31 of file sf_wrappers.c.

◆ vfunction_apply_string

attach_string_ptr vfunction_apply_string

Definition at line 29 of file sf_wrappers.c.