diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Camera.cpp | 7 | ||||
-rw-r--r-- | src/Camera.h | 6 | ||||
-rw-r--r-- | src/GameDraw.cpp | 3 |
3 files changed, 3 insertions, 13 deletions
diff --git a/src/Camera.cpp b/src/Camera.cpp deleted file mode 100644 index ca2b9af..0000000 --- a/src/Camera.cpp +++ /dev/null @@ -1,7 +0,0 @@ -/**> HEADER FILES <**/ -#include "Camera.h" - -void Camera::Apply() -{ - glTranslatef(-position.x,-position.y,-position.z); -} diff --git a/src/Camera.h b/src/Camera.h index 7746537..1aeb6ee 100644 --- a/src/Camera.h +++ b/src/Camera.h @@ -22,12 +22,9 @@ #ifndef BLACKSHADES_CAMERA_H #define BLACKSHADES_CAMERA_H -#include <GL/gl.h> - #include "Quaternions.h" -class Camera { -public: +struct Camera { XYZ position; XYZ oldposition; XYZ targetoffset; @@ -35,7 +32,6 @@ public: float rotation, rotation2; float oldrotation, oldrotation2; float visrotation, visrotation2; - void Apply(); }; #endif // BLACKSHADES_CAMERA_H diff --git a/src/GameDraw.cpp b/src/GameDraw.cpp index a916d7e..54fddc1 100644 --- a/src/GameDraw.cpp +++ b/src/GameDraw.cpp @@ -623,7 +623,8 @@ void Game::DrawGLScene(void) randInt(-99, 99) / 100.0f * camerashake, randInt(-99, 99) / 100.0f * camerashake); } - camera.Apply(); + glTranslatef(-camera.position.x, + -camera.position.y, -camera.position.z); glPushMatrix(); glClipPlane(GL_CLIP_PLANE0, eqn); |