summaryrefslogtreecommitdiff
path: root/src/koopatlas/camera.h
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-01-15 21:31:34 +0100
committerTreeki <treeki@gmail.com>2012-01-15 21:31:34 +0100
commit83729d2427ebb9a8563dce8ca3c8c19fb9f71c4a (patch)
tree5d48147b1f8e23992fe4a921adcec83da45969cd /src/koopatlas/camera.h
parent0dabea30d98d175e5d7e0655c10757db99ac8295 (diff)
downloadkamek-83729d2427ebb9a8563dce8ca3c8c19fb9f71c4a.tar.gz
kamek-83729d2427ebb9a8563dce8ca3c8c19fb9f71c4a.zip
initial commit of the Koopatlas engine
Diffstat (limited to '')
-rw-r--r--src/koopatlas/camera.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/koopatlas/camera.h b/src/koopatlas/camera.h
new file mode 100644
index 0000000..f057374
--- /dev/null
+++ b/src/koopatlas/camera.h
@@ -0,0 +1,37 @@
+#include "koopatlas/core.h"
+
+class dWorldCamera_c : public dBase_c {
+ public:
+ int onCreate();
+ int onDelete();
+ int onExecute();
+ int onDraw();
+
+ dWorldCamera_c();
+
+ EGG::Screen screen;
+ EGG::LookAtCamera camera3d;
+
+ EGG::ProjectOrtho projection2d;
+ EGG::LookAtCamera camera2d;
+
+ Vec camPos, camTarget, camUp;
+
+
+ float currentX, currentY, zoomLevel;
+
+ void calculateScreenGeometry();
+
+
+ float zoomDivisor, screenLeft, screenTop, screenWidth, screenHeight;
+
+
+ void doStuff(float);
+ void generateCameraMatrices();
+ void updateCameras();
+
+ static dWorldCamera_c *build();
+ static dWorldCamera_c *instance;
+};
+
+