Spellforce-Spell-framework
Loading...
Searching...
No Matches
sf_mod_registry.cpp File Reference
Include dependency graph for sf_mod_registry.cpp:

Go to the source code of this file.

Functions

SFBuilding *__thiscall registerBuilding (uint8_t building_type)
void __thiscall linkBuildingJSON (SFBuilding *building, const char *building_json_name)
void __thiscall linkBuildingDoneHandler (SFBuilding *building, building_done_handler_ptr handler)
void __thiscall linkBuildingEntryHandler (SFBuilding *building, building_entry_handler_ptr handler)
void __thiscall applyBuildingTag (SFBuilding *building, BuildingTag tag)
SFSpell *__thiscall registerSpell (uint16_t spell_id)
void __thiscall applySpellTag (SFSpell *spell, SpellTag tag)
void __thiscall linkPhysRainHandler (SFSpell *spell, sub_effect_handler_ptr handler)
void __thiscall linkPhysEffectHandler (SFSpell *spell, phys_effect_handler_ptr handler)
void __thiscall linkTypeHandler (SFSpell *spell, handler_ptr typeHandler)
void __thiscall linkSingleTargetAIHandler (SFSpell *spell, ai_single_handler_ptr handler)
void __thiscall linkAvoidanceAIHandler (SFSpell *spell, ai_avoidance_handler_ptr handler)
void __thiscall linkAOEAIHandler (SFSpell *spell, ai_aoe_handler_ptr handler)
void __thiscall linkOnHitHandler (SFSpell *spell, onhit_handler_ptr onhitHandler, OnHitPhase phase)
void __thiscall linkEffectHandler (SFSpell *spell, uint16_t spell_effect_id, handler_ptr effectHandler)
void __thiscall linkEndHandler (SFSpell *spell, handler_ptr endHandler)
void __thiscall linkSubEffectHandler (SFSpell *spell, sub_effect_handler_ptr handler)
void __thiscall linkRefreshHandler (SFSpell *spell, refresh_handler_ptr handler)
void __thiscall linkDealDamageHandler (SFSpell *spell, damage_handler_ptr handler, SpellDamagePhase phase)
void __thiscall linkEnchantChanceHandler (SFSpell *spell, enchant_handler_ptr handler)
uint16_t __thiscall getSpellTags (uint16_t spell_line_id)
uint32_t __thiscall getBuildingTags (uint8_t building_type)
uint8_t __thiscall getRacialSmelter (uint8_t race)
uint8_t __thiscall getRacialFoodstore (uint8_t race)
uint8_t __thiscall getRacialSawmill (uint8_t race)
uint8_t __thiscall getRacialStonecutter (uint8_t race)
uint8_t __thiscall getRacialWoodcutter (uint8_t race)
uint8_t __thiscall getRacialIronMine (uint8_t race)
uint8_t __thiscall getRacialQuarry (uint8_t race)
void register_mod_spells ()
 Registers the mod spells and performs basic conflict checking.
int32_t recalcCoord (int32_t value)
void dumpAuxEntry (BuildingAuxEntry_related *entry)
void addCollisionEntry (uint_list_node *list, int32_t posX, int32_t posY, int8_t index)
void register_building_to_game (SFBuilding *building, const Building *src)
uint8_t get_resource_id (const char *resource_name)
void register_mod_buildings ()

Variables

std::list< SFBuilding * > g_internal_building_list
std::list< SFSpell * > g_internal_spell_list
addBuilding_ptr AddBuilding
addBuildingAuxData_ptr AddAuxData
setCollisionListSize_ptr setListSize

Function Documentation

◆ addCollisionEntry()

void addCollisionEntry ( uint_list_node * list,
int32_t posX,
int32_t posY,
int8_t index )

Definition at line 501 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ applyBuildingTag()

void __thiscall applyBuildingTag ( SFBuilding * building,
BuildingTag tag )

Definition at line 64 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ applySpellTag()

void __thiscall applySpellTag ( SFSpell * spell,
SpellTag tag )

Definition at line 101 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ dumpAuxEntry()

void dumpAuxEntry ( BuildingAuxEntry_related * entry)

Definition at line 476 of file sf_mod_registry.cpp.

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

◆ get_resource_id()

uint8_t get_resource_id ( const char * resource_name)

Definition at line 574 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ getBuildingTags()

uint32_t __thiscall getBuildingTags ( uint8_t building_type)

Definition at line 187 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ getRacialFoodstore()

uint8_t __thiscall getRacialFoodstore ( uint8_t race)

Definition at line 214 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ getRacialIronMine()

uint8_t __thiscall getRacialIronMine ( uint8_t race)

Definition at line 274 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ getRacialQuarry()

uint8_t __thiscall getRacialQuarry ( uint8_t race)

Definition at line 289 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ getRacialSawmill()

uint8_t __thiscall getRacialSawmill ( uint8_t race)

Definition at line 229 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ getRacialSmelter()

