Spellforce-Spell-framework
Loading...
Searching...
No Matches
sf_building_loader.c File Reference
#include "sf_building_loader.h"
#include "sf_wrappers.h"
#include "sf_modloader.h"
#include "sf_hooks.h"
#include "jsmn.h"
Include dependency graph for sf_building_loader.c:

Go to the source code of this file.

Macros

#define JSMN_PARENT_LINKS

Functions

void init_building (Building *building)
bool parse_collision (const char *json, const jsmntok_t *tokens, int token_count, int start_index, Collision *collision)
bool parse_resource (const char *json, const jsmntok_t *tokens, int token_count, int start_index, Resource *resource)
bool parse_resources (const char *json, const jsmntok_t *tokens, int token_count, int start_index, Building *building)
bool parse_world_coord (const char *json, const jsmntok_t *tokens, int token_count, int start_index, WorldCoord *coord)
bool parse_building_from_tokens (const char *json, jsmntok_t *tokens, int token_count, Building *building)
bool parse_building_json (const char *json_string, Building *building)
char * readfile (const char *path)
bool parse_building_json_entrypoint (const char *building_json_name, const char *mod_id, Building *out_building)
void print_building (const Building *building)

Macro Definition Documentation

◆ JSMN_PARENT_LINKS

#define JSMN_PARENT_LINKS

Definition at line 7 of file sf_building_loader.c.

Function Documentation

◆ init_building()

void init_building ( Building * building)

Definition at line 10 of file sf_building_loader.c.

Here is the caller graph for this function:

◆ parse_building_from_tokens()

bool parse_building_from_tokens ( const char * json,
jsmntok_t * tokens,
int token_count,
Building * building )

Definition at line 381 of file sf_building_loader.c.

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

◆ parse_building_json()

bool parse_building_json ( const char * json_string,
Building * building )

Definition at line 350 of file sf_building_loader.c.

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

◆ parse_building_json_entrypoint()

bool parse_building_json_entrypoint ( const char * building_json_name,
const char * mod_id,
Building * out_building )

Definition at line 552 of file sf_building_loader.c.

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

◆ parse_collision()

bool parse_collision ( const char * json,
const jsmntok_t * tokens,
int token_count,
int start_index,
Collision * collision )

Definition at line 202 of file sf_building_loader.c.

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

◆ parse_resource()

bool parse_resource ( const char * json,
const jsmntok_t * tokens,
int token_count,
int start_index,
Resource * resource )

Definition at line 256 of file sf_building_loader.c.

Here is the caller graph for this function:

◆ parse_resources()

bool parse_resources ( const char * json,
const jsmntok_t * tokens,
int token_count,
int start_index,
Building * building )

Definition at line 295 of file sf_building_loader.c.

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

◆ parse_world_coord()

bool parse_world_coord ( const char * json,
const jsmntok_t * tokens,
int token_count,
int start_index,
WorldCoord * coord )

Definition at line 156 of file sf_building_loader.c.

Here is the caller graph for this function:

◆ print_building()

void print_building ( const Building * building)

Definition at line 578 of file sf_building_loader.c.

Here is the call graph for this function:

◆ readfile()

char * readfile ( const char * path)

Definition at line 496 of file sf_building_loader.c.

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