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

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

Collaboration diagram for Framework Wrappers:

Typedefs

typedef uint32_t(__thiscall * XDataGet_ptr) (void *_this, uint16_t key, uint8_t keyType)
typedef uint32_t(__thiscall * CGdXDataExists_ptr) (void *_this, uint16_t key, uint8_t keyType)

Functions

uint32_t __thiscall getDistance (SF_Coord *pointA, SF_Coord *pointB)
bool __thiscall isSiegeUnit (SF_CGdFigure *_this, uint16_t figure_index)
void initialize_wrapper_data_hooks ()
void log_message (const char *filename, const char *format,...)
void log_warning (const char *format,...)
 Logs a warning at DEBUG_INFO, i.e. always shown.
void log_warning_level (DebugLevel level, const char *format,...)
 Logs a warning that is only shown once the log level reaches level.
void log_info (const char *format,...)
void log_error (const char *format,...)
const char * debug_level_to_string (DebugLevel level)
void log_debug (DebugLevel level, const char *format,...)
SFLogsetup_logger ()
bool __thiscall isActionMelee (SF_SGtFigureAction *_this)
uint32_t __thiscall getBuildingXData (SF_CGdBuildingToolbox *_this, uint16_t building_index, uint8_t key_type)
void __thiscall setupFigureIterator (CGdFigureIterator *iterator, SF_CGdSpell *spell)
bool __thiscall hasSpellTag (uint16_t spell_id, SpellTag tag)
bool __thiscall hasBuildingTag (uint8_t building_type, BuildingTag tag)
bool __thiscall buildingIsScavenger (SF_CGdBuilding *_this, uint16_t building_index)
bool __thiscall buildingIsHabitable (SF_CGdBuilding *_this, uint16_t building_index)
bool __thiscall buildingIsHabitableSingle (SF_CGdBuilding *_this, uint16_t building_index)
bool __thiscall buildingIsFisher (SF_CGdBuilding *_this, uint16_t building_index)
bool __thiscall buildingIsFoodstore (SF_CGdBuilding *_this, uint16_t building_index)
bool __thiscall buildingIsForge (SF_CGdBuilding *_this, uint16_t building_index)
bool __thiscall buildingIsGatherer (SF_CGdBuilding *_this, uint16_t building_index)
bool __thiscall buildingIsHQ (SF_CGdBuilding *_this, uint16_t building_index)
bool __thiscall buildingIsHunter (SF_CGdBuilding *_this, uint16_t building_index)
bool __thiscall buildingIsIronMine (SF_CGdBuilding *_this, uint16_t building_index)
bool __thiscall buildingIsMaceCarver (SF_CGdBuilding *_this, uint16_t building_index)
bool __thiscall buildingIsMoonsilverMine (SF_CGdBuilding *_this, uint16_t building_index)
bool __thiscall buildingIsQuarry (SF_CGdBuilding *_this, uint16_t building_index)
bool __thiscall buildingIsSawmill (SF_CGdBuilding *_this, uint16_t building_index)
bool __thiscall buildingIsSmelter (SF_CGdBuilding *_this, uint16_t building_index)
bool __thiscall buildingIsStonecutter (SF_CGdBuilding *_this, uint16_t building_index)
bool __thiscall buildingIsTemple (SF_CGdBuilding *_this, uint16_t building_index)
bool __thiscall buildingIsTower (SF_CGdBuilding *_this, uint16_t building_index)
bool __thiscall buildingIsWoodcutter (SF_CGdBuilding *_this, uint16_t building_index)
bool __thiscall buildingIsShrine (SF_CGdBuilding *_this, uint16_t building_index)
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))
int8_t __thiscall addBonusMultExt (FigureStatisticExt *_this, int8_t value)
uint16_t __thiscall getCurrentStat (SF_CGdFigure *_this, uint16_t target, StatisticDataKey key)
uint16_t __thiscall getMaxStat (SF_CGdFigure *_this, uint16_t target, StatisticDataKey key)
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)
uint16_t __thiscall getPhysDamageReduction (SF_CGdFigureToolbox *_this, uint16_t source_index, uint16_t target_index, uint16_t action_id)
bool __thiscall XDataExists (SF_CGdEffect *_this, uint16_t effect_index, SpellDataKey data)
uint16_t __thiscall sf_get_spell_id (SF_CGdSpell *_this, uint16_t spell_index)
void __thiscall tryClearCheckSpellsBeforeJob (SF_CGdSpell *_this, uint16_t spell_index, uint16_t figure_index)

