63 lines
1,016 B
C
63 lines
1,016 B
C
#ifndef ZOOM_LEVEL_H
|
|
#define ZOOM_LEVEL_H
|
|
|
|
#include <GL/gl.h>
|
|
#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;
|
|
} ROOM;
|
|
|
|
typedef struct _LEVEL {
|
|
int nRooms;
|
|
ROOM *rooms;
|
|
int nTextures;
|
|
GLuint *textures;
|
|
} LEVEL;
|
|
#pragma pack(pop)
|
|
|
|
typedef struct _POLYGON {
|
|
VERTEX vertices[3];
|
|
VECTOR normal;
|
|
|
|
GLuint texture;
|
|
TEXCOORDS texcoords[3];
|
|
} POLYGON;
|
|
|
|
typedef struct _POLYGON_LIST {
|
|
int nPolygons;
|
|
|
|
POLYGON polygons[0];
|
|
} POLYGON_LIST;
|
|
|
|
|
|
int LoadLevel(char *, LEVEL *);
|
|
POLYGON_LIST *DrawRoom(LEVEL *, int);
|
|
void FreeLevel(LEVEL *);
|
|
|
|
#endif
|