From b7ce94ec764f19ba8d092839ee289e9e1d93266b Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20Chilliet?= Date: Mon, 28 Nov 2016 20:35:31 +0700 Subject: [PATCH] Replaced hardcoded environment values by appropriate define --- Source/Objects.cpp | 2 +- Source/Skybox.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Objects.cpp b/Source/Objects.cpp index 1a974be..6f98ead 100644 --- a/Source/Objects.cpp +++ b/Source/Objects.cpp @@ -160,7 +160,7 @@ void Objects::Draw() roty[i] = -10; } if (type[i] == treetrunktype || type[i] == treeleavestype) { - if (type[i] == treetrunktype || environment == 2) { + if (type[i] == treetrunktype || environment == desertenvironment) { messedwith[i] -= multiplier; if (rotxvel[i] || rotx[i]) { if (rotx[i] > 0) rotxvel[i] -= multiplier * 8 * fabs(rotx[i]); diff --git a/Source/Skybox.cpp b/Source/Skybox.cpp index 0797722..327db69 100644 --- a/Source/Skybox.cpp +++ b/Source/Skybox.cpp @@ -50,12 +50,12 @@ void SkyBox::draw() M[13] = 0; M[14] = 0; glLoadMatrixf(M); - if (environment == 2) + if (environment == desertenvironment) { glScalef(1 + blurness / 1000, 1, 1 + blurness / 1000); - if (environment != 2) - glColor3f(.85 * skyboxr, .85 * skyboxg, .95 * skyboxb); - else glColor3f(1 * skyboxr, .95 * skyboxg, .95 * skyboxb); + } else { + glColor3f(.85 * skyboxr, .85 * skyboxg, .95 * skyboxb); + } if (!skyboxtexture) { glDisable(GL_TEXTURE_2D); -- 2.39.2