From 28d05e3fdd7547b9b60030cc05295ed81840de0a Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sun, 6 Jan 2013 18:56:34 +0000 Subject: [PATCH] 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 --- polymer/eduke32/source/game.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index e75efc612..087c2722a 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -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 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) { @@ -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), // we render onto a square tile and display a portion of that // rotated on-screen later on. - const int32_t viewtilexsiz = ((tang&1023) ? tiltcx : tiltcy)>>(int)!ud.detail; - const int32_t viewtileysiz = tiltcx>>(int)!ud.detail; + const int32_t viewtilexsiz = (tang&1023) ? tiltcx : tiltcy; + const int32_t viewtileysiz = tiltcx; walock[TILE_TILT] = 255; if (waloff[TILE_TILT] == 0) @@ -3601,8 +3601,8 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio) if ((tang&1023) == 512) { //Block off unscreen section of 90ΓΈ tilted screen - j = ((tiltcx-(60*tiltcs))>>(int)!ud.detail); - for (i=((60*tiltcs)>>(int)!ud.detail)-1; i>=0; i--) + j = tiltcx-(60*tiltcs); + for (i=(60*tiltcs)-1; i>=0; i--) { startumost[i] = 1; startumost[i+j] = 1; @@ -3850,15 +3850,33 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio) if (i > 256) i = 512-i; i = sintable[i+512]*8 + sintable[i]*5; - if (ud.detail) - i >>= 1; - i >>= (tiltcs-1); // JBF 20030807 + i >>= tiltcs; // JBF 20030807 rotatesprite_win(160<<16,100<<16,i,tang+512,TILE_TILT,0,0,4+2+64); 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