summaryrefslogtreecommitdiffstats
path: root/zoom/level.h
diff options
context:
space:
mode:
Diffstat (limited to 'zoom/level.h')
-rw-r--r--zoom/level.h53
1 files changed, 26 insertions, 27 deletions
diff --git a/zoom/level.h b/zoom/level.h
index c93fd3b..49de407 100644
--- a/zoom/level.h
+++ b/zoom/level.h
@@ -5,45 +5,44 @@
#include <zoom/types.h>
#include <zoom/render.h>
-#pragma pack(push, 2)
-typedef struct _LEVELHEADER {
- char l, f;
- int nRooms;
- int nTextures;
-} LEVELHEADER;
-
-typedef struct _ROOMHEADER {
- int nWalls;
- int nThings;
- int nGates;
-} ROOMHEADER;
-
typedef struct _GATEINFO {
unsigned short state;
unsigned short timer;
} GATEINFO;
typedef struct _ROOM {
- int nWalls;
- int nThings;
- int nGates;
- WALL *walls;
- THING *things;
- GATE *gates;
- GATEINFO *gateinfo;
+ int nWalls;
+ int nThings;
+ int nGates;
+ WALL *walls;
+ THING *things;
+ GATE *gates;
+ GATEINFO *gateinfo;
} ROOM;
+typedef struct _LEVELINFO {
+ char *name;
+ char *desc;
+ VERTEX start;
+} LEVELINFO;
+
+typedef struct _TEXTURE {
+ char *name;
+ GLuint id;
+} TEXTURE;
+
typedef struct _LEVEL {
- int nRooms;
- ROOM *rooms;
- int nTextures;
- GLuint *textures;
+ LEVELINFO *info;
+ int nRooms;
+ ROOM *rooms;
+ int nTextures;
+ TEXTURE *textures;
} LEVEL;
-#pragma pack(pop)
typedef struct _POLYGON {
+ VECTOR normal;
VERTEX vertices[3];
- VECTOR normal;
+ VECTOR normals[3];
GLuint texture;
TEXCOORDS texcoords[3];
@@ -56,7 +55,7 @@ typedef struct _POLYGON_LIST {
} POLYGON_LIST;
-int LoadLevel(char *, LEVEL *);
+LEVEL *LoadLevel(char *);
POLYGON_LIST *DrawRoom(LEVEL *, int);
void FreeLevel(LEVEL *);