mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
Hi-res security viewscreens
git-svn-id: https://svn.eduke32.com/eduke32@4679 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
de1d236366
commit
1c68e84e5a
3 changed files with 46 additions and 22 deletions
|
@ -7479,10 +7479,32 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
|
||||||
t->xrepeat += 8;
|
t->xrepeat += 8;
|
||||||
t->yrepeat += 8;
|
t->yrepeat += 8;
|
||||||
}
|
}
|
||||||
else if (g_curViewscreen >= 0 && waloff[TILE_VIEWSCR] && walock[TILE_VIEWSCR] > 200)
|
else if (g_curViewscreen >= 0 && OW != i && display_mirror != 3 && waloff[TILE_VIEWSCR] && walock[TILE_VIEWSCR] > 200 )
|
||||||
{
|
{
|
||||||
|
// this exposes a sprite sorting issue which needs to be debugged further...
|
||||||
|
#if 0
|
||||||
|
if (spritesortcnt < MAXSPRITESONSCREEN)
|
||||||
|
{
|
||||||
|
spritetype *const newt = &tsprite[spritesortcnt++];
|
||||||
|
|
||||||
|
Bmemcpy(newt, t, sizeof(spritetype));
|
||||||
|
|
||||||
|
newt->cstat |= 2|512;
|
||||||
|
newt->x += (sintable[(newt->ang+512)&2047]>>12);
|
||||||
|
newt->y += (sintable[newt->ang&2047]>>12);
|
||||||
|
updatesector(newt->x, newt->y, &newt->sectnum);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
t->picnum = TILE_VIEWSCR;
|
t->picnum = TILE_VIEWSCR;
|
||||||
|
t->xrepeat = t->xrepeat & 1 ? (t->xrepeat>>2) + 1 : t->xrepeat>>2;
|
||||||
|
t->yrepeat = t->yrepeat & 1 ? (t->yrepeat>>2) + 1 : t->yrepeat>>2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
t->x += (sintable[(t->ang+512)&2047]>>13);
|
||||||
|
t->y += (sintable[t->ang&2047]>>13);
|
||||||
|
updatesector(t->x, t->y, &t->sectnum);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SHRINKSPARK__STATIC:
|
case SHRINKSPARK__STATIC:
|
||||||
|
|
|
@ -550,25 +550,6 @@ void G_CacheMapData(void)
|
||||||
OSD_Printf("Cache time: %dms\n", endtime-starttime);
|
OSD_Printf("Cache time: %dms\n", endtime-starttime);
|
||||||
}
|
}
|
||||||
|
|
||||||
void G_SetupCamTile(int32_t i,int32_t wn)
|
|
||||||
{
|
|
||||||
//if (waloff[wn] == 0) loadtile(wn);
|
|
||||||
setviewtotile(wn,tilesiz[wn].y, tilesiz[wn].x);
|
|
||||||
|
|
||||||
yax_preparedrawrooms();
|
|
||||||
drawrooms(SX,SY,SZ,SA,100+sprite[i].shade,SECT);
|
|
||||||
yax_drawrooms(G_DoSpriteAnimations, SECT, 0, 65536);
|
|
||||||
|
|
||||||
display_mirror = 1;
|
|
||||||
G_DoSpriteAnimations(SX,SY,SA,65536L);
|
|
||||||
display_mirror = 0;
|
|
||||||
drawmasks();
|
|
||||||
|
|
||||||
setviewback();
|
|
||||||
squarerotatetile(wn);
|
|
||||||
invalidatetile(wn,-1,255);
|
|
||||||
}
|
|
||||||
|
|
||||||
void G_UpdateScreenArea(void)
|
void G_UpdateScreenArea(void)
|
||||||
{
|
{
|
||||||
if (!in3dmode())
|
if (!in3dmode())
|
||||||
|
|
|
@ -363,6 +363,26 @@ int32_t SetAnimation(int32_t animsect,int32_t *animptr, int32_t thegoal, int32_t
|
||||||
return j;
|
return j;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void G_SetupCamTile(int32_t i, int32_t wn)
|
||||||
|
{
|
||||||
|
int32_t const mir = display_mirror;
|
||||||
|
//if (waloff[wn] == 0) loadtile(wn);
|
||||||
|
setviewtotile(wn, tilesiz[wn].y, tilesiz[wn].x);
|
||||||
|
|
||||||
|
yax_preparedrawrooms();
|
||||||
|
drawrooms(SX, SY, SZ, SA, 100+sprite[i].shade, SECT);
|
||||||
|
yax_drawrooms(G_DoSpriteAnimations, SECT, 0, 65536);
|
||||||
|
|
||||||
|
display_mirror = 3;
|
||||||
|
G_DoSpriteAnimations(SX, SY, SA, 65536L);
|
||||||
|
display_mirror = mir;
|
||||||
|
drawmasks();
|
||||||
|
|
||||||
|
setviewback();
|
||||||
|
squarerotatetile(wn);
|
||||||
|
invalidatetile(wn, -1, 255);
|
||||||
|
}
|
||||||
|
|
||||||
void G_AnimateCamSprite(void)
|
void G_AnimateCamSprite(void)
|
||||||
{
|
{
|
||||||
int32_t i = g_curViewscreen;
|
int32_t i = g_curViewscreen;
|
||||||
|
@ -379,10 +399,11 @@ void G_AnimateCamSprite(void)
|
||||||
|
|
||||||
if (ps->newowner >= 0)
|
if (ps->newowner >= 0)
|
||||||
OW = ps->newowner;
|
OW = ps->newowner;
|
||||||
else if (OW >= 0 && dist(&sprite[ps->i], &sprite[i]) < 8192)
|
|
||||||
|
if (OW >= 0 && dist(&sprite[ps->i], &sprite[i]) < 8192)
|
||||||
{
|
{
|
||||||
if (waloff[TILE_VIEWSCR] == 0)
|
if (waloff[TILE_VIEWSCR] == 0)
|
||||||
allocatepermanenttile(TILE_VIEWSCR,tilesiz[PN].x,tilesiz[PN].y);
|
allocatepermanenttile(TILE_VIEWSCR,tilesiz[PN].x<<2,tilesiz[PN].y<<2);
|
||||||
else
|
else
|
||||||
walock[TILE_VIEWSCR] = 255;
|
walock[TILE_VIEWSCR] = 255;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue