diff options
Diffstat (limited to 'engines/sci/graphics/screen_item32.h')
-rw-r--r-- | engines/sci/graphics/screen_item32.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/engines/sci/graphics/screen_item32.h b/engines/sci/graphics/screen_item32.h index c2c4e43358..ef29609da6 100644 --- a/engines/sci/graphics/screen_item32.h +++ b/engines/sci/graphics/screen_item32.h @@ -275,6 +275,8 @@ public: // these insertion IDs instead. They are more stable and cause // objects with identical priority and z-index to be rendered in // the order that they were created. + // + // This also applies to ScreenItem::hasPriorityAbove. return _creationId < other._creationId; } } @@ -302,6 +304,20 @@ public: return false; } + inline bool hasPriorityAbove(const ScreenItem &other) const { + if (_priority > other._priority) { + return true; + } + + if (_priority == other._priority) { + // This is different than SSCI; see ScreenItem::operator< for an + // explanation + return _creationId > other._creationId; + } + + return false; + } + /** * Calculates the dimensions and scaling parameters for * the screen item, using the given plane as the parent |