(no commit message)
[atyndall/cits2231.git] / helper.c
index ea80294..f6ecc8c 100644 (file)
--- a/helper.c
+++ b/helper.c
@@ -293,10 +293,10 @@ void drawAxisLines() {
   glEnable(GL_TEXTURE_2D);
 }
 
-void addSceneObject(int id) {
+int addSceneObject(int id) {
   // **NOTE: Currently only adds the teapot
 
-  nObjects += 1; // New object in scene
+  curObject = nObjects;
 
   sceneObjs[nObjects].mesh = -1;
   sceneObjs[nObjects].texture = -1;
@@ -308,4 +308,8 @@ void addSceneObject(int id) {
 
   sceneObjs[nObjects].rotation.parameter = 0;
   sceneObjs[nObjects].rotation.vect = (vector*)calloc( 3, sizeof(vector[0]) );
+
+  nObjects += 1; // New object in scene
+
+  return nObjects;
 }
\ No newline at end of file

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