#define NTEXTURE 30 // The number of textures (in the models-textures dir)
#define MAXOBJECTS 256
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
// Meshes and textures arrays
extern mesh* meshes[];
extern texture* textures[];
// w: left/right, h: near/far\r
\r
// **NOTE: Currently a work in progress, does not work correctly\r
+ float angler = 2*M_PI*((rotate*camRotateFactor)/360);\r
printf("cam angle: %f\n", rotate*camRotateFactor);\r
// float arc = arctan()\r
- sceneObjs[curObject].x += diffx * sin(rotate*camRotateFactor) * 0.3;\r
- sceneObjs[curObject].z += diffx * cos(rotate*camRotateFactor) * 0.3;\r
+ sceneObjs[curObject].x += diffx * sin(angler) * 0.3;\r
+ sceneObjs[curObject].z += diffx * cos(angler) * 0.3;\r
\r
} else if ( buttonSelected == GLUT_MIDDLE_BUTTON ) {\r
// w: big/small\r