| 216 | } |
| 217 | |
| 218 | static HResourceType GetResourceType(HPreloader preloader, const char* path) |
| 219 | { |
| 220 | const char* ext = strrchr(path, '.'); |
| 221 | if (!ext) |
| 222 | { |
| 223 | dmLogWarning("Unknown resource type: '%s'. Missing file extension.", path); |
| 224 | return 0; |
| 225 | } |
| 226 | else |
| 227 | { |
| 228 | HResourceType resource_type = FindResourceType(preloader->m_Factory, ext + 1); |
| 229 | if (resource_type) |
| 230 | { |
| 231 | assert(resource_type->m_CreateFunction); |
| 232 | return resource_type; |
| 233 | } |
| 234 | dmLogError("Unknown resource type: '%s'. Unknown resource type: %s", path, ext); |
| 235 | } |
| 236 | return 0; |
| 237 | } |
| 238 | |
| 239 | Result MakePathDescriptor(ResourcePreloader* preloader, const char* name, PathDescriptor& out_path_descriptor) |
| 240 | { |
no test coverage detected