From 81a2ee7d7c38e427a00ac1102b817e2854bb45eb Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 20 Apr 2014 23:03:28 +0300 Subject: FULLPIPE: Implement ModalQuery::init() --- engines/fullpipe/modal.cpp | 34 ++++++++++++++++++++++++++++++++++ engines/fullpipe/modal.h | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp index 2a861be2bc..bf2163ccb7 100644 --- a/engines/fullpipe/modal.cpp +++ b/engines/fullpipe/modal.cpp @@ -1411,6 +1411,40 @@ bool ModalQuery::handleMessage(ExCommand *cmd) { return false; } +bool ModalQuery::init(int counterdiff) { + if (_okBtn->isPointInside(g_fp->_mouseScreenPos.x, g_fp->_mouseScreenPos.y)) + _okBtn->_flags |= 4; + else + _okBtn->_flags &= 0xFFFB; + + if (_cancelBtn->isPointInside(g_fp->_mouseScreenPos.x, g_fp->_mouseScreenPos.y)) + _cancelBtn->_flags |= 4; + else + _cancelBtn->_flags &= 0xFFFB; + + if (_queryResult == -1) { + return true; + } else { + if (_bg->_id == PIC_MEX_BGR) { + _cancelBtn->_flags &= 0xFFFB; + _okBtn->_flags &= 0xFFFB; + + if (_queryResult == 1) { + warning("STUB: ModalQuery::init()"); + //sceneFade(g_vrtDrawHandle, (Scene *)this->_picObjList, 0); + + //if (inputArFlag) { + // g_needRestart = 1; + // return 0; + //} + //SendMessageA(hwndCallback, WM_DESTROY, 0, 0); + } + } + } + + return false; +} + void ModalSaveGame::setScene(Scene *sc) { warning("STUB: ModalSaveGame::setScene()"); } diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h index 1babab989f..a3656a95a0 100644 --- a/engines/fullpipe/modal.h +++ b/engines/fullpipe/modal.h @@ -220,7 +220,7 @@ public: virtual bool pollEvent() { return true; } virtual bool handleMessage(ExCommand *message); - virtual bool init(int counterdiff) { return true; } + virtual bool init(int counterdiff); virtual void update(); virtual void saveload() {} -- cgit v1.2.3