Spellforce-Spell-framework
Loading...
Searching...
No Matches
sf_registry.cpp
Go to the documentation of this file.
1
21#include "../core/sf_wrappers.h"
22#include "../core/sf_hooks.h"
23
24#include "sf_registry.h"
25#include "sf_vanilla_registry.h"
26#include "sf_mod_registry.h"
27
34
35#include <windows.h>
36#include <iostream>
37
38// Exposed in sfsf.h
42
53{
54 log_info("| - Loading framework with API Addresses");
61 log_info("| - Loading framework with create_mod_info Address");
64
65 log_info("| - Loading Default Mod Information");
66 g_framework_mod = createModInfo("Spellforce Spell Framework", "2.1.0-beta",
67 "Muddykat, UnSchtalch and shovel_knight",
68 "A Modding Framework to ease the creation of new Spells in the game Spellforce Platinum Edition.");
70}
71
100{
101
102 log_info(
103 "|=====| Spellforce Spell Framework Configuration Phase Start |=====|");
104
105 log_info("| - Initializing Data Hooks");
106
108
109 log_info("| - Linking API functions");
110
111 // setup framework api structure references
113
114 log_info("| - Initialization of Vanilla Spells");
115
117
118 log_info("| - Effect Handlers");
119
121
122 log_info("| - Registration of Vanilla Spell End Handlers");
123
125
126 log_info("| - Registration of Vanilla Sub Effect Handlers");
127
129
130 log_info("| - Registration of Vanilla Spell Refresh Handlers");
131
133
134 log_info("| - Registration of Vanilla Spell Deal Damage Handlers");
135
137
138 log_info(
139 "|======| Spellforce Spell Framework Configuration Phase End |======|");
140 log_info(
141 "|+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.|");
142 log_info(
143 "|====== ====== ======| Mod Loading Phase Start |====== ====== =====|");
144
145 // Attempt to load all mods -> see sf_modloader.h
147
148 log_info(
149 "|====== ====== ======| Mod Loading Phase End |====== ====== ======-|");
150 log_info(
151 "|+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.|");
152 log_info(
153 "|====== === ======| Mod Registration Phase Start |====== === ======|");
154
155 // Now try and register these spells
157
158 log_info(
159 "|====== ==== ======| Mod Registration Phase End |====== ==== ======|");
160 log_info(
161 "|+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.|");
162 log_info(
163 "|=== === ===| Spellforce Spell Framework Working (^_^) |=== === ===|");
164 log_info(
165 "|======================| Injecting Assembly |======================|");
166}
RegistrationFunctions * registrationAPI
Definition TestMod.cpp:14
SpellFunctions * spellAPI
Definition TestMod.cpp:11
FigureFunctions * figureAPI
Definition TestMod.cpp:13
ToolboxFunctions * toolboxAPI
Definition TestMod.cpp:12
void initialize_data_hooks()
Used to initialize all disparate hooks in one place.
Definition sf_hooks.c:51
EffectFunctions effectAPI
Definition sf_hooks.c:37
IteratorFunctions iteratorAPI
Definition sf_hooks.c:40
void log_info(const char *message)
Definition sf_wrappers.c:89
SFLog * setup_logger()
SFMod * createModInfo(const char *mod_id, const char *mod_version, const char *mod_author, const char *mod_description)
void register_mod_spells()
Registers the mod spells and performs basic conflict checking.
void initialize_mods()
SpellforceSpellFramework frameworkAPI
void registerFrameworkAPI()
Registers the framework API addresses.
SFMod * g_current_mod
void initialize_framework()
Initializes the Spellforce Spell Framework (SFSF).
SFMod * g_framework_mod
void __thiscall register_vanilla_spell_damage_handlers()
void register_vanilla_effect_handlers()
void register_vanilla_spell_end_handlers()
void register_vanilla_spell_refresh_handlers()
void register_vanilla_sub_effect_handlers()
void initialize_vanilla_spells()
Represents the Spellforce Spell Framework API.This structure serves as the central interface for inte...
Definition sfsf.h:36
RegistrationFunctions * registrationAPI
Interface for registration-related functions.
Definition sfsf.h:74
ToolboxFunctions * toolboxAPI
Interface for toolbox-related functions.
Definition sfsf.h:54
SFLog * logAPI
Interface for logging functionality. Enables logging of information, warnings, and errors to assist i...
Definition sfsf.h:93
IteratorFunctions * iteratorAPI
Interface for iterator-related functions.
Definition sfsf.h:67
FigureFunctions * figureAPI
Interface for figure-related functions. Facilitates interactions with figures (e.g....
Definition sfsf.h:60
EffectFunctions * effectAPI
Interface for spell effect-related functions. Provides access to functions that allow setting effect ...
Definition sfsf.h:80
SpellFunctions * spellAPI
Interface for spell-related functions.
Definition sfsf.h:47
createModInfo_ptr createModInfo
Pointer to the function responsible for creating mod information.
Definition sfsf.h:40