The dream is true...

git-svn-id: https://svn.eduke32.com/eduke32@701 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
plagman 2008-04-10 08:24:06 +00:00
parent 7b03cef01a
commit e872a59fa5
4 changed files with 27 additions and 5 deletions

View file

@ -210,6 +210,7 @@ struct validmode_t {
EXTERN struct validmode_t validmode[MAXVALIDMODES];
EXTERN short numsectors, numwalls;
EXTERN char display_mirror;
EXTERN /*volatile*/ int totalclock;
EXTERN int numframes, randomseed;
EXTERN short sintable[2048];

View file

@ -129,6 +129,9 @@ void polymer_drawsprite(int snum);
# ifdef POLYMER_C
extern int globalposx, globalposy, globalposz, globalhoriz;
extern short globalang, globalcursectnum;
extern int globalpal, cosglobalang, singlobalang;
extern int cosviewingrangeglobalang, sinviewingrangeglobalang;
// CORE
static void polymer_displayrooms(short sectnum);

View file

@ -278,6 +278,10 @@ void polymer_drawrooms(int daposx, int daposy, int daposz, short
viewangle = daang;
curmodelviewmatrix = rootmodelviewmatrix;
cosglobalang = sintable[(viewangle+512)&2047];
singlobalang = sintable[viewangle&2047];
cosviewingrangeglobalang = mulscale16(cosglobalang,viewingrange);
sinviewingrangeglobalang = mulscale16(singlobalang,viewingrange);
if (pr_verbosity >= 3) OSD_Printf("PR : Rooms drawn.\n");
}
@ -290,7 +294,9 @@ void polymer_drawmasks(void)
while (spritesortcnt)
{
polymer_drawsprite(--spritesortcnt);
spritesortcnt--;
tspriteptr[spritesortcnt] = &tsprite[spritesortcnt];
polymer_drawsprite(spritesortcnt);
}
bglDisable(GL_POLYGON_OFFSET_FILL);
@ -644,7 +650,15 @@ static void polymer_displayrooms(short dacursectnum)
if (depth)
{
cosglobalang = sintable[(viewangle+512)&2047];
singlobalang = sintable[viewangle&2047];
cosviewingrangeglobalang = mulscale16(cosglobalang,viewingrange);
sinviewingrangeglobalang = mulscale16(singlobalang,viewingrange);
display_mirror = 1;
polymer_animatesprites();
display_mirror = 0;
bglDisable(GL_CULL_FACE);
drawmasks();
bglEnable(GL_CULL_FACE);
@ -715,6 +729,10 @@ static void polymer_drawplane(short sectnum, short wallnum, GLuint glpic
bglCullFace(GL_FRONT);
bglEnable(GL_CLIP_PLANE0);
if (wallnum >= 0)
preparemirror(globalposx, globalposy, 0, globalang,
0, wallnum, 0, &gx, &gy, &viewangle);
gx = globalposx;
gy = globalposy;
gz = globalposz;
@ -807,7 +825,7 @@ static void polymer_inb4mirror(GLfloat* buffer, GLdouble* plane)
static void polymer_animatesprites(void)
{
asi.animatesprites(asi.x, asi.y, asi.a, asi.smoothratio);
asi.animatesprites(globalposx, globalposy, viewangle, asi.smoothratio);
}
// SECTORS
@ -1644,7 +1662,7 @@ static void polymer_updatewall(short wallnum)
memcpy(&w->bigportal[6], &s->ceilbuffer[(wal->point2 - sec->wallptr) * 5], sizeof(GLfloat) * 3);
memcpy(&w->bigportal[9], &s->ceilbuffer[(wallnum - sec->wallptr) * 5], sizeof(GLfloat) * 3);
polymer_buffertoplane(w->portal, NULL, w->plane);
polymer_buffertoplane(w->bigportal, NULL, w->plane);
w->controlstate = 1;
@ -1674,7 +1692,7 @@ static void polymer_drawwall(short sectnum, short wallnum)
if (pr_verbosity >= 3) OSD_Printf("PR : Finished drawing wall %i...\n", wallnum);
}
#define INDICE(n) ((indices) ? (indices[i+n]*5) : ((i+n)*5))
#define INDICE(n) ((indices) ? (indices[i+n]*5) : ((i+n)*3))
// HSR
static void polymer_buffertoplane(GLfloat* buffer, GLushort* indices, GLdouble* plane)

View file

@ -113,7 +113,7 @@ intptr_t *script = NULL;
int g_ScriptSize = 16384;
char display_mirror,typebuflen,typebuf[141];
char typebuflen,typebuf[141];
char *music_fn[MAXVOLUMES+1][MAXLEVELS],music_select;
char env_music_fn[MAXVOLUMES+1][BMAX_PATH];