Commit c952dd04 authored by Dario Seyb's avatar Dario Seyb

small fixes

parent 3deec03d
...@@ -29,10 +29,10 @@ float getTessLevel(float d0, float d1){ ...@@ -29,10 +29,10 @@ float getTessLevel(float d0, float d1){
if(avg >= 2000 * factor){ if(avg >= 2000 * factor){
return 1; return 1;
} }
if(avg >= 1000 * factor){ if(avg >= 1800 * factor){
return 2; return 2;
} }
if(avg >= 700 * factor){ if(avg >= 1000 * factor){
return 4; return 4;
} }
if(avg >= 400 * factor){ if(avg >= 400 * factor){
......
...@@ -78,25 +78,25 @@ bool SettingsSystem::startup() { ...@@ -78,25 +78,25 @@ bool SettingsSystem::startup() {
const picojson::object& planetObj = planetVal.get<picojson::object>(); const picojson::object& planetObj = planetVal.get<picojson::object>();
PlanetMetaData planet; PlanetMetaData planetData;
planet.name = planetName; planetData.name = planetName;
for (auto& prop : planetObj) { for (auto& prop : planetObj) {
if (prop.first == "shaders") { if (prop.first == "shaders") {
VALIDATE_TYPE(prop, std::string); VALIDATE_TYPE(prop, std::string);
planet.shaders = prop.second.get<std::string>(); planetData.shaders = prop.second.get<std::string>();
} else if (prop.first == "atmosphere") { } else if (prop.first == "atmosphere") {
VALIDATE_TYPE(prop, bool); VALIDATE_TYPE(prop, bool);
planet.hasAtmosphere = prop.second.get<bool>(); planetData.hasAtmosphere = prop.second.get<bool>();
} else if (prop.first == "water") { } else if (prop.first == "water") {
VALIDATE_TYPE(prop, bool); VALIDATE_TYPE(prop, bool);
planet.hasWater = prop.second.get<bool>(); planetData.hasWater = prop.second.get<bool>();
} else if (prop.first == "moons") { } else if (prop.first == "moons") {
VALIDATE_TYPE(prop, int64_t); VALIDATE_TYPE(prop, int64_t);
planet.moonCount = prop.second.get<int64_t>(); planetData.moonCount = prop.second.get<int64_t>();
} }
} }
m_availablePlanets.push_back(planet); m_availablePlanets.push_back(planetData);
} }
} else if(i.first == "resolution") { } else if(i.first == "resolution") {
VALIDATE_TYPE(i, picojson::array); VALIDATE_TYPE(i, picojson::array);
...@@ -140,4 +140,4 @@ bool SettingsSystem::startup() { ...@@ -140,4 +140,4 @@ bool SettingsSystem::startup() {
void SettingsSystem::shutdown() { void SettingsSystem::shutdown() {
} }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment