From: Côme Chilliet Date: Mon, 28 Nov 2016 13:35:31 +0000 (+0700) Subject: Replaced hardcoded environment values by appropriate define X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=b7ce94ec764f19ba8d092839ee289e9e1d93266b;p=lugaru.git Replaced hardcoded environment values by appropriate define --- 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);