2006-08-29 02:02:28 +00:00
|
|
|
// blah
|
|
|
|
|
|
|
|
#ifndef _polymer_h_
|
2006-08-30 23:32:39 +00:00
|
|
|
# define _polymer_h_
|
2006-08-29 02:02:28 +00:00
|
|
|
|
2006-09-17 20:16:20 +00:00
|
|
|
# ifdef _WIN32
|
|
|
|
# define PR_CALLBACK __stdcall
|
|
|
|
# else
|
2006-09-20 07:23:25 +00:00
|
|
|
# define PR_CALLBACK
|
2006-09-17 20:16:20 +00:00
|
|
|
# endif
|
|
|
|
|
2006-08-30 23:32:39 +00:00
|
|
|
# include "compat.h"
|
|
|
|
# include "build.h"
|
|
|
|
# include "glbuild.h"
|
|
|
|
# include "osd.h"
|
|
|
|
# include "polymost.h"
|
2006-09-27 17:55:49 +00:00
|
|
|
# include "pragmas.h"
|
2006-09-29 21:36:12 +00:00
|
|
|
|
|
|
|
// CVARS
|
|
|
|
extern char pr_verbosity;
|
|
|
|
extern char pr_wireframe;
|
2006-08-29 02:02:28 +00:00
|
|
|
|
2006-09-29 21:36:12 +00:00
|
|
|
// DATA
|
2006-08-30 23:32:39 +00:00
|
|
|
typedef struct s_prsector {
|
2006-09-27 17:55:49 +00:00
|
|
|
// geometry
|
2006-09-27 02:23:27 +00:00
|
|
|
GLdouble* verts;
|
|
|
|
GLfloat* floorbuffer;
|
|
|
|
GLfloat* ceilbuffer;
|
2006-09-29 21:36:12 +00:00
|
|
|
// attributes
|
|
|
|
GLfloat floorcolor[4], ceilcolor[4];
|
|
|
|
GLuint floorglpic, ceilglpic;
|
2006-09-27 17:55:49 +00:00
|
|
|
// elements
|
2006-09-27 02:23:27 +00:00
|
|
|
GLushort* indices;
|
|
|
|
short curindice;
|
2006-09-27 17:55:49 +00:00
|
|
|
int indicescount;
|
|
|
|
|
2006-08-30 23:32:39 +00:00
|
|
|
short wallcount;
|
|
|
|
char invalidate;
|
2006-09-27 02:23:27 +00:00
|
|
|
} _prsector;
|
2006-09-29 21:36:12 +00:00
|
|
|
|
|
|
|
typedef struct s_prwall {
|
|
|
|
// geometry
|
|
|
|
GLfloat* wallbuffer;
|
|
|
|
GLfloat* overbuffer;
|
|
|
|
// attributes
|
|
|
|
GLfloat wallcolor[4], overcolor[4];
|
|
|
|
GLfloat wallglpic, overglpic;
|
|
|
|
|
|
|
|
char underover;
|
|
|
|
char invalidate;
|
|
|
|
} _prwall;
|
|
|
|
|
|
|
|
extern _prsector* prsectors[MAXSECTORS];
|
|
|
|
extern _prwall* prwalls[MAXWALLS];
|
2006-08-30 23:32:39 +00:00
|
|
|
|
2006-09-29 21:36:12 +00:00
|
|
|
// EXTERNAL FUNCTIONS
|
|
|
|
int polymer_init(void);
|
|
|
|
void polymer_glinit(void);
|
|
|
|
void polymer_loadboard(void);
|
|
|
|
void polymer_drawrooms(long daposx, long daposy, long daposz, short daang, long dahoriz, short dacursectnum);
|
|
|
|
// SECTOR MANAGEMENT
|
|
|
|
int polymer_initsector(short sectnum);
|
|
|
|
int polymer_updatesector(short sectnum);
|
|
|
|
void PR_CALLBACK polymer_tesscombine(GLdouble v[3], GLdouble *data[4], GLfloat weight[4], GLdouble **out);
|
|
|
|
void PR_CALLBACK polymer_tesserror(GLenum error);
|
|
|
|
void PR_CALLBACK polymer_tessedgeflag(GLenum error);
|
|
|
|
void PR_CALLBACK polymer_tessvertex(void* vertex, void* sector);
|
|
|
|
int polymer_buildfloor(short sectnum);
|
|
|
|
void polymer_drawsector(long daposx, long daposy, long daposz, short daang, long dahoriz, short sectnum);
|
|
|
|
// WALL MANAGEMENT
|
|
|
|
int polymer_initwall(short wallnum);
|
|
|
|
void polymer_updatewall(short wallnum);
|
|
|
|
void polymer_drawwall(short wallnum);
|
2006-08-30 23:32:39 +00:00
|
|
|
|
2006-08-29 02:02:28 +00:00
|
|
|
#endif // !_polymer_h_
|