Disallow high-quality (640x480) tilted screen if MAXYDIM is less than 640.

This fixes the crash on Wii when looking sidewards (e.g. when dying), but
makes the tilted view look more pixelated.
The problem was that an attempt was made to render onto a 640x640 tile for
the rotated view, but the base engine arrays were too small for that.

git-svn-id: https://svn.eduke32.com/eduke32@2698 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-05-26 21:58:24 +00:00
parent 2fc6e2e6b0
commit eeb42f20bf

View file

@ -3585,19 +3585,23 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio)
int32_t oviewingrange = viewingrange; // save it from setviewtotile()
const int16_t tang = (ud.screen_tilting) ? p->rotscrnang : 0;
if (xres <= 320 && yres <= 240)
// To render a tilted screen in high quality, we need at least
// 640 pixels of *Y* dimension.
#if MAXYDIM >= 640
if (xres > 320 || yres > 240)
{
tiltcs = 2;
tiltcx = 640;
tiltcy = 400;
}
else
#endif
{
// JBF 20030807: Increased tilted-screen quality
tiltcs = 1;
tiltcx = 320;
tiltcy = 200;
}
else
{
tiltcs = 2;
tiltcx = 640;
tiltcy = 400;
}
walock[TILE_TILT] = 255;
if (waloff[TILE_TILT] == 0)