Variables

SF_String_ctor_ptr g_create_sf_string
SF_String_dtor_ptr g_destroy_sf_string
has_spell_effect_ptr has_spell_effect
FUN_0069eaf0_ptr FUN_0069eaf0
fidfree_ptr fidFree
XDataGet_ptr XDataGet
CGdXDataExists_ptr CGdXDataExists
get_phys_damage_reduction_ptr g_get_damage_reduction
SFLog sf_logger

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.

Typedef Documentation

◆ CGdXDataExists_ptr

typedef uint32_t(__thiscall * CGdXDataExists_ptr) (void *_this, uint16_t key, uint8_t keyType)

Definition at line 27 of file sf_wrappers.c.

◆ XDataGet_ptr

typedef uint32_t(__thiscall * XDataGet_ptr) (void *_this, uint16_t key, uint8_t keyType)

Definition at line 26 of file sf_wrappers.c.

Function Documentation

◆ addBonusMultExt()

int8_t __thiscall addBonusMultExt ( FigureStatisticExt * _this,
int8_t value )

Definition at line 392 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ addBonusMultToStatistic()

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

Definition at line 573 of file sf_wrappers.c.

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

◆ buildingIsFisher()

bool __thiscall buildingIsFisher ( SF_CGdBuilding * _this,
uint16_t building_index )

Definition at line 264 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ buildingIsFoodstore()

bool __thiscall buildingIsFoodstore ( SF_CGdBuilding * _this,
uint16_t building_index )

Definition at line 269 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ buildingIsForge()

bool __thiscall buildingIsForge ( SF_CGdBuilding * _this,
uint16_t building_index )

Definition at line 274 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ buildingIsGatherer()

bool __thiscall buildingIsGatherer ( SF_CGdBuilding * _this,
uint16_t building_index )

Definition at line 279 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ buildingIsHabitable()

bool __thiscall buildingIsHabitable ( SF_CGdBuilding * _this,
uint16_t building_index )

Definition at line 254 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ buildingIsHabitableSingle()

bool __thiscall buildingIsHabitableSingle ( SF_CGdBuilding * _this,
uint16_t building_index )

Definition at line 259 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ buildingIsHQ()

bool __thiscall buildingIsHQ ( SF_CGdBuilding * _this,
uint16_t building_index )

Definition at line 284 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ buildingIsHunter()

bool __thiscall buildingIsHunter ( SF_CGdBuilding * _this,
uint16_t building_index )

Definition at line 289 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ buildingIsIronMine()

bool __thiscall buildingIsIronMine ( SF_CGdBuilding * _this,
uint16_t building_index )

Definition at line 294 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ buildingIsMaceCarver()

bool __thiscall buildingIsMaceCarver ( SF_CGdBuilding * _this,
uint16_t building_index )

Definition at line 300 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ buildingIsMoonsilverMine()

bool __thiscall buildingIsMoonsilverMine ( SF_CGdBuilding * _this,
uint16_t building_index )

Definition at line 305 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ buildingIsQuarry()

bool __thiscall buildingIsQuarry ( SF_CGdBuilding * _this,
uint16_t building_index )

Definition at line 311 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ buildingIsSawmill()

bool __thiscall buildingIsSawmill ( SF_CGdBuilding * _this,
uint16_t building_index )

Definition at line 316 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ buildingIsScavenger()

bool __thiscall buildingIsScavenger ( SF_CGdBuilding * _this,
uint16_t building_index )

Definition at line 249 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ buildingIsShrine()

bool __thiscall buildingIsShrine ( SF_CGdBuilding * _this,
uint16_t building_index )

Definition at line 346 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ buildingIsSmelter()

bool __thiscall buildingIsSmelter ( SF_CGdBuilding * _this,
uint16_t building_index )

Definition at line 321 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ buildingIsStonecutter()

bool __thiscall buildingIsStonecutter ( SF_CGdBuilding * _this,
uint16_t building_index )

Definition at line 326 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ buildingIsTemple()

bool __thiscall buildingIsTemple ( SF_CGdBuilding * _this,
uint16_t building_index )

Definition at line 331 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ buildingIsTower()

bool __thiscall buildingIsTower ( SF_CGdBuilding * _this,
uint16_t building_index )

