MCPcopy Create free account
hub / github.com/crownengine/crown / parse_unit_from_json

Function parse_unit_from_json

src/resource/unit_compiler.cpp:1124–1134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1122 }
1123
1124 s32 parse_unit_from_json(UnitCompiler &c, const char *unit_json, CompileOptions &opts)
1125 {
1126 s32 err = collect_prefabs(c, StringId64(), unit_json, true, opts);
1127 ENSURE_OR_RETURN(UNIT_COMPILER, err == 0, opts);
1128
1129 u32 original_unit = c._prefab_offsets[array::size(c._prefab_offsets) - 1];
1130 err = parse_unit_internal(c, &c._prefab_data[original_unit], NULL, NULL, opts);
1131 ENSURE_OR_RETURN(UNIT_COMPILER, err == 0, opts);
1132
1133 return flatten(c, opts);
1134 }
1135
1136 s32 parse_unit(UnitCompiler &c, const char *path, CompileOptions &opts)
1137 {

Callers 1

parse_unitFunction · 0.85

Calls 5

collect_prefabsFunction · 0.85
parse_unit_internalFunction · 0.85
flattenFunction · 0.85
StringId64Class · 0.50
sizeFunction · 0.50

Tested by

no test coverage detected