diff options
author | Martin Kiewitz | 2010-07-24 18:06:49 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-07-24 18:06:49 +0000 |
commit | 252e7736e59cdb2c57aa3a67396327d8e82c7742 (patch) | |
tree | e9baf60caa0eb09dbe240056ccdda64ef6cb003d /engines | |
parent | 353b0d29938690b0cff4c032febcc8375b1c17d8 (diff) | |
download | scummvm-rg350-252e7736e59cdb2c57aa3a67396327d8e82c7742.tar.gz scummvm-rg350-252e7736e59cdb2c57aa3a67396327d8e82c7742.tar.bz2 scummvm-rg350-252e7736e59cdb2c57aa3a67396327d8e82c7742.zip |
SCI: honor given order of screen items in sci32
fixes gk1 game menu slider controls
svn-id: r51252
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/graphics/frameout.cpp | 10 | ||||
-rw-r--r-- | engines/sci/graphics/frameout.h | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 0ace3c8e62..6f0aa1c428 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -122,7 +122,12 @@ int16 GfxFrameout::kernelGetHighPlanePri() { } bool sortHelper(const FrameoutEntry* entry1, const FrameoutEntry* entry2) { - return (entry1->priority == entry2->priority) ? (entry1->y < entry2->y) : (entry1->priority < entry2->priority); + if (entry1->priority == entry2->priority) { + if (entry1->y == entry2->y) + return (entry1->givenOrderNr < entry2->givenOrderNr); + return (entry1->y < entry2->y); + } + return (entry1->priority < entry2->priority); } bool planeSortHelper(const PlaneEntry &entry1, const PlaneEntry &entry2) { @@ -247,6 +252,7 @@ void GfxFrameout::kernelFrameout() { itemEntry->scaleX = readSelectorValue(_segMan, itemObject, SELECTOR(scaleX)); itemEntry->scaleY = readSelectorValue(_segMan, itemObject, SELECTOR(scaleY)); itemEntry->object = itemObject; + itemEntry->givenOrderNr = itemNr; itemList.push_back(itemEntry); itemEntry++; @@ -282,6 +288,8 @@ void GfxFrameout::kernelFrameout() { // Now display itemlist itemEntry = itemData; +// warning("Plane %s", _segMan->getObjectName(planeObject)); + for (FrameoutList::iterator listIterator = itemList.begin(); listIterator != itemList.end(); listIterator++) { itemEntry = *listIterator; diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h index 5adf147c8d..5c42489446 100644 --- a/engines/sci/graphics/frameout.h +++ b/engines/sci/graphics/frameout.h @@ -39,6 +39,7 @@ struct PlaneEntry { typedef Common::List<PlaneEntry> PlaneList; struct FrameoutEntry { + uint16 givenOrderNr; reg_t object; GuiResourceId viewId; int16 loopNo; |