]> git.lizzy.rs Git - shadowclad.git/blobdiff - level.h
Rework asset import, add texture import
[shadowclad.git] / level.h
diff --git a/level.h b/level.h
index 22e4ad4a369132efe2bdc60f7e765c3095a82aae..539ab37fbf1a8aeaa539f6b13c5fad8f81cc4135 100644 (file)
--- a/level.h
+++ b/level.h
@@ -1,16 +1,35 @@
-#ifndef LEVEL_H
-#define LEVEL_H
+#ifndef LEVEL_H_
+#define LEVEL_H_
 
-#include <GL/gl.h>
+#include <stdint.h>
+
+#include "assimp_types.h"
 
 #include "tga.h"
 
-typedef GLuint Block;
+typedef enum {
+       BLOCKTYPE_SPACE,
+       BLOCKTYPE_OBSTACLE_X,
+       BLOCKTYPE_OBSTACLE_Z,
+       BLOCKTYPE_OBSTACLE
+} BlockType;
+
+typedef struct {
+       const BlockType type;
+       const AiScene* sceneData;
+       GLuint* textureIds;
+} Block;
+
+typedef struct {
+       int width;
+       int height;
+       Block* blocks;
+} BlockGrid;
 
-const Block BLOCK_EMPTY = 0;
-const Block BLOCK_WALL01 = 1;
+BlockGrid levelGrid;
 
-Block get_block(GLushort x, GLushort y);
-void set_image(TGAimage* image);
+void initLevel();
+void buildLevelFromImage(TgaImage* image);
+const AiScene* importScene(const char* path);
 
 #endif