From 9e4cb9324ae8de074b2112f51d0a4f5cff11983b Mon Sep 17 00:00:00 2001 From: Untrustedlife Date: Wed, 23 Jan 2019 17:25:29 -0600 Subject: [PATCH] increased base opacity of cells (this was undone?) added space that was unnessasarily removed made change suggested by hhenri, --- .../MicrobeStage/Compounds.json | 26 +++++++++---------- scripts/microbe_stage/configs.as | 2 +- src/microbe_stage/compound_cloud_system.cpp | 22 +++++++++++++--- 3 files changed, 32 insertions(+), 18 deletions(-) diff --git a/scripts/SimulationParameters/MicrobeStage/Compounds.json b/scripts/SimulationParameters/MicrobeStage/Compounds.json index d7f4d5cbd30..3ada35d96f1 100644 --- a/scripts/SimulationParameters/MicrobeStage/Compounds.json +++ b/scripts/SimulationParameters/MicrobeStage/Compounds.json @@ -77,6 +77,19 @@ } }, + "iron": { + "name": "Iron", + "volume": 1, + "isCloud": true, + "isUseful": false, + "isEnvironmental": false, + "colour": { + "r": 0.28, + "g": 0.098, + "b": 0.02 + } + }, + "oxygen": { "name": "Oxygen", "volume": 1, @@ -101,18 +114,5 @@ "g": 0.0, "b": 0.0 } - }, - - "iron": { - "name": "Iron", - "volume": 1, - "isCloud": true, - "isUseful": false, - "isEnvironmental": false, - "colour": { - "r": 0.28, - "g": 0.098, - "b": 0.02 - } } } diff --git a/scripts/microbe_stage/configs.as b/scripts/microbe_stage/configs.as index 0703beaea50..884a67a5b0c 100644 --- a/scripts/microbe_stage/configs.as +++ b/scripts/microbe_stage/configs.as @@ -20,7 +20,7 @@ const auto MAX_COLOR = 0.9f; const auto MIN_COLOR_MUTATION = -0.005f; const auto MAX_COLOR_MUTATION = 0.005f; -const auto MIN_OPACITY = 0.2f; +const auto MIN_OPACITY = 0.5f; const auto MAX_OPACITY = 1.8f; const auto MIN_OPACITY_CHITIN = 0.4f; diff --git a/src/microbe_stage/compound_cloud_system.cpp b/src/microbe_stage/compound_cloud_system.cpp index ddf378b196e..2162a272cab 100644 --- a/src/microbe_stage/compound_cloud_system.cpp +++ b/src/microbe_stage/compound_cloud_system.cpp @@ -284,23 +284,36 @@ void m_position.X, CLOUD_Y_COORDINATE, m_position.Z); // Clear data. Maybe there is a faster way + if(m_compoundId1 != NULL_COMPOUND) { for(size_t x = 0; x < m_density1.size(); ++x) { for(size_t y = 0; y < m_density1[x].size(); ++y) { - if(m_compoundId1 != NULL_COMPOUND) { m_density1[x][y] = 0; m_oldDens1[x][y] = 0; } + } + } - if(m_compoundId2 != NULL_COMPOUND) { + if(m_compoundId2 != NULL_COMPOUND) { + for(size_t x = 0; x < m_density2.size(); ++x) { + for(size_t y = 0; y < m_density2[x].size(); ++y) { m_density2[x][y] = 0; m_oldDens2[x][y] = 0; } + } + } - if(m_compoundId3 != NULL_COMPOUND) { + if(m_compoundId3 != NULL_COMPOUND) { + for(size_t x = 0; x < m_density3.size(); ++x) { + for(size_t y = 0; y < m_density3[x].size(); ++y) { m_density3[x][y] = 0; m_oldDens3[x][y] = 0; } - if(m_compoundId4 != NULL_COMPOUND) { + } + } + + if(m_compoundId4 != NULL_COMPOUND) { + for(size_t x = 0; x < m_density4.size(); ++x) { + for(size_t y = 0; y < m_density4[x].size(); ++y) { m_density4[x][y] = 0; m_oldDens4[x][y] = 0; } @@ -1134,6 +1147,7 @@ void // Etc. if(cloud.m_compoundId3 != NULL_COMPOUND) fillCloudChannel(cloud.m_density3, 2, rowBytes, pDest); + if(cloud.m_compoundId4 != NULL_COMPOUND) fillCloudChannel(cloud.m_density4, 3, rowBytes, pDest);