| 20 | namespace devilution { |
| 21 | |
| 22 | OwnedClxSpriteListOrSheet LoadCelListOrSheet(const char *pszName, PointerOrValue<uint16_t> widthOrWidths) |
| 23 | { |
| 24 | char path[MaxMpqPathSize]; |
| 25 | *BufCopy(path, pszName, DEVILUTIONX_CEL_EXT) = '\0'; |
| 26 | #ifdef UNPACKED_MPQS |
| 27 | return LoadClxListOrSheet(path); |
| 28 | #else |
| 29 | size_t size; |
| 30 | std::unique_ptr<uint8_t[]> data = LoadFileInMem<uint8_t>(path, &size); |
| 31 | #ifdef DEBUG_CEL_TO_CL2_SIZE |
| 32 | std::cout << path; |
| 33 | #endif |
| 34 | return CelToClx(data.get(), size, widthOrWidths); |
| 35 | #endif |
| 36 | } |
| 37 | |
| 38 | } // namespace devilution |
no test coverage detected