Allow the screen bounds difference in CON showview/-unbiased to be less than 2.

This requires one tweak in drawrooms' umost/dmost setup to prevent oob access.
Specifically, a coordinate difference of 0 is allowed.  In the classic renderer,
this would mean a one-pixel (real screen coords) height or width.  In Polymost,
it would currently mean a one-pixel height and zero-pixel width, but this might
be subject to change.

git-svn-id: https://svn.eduke32.com/eduke32@2574 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-03-31 11:22:19 +00:00
parent 1ae1bfa479
commit 34c0e85295
2 changed files with 2 additions and 3 deletions

View file

@ -8161,9 +8161,8 @@ void drawrooms(int32_t daposx, int32_t daposy, int32_t daposz,
{
umost[i] = shortptr1[i]-windowy1;
dmost[i] = shortptr2[i]-windowy1;
i--;
}
while (i != 0);
while (i--); // xdimen == 1 is OK!
umost[0] = shortptr1[0]-windowy1;
dmost[0] = shortptr2[0]-windowy1;
}

View file

@ -2353,7 +2353,7 @@ nullquote:
y2 = scale(y2,ydim-1,199);
}
if ((x1 < 0 || y1 < 0 || x2 > xdim-1 || y2 > ydim-1 || x2-x1 < 2 || y2-y1 < 2))
if ((x1 < 0 || y1 < 0 || x2 >= xdim || y2 >= ydim))
{
OSD_Printf(CON_ERROR "incorrect coordinates\n",g_errorLineNum,keyw[g_tw]);
continue;