From b8bbc32a89e53f6eb271d848cdb4935494c0f43f Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Tue, 30 Jul 2019 03:50:28 +0530 Subject: HDB: Add support for the PPC version --- engines/hdb/menu.cpp | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'engines/hdb/menu.cpp') diff --git a/engines/hdb/menu.cpp b/engines/hdb/menu.cpp index 9c36c9bd02..3158e789d6 100644 --- a/engines/hdb/menu.cpp +++ b/engines/hdb/menu.cpp @@ -619,10 +619,16 @@ void Menu::drawMenu() { _modeLoadGfx->drawMasked(centerPic(_modeLoadGfx), _oBannerY); _menuBackoutGfx->drawMasked(kBackoutX, kBackoutY); - - if (_saveGames[0].seconds) { + if (_saveGames[kAutoSaveSlot].seconds) _vortexian[anim]->drawMasked(kVortSaveX, kVortSaveY); + + if (g_hdb->isPPC()) { + g_hdb->_gfx->setCursor(kVortSaveTextX, kVortSaveY); + g_hdb->_gfx->drawText("Last Vortexian"); + g_hdb->_gfx->setCursor(kVortSaveTextX, kVortSaveY + 12); + g_hdb->_gfx->drawText("Saved Game"); } + if (anim_time < g_hdb->getTimeSlice()) { anim_time = g_hdb->getTimeSlice() + 50; anim++; @@ -760,6 +766,10 @@ void Menu::freeMenu() { delete _demoPlaqueGfx; _demoPlaqueGfx = NULL; + if (g_hdb->isPPC()) { + warning("FIXME: When handangoGfx is added, free it here"); + } + if (_nebulaGfx[0]) { for (int i = 0; i < kNebulaCount; i++) { delete _nebulaGfx[i]; @@ -1279,6 +1289,22 @@ void Menu::processInput(int x, int y) { g_hdb->_sound->playSound(SND_MENU_BACKOUT); } + // Vortexian Load only exists on PocketPC! + if (g_hdb->isPPC()) { + // 5 Slots screen + // Vortexian autosave LOAD? + if (y > kVortSaveY && (y < kVortSaveY + 32) && (x >= kVortSaveX) && (x < kVortSaveX + 96) && _saveGames[kAutoSaveSlot].seconds) { + g_hdb->_sound->playSound(SND_VORTEX_SAVE); + if (g_hdb->loadGameState(kAutoSaveSlot).getCode() == Common::kNoError) { + _gamefilesActive = false; + freeMenu(); + g_hdb->setGameState(GAME_PLAY); + return; + } + } + + } + int i = 0; for (; i < kNumSaveSlots; i++) if (y >= (i * 32 + kSaveSlotY - 4) && y <= (i * 32 + kSaveSlotY + 24)) -- cgit v1.2.3