(no commit message)
authorAsh Tyndall <[email protected]>
Sat, 22 Oct 2011 07:12:33 +0000 (15:12 +0800)
committerAsh Tyndall <[email protected]>
Sat, 22 Oct 2011 07:12:33 +0000 (15:12 +0800)
scene.c

diff --git a/scene.c b/scene.c
index 42b717c..3ffe29f 100644 (file)
--- a/scene.c
+++ b/scene.c
@@ -347,19 +347,24 @@ void motion(int x, int y) {
       break;\r
 \r
     case STATE_LIGHT_1_MOVE:\r
-    case STATE_LIGHT_2_MOVE:;\r
+    case STATE_LIGHT_2_MOVE:\r
+      ; // Semi-colon required to allow variable declaration below\r
       \r
       int i = 0;\r
       if ( manipulateState == STATE_LIGHT_2_MOVE ) i = 1;\r
 \r
       if ( buttonSelected == GLUT_LEFT_BUTTON ) {\r
+        // w: left/right, h: near/far\r
         float angler = 2 * M_PI * ( (rotate*camRotateFactor)/360.0 );\r
         lightObjs[i].position[0] += diffx * cos(angler) * leftrightFactor + diffy * cos(M_PI/2 + angler) * nearfarFactor;\r
         lightObjs[i].position[2] += diffx * sin(angler) * leftrightFactor + diffy * sin(M_PI/2 + angler) * nearfarFactor;\r
-        \r
 \r
       } else if ( buttonSelected == GLUT_MIDDLE_BUTTON ) {\r
+        // w: increase/decrease some light param\r
+        // **NOTE: Currently not implemented\r
 \r
+        // h: up/down\r
+        lightObjs[i].position[1] -= diffy * updownFactor;\r
       }\r
 \r
       break;\r

UCC git Repository :: git.ucc.asn.au