diff --git a/polymer/build/include/build.h b/polymer/build/include/build.h index 783aa2e31..a01488187 100644 --- a/polymer/build/include/build.h +++ b/polymer/build/include/build.h @@ -186,6 +186,7 @@ EXTERN int guniqhudid; EXTERN sectortype *sector; EXTERN walltype *wall; EXTERN spritetype *sprite; +EXTERN spritetype *tspriteptr[MAXSPRITESONSCREEN]; EXTERN int spritesortcnt; EXTERN spritetype *tsprite; diff --git a/polymer/build/include/polymer.h b/polymer/build/include/polymer.h index 133f80d00..6a6d566c6 100644 --- a/polymer/build/include/polymer.h +++ b/polymer/build/include/polymer.h @@ -7,6 +7,7 @@ // o make occlusion queries every n frames (cvar) // o there's still a texture alignment problem with slopes (waterfall in launch facility) // o there's also the texture alignment problem Hunter reported (san andreas fault) +// o also sliding doors are still fucked up sometimes (like under the bar in E1L2) // o port glowmaps and detail maps from hacked polymost (:( // o shading needs a lot of work // o make the portal smaller diff --git a/polymer/build/src/engine.c b/polymer/build/src/engine.c index 2f838e722..33513edbe 100644 --- a/polymer/build/src/engine.c +++ b/polymer/build/src/engine.c @@ -571,7 +571,7 @@ static short maskwall[MAXWALLSB], maskwallcnt; static int spritesx[MAXSPRITESONSCREEN]; static int spritesy[MAXSPRITESONSCREEN+1]; static int spritesz[MAXSPRITESONSCREEN]; -static spritetype *tspriteptr[MAXSPRITESONSCREEN]; +spritetype *tspriteptr[MAXSPRITESONSCREEN]; short umost[MAXXDIM], dmost[MAXXDIM]; static short bakumost[MAXXDIM], bakdmost[MAXXDIM]; @@ -3184,6 +3184,21 @@ static void drawsprite(int snum) # endif return; } +# ifdef USE_OPENGL + if (rendmode == 4) + { + bglEnable(GL_ALPHA_TEST); + bglEnable(GL_BLEND); + bglEnable(GL_POLYGON_OFFSET_FILL); + + polymer_drawsprite(snum); + + bglDisable(GL_POLYGON_OFFSET_FILL); + bglDisable(GL_BLEND); + bglDisable(GL_ALPHA_TEST); + return; + } +# endif #endif //============================================================================= //POLYMOST ENDS @@ -6096,7 +6111,7 @@ void drawmasks(void) _point2d dot, dot2, middle, pos, spr; #ifdef USE_OPENGL - if (rendmode == 4) + if ((rendmode == 4) && 0) { polymer_drawmasks(); return; diff --git a/polymer/build/src/polymer.c b/polymer/build/src/polymer.c index d2c15249f..022f03ac5 100644 --- a/polymer/build/src/polymer.c +++ b/polymer/build/src/polymer.c @@ -437,7 +437,7 @@ void polymer_drawsprite(int snum) if (pr_verbosity >= 3) OSD_Printf("PR : Sprite %i...\n", snum); - tspr = &tsprite[snum]; + tspr = tspriteptr[snum]; curpicnum = tspr->picnum; if (picanm[curpicnum]&192) curpicnum += animateoffs(curpicnum,tspr->owner+32768);