summaryrefslogtreecommitdiffstats
path: root/zoom
diff options
context:
space:
mode:
Diffstat (limited to 'zoom')
-rw-r--r--zoom/level.h53
-rw-r--r--zoom/types.h1
2 files changed, 27 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 *);
diff --git a/zoom/types.h b/zoom/types.h
index 0a60876..4c86190 100644
--- a/zoom/types.h
+++ b/zoom/types.h
@@ -32,6 +32,7 @@ typedef struct WALL {
VECTOR normal;
};
};
+ VECTOR normals[3];
int texture;
TEXCOORDS texcoords[3];
} WALL;