From 9efa535c7835dbea7b7a5514ab0d962a255a796f Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Tue, 28 Nov 2023 07:54:35 -0500 Subject: [PATCH] Angle --- source/Irrlicht/CB3DJSONMeshFileLoader.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/source/Irrlicht/CB3DJSONMeshFileLoader.cpp b/source/Irrlicht/CB3DJSONMeshFileLoader.cpp index e17f9ecc..e3347b03 100644 --- a/source/Irrlicht/CB3DJSONMeshFileLoader.cpp +++ b/source/Irrlicht/CB3DJSONMeshFileLoader.cpp @@ -343,6 +343,8 @@ std::tuple CB3DJSONMeshFileLoader::readChunkTEXS() { B3DTexture.Xscale = scale.X; B3DTexture.Yscale = scale.Y; + // println(std::to_string(B3DTexture.Xscale) + " " + std::to_string(B3DTexture.Yscale)); + } else { if (t.contains("scale") && !t["scale"].is_array()) { @@ -356,6 +358,18 @@ std::tuple CB3DJSONMeshFileLoader::readChunkTEXS() { return {false, "Malformed \"scale\" in TEXS block index (" + std::to_string(index) + "). Must be an array with 2 numbers."}; } + //* Angle. + if (t.contains("angle") && t["angle"].is_number()) { + + B3DTexture.Angle = t["angle"]; + + } else { + if (t.contains("angle")) { + return {false, "\"angle\" in TEXS block index (" + std::to_string(index) + ") is not a number."}; + } + + return {false, "\"angle\" in TEXS block index (" + std::to_string(index) + ") is missing."}; + } index++;