|
Spellforce-Spell-framework
|
Core mod that maps custom maps to custom loading screen meshes. More...
Macros | |
| #define | MAX_SCREEN_ENTRIES 128 |
Functions | |
| void | initialize_screens_module () |
| Loads and validates sfsf\screens.json. | |
| const char * | find_screen_for_map (const char *map_name) |
| Finds the loading screen mesh for a map, or NULL for the default. | |
Variables | |
| SFMod * | g_screens_mod = NULL |
| SFMod * | g_screens_mod |
Core mod that maps custom maps to custom loading screen meshes.
Reads sfsf\screens.json, checks that every mesh it names is actually present under mesh\, and answers lookups from the loading screen hook. Owning its own SFMod means a mistyped mesh name shows up in the in-game mod list rather than silently falling back to the vanilla screen.
| #define MAX_SCREEN_ENTRIES 128 |
Upper bound on custom loading screens.
Definition at line 21 of file sf_screens_module.h.
| const char * find_screen_for_map | ( | const char * | map_name | ) |
Finds the loading screen mesh for a map, or NULL for the default.
| map_name | Map path as the engine has it, e.g. "map\\Campaign\\000_Greyfell.map". Path, extension and any leading "NNN_" prefix are stripped before matching, so "000_Greyfell.map" matches "greyfell". |
Definition at line 156 of file sf_screens_module.c.

| void initialize_screens_module | ( | ) |
Loads and validates sfsf\screens.json.
Safe to call when the file is absent - custom loading screens are simply disabled. Must run before the first map load.
Definition at line 113 of file sf_screens_module.c.


| SFMod* g_screens_mod = NULL |
The core mod that owns every JSON-defined loading screen.
Definition at line 22 of file sf_screens_module.c.
|
extern |
The core mod that owns every JSON-defined loading screen.
Definition at line 22 of file sf_screens_module.c.