add post-effect-slot resource & add gfx.posteffects library
This commit is contained in:
@@ -189,6 +189,8 @@ constexpr const char* to_string(ResourceType type) {
|
||||
switch (type) {
|
||||
case ResourceType::CAMERA:
|
||||
return "camera";
|
||||
case ResourceType::POST_EFFECT_SLOT:
|
||||
return "post-effect-slot";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
@@ -197,6 +199,8 @@ constexpr const char* to_string(ResourceType type) {
|
||||
inline std::optional<ResourceType> ResourceType_from(std::string_view str) {
|
||||
if (str == "camera") {
|
||||
return ResourceType::CAMERA;
|
||||
} else if (str == "post-effect-slot") {
|
||||
return ResourceType::POST_EFFECT_SLOT;
|
||||
}
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,11 @@ class ContentPackRuntime;
|
||||
|
||||
enum class ContentType { NONE, BLOCK, ITEM, ENTITY, GENERATOR };
|
||||
|
||||
enum class ResourceType : size_t { CAMERA, LAST = CAMERA };
|
||||
enum class ResourceType : size_t {
|
||||
CAMERA,
|
||||
POST_EFFECT_SLOT,
|
||||
LAST = POST_EFFECT_SLOT
|
||||
};
|
||||
|
||||
inline constexpr auto RESOURCE_TYPES_COUNT =
|
||||
static_cast<size_t>(ResourceType::LAST) + 1;
|
||||
|
||||
Reference in New Issue
Block a user