| 1234 | } |
| 1235 | |
| 1236 | void register_component_compiler(UnitCompiler &c, StringId32 type, CompileFunction fn, f32 spawn_order) |
| 1237 | { |
| 1238 | ComponentTypeData ctd(default_allocator()); |
| 1239 | ctd._compiler = fn; |
| 1240 | |
| 1241 | ComponentTypeInfo cti; |
| 1242 | cti._type = type; |
| 1243 | cti._spawn_order = spawn_order; |
| 1244 | |
| 1245 | hash_map::set(c._component_data, type, ctd); |
| 1246 | |
| 1247 | array::push_back(c._component_info, cti); |
| 1248 | std::sort(array::begin(c._component_info), array::end(c._component_info)); |
| 1249 | } |
| 1250 | |
| 1251 | void register_component_compiler(UnitCompiler &c, const char *type, CompileFunction fn, f32 spawn_order) |
| 1252 | { |
no test coverage detected