Spellforce-Spell-framework
Loading...
Searching...
No Matches
sf_wrappers.c File Reference
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sf_wrappers.h"
#include "sf_hooks.h"
#include "hooks/sf_menu_hook.h"
#include "hooks/sf_console_hook.h"
#include "hooks/sf_vanilla_fix_hook.h"
#include "../registry/sf_mod_registry.h"
Include dependency graph for sf_wrappers.c:

Go to the source code of this file.

Macros

#define LOG_BUFFER_SIZE   1024

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

Macro Definition Documentation

◆ LOG_BUFFER_SIZE

#define LOG_BUFFER_SIZE   1024

Definition at line 14 of file sf_wrappers.c.