Make this look nicer

This commit is contained in:
jordan4ibanez 2023-11-28 08:51:46 -05:00
parent 77b0021dd9
commit 30e46b5ead
1 changed files with 9 additions and 2 deletions

View File

@ -243,6 +243,7 @@ std::tuple<bool, std::string> CB3DJSONMeshFileLoader::readChunkBRUS() {
json b = *reference; json b = *reference;
if (!b.is_object()) { if (!b.is_object()) {
return {false, "BRUS: Element " + std::to_string(index) + " is not an object."}; return {false, "BRUS: Element " + std::to_string(index) + " is not an object."};
} }
@ -255,7 +256,9 @@ std::tuple<bool, std::string> CB3DJSONMeshFileLoader::readChunkBRUS() {
//* Red. //* Red.
if (b.contains("red") && b["red"].is_number()) { if (b.contains("red") && b["red"].is_number()) {
B3DMaterial.red = b["red"]; B3DMaterial.red = b["red"];
} else { } else {
if (!b.contains("red")) { if (!b.contains("red")) {
@ -279,7 +282,9 @@ std::tuple<bool, std::string> CB3DJSONMeshFileLoader::readChunkBRUS() {
//* Blue. //* Blue.
if (b.contains("blue") && b["blue"].is_number()) { if (b.contains("blue") && b["blue"].is_number()) {
B3DMaterial.blue = b["blue"]; B3DMaterial.blue = b["blue"];
} else { } else {
if (!b.contains("blue")) { if (!b.contains("blue")) {
@ -303,7 +308,9 @@ std::tuple<bool, std::string> CB3DJSONMeshFileLoader::readChunkBRUS() {
//* Blend. //* Blend.
if (b.contains("blend") && b["blend"].is_number_integer()) { if (b.contains("blend") && b["blend"].is_number_integer()) {
B3DMaterial.blend = b["blend"]; B3DMaterial.blend = b["blend"];
} else { } else {
if (!b.contains("blend")) { if (!b.contains("blend")) {
@ -315,7 +322,9 @@ std::tuple<bool, std::string> CB3DJSONMeshFileLoader::readChunkBRUS() {
//* FX. //* FX.
if (b.contains("fx") && b["fx"].is_number_integer()) { if (b.contains("fx") && b["fx"].is_number_integer()) {
B3DMaterial.fx = b["fx"]; B3DMaterial.fx = b["fx"];
} else { } else {
if (!b.contains("fx")) { if (!b.contains("fx")) {
@ -325,8 +334,6 @@ std::tuple<bool, std::string> CB3DJSONMeshFileLoader::readChunkBRUS() {
return {false, "BRUS: Element (" + std::to_string(index) + ") \"fx\" is not an integer."}; return {false, "BRUS: Element (" + std::to_string(index) + ") \"fx\" is not an integer."};
} }
index++; index++;
} }