Commits

jodoherty committed e12ceb0

Added weapon recoil.

  • Participants
  • Parent commits 81a732f

Comments (0)

Files changed (2)

     width = screen->w;
     height = screen->h;
 
+    // Initialize GLEW 
+    GLenum err = glewInit();
+    if (GLEW_OK != err) {
+        cerr << "Error, glewInit failed: " 
+             << glewGetErrorString(err) << endl;
+        exit(EXIT_FAILURE);
+    }
+
     // Set up the screen
     reshape(width, height);
 
         }
     }
     step++;
-
 }
 
 void Ship::drawAt(float x, float y)
     Bullet *bullet = new Bullet(this->x + size*cos(this->direction),
                                 this->y + size*sin(this->direction),
                                 dx, dy);
+    this->dx -= dx*0.03f;
+    this->dy -= dy*0.03f;
     return bullet;
 }