summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--build.zig1
-rw-r--r--src/Camera.cpp7
-rw-r--r--src/Camera.h6
-rw-r--r--src/GameDraw.cpp3
4 files changed, 3 insertions, 14 deletions
diff --git a/build.zig b/build.zig
index 982956a..11b8baf 100644
--- a/build.zig
+++ b/build.zig
@@ -31,7 +31,6 @@ pub fn build(b: *Builder) void {
     exe.addIncludeDir("src");
 
     const cxxflags = [_][]const u8{ "--std=c++17" };
-    exe.addCSourceFile("src/Camera.cpp", &cxxflags);
     exe.addCSourceFile("src/Decals.cpp", &cxxflags);
     exe.addCSourceFile("src/Fog.cpp", &cxxflags);
     exe.addCSourceFile("src/Frustum.cpp", &cxxflags);
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);