diff options
author | Eugene Sandulenko | 2014-04-09 23:43:50 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2014-04-09 23:43:50 +0300 |
commit | 15c6293128bd45eca9d3783c1201d0b34f239862 (patch) | |
tree | 871cb434ca9e64f992bb369f4866a435296f1722 /engines/fullpipe/modal.cpp | |
parent | a73bb7b3f68fbd67a4ea8505e44c81fbe88dfe59 (diff) | |
download | scummvm-rg350-15c6293128bd45eca9d3783c1201d0b34f239862.tar.gz scummvm-rg350-15c6293128bd45eca9d3783c1201d0b34f239862.tar.bz2 scummvm-rg350-15c6293128bd45eca9d3783c1201d0b34f239862.zip |
FULLPIPE: Implement ModalMainMenu constructor
Diffstat (limited to 'engines/fullpipe/modal.cpp')
-rw-r--r-- | engines/fullpipe/modal.cpp | 110 |
1 files changed, 107 insertions, 3 deletions
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp index 603aaff026..833d47fde1 100644 --- a/engines/fullpipe/modal.cpp +++ b/engines/fullpipe/modal.cpp @@ -718,7 +718,7 @@ bool ModalCredits::init(int counterdiff) { g_fp->_modalObject = menu; - menu->_field_34 = 1; + menu->_mfield_34 = 1; } return true; @@ -750,9 +750,113 @@ void ModalCredits::update() { } ModalMainMenu::ModalMainMenu() { - warning("STUB: ModalMainMenu::ModalMainMenu()"); + _areas.clear(); + + _mfield_2C = 0; + _mfield_C = 0; + _mfield_34 = 0; + _scene = g_fp->accessScene(SC_MAINMENU); + _mfield_50 = 0; + _screct.left = g_fp->_sceneRect.left; + _screct.top = g_fp->_sceneRect.top; + _screct.right = g_fp->_sceneRect.right; + _screct.bottom = g_fp->_sceneRect.bottom; - _field_34 = 0; + if (g_fp->_currentScene) { + _bgX = g_fp->_currentScene->_x; + _bgY = g_fp->_currentScene->_y; + } else { + _bgX = 0; + _bgY = 0; + } + + g_fp->_sceneRect.top = 0; + g_fp->_sceneRect.left = 0; + g_fp->_sceneRect.right = 800; + g_fp->_sceneRect.bottom = 600; + + MenuArea *area; + + area = new MenuArea(); + area->picIdL = PIC_MNU_EXIT_L; + area->picObjD = 0; + area->picObjL = _scene->getPictureObjectById(PIC_MNU_EXIT_L, 0); + area->picObjL->_flags &= 0xFFFB; + _areas.push_back(area); + + area = new MenuArea(); + area->picIdL = PIC_MNU_CONTINUE_L; + area->picObjD = 0; + area->picObjL = _scene->getPictureObjectById(area->picIdL, 0); + area->picObjL->_flags &= 0xFFFB; + _areas.push_back(area); + + if (isSaveAllowed()) { + area = new MenuArea(); + area->picIdL = PIC_MNU_SAVE_L; + area->picObjD = 0; + area->picObjL = _scene->getPictureObjectById(area->picIdL, 0); + area->picObjL->_flags &= 0xFFFB; + _areas.push_back(area); + } + + area = new MenuArea(); + area->picIdL = PIC_MNU_LOAD_L; + area->picObjD = 0; + area->picObjL = _scene->getPictureObjectById(area->picIdL, 0); + area->picObjL->_flags &= 0xFFFB; + _areas.push_back(area); + + area = new MenuArea(); + area->picIdL = PIC_MNU_RESTART_L; + area->picObjD = 0; + area->picObjL = _scene->getPictureObjectById(area->picIdL, 0); + area->picObjL->_flags &= 0xFFFB; + _areas.push_back(area); + + area = new MenuArea(); + area->picIdL = PIC_MNU_AUTHORS_L; + area->picObjD = 0; + area->picObjL = _scene->getPictureObjectById(area->picIdL, 0); + area->picObjL->_flags &= 0xFFFB; + _areas.push_back(area); + + area = new MenuArea(); + area->picIdL = PIC_MNU_SLIDER_L; + area->picObjD = _scene->getPictureObjectById(PIC_MNU_SLIDER_D, 0); + area->picObjD->_flags |= 4; + area->picObjL = _scene->getPictureObjectById(area->picIdL, 0); + area->picObjL->_flags &= 0xFFFB; + _areas.push_back(area); + _menuSliderIdx = _areas.size() - 1; + + area = new MenuArea(); + area->picIdL = PIC_MNU_MUSICSLIDER_L; + area->picObjD = _scene->getPictureObjectById(PIC_MNU_MUSICSLIDER_D, 0); + area->picObjD->_flags |= 4; + area->picObjL = _scene->getPictureObjectById(area->picIdL, 0); + area->picObjL->_flags &= 0xFFFB; + _areas.push_back(area); + _musicSliderIdx = _areas.size(); + + if (g_fp->_mainMenu_debugEnabled) + enableDebugMenuButton(); + + setSliderPos(); +} + +bool ModalMainMenu::isSaveAllowed() { + warning("STUB: ModalMainMenu::isSaveAllowed()"); + + return true; +} + +void ModalMainMenu::enableDebugMenuButton() { + warning("STUB: ModalMainMenu::enableDebugMenuButton()"); +} + +void ModalMainMenu::setSliderPos() { + warning("STUB: ModalMainMenu::setSliderPos()"); } ModalHelp::ModalHelp() { |