(no commit message)
[atyndall/cits2231.git] / scene.c
diff --git a/scene.c b/scene.c
index eefeec1..99ccfa0 100644 (file)
--- a/scene.c
+++ b/scene.c
@@ -308,6 +308,7 @@ void motion(int x, int y) {
 \r
         // **NOTE: Currently a work in progress, does not work correctly\r
         printf("cam angle: %f\n", rotate*camRotateFactor);\r
+       // float arc = arctan()\r
         sceneObjs[curObject].x += diffx * sin(rotate*camRotateFactor);\r
         sceneObjs[curObject].z += diffx * cos(rotate*camRotateFactor);\r
 \r
@@ -426,6 +427,9 @@ void display() {
       glPushMatrix();\r
         SceneObject so = sceneObjs[i];\r
 \r
+        // Apply translation vector\r
+        glTranslatef(so.x, so.y, so.z);\r
+\r
         // Apply independant rotation vectors\r
         glRotatef(so.rotation.x, 1.0, 0.0, 0.0);\r
         glRotatef(so.rotation.y, 0.0, 1.0, 0.0);\r
@@ -434,9 +438,6 @@ void display() {
         // Apply scaling vector\r
         glScalef(so.scale[0], so.scale[1], so.scale[2]);\r
 \r
-        // Apply translation vector\r
-        glTranslatef(so.x, so.y, so.z);\r
-\r
         // Apply texture\r
         if ( so.texture.id > 0 ) {\r
           getTexture(so.texture.id);\r
@@ -461,7 +462,6 @@ void display() {
         glBindTexture(GL_TEXTURE_2D, 0);\r
       glPopMatrix();\r
     }\r
-    \r
 \r
     // Draw a white ball over the light sources\r
     glDisable(GL_LIGHTING);\r

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