75 lines
1.2 KiB
C
75 lines
1.2 KiB
C
#ifndef ZOOM_LEVEL_H
|
|
#define ZOOM_LEVEL_H
|
|
|
|
#include <GL/gl.h>
|
|
#include <zoom/types.h>
|
|
#include <zoom/render.h>
|
|
|
|
/*typedef struct _GATEINFO {
|
|
unsigned short state;
|
|
unsigned short timer;
|
|
} GATEINFO;*/
|
|
|
|
typedef struct _ROOM {
|
|
char *id;
|
|
int nWalls;
|
|
//int nThings;
|
|
//int nGates;
|
|
WALL *walls;
|
|
//THING *things;
|
|
//GATE *gates;
|
|
//GATEINFO *gateinfo;
|
|
} ROOM;
|
|
|
|
typedef struct _GATE {
|
|
//unsigned char type;
|
|
//unsigned char open;
|
|
int nWalls;
|
|
WALL *walls;
|
|
//VERTEX point;
|
|
ROOM *room1, *room2;
|
|
int gate;
|
|
} GATE;
|
|
|
|
typedef struct _LEVELINFO {
|
|
char *name;
|
|
char *desc;
|
|
VERTEX start;
|
|
} LEVELINFO;
|
|
|
|
typedef struct _TEXTURE {
|
|
char *name;
|
|
GLuint id;
|
|
} TEXTURE;
|
|
|
|
typedef struct _LEVEL {
|
|
LEVELINFO *info;
|
|
int nRooms;
|
|
ROOM *rooms;
|
|
int nGates;
|
|
GATE *gates;
|
|
int nTextures;
|
|
TEXTURE *textures;
|
|
} LEVEL;
|
|
|
|
typedef struct _POLYGON {
|
|
VECTOR normal;
|
|
VERTEX vertices[3];
|
|
VECTOR normals[3];
|
|
|
|
GLuint texture;
|
|
TEXCOORDS texcoords[3];
|
|
} POLYGON;
|
|
|
|
typedef struct _POLYGON_LIST {
|
|
int nPolygons;
|
|
|
|
POLYGON polygons[0];
|
|
} POLYGON_LIST;
|
|
|
|
|
|
LEVEL *LoadLevel(char *);
|
|
POLYGON_LIST *DrawRoom(LEVEL *, int);
|
|
void FreeLevel(LEVEL *);
|
|
|
|
#endif
|