You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
605 B
21 lines
605 B
#include "engine/load_pcx_as_cel.hpp" |
|
|
|
#include <SDL.h> |
|
|
|
#include "engine/assets.hpp" |
|
#include "utils/log.hpp" |
|
#include "utils/pcx_to_cel.hpp" |
|
|
|
namespace devilution { |
|
|
|
std::optional<OwnedCelSpriteWithFrameHeight> LoadPcxAssetAsCel(const char *filename, unsigned numFrames, bool generateFrameHeaders, uint8_t transparentColorIndex) |
|
{ |
|
SDL_RWops *handle = OpenAsset(filename); |
|
if (handle == nullptr) { |
|
LogError("Missing file: {}", filename); |
|
return std::nullopt; |
|
} |
|
return LoadPcxAsCel(handle, numFrames, generateFrameHeaders, transparentColorIndex); |
|
} |
|
|
|
} // namespace devilution
|
|
|