MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / LoadCelListOrSheet

Function LoadCelListOrSheet

Source/engine/load_cel.cpp:22–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20namespace devilution {
21
22OwnedClxSpriteListOrSheet 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

Callers 2

LoadCelFunction · 0.85
LoadCelSheetFunction · 0.85

Calls 4

LoadClxListOrSheetFunction · 0.85
CelToClxFunction · 0.85
getMethod · 0.80
BufCopyFunction · 0.50

Tested by

no test coverage detected