I like my sprites sorted thank you very much.

git-svn-id: https://svn.eduke32.com/eduke32@672 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
plagman 2008-03-30 16:08:18 +00:00
parent e59df55f41
commit ffa2d63c0e
4 changed files with 20 additions and 3 deletions

View file

@ -186,6 +186,7 @@ EXTERN int guniqhudid;
EXTERN sectortype *sector; EXTERN sectortype *sector;
EXTERN walltype *wall; EXTERN walltype *wall;
EXTERN spritetype *sprite; EXTERN spritetype *sprite;
EXTERN spritetype *tspriteptr[MAXSPRITESONSCREEN];
EXTERN int spritesortcnt; EXTERN int spritesortcnt;
EXTERN spritetype *tsprite; EXTERN spritetype *tsprite;

View file

@ -7,6 +7,7 @@
// o make occlusion queries every n frames (cvar) // 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 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 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 port glowmaps and detail maps from hacked polymost (:(
// o shading needs a lot of work // o shading needs a lot of work
// o make the portal smaller // o make the portal smaller

View file

@ -571,7 +571,7 @@ static short maskwall[MAXWALLSB], maskwallcnt;
static int spritesx[MAXSPRITESONSCREEN]; static int spritesx[MAXSPRITESONSCREEN];
static int spritesy[MAXSPRITESONSCREEN+1]; static int spritesy[MAXSPRITESONSCREEN+1];
static int spritesz[MAXSPRITESONSCREEN]; static int spritesz[MAXSPRITESONSCREEN];
static spritetype *tspriteptr[MAXSPRITESONSCREEN]; spritetype *tspriteptr[MAXSPRITESONSCREEN];
short umost[MAXXDIM], dmost[MAXXDIM]; short umost[MAXXDIM], dmost[MAXXDIM];
static short bakumost[MAXXDIM], bakdmost[MAXXDIM]; static short bakumost[MAXXDIM], bakdmost[MAXXDIM];
@ -3184,6 +3184,21 @@ static void drawsprite(int snum)
# endif # endif
return; 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 #endif
//============================================================================= //POLYMOST ENDS //============================================================================= //POLYMOST ENDS
@ -6096,7 +6111,7 @@ void drawmasks(void)
_point2d dot, dot2, middle, pos, spr; _point2d dot, dot2, middle, pos, spr;
#ifdef USE_OPENGL #ifdef USE_OPENGL
if (rendmode == 4) if ((rendmode == 4) && 0)
{ {
polymer_drawmasks(); polymer_drawmasks();
return; return;

View file

@ -437,7 +437,7 @@ void polymer_drawsprite(int snum)
if (pr_verbosity >= 3) OSD_Printf("PR : Sprite %i...\n", snum); if (pr_verbosity >= 3) OSD_Printf("PR : Sprite %i...\n", snum);
tspr = &tsprite[snum]; tspr = tspriteptr[snum];
curpicnum = tspr->picnum; curpicnum = tspr->picnum;
if (picanm[curpicnum]&192) curpicnum += animateoffs(curpicnum,tspr->owner+32768); if (picanm[curpicnum]&192) curpicnum += animateoffs(curpicnum,tspr->owner+32768);