mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Reimplement pixel doubling by taking the upper left pixel of each 2x2 block.
This obviously won't help performance as the scene has still to be drawn at the original resolution, but it's better than the draw-to-tile hack. git-svn-id: https://svn.eduke32.com/eduke32@3378 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
a959b998bd
commit
28d05e3fdd
1 changed files with 26 additions and 8 deletions
|
@ -3538,7 +3538,7 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio)
|
||||||
|
|
||||||
const int32_t vr = divscale22(1,sprite[p->i].yrepeat+28);
|
const int32_t vr = divscale22(1,sprite[p->i].yrepeat+28);
|
||||||
const int32_t software_screen_tilting =
|
const int32_t software_screen_tilting =
|
||||||
(getrendermode() == REND_CLASSIC && ((ud.screen_tilting && p->rotscrnang && !g_fakeMultiMode) || !ud.detail));
|
(getrendermode() == REND_CLASSIC && ((ud.screen_tilting && p->rotscrnang && !g_fakeMultiMode)));
|
||||||
|
|
||||||
if (!r_usenewaspect)
|
if (!r_usenewaspect)
|
||||||
{
|
{
|
||||||
|
@ -3588,8 +3588,8 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio)
|
||||||
// If the view is rotated (not 0 or 180 degrees modulo 360 degrees),
|
// If the view is rotated (not 0 or 180 degrees modulo 360 degrees),
|
||||||
// we render onto a square tile and display a portion of that
|
// we render onto a square tile and display a portion of that
|
||||||
// rotated on-screen later on.
|
// rotated on-screen later on.
|
||||||
const int32_t viewtilexsiz = ((tang&1023) ? tiltcx : tiltcy)>>(int)!ud.detail;
|
const int32_t viewtilexsiz = (tang&1023) ? tiltcx : tiltcy;
|
||||||
const int32_t viewtileysiz = tiltcx>>(int)!ud.detail;
|
const int32_t viewtileysiz = tiltcx;
|
||||||
|
|
||||||
walock[TILE_TILT] = 255;
|
walock[TILE_TILT] = 255;
|
||||||
if (waloff[TILE_TILT] == 0)
|
if (waloff[TILE_TILT] == 0)
|
||||||
|
@ -3601,8 +3601,8 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio)
|
||||||
if ((tang&1023) == 512)
|
if ((tang&1023) == 512)
|
||||||
{
|
{
|
||||||
//Block off unscreen section of 90ø tilted screen
|
//Block off unscreen section of 90ø tilted screen
|
||||||
j = ((tiltcx-(60*tiltcs))>>(int)!ud.detail);
|
j = tiltcx-(60*tiltcs);
|
||||||
for (i=((60*tiltcs)>>(int)!ud.detail)-1; i>=0; i--)
|
for (i=(60*tiltcs)-1; i>=0; i--)
|
||||||
{
|
{
|
||||||
startumost[i] = 1;
|
startumost[i] = 1;
|
||||||
startumost[i+j] = 1;
|
startumost[i+j] = 1;
|
||||||
|
@ -3850,15 +3850,33 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio)
|
||||||
if (i > 256)
|
if (i > 256)
|
||||||
i = 512-i;
|
i = 512-i;
|
||||||
i = sintable[i+512]*8 + sintable[i]*5;
|
i = sintable[i+512]*8 + sintable[i]*5;
|
||||||
if (ud.detail)
|
i >>= tiltcs; // JBF 20030807
|
||||||
i >>= 1;
|
|
||||||
i >>= (tiltcs-1); // JBF 20030807
|
|
||||||
|
|
||||||
rotatesprite_win(160<<16,100<<16,i,tang+512,TILE_TILT,0,0,4+2+64);
|
rotatesprite_win(160<<16,100<<16,i,tang+512,TILE_TILT,0,0,4+2+64);
|
||||||
walock[TILE_TILT] = 199;
|
walock[TILE_TILT] = 199;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!ud.detail && getrendermode()==REND_CLASSIC && ((xdim|ydim)&1)==0)
|
||||||
|
{
|
||||||
|
begindrawing();
|
||||||
|
{
|
||||||
|
uint8_t *const f = (uint8_t *)frameplace;
|
||||||
|
int32_t x, y;
|
||||||
|
|
||||||
|
for (x=0; x<xdim; x+=2)
|
||||||
|
for (y=0; y<ydim; y+=2)
|
||||||
|
{
|
||||||
|
const int32_t yl0 = ylookup[y];
|
||||||
|
const int32_t yl1 = ylookup[y+1];
|
||||||
|
|
||||||
|
uint8_t newpal = f[yl0+x];
|
||||||
|
f[yl0+x] = f[yl0+x+1] = f[yl1+x] = f[yl1+x+1] = newpal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
enddrawing();
|
||||||
|
}
|
||||||
|
|
||||||
G_RestoreInterpolations();
|
G_RestoreInterpolations();
|
||||||
|
|
||||||
if (totalclock < lastvisinc)
|
if (totalclock < lastvisinc)
|
||||||
|
|
Loading…
Reference in a new issue