add post-effect-slot resource & add gfx.posteffects library

This commit is contained in:
MihailRis
2025-04-06 12:47:25 +03:00
parent c3bc084e76
commit 64039f0e43
11 changed files with 182 additions and 12 deletions
+4
View File
@@ -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;
}
+5 -1
View File
@@ -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;