From da18594daf0e142cf03cec516f52f4ea15941fc7 Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Tue, 28 Nov 2023 08:41:21 -0500 Subject: [PATCH] Blend & FX --- source/Irrlicht/CB3DJSONMeshFileLoader.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/source/Irrlicht/CB3DJSONMeshFileLoader.cpp b/source/Irrlicht/CB3DJSONMeshFileLoader.cpp index 3b155b8a..96e0805b 100644 --- a/source/Irrlicht/CB3DJSONMeshFileLoader.cpp +++ b/source/Irrlicht/CB3DJSONMeshFileLoader.cpp @@ -298,7 +298,29 @@ std::tuple CB3DJSONMeshFileLoader::readChunkBRUS() { return {false, "BRUS: Element (" + std::to_string(index) + ") \"alpha\" is not a number."}; } + //* Blend. + if (b.contains("blend") && b["blend"].is_number_integer()) { + B3DMaterial.blend = b["blend"]; + } else { + if (!b.contains("blend")) { + return {false, "BRUS: Element (" + std::to_string(index) + ") is missing \"blend\"."}; + } + + return {false, "BRUS: Element (" + std::to_string(index) + ") \"blend\" is not an integer."}; + } + + //* FX. + if (b.contains("fx") && b["fx"].is_number_integer()) { + B3DMaterial.fx = b["fx"]; + } else { + + if (!b.contains("fx")) { + return {false, "BRUS: Element (" + std::to_string(index) + ") is missing \"fx\"."}; + } + + return {false, "BRUS: Element (" + std::to_string(index) + ") \"fx\" is not an integer."}; + }