Definition at line 336 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ buildingIsWoodcutter()

bool __thiscall buildingIsWoodcutter ( SF_CGdBuilding * _this,
uint16_t building_index )

Definition at line 341 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ debug_level_to_string()

const char * debug_level_to_string ( DebugLevel level)

Definition at line 169 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ disposeFigureIterator()

void __thiscall disposeFigureIterator ( CGdFigureIterator * iterator)

Definition at line 352 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ getBuildingXData()

uint32_t __thiscall getBuildingXData ( SF_CGdBuildingToolbox * _this,
uint16_t building_index,
uint8_t key_type )

Definition at line 218 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ getCurrentStat()

uint16_t __thiscall getCurrentStat ( SF_CGdFigure * _this,
uint16_t target,
StatisticDataKey key )

Definition at line 414 of file sf_wrappers.c.

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

◆ getDistance()

uint32_t __thiscall getDistance ( SF_Coord * pointA,
SF_Coord * pointB )

Definition at line 41 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ getMaxStat()

uint16_t __thiscall getMaxStat ( SF_CGdFigure * _this,
uint16_t target,
StatisticDataKey key )

Definition at line 494 of file sf_wrappers.c.

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

◆ getPhysDamageReduction()

uint16_t __thiscall getPhysDamageReduction ( SF_CGdFigureToolbox * _this,
uint16_t source_index,
uint16_t target_index,
uint16_t action_id )

Definition at line 635 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 630 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ hasBuildingTag()

bool __thiscall hasBuildingTag ( uint8_t building_type,
BuildingTag tag )

Definition at line 240 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 235 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 80 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 209 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ isSiegeUnit()

bool __thiscall isSiegeUnit ( SF_CGdFigure * _this,
uint16_t figure_index )

Definition at line 66 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ log_debug()

void log_debug ( DebugLevel level,
const char * format,
... )

Definition at line 182 of file sf_wrappers.c.

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

◆ log_error()

void log_error ( const char * format,
... )

Definition at line 153 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 * format,
... )

Definition at line 140 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 * format,
... )

Definition at line 91 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ log_warning()

void log_warning ( const char * format,
... )

Logs a warning at DEBUG_INFO, i.e. always shown.

Definition at line 124 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ log_warning_level()

void log_warning_level ( DebugLevel level,
const char * format,
... )

Logs a warning that is only shown once the log level reaches level.

Definition at line 132 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ setup_logger()

SFLog * setup_logger ( )

Definition at line 199 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 228 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 655 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ spellClearFigureFlag()

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

Definition at line 607 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 361 of file sf_wrappers.c.

◆ tryClearCheckSpellsBeforeJob()

void __thiscall tryClearCheckSpellsBeforeJob ( SF_CGdSpell * _this,
uint16_t spell_index,
uint16_t figure_index )

Definition at line 661 of file sf_wrappers.c.

Here is the caller graph for this function:

◆ XDataExists()

bool __thiscall XDataExists ( SF_CGdEffect * _this,
uint16_t effect_index,
SpellDataKey data )

Definition at line 641 of file sf_wrappers.c.

Here is the caller graph for this function:

Variable Documentation

◆ CGdXDataExists

CGdXDataExists_ptr CGdXDataExists

Definition at line 36 of file sf_wrappers.c.

◆ fidFree

fidfree_ptr fidFree

Definition at line 33 of file sf_wrappers.c.

◆ FUN_0069eaf0

FUN_0069eaf0_ptr FUN_0069eaf0

Definition at line 32 of file sf_wrappers.c.

◆ g_create_sf_string

SF_String_ctor_ptr g_create_sf_string

Definition at line 29 of file sf_wrappers.c.

◆ g_destroy_sf_string

SF_String_dtor_ptr g_destroy_sf_string

Definition at line 30 of file sf_wrappers.c.

◆ g_get_damage_reduction

get_phys_damage_reduction_ptr g_get_damage_reduction

Definition at line 38 of file sf_wrappers.c.

◆ has_spell_effect

has_spell_effect_ptr has_spell_effect

Definition at line 31 of file sf_wrappers.c.

◆ sf_logger

SFLog sf_logger

Definition at line 198 of file sf_wrappers.c.

◆ XDataGet

XDataGet_ptr XDataGet

Definition at line 35 of file sf_wrappers.c.