Fix artifacts if a resize reordered the saved maps of an item.

(Happens in Slumberland if resizing the window from 1600x900 to 800x600 in the second room, then picking up the cuckoo.)
This commit is contained in:
elasota
2020-04-25 00:50:28 -04:00
parent b5a3db860f
commit c357ca2b7c
7 changed files with 52 additions and 42 deletions

View File

@@ -213,7 +213,7 @@ short AddGrease (short where, short who, short h, short v,
QOffsetRect(&src, h, v);
QSetRect(&bounds, 0, 0, 32, 27 * 4);
savedNum = BackUpToSavedMap(&bounds, where, who);
savedNum = BackUpToSavedMap(&bounds, where, who, kDefaultComponent);
if (savedNum != -1)
{
BackupGrease (&src, savedNum, isRight);
@@ -332,5 +332,5 @@ void RemapGreaseSavedMap(SInt16 removedItem, SInt16 substituteItem)
grease[i].mapNum = removedItem;
return;
}
}
}
}