From 66cbaeefe20967348bb5306272f937dba0281021 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 25 Aug 2018 12:04:26 +0300 Subject: SCI32: Adapt the pathfinding debug code to work woth SCI32 games --- engines/sci/graphics/frameout.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'engines/sci/graphics/frameout.cpp') diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 434c5a0fec..505e2063f3 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -1354,6 +1354,16 @@ void GfxFrameout::remapMarkRedraw() { #pragma mark - #pragma mark Debugging +Plane *GfxFrameout::getTopVisiblePlane() { + for (PlaneList::const_iterator it = _visiblePlanes.begin(); it != _visiblePlanes.end(); ++it) { + Plane *p = *it; + if (p->_type == kPlaneTypePicture) + return p; + } + + return nullptr; +} + void GfxFrameout::printPlaneListInternal(Console *con, const PlaneList &planeList) const { for (PlaneList::const_iterator it = planeList.begin(); it != planeList.end(); ++it) { Plane *p = *it; -- cgit v1.2.3