mirror of
https://github.com/minetest/irrlicht.git
synced 2025-02-21 13:20:27 +01:00
Make this look nicer
This commit is contained in:
parent
77b0021dd9
commit
30e46b5ead
@ -243,6 +243,7 @@ std::tuple<bool, std::string> CB3DJSONMeshFileLoader::readChunkBRUS() {
|
||||
json b = *reference;
|
||||
|
||||
if (!b.is_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.
|
||||
if (b.contains("red") && b["red"].is_number()) {
|
||||
|
||||
B3DMaterial.red = b["red"];
|
||||
|
||||
} else {
|
||||
|
||||
if (!b.contains("red")) {
|
||||
@ -279,7 +282,9 @@ std::tuple<bool, std::string> CB3DJSONMeshFileLoader::readChunkBRUS() {
|
||||
|
||||
//* Blue.
|
||||
if (b.contains("blue") && b["blue"].is_number()) {
|
||||
|
||||
B3DMaterial.blue = b["blue"];
|
||||
|
||||
} else {
|
||||
|
||||
if (!b.contains("blue")) {
|
||||
@ -303,7 +308,9 @@ std::tuple<bool, std::string> CB3DJSONMeshFileLoader::readChunkBRUS() {
|
||||
|
||||
//* Blend.
|
||||
if (b.contains("blend") && b["blend"].is_number_integer()) {
|
||||
|
||||
B3DMaterial.blend = b["blend"];
|
||||
|
||||
} else {
|
||||
|
||||
if (!b.contains("blend")) {
|
||||
@ -315,7 +322,9 @@ std::tuple<bool, std::string> CB3DJSONMeshFileLoader::readChunkBRUS() {
|
||||
|
||||
//* FX.
|
||||
if (b.contains("fx") && b["fx"].is_number_integer()) {
|
||||
|
||||
B3DMaterial.fx = b["fx"];
|
||||
|
||||
} else {
|
||||
|
||||
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."};
|
||||
}
|
||||
|
||||
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user