]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Environment/Lights.cpp
Update copyright year to 2017
[lugaru.git] / Source / Environment / Lights.cpp
index 17efb4c0d5c23b5e639d5872ae628c131fd83a49..921685bb7d98aeb16599b3f48b2e833438d4144f 100644 (file)
@@ -1,6 +1,6 @@
 /*
 Copyright (C) 2003, 2010 - Wolfire Games
-Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file)
+Copyright (C) 2010-2017 - Lugaru contributors (see AUTHORS file)
 
 This file is part of Lugaru.
 
@@ -18,16 +18,15 @@ You should have received a copy of the GNU General Public License
 along with Lugaru.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-/**> HEADER FILES <**/
-#include "Environment/Lights.h"
+#include "Environment/Lights.hpp"
 
 void SetUpLight(Light* whichsource, int whichlight)
 {
-    static float qattenuation[] = {0.0002f};
+    static float qattenuation[] = { 0.0002f };
 
     //Initialize lights
     if (whichlight == 0) {
-        GLfloat LightAmbient[] = { whichsource->ambient[0], whichsource->ambient[1], whichsource->ambient[2], 1.0f};
+        GLfloat LightAmbient[] = { whichsource->ambient[0], whichsource->ambient[1], whichsource->ambient[2], 1.0f };
         GLfloat LightDiffuse[] = { whichsource->color[0], whichsource->color[1], whichsource->color[2], 1.0f };
         GLfloat LightPosition[] = { whichsource->location.x, whichsource->location.y, whichsource->location.z, 0.0f };
 
@@ -38,27 +37,27 @@ void SetUpLight(Light* whichsource, int whichlight)
     } else {
         GLenum lightselect = GL_LIGHT1;
         switch (whichlight) {
-        case 2:
-            lightselect = GL_LIGHT2;
-            break;
-        case 3:
-            lightselect = GL_LIGHT3;
-            break;
-        case 4:
-            lightselect = GL_LIGHT4;
-            break;
-        case 5:
-            lightselect = GL_LIGHT5;
-            break;
-        case 6:
-            lightselect = GL_LIGHT6;
-            break;
-        case 7:
-            lightselect = GL_LIGHT7;
-            break;
+            case 2:
+                lightselect = GL_LIGHT2;
+                break;
+            case 3:
+                lightselect = GL_LIGHT3;
+                break;
+            case 4:
+                lightselect = GL_LIGHT4;
+                break;
+            case 5:
+                lightselect = GL_LIGHT5;
+                break;
+            case 6:
+                lightselect = GL_LIGHT6;
+                break;
+            case 7:
+                lightselect = GL_LIGHT7;
+                break;
         }
 
-        GLfloat LightAmbient[] = { 0, 0, 0, 1.0f};
+        GLfloat LightAmbient[] = { 0, 0, 0, 1.0f };
         GLfloat LightDiffuse[] = { whichsource->color[0], whichsource->color[1], whichsource->color[2], 1.0f };
         GLfloat LightPosition[] = { whichsource->location.x, whichsource->location.y, whichsource->location.z, 1.0f };
 
@@ -67,6 +66,5 @@ void SetUpLight(Light* whichsource, int whichlight)
         glLightfv(lightselect, GL_AMBIENT, LightAmbient);
         glLightfv(lightselect, GL_DIFFUSE, LightDiffuse);
         glEnable(lightselect);
-
     }
 }