This repository has been archived on 2025-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
neofx-libzoom/zoom/level.h
neoraider a5aa4b54e2 libzoom: XML level loader implemented.
zoom: Converted old test level to XML.
2007-05-14 17:38:01 +00:00

62 lines
1,001 B
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 {
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 {
LEVELINFO *info;
int nRooms;
ROOM *rooms;
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