mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-07 11:27:44 +00:00
Clip strip value when removing objects
svn-id: r6488
This commit is contained in:
parent
945dee311e
commit
2810185599
@ -763,13 +763,22 @@ void Scumm::clearOwnerOf(int obj)
|
||||
|
||||
void Scumm::removeObjectFromRoom(int obj)
|
||||
{
|
||||
int i, j;
|
||||
int i, j, strip;
|
||||
|
||||
for (i = 1; i < _numLocalObjects; i++) {
|
||||
if (_objs[i].obj_nr == (uint16)obj) {
|
||||
if (_objs[i].width != 0) {
|
||||
for (j = 0; j < _objs[i].width; j++)
|
||||
setGfxUsageBit((_objs[i].x_pos >> 3) + j, USAGE_BIT_DIRTY);
|
||||
for (j = 0; j < _objs[i].width; j++) {
|
||||
strip = (_objs[i].x_pos >> 3) + j;
|
||||
|
||||
// Clip value
|
||||
if (strip < _screenStartStrip)
|
||||
continue;
|
||||
if (strip > _screenEndStrip)
|
||||
break;
|
||||
|
||||
setGfxUsageBit(strip, USAGE_BIT_DIRTY);
|
||||
}
|
||||
}
|
||||
_BgNeedsRedraw = true;
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user