diff options
author | Eugene Sandulenko | 2013-09-10 22:49:39 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-09-10 22:49:39 +0300 |
commit | 531867cc3cd1cba7d036024a12898126d41195be (patch) | |
tree | db04a8e0b495d5518180d5b491c8c4f8d5dbf967 | |
parent | 7509ffec339ddd09fe9109717a5c35dbfe127671 (diff) | |
download | scummvm-rg350-531867cc3cd1cba7d036024a12898126d41195be.tar.gz scummvm-rg350-531867cc3cd1cba7d036024a12898126d41195be.tar.bz2 scummvm-rg350-531867cc3cd1cba7d036024a12898126d41195be.zip |
FULLPIPE: Finish sceneHandlerDbgMenu()
-rw-r--r-- | engines/fullpipe/constants.h | 1 | ||||
-rw-r--r-- | engines/fullpipe/scenes.cpp | 34 |
2 files changed, 27 insertions, 8 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index f99e679e4e..4f389f80a8 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -36,6 +36,7 @@ namespace Fullpipe { #define MSG_HMRKICK_STUCCO 4765 #define MSG_MANSHADOWSOFF 5196 #define MSG_MANSHADOWSON 5197 +#define MSG_RESTARTGAME 4767 #define MSG_SC1_SHOWOSK 1019 #define MSG_SC1_SHOWOSK2 468 #define MSG_SC1_UTRUBACLICK 1100 diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 980dae7f62..37be7facc9 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -1440,12 +1440,30 @@ void sceneDbgMenu_initScene(Scene *sc) { setInputDisabled(0); } +GameObject *sceneHandlerDbgMenu_getObjectAtXY(int x, int y) { + if (g_fullpipe->_currentScene) + for (uint i = 0; i < g_fullpipe->_currentScene->_picObjList.size(); i++) { + PictureObject *pic = (PictureObject *)g_fullpipe->_currentScene->_picObjList[i]; + + if (x >= pic->_ox && y >= pic->_oy) { + Common::Point point; + + pic->getDimensions(&point); + + if (x <= pic->_ox + point.x && y <= pic->_oy + point.y && pic != g_vars->selector) + return pic; + } + } + + return 0; +} + int sceneHandlerDbgMenu(ExCommand *ex) { if (ex->_messageKind != 17) return 0; -#if 0 - int mx = g_fullpipe->_mouseScreenPos.x + g_sceneRect.left; - int my = g_fullpipe->_mouseScreenPos.y + g_sceneRect.top; + + int mx = g_fullpipe->_mouseScreenPos.x + g_fullpipe->_sceneRect.left; + int my = g_fullpipe->_mouseScreenPos.y + g_fullpipe->_sceneRect.top; if (ex->_messageNum == 29) { GameObject *obj = sceneHandlerDbgMenu_getObjectAtXY(mx, my); @@ -1467,8 +1485,8 @@ int sceneHandlerDbgMenu(ExCommand *ex) { GameObject *obj = g_fullpipe->_currentScene->getStaticANIObjectAtPos(mx, my); if (obj) { if (canInteractAny(0, obj, -3)) { - g_cursorId = PIC_CSR_DEFAULT; - input_setCursor(PIC_CSR_DEFAULT); + g_fullpipe->_cursorId = PIC_CSR_DEFAULT; + g_fullpipe->setCursor(PIC_CSR_DEFAULT); return 0; } } else { @@ -1477,13 +1495,13 @@ int sceneHandlerDbgMenu(ExCommand *ex) { g_vars->selector->_flags |= 4; g_vars->selector->setOXY(obj->_ox, obj->_oy); g_fullpipe->_cursorId = PIC_CSR_DEFAULT; - input_setCursor(PIC_CSR_DEFAULT); + g_fullpipe->setCursor(PIC_CSR_DEFAULT); return 0; } g_vars->selector->_flags &= 0xFFFB; } - input_setCursor(g_cursorId); -#endif + g_fullpipe->setCursor(g_fullpipe->_cursorId); + return 0; } |