|
Spellforce-Spell-framework
|
#include "sf_mod_registry.h"#include "sf_error_registry.h"#include "spell_data_registries/sf_spelltype_registry.h"#include "spell_data_registries/sf_spelleffect_registry.h"#include "spell_data_registries/sf_spellend_registry.h"#include "spell_data_registries/sf_subeffect_registry.h"#include "spell_data_registries/sf_spellrefresh_registry.h"#include "spell_data_registries/sf_onhit_registry.h"#include "spell_data_registries/sf_spelldamage_registry.h"#include "spell_data_registries/sf_phys_effect_registry.h"#include "spell_data_registries/sf_enchant_registry.h"#include "../../api/structures/sf_building_structures.h"#include "ai_data_registries/sf_ai_aoe_registry.h"#include "ai_data_registries/sf_ai_avoidance_registry.h"#include "ai_data_registries/sf_ai_single_target_registry.h"#include "building_registry/sf_building_done_registry.h"#include "building_registry/sf_building_entry_registry.h"#include <windows.h>#include <iostream>#include <map>#include <list>#include <cstdint>#include <stdio.h>#include <stdarg.h>#include <stdlib.h>#include <string.h>#include "../core/sf_building_loader.h"
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 |
| void addCollisionEntry | ( | uint_list_node * | list, |
| int32_t | posX, | ||
| int32_t | posY, | ||
| int8_t | index ) |
| void __thiscall applyBuildingTag | ( | SFBuilding * | building, |
| BuildingTag | tag ) |
| void dumpAuxEntry | ( | BuildingAuxEntry_related * | entry | ) |
Definition at line 476 of file sf_mod_registry.cpp.


| uint8_t get_resource_id | ( | const char * | resource_name | ) |
| uint32_t __thiscall getBuildingTags | ( | uint8_t | building_type | ) |
| uint8_t __thiscall getRacialFoodstore | ( | uint8_t | race | ) |
| uint8_t __thiscall getRacialIronMine | ( | uint8_t | race | ) |
| uint8_t __thiscall getRacialQuarry | ( | uint8_t | race | ) |
| uint8_t __thiscall getRacialSawmill | ( | uint8_t | race | ) |
| uint8_t __thiscall getRacialSmelter | ( | uint8_t | race | ) |
| uint8_t __thiscall getRacialStonecutter | ( | uint8_t | race | ) |
| uint8_t __thiscall getRacialWoodcutter | ( | uint8_t | race | ) |
| uint16_t __thiscall getSpellTags | ( | uint16_t | spell_line_id | ) |
| void __thiscall linkAOEAIHandler | ( | SFSpell * | spell, |
| ai_aoe_handler_ptr | handler ) |
| void __thiscall linkAvoidanceAIHandler | ( | SFSpell * | spell, |
| ai_avoidance_handler_ptr | handler ) |
| void __thiscall linkBuildingDoneHandler | ( | SFBuilding * | building, |
| building_done_handler_ptr | handler ) |
| void __thiscall linkBuildingEntryHandler | ( | SFBuilding * | building, |
| building_entry_handler_ptr | handler ) |
| void __thiscall linkBuildingJSON | ( | SFBuilding * | building, |
| const char * | building_json_name ) |
| void __thiscall linkDealDamageHandler | ( | SFSpell * | spell, |
| damage_handler_ptr | handler, | ||
| SpellDamagePhase | phase ) |
| void __thiscall linkEffectHandler | ( | SFSpell * | spell, |
| uint16_t | spell_effect_id, | ||
| handler_ptr | effectHandler ) |
| void __thiscall linkEnchantChanceHandler | ( | SFSpell * | spell, |
| enchant_handler_ptr | handler ) |
| void __thiscall linkEndHandler | ( | SFSpell * | spell, |
| handler_ptr | endHandler ) |
| void __thiscall linkOnHitHandler | ( | SFSpell * | spell, |
| onhit_handler_ptr | onhitHandler, | ||
| OnHitPhase | phase ) |
| void __thiscall linkPhysEffectHandler | ( | SFSpell * | spell, |
| phys_effect_handler_ptr | handler ) |
| void __thiscall linkPhysRainHandler | ( | SFSpell * | spell, |
| sub_effect_handler_ptr | handler ) |
| void __thiscall linkRefreshHandler | ( | SFSpell * | spell, |
| refresh_handler_ptr | handler ) |
| void __thiscall linkSingleTargetAIHandler | ( | SFSpell * | spell, |
| ai_single_handler_ptr | handler ) |
| void __thiscall linkSubEffectHandler | ( | SFSpell * | spell, |
| sub_effect_handler_ptr | handler ) |
| void __thiscall linkTypeHandler | ( | SFSpell * | spell, |
| handler_ptr | typeHandler ) |
| int32_t recalcCoord | ( | int32_t | value | ) |
| void register_building_to_game | ( | SFBuilding * | building, |
| const Building * | src ) |
Definition at line 508 of file sf_mod_registry.cpp.


| void register_mod_buildings | ( | ) |
Definition at line 607 of file sf_mod_registry.cpp.


| 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.
Definition at line 331 of file sf_mod_registry.cpp.


| SFBuilding *__thiscall registerBuilding | ( | uint8_t | building_type | ) |
| SFSpell *__thiscall registerSpell | ( | uint16_t | spell_id | ) |
| addBuildingAuxData_ptr AddAuxData |
Definition at line 468 of file sf_mod_registry.cpp.
| addBuilding_ptr AddBuilding |
Definition at line 467 of file sf_mod_registry.cpp.
| std::list<SFBuilding *> g_internal_building_list |
Definition at line 33 of file sf_mod_registry.cpp.
| std::list<SFSpell *> g_internal_spell_list |
Definition at line 70 of file sf_mod_registry.cpp.
| setCollisionListSize_ptr setListSize |
Definition at line 469 of file sf_mod_registry.cpp.