]> 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 b36c2bb88738b3550593d2126c518b5118279762..539ab37fbf1a8aeaa539f6b13c5fad8f81cc4135 100644 (file)
--- a/level.h
+++ b/level.h
@@ -7,12 +7,29 @@
 
 #include "tga.h"
 
-typedef uint32_t Block;
+typedef enum {
+       BLOCKTYPE_SPACE,
+       BLOCKTYPE_OBSTACLE_X,
+       BLOCKTYPE_OBSTACLE_Z,
+       BLOCKTYPE_OBSTACLE
+} BlockType;
 
-const AiScene* levelScene;
+typedef struct {
+       const BlockType type;
+       const AiScene* sceneData;
+       GLuint* textureIds;
+} Block;
+
+typedef struct {
+       int width;
+       int height;
+       Block* blocks;
+} BlockGrid;
+
+BlockGrid levelGrid;
 
 void initLevel();
-void setImage(TgaImage* image);
+void buildLevelFromImage(TgaImage* image);
 const AiScene* importScene(const char* path);
 
 #endif