| 425 | } |
| 426 | |
| 427 | static s32 compile_animation_state_machine(Buffer &output, UnitCompiler &compiler, FlatJsonObject &obj, CompileOptions &opts) |
| 428 | { |
| 429 | CE_UNUSED(compiler); |
| 430 | |
| 431 | TempAllocator4096 ta; |
| 432 | DynamicString state_machine_resource(ta); |
| 433 | RETURN_IF_ERROR(sjson::parse_string(state_machine_resource, flat_json_object::get(obj, "data.state_machine_resource"))); |
| 434 | WARN_IF_MISSING(UNIT_COMPILER, "state_machine" |
| 435 | , state_machine_resource.c_str() |
| 436 | , opts |
| 437 | ); |
| 438 | opts.add_requirement("state_machine", state_machine_resource.c_str()); |
| 439 | |
| 440 | AnimationStateMachineDesc asmd; |
| 441 | asmd.state_machine_resource = RETURN_IF_ERROR(sjson::parse_resource_name(flat_json_object::get(obj, "data.state_machine_resource"))); |
| 442 | |
| 443 | FileBuffer fb(output); |
| 444 | BinaryWriter bw(fb); |
| 445 | bw.write(asmd.state_machine_resource); |
| 446 | return 0; |
| 447 | } |
| 448 | |
| 449 | static s32 compile_fog(Buffer &output, UnitCompiler &compiler, FlatJsonObject &obj, CompileOptions &opts) |
| 450 | { |
nothing calls this directly
no test coverage detected