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.
29 lines
692 B
29 lines
692 B
#pragma once |
|
|
|
#include "clx_sprite.hpp" |
|
|
|
namespace devilution { |
|
|
|
OwnedClxSpriteListOrSheet LoadClxListOrSheet(const char *path); |
|
|
|
inline OwnedClxSpriteList LoadClx(const char *path) |
|
{ |
|
return LoadClxListOrSheet(path).list(); |
|
} |
|
|
|
inline OwnedClxSpriteSheet LoadClxSheet(const char *path) |
|
{ |
|
return LoadClxListOrSheet(path).sheet(); |
|
} |
|
|
|
OptionalOwnedClxSpriteListOrSheet LoadOptionalClxListOrSheet(const char *path); |
|
|
|
inline OptionalOwnedClxSpriteList LoadOptionalClx(const char *path) |
|
{ |
|
OptionalOwnedClxSpriteListOrSheet result = LoadOptionalClxListOrSheet(path); |
|
if (!result) |
|
return std::nullopt; |
|
return std::move(*result).list(); |
|
} |
|
|
|
} // namespace devilution
|
|
|