mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 17:33:05 +00:00
FULLPIPE: Finish sceneHandlerDbgMenu()
This commit is contained in:
parent
7509ffec33
commit
531867cc3c
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user