SCI: kAddToPic(list) set fixed priority flag
svn-id: r51954
This commit is contained in:
parent
2db12a1ae7
commit
a201b2e506
2 changed files with 15 additions and 3 deletions
|
@ -518,6 +518,19 @@ void GfxAnimate::reAnimate(Common::Rect rect) {
|
|||
}
|
||||
}
|
||||
|
||||
void GfxAnimate::preprocessAddToPicList() {
|
||||
AnimateList::iterator it;
|
||||
const AnimateList::iterator end = _list.end();
|
||||
|
||||
for (it = _list.begin(); it != end; ++it) {
|
||||
if (it->priority == -1)
|
||||
it->priority = _ports->kernelCoordinateToPriority(it->y);
|
||||
|
||||
// Do not allow priority to get changed by fill()
|
||||
it->signal |= kSignalFixedPriority;
|
||||
}
|
||||
}
|
||||
|
||||
void GfxAnimate::addToPicDrawCels() {
|
||||
reg_t curObject;
|
||||
GfxView *view = NULL;
|
||||
|
@ -527,9 +540,6 @@ void GfxAnimate::addToPicDrawCels() {
|
|||
for (it = _list.begin(); it != end; ++it) {
|
||||
curObject = it->object;
|
||||
|
||||
if (it->priority == -1)
|
||||
it->priority = _ports->kernelCoordinateToPriority(it->y);
|
||||
|
||||
// Get the corresponding view
|
||||
view = _cache->getView(it->viewId);
|
||||
|
||||
|
@ -687,6 +697,7 @@ void GfxAnimate::kernelAddToPicList(reg_t listReference, int argc, reg_t *argv)
|
|||
error("kAddToPic called with non-list as parameter");
|
||||
|
||||
makeSortedList(list);
|
||||
preprocessAddToPicList();
|
||||
fill(tempPicNotValid);
|
||||
addToPicDrawCels();
|
||||
|
||||
|
|
|
@ -100,6 +100,7 @@ public:
|
|||
void updateScreen(byte oldPicNotValid);
|
||||
void restoreAndDelete(int argc, reg_t *argv);
|
||||
void reAnimate(Common::Rect rect);
|
||||
void preprocessAddToPicList();
|
||||
void addToPicDrawCels();
|
||||
void addToPicDrawView(GuiResourceId viewId, int16 loopNo, int16 celNo, int16 leftPos, int16 topPos, int16 priority, int16 control);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue