summaryrefslogtreecommitdiff
path: root/src/koopatlas/map.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/map.h
parent0dabea30d98d175e5d7e0655c10757db99ac8295 (diff)
downloadkamek-83729d2427ebb9a8563dce8ca3c8c19fb9f71c4a.tar.gz
kamek-83729d2427ebb9a8563dce8ca3c8c19fb9f71c4a.zip
initial commit of the Koopatlas engine
Diffstat (limited to '')
-rw-r--r--src/koopatlas/map.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/koopatlas/map.h b/src/koopatlas/map.h
new file mode 100644
index 0000000..6f07ddf
--- /dev/null
+++ b/src/koopatlas/map.h
@@ -0,0 +1,60 @@
+#include "koopatlas/core.h"
+
+// Can't remember why I had this. Who cares
+#define GEKKO
+#include "rvl/mtx.h"
+#include "rvl/GXEnum.h"
+#include "rvl/GXStruct.h"
+#include "rvl/GXTransform.h"
+#include "rvl/GXGeometry.h"
+#include "rvl/GXDispList.h"
+#include "rvl/GXLighting.h"
+#include "rvl/GXTev.h"
+#include "rvl/GXTexture.h"
+#include "rvl/GXCull.h"
+#include "rvl/GXPixel.h"
+#include "rvl/GXBump.h"
+#include "rvl/GXVert.h"
+#include "rvl/vifuncs.h"
+
+class dWMMap_c : public dBase_c {
+ public:
+ dWMMap_c();
+
+ int onCreate();
+ int onDelete();
+ int onExecute();
+ int onDraw();
+
+ class renderer_c : public m3d::proc_c {
+ public:
+ mAllocator_c allocator;
+
+ void drawOpa();
+ void drawXlu();
+
+ private:
+ void drawTiles();
+
+ void beginRendering();
+ void endRendering();
+
+ void renderTileLayer(dKPLayer_s *layer, dKPLayer_s::sector_s *sector);
+
+ void loadTexture(GXTexObj *obj);
+
+ void loadCamera();
+
+ GXTexObj *currentTexture;
+ Mtx renderMtx;
+ float baseZ;
+
+ int minX, minY, maxX, maxY;
+ };
+
+ renderer_c renderer;
+
+ static dWMMap_c *build();
+ static dWMMap_c *instance;
+};
+