CON: Remove bounds check on rotatesprite coordinates.

git-svn-id: https://svn.eduke32.com/eduke32@5973 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2016-12-26 06:02:56 +00:00
parent 0b75ca3ec1
commit 9627f24d54
3 changed files with 0 additions and 17 deletions

View file

@ -2904,12 +2904,6 @@ nullquote:
continue;
}
if (EDUKE32_PREDICT_FALSE(pos.x < -(320<<16) || pos.x >= (640<<16) || pos.y < -(200<<16) || pos.y >= (400<<16)))
{
CON_ERRPRINTF("invalid coordinates: %d, %d\n", pos.x, pos.y);
continue;
}
int32_t blendidx = 0;
NEG_ALPHA_TO_BLEND(alpha, blendidx, orientation);

View file

@ -402,15 +402,6 @@ function _rotspr(x, y, zoom, ang, tilenum, shade, pal, orientation,
y = 65536*y
end
-- XXX: This is the same as the check in gameexec.c, but ideally we'd want
-- rotatesprite to accept all coordinates and simply draw nothing if the
-- tile's bounding rectange is beyond the screen.
-- XXX: Currently, classic rotatesprite() is not correct with some large
-- zoom values.
if (not (x >= -320*65536 and x < 640*65536) or not (y >= -200*65536 and y < 400*65536)) then
error(format("invalid coordinates (%.03f, %.03f)", x, y), 2)
end
local blendidx = 0
if (alpha < 0) then
-- See NEG_ALPHA_TO_BLEND.

View file

@ -2999,8 +2999,6 @@ dodefault:
y<<=16;
}
// NOTE: Unlike CON, no error on large x/y.
orientation &= (ROTATESPRITE_MAX-1);
rotatesprite_(x,y,z,a,tilenum,shade,pal,2|orientation,alpha,0,x1,y1,x2,y2);