]> git.lizzy.rs Git - shadowclad.git/blob - level.h
539ab37fbf1a8aeaa539f6b13c5fad8f81cc4135
[shadowclad.git] / level.h
1 #ifndef LEVEL_H_
2 #define LEVEL_H_
3
4 #include <stdint.h>
5
6 #include "assimp_types.h"
7
8 #include "tga.h"
9
10 typedef enum {
11         BLOCKTYPE_SPACE,
12         BLOCKTYPE_OBSTACLE_X,
13         BLOCKTYPE_OBSTACLE_Z,
14         BLOCKTYPE_OBSTACLE
15 } BlockType;
16
17 typedef struct {
18         const BlockType type;
19         const AiScene* sceneData;
20         GLuint* textureIds;
21 } Block;
22
23 typedef struct {
24         int width;
25         int height;
26         Block* blocks;
27 } BlockGrid;
28
29 BlockGrid levelGrid;
30
31 void initLevel();
32 void buildLevelFromImage(TgaImage* image);
33 const AiScene* importScene(const char* path);
34
35 #endif