uint8_t __thiscall getRacialSmelter ( uint8_t race)

Definition at line 199 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ getRacialStonecutter()

uint8_t __thiscall getRacialStonecutter ( uint8_t race)

Definition at line 244 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ getRacialWoodcutter()

uint8_t __thiscall getRacialWoodcutter ( uint8_t race)

Definition at line 259 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ getSpellTags()

uint16_t __thiscall getSpellTags ( uint16_t spell_line_id)

Definition at line 175 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ linkAOEAIHandler()

void __thiscall linkAOEAIHandler ( SFSpell * spell,
ai_aoe_handler_ptr handler )

Definition at line 132 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ linkAvoidanceAIHandler()

void __thiscall linkAvoidanceAIHandler ( SFSpell * spell,
ai_avoidance_handler_ptr handler )

Definition at line 127 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ linkBuildingDoneHandler()

void __thiscall linkBuildingDoneHandler ( SFBuilding * building,
building_done_handler_ptr handler )

Definition at line 54 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ linkBuildingEntryHandler()

void __thiscall linkBuildingEntryHandler ( SFBuilding * building,
building_entry_handler_ptr handler )

Definition at line 59 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ linkBuildingJSON()

void __thiscall linkBuildingJSON ( SFBuilding * building,
const char * building_json_name )

Definition at line 49 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ linkDealDamageHandler()

void __thiscall linkDealDamageHandler ( SFSpell * spell,
damage_handler_ptr handler,
SpellDamagePhase phase )

Definition at line 164 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ linkEffectHandler()

void __thiscall linkEffectHandler ( SFSpell * spell,
uint16_t spell_effect_id,
handler_ptr effectHandler )

Definition at line 143 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ linkEnchantChanceHandler()

void __thiscall linkEnchantChanceHandler ( SFSpell * spell,
enchant_handler_ptr handler )

Definition at line 170 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ linkEndHandler()

void __thiscall linkEndHandler ( SFSpell * spell,
handler_ptr endHandler )

Definition at line 149 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ linkOnHitHandler()

void __thiscall linkOnHitHandler ( SFSpell * spell,
onhit_handler_ptr onhitHandler,
OnHitPhase phase )

Definition at line 137 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ linkPhysEffectHandler()

void __thiscall linkPhysEffectHandler ( SFSpell * spell,
phys_effect_handler_ptr handler )

Definition at line 112 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ linkPhysRainHandler()

void __thiscall linkPhysRainHandler ( SFSpell * spell,
sub_effect_handler_ptr handler )

Definition at line 107 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ linkRefreshHandler()

void __thiscall linkRefreshHandler ( SFSpell * spell,
refresh_handler_ptr handler )

Definition at line 159 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ linkSingleTargetAIHandler()

void __thiscall linkSingleTargetAIHandler ( SFSpell * spell,
ai_single_handler_ptr handler )

Definition at line 122 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ linkSubEffectHandler()

void __thiscall linkSubEffectHandler ( SFSpell * spell,
sub_effect_handler_ptr handler )

Definition at line 154 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ linkTypeHandler()

void __thiscall linkTypeHandler ( SFSpell * spell,
handler_ptr typeHandler )

Definition at line 117 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ recalcCoord()

int32_t recalcCoord ( int32_t value)

Definition at line 471 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ register_building_to_game()

void register_building_to_game ( SFBuilding * building,
const Building * src )

Definition at line 508 of file sf_mod_registry.cpp.

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

◆ register_mod_buildings()

void register_mod_buildings ( )

Definition at line 607 of file sf_mod_registry.cpp.

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

◆ register_mod_spells()

void register_mod_spells ( )

Registers the mod spells and performs basic conflict checking.

This function iterates over the g_internal_spell_list and claims each spell's spell_id and spell_effect_id through the shared conflict registry, which logs and attributes any clash with a mod that registered the same ID earlier.

Additionally, it registers the spell type handler, spell effect handler, and spell end handler if the SFSpell struct has a non-null handler pointer.

See also
claim_numeric_id(), sf_error_registry.h

Definition at line 331 of file sf_mod_registry.cpp.

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

◆ registerBuilding()

SFBuilding *__thiscall registerBuilding ( uint8_t building_type)

Definition at line 35 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ registerSpell()

SFSpell *__thiscall registerSpell ( uint16_t spell_id)

Definition at line 72 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ AddAuxData

Definition at line 468 of file sf_mod_registry.cpp.

◆ AddBuilding

addBuilding_ptr AddBuilding

Definition at line 467 of file sf_mod_registry.cpp.

◆ g_internal_building_list

std::list<SFBuilding *> g_internal_building_list

Definition at line 33 of file sf_mod_registry.cpp.

◆ g_internal_spell_list

std::list<SFSpell *> g_internal_spell_list

Definition at line 70 of file sf_mod_registry.cpp.

◆ setListSize

Definition at line 469 of file sf_mod_registry.cpp.