|
Spellforce-Spell-framework
|
Turns a campaign JSON file into an SFSF_CampaignDef. More...
Classes | |
| struct | CampaignJson |
| Parse result: the definition plus which keys were actually present. More... | |
Macros | |
| #define | JSMN_STATIC |
| #define | JSMN_PARENT_LINKS |
Functions | |
| bool | parse_campaign_json_file (const char *path, CampaignJson *out_campaign) |
| Reads and parses a campaign JSON file. | |
Turns a campaign JSON file into an SFSF_CampaignDef.
The loader only parses - it does not validate meaning or register anything. Presence flags are reported back so the caller (sf_campaign_module.c) can decide what is required and attribute the failures to a mod.
| #define JSMN_PARENT_LINKS |
Definition at line 15 of file sf_campaign_loader.c.
| #define JSMN_STATIC |
Definition at line 14 of file sf_campaign_loader.c.
| enum CampaignFieldKey |
Definition at line 44 of file sf_campaign_loader.h.
| bool parse_campaign_json_file | ( | const char * | path, |
| CampaignJson * | out_campaign ) |
Reads and parses a campaign JSON file.
| path | Full path to the .json file. |
| out_campaign | Zeroed and filled on success. |
Definition at line 198 of file sf_campaign_loader.c.
