diff options
author | Eugene Sandulenko | 2016-09-20 23:03:55 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-09-20 23:03:55 +0200 |
commit | 8ffa6483f45960c2c0d919aa7c11f06a9c79f3b0 (patch) | |
tree | 8c3b0022aa30bf37ff8243db8ccf9e6b398bd6e2 /engines/fullpipe | |
parent | 25f13b5dab0948c9934f5fcbabb5f84f9c9072aa (diff) | |
download | scummvm-rg350-8ffa6483f45960c2c0d919aa7c11f06a9c79f3b0.tar.gz scummvm-rg350-8ffa6483f45960c2c0d919aa7c11f06a9c79f3b0.tar.bz2 scummvm-rg350-8ffa6483f45960c2c0d919aa7c11f06a9c79f3b0.zip |
FULLPIPE: Simplified Debug scene logic
Diffstat (limited to 'engines/fullpipe')
-rw-r--r-- | engines/fullpipe/scenes/sceneDbg.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/engines/fullpipe/scenes/sceneDbg.cpp b/engines/fullpipe/scenes/sceneDbg.cpp index 9df8c2766b..2ba59778ba 100644 --- a/engines/fullpipe/scenes/sceneDbg.cpp +++ b/engines/fullpipe/scenes/sceneDbg.cpp @@ -41,19 +41,21 @@ void sceneDbgMenu_initScene(Scene *sc) { } GameObject *sceneHandlerDbgMenu_getObjectAtXY(int x, int y) { - if (g_fp->_currentScene) - for (uint i = 1; i < g_fp->_currentScene->_picObjList.size(); i++) { - PictureObject *pic = (PictureObject *)g_fp->_currentScene->_picObjList[i]; + if (!g_fp->_currentScene) + return 0; + + for (uint i = 1; i < g_fp->_currentScene->_picObjList.size(); i++) { + PictureObject *pic = (PictureObject *)g_fp->_currentScene->_picObjList[i]; - if (x >= pic->_ox && y >= pic->_oy) { - Common::Point point; + if (x >= pic->_ox && y >= pic->_oy) { + Common::Point point; - pic->getDimensions(&point); + pic->getDimensions(&point); - if (x <= pic->_ox + point.x && y <= pic->_oy + point.y && pic != g_vars->selector) - return pic; - } + if (x <= pic->_ox + point.x && y <= pic->_oy + point.y && pic != g_vars->selector) + return pic; } + } return 0; } |