diff options
author | Matthew Hoops | 2011-09-20 21:57:34 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-09-20 21:57:34 -0400 |
commit | 6c47e909da0fb6d47c5e9105d4c44fdd0db1c7dc (patch) | |
tree | 77f6657f27a5f19e198e414201f74b5bc249d3f0 /engines | |
parent | 335a043bd06ab269c8c263fb86a2bc48f5ba9f7b (diff) | |
download | scummvm-rg350-6c47e909da0fb6d47c5e9105d4c44fdd0db1c7dc.tar.gz scummvm-rg350-6c47e909da0fb6d47c5e9105d4c44fdd0db1c7dc.tar.bz2 scummvm-rg350-6c47e909da0fb6d47c5e9105d4c44fdd0db1c7dc.zip |
PEGASUS: Remove remaining 'old' code
Diffstat (limited to 'engines')
-rw-r--r-- | engines/pegasus/credits.cpp | 178 | ||||
-rw-r--r-- | engines/pegasus/menu.cpp | 196 | ||||
-rw-r--r-- | engines/pegasus/module.mk | 3 | ||||
-rw-r--r-- | engines/pegasus/overview.cpp | 144 | ||||
-rw-r--r-- | engines/pegasus/pegasus.cpp | 89 | ||||
-rw-r--r-- | engines/pegasus/pegasus.h | 54 |
6 files changed, 3 insertions, 661 deletions
diff --git a/engines/pegasus/credits.cpp b/engines/pegasus/credits.cpp deleted file mode 100644 index 6d683de8f7..0000000000 --- a/engines/pegasus/credits.cpp +++ /dev/null @@ -1,178 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#include "common/events.h" -#include "common/textconsole.h" -#include "video/qt_decoder.h" - -#include "pegasus/pegasus.h" - -namespace Pegasus { - -enum { - kCreditsCore = 0, - kCreditsSupport, - kCreditsOriginal, - kCreditsTalent, - kCreditsOther, - kCreditsMainMenu -}; - -static const int s_startCreditsSegment[] = { 0, 16, 25, 37, 39 }; - -static int findButtonForFrame(int frame) { - int button = kCreditsCore; - for (int i = kCreditsCore; i < kCreditsMainMenu; i++) - if (frame >= s_startCreditsSegment[i]) - button = i; - - return button; -} - -void PegasusEngine::runCredits() { - Video::QuickTimeDecoder *creditsVideo = new Video::QuickTimeDecoder(); - if (!creditsVideo->loadFile("Images/Credits/Credits.movie")) - error("Could not open credits movie"); - - // We're not playing, just retrieving frames - creditsVideo->pauseVideo(true); - - int curButton = kCreditsCore; - int frame = 0; - - drawCredits(curButton, false, frame, creditsVideo); - _system->updateScreen(); - - bool continueLooping = true; - while (!shouldQuit() && continueLooping) { - Common::Event event; - while (_eventMan->pollEvent(event)) { - bool needsUpdate = false; - - switch (event.type) { - case Common::EVENT_KEYDOWN: - switch (event.kbd.keycode) { - case Common::KEYCODE_UP: - if (curButton != kCreditsCore) - curButton--; - frame = s_startCreditsSegment[curButton]; - needsUpdate = true; - break; - case Common::KEYCODE_DOWN: - if (curButton != kCreditsMainMenu) { - curButton++; - if (curButton == kCreditsMainMenu) - frame = 43; - else - frame = s_startCreditsSegment[curButton]; - needsUpdate = true; - } - break; - case Common::KEYCODE_LEFT: - if (frame > 0) { - frame--; - curButton = findButtonForFrame(frame); - needsUpdate = true; - } - break; - case Common::KEYCODE_RIGHT: - if (frame < 43) { - frame++; - curButton = findButtonForFrame(frame); - needsUpdate = true; - } - break; - case Common::KEYCODE_RETURN: - if (curButton == kCreditsMainMenu) { - drawCredits(curButton, true, frame, creditsVideo); - _system->updateScreen(); - continueLooping = false; - } - break; - default: - break; - } - break; - default: - break; - } - - if (needsUpdate) { - drawCredits(curButton, false, frame, creditsVideo); - _system->updateScreen(); - } - } - - _system->delayMillis(10); - } - - delete creditsVideo; -} - -void PegasusEngine::drawCredits(int button, bool highlight, int frame, Video::QuickTimeDecoder *video) { - static const int s_creditsButtonY[] = { 224, 260, 296, 332, 366, 407 }; - - _gfx->drawPict("Images/Credits/CredScrn.pict", 0, 0, false); - - if (highlight) - _gfx->drawPict("Images/Credits/MainMenu.pict", 32, 412, false); - - if (button == kCreditsMainMenu) - _gfx->drawPictTransparent("Images/Credits/SelectL.pict", 30, s_creditsButtonY[button], _gfx->getColor(0xf8, 0xf8, 0xf8)); - else - _gfx->drawPictTransparent("Images/Credits/SelectS.pict", 40, s_creditsButtonY[button], _gfx->getColor(0xf8, 0xf8, 0xf8)); - - video->seekToTime(frame * 200); - - const Graphics::Surface *surf = video->decodeNextFrame(); - _system->copyRectToScreen((byte *)surf->pixels, surf->pitch, 288, 0, video->getWidth(), video->getHeight()); -} - -void PegasusEngine::runDemoCredits() { - _gfx->drawPict("Images/Demo/DemoCredits.pict", 0, 0, true); - - bool continueLooping = true; - while (!shouldQuit() && continueLooping) { - Common::Event event; - while (_eventMan->pollEvent(event)) { - switch (event.type) { - case Common::EVENT_MOUSEMOVE: - _system->updateScreen(); - break; - case Common::EVENT_KEYDOWN: - // Break on any keypress, but ignore the meta keys - // Except for num lock! num lock on OS9 is 'clear' and we need that for the inventory panel (along with the tilde) - continueLooping = (event.kbd.keycode == Common::KEYCODE_INVALID || (event.kbd.keycode >= Common::KEYCODE_CAPSLOCK && event.kbd.keycode <= Common::KEYCODE_COMPOSE)); - break; - case Common::EVENT_LBUTTONDOWN: - continueLooping = false; - break; - default: - break; - } - } - - _system->delayMillis(10); - } -} - -} // End of namespace Pegasus diff --git a/engines/pegasus/menu.cpp b/engines/pegasus/menu.cpp deleted file mode 100644 index 12c987c3b6..0000000000 --- a/engines/pegasus/menu.cpp +++ /dev/null @@ -1,196 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#include "common/events.h" -#include "common/textconsole.h" - -#include "pegasus/console.h" -#include "pegasus/pegasus.h" -#include "pegasus/sound.h" - -namespace Pegasus { - -enum { - kInterfaceOverviewButton = 0, - kStartButton = 1, - kRestoreButton = 2, - kDifficultyButton = 3, - kCreditsButton = 4, - kQuitButton = 5 -}; - -enum { - kDemoStartButton = 0, - kDemoCreditsButton = 1, - kDemoQuitButton = 2 -}; - -void PegasusEngine::runMainMenu() { - Sound sound; - sound.initFromAIFFFile("Sounds/Main Menu.aiff"); - sound.loopSound(); - - int buttonSelected = 0; - drawMenu(buttonSelected); - - while (!shouldQuit()) { - Common::Event event; - - // Ignore events for now - while (_eventMan->pollEvent(event)) { - switch (event.type) { - case Common::EVENT_KEYDOWN: - switch (event.kbd.keycode) { - case Common::KEYCODE_UP: - if (buttonSelected > 0) { - buttonSelected--; - drawMenu(buttonSelected); - } - break; - case Common::KEYCODE_DOWN: - if ((isDemo() && buttonSelected < 2) || (!isDemo() && buttonSelected < 5)) { - buttonSelected++; - drawMenu(buttonSelected); - } - break; - case Common::KEYCODE_LEFT: - case Common::KEYCODE_RIGHT: - if (buttonSelected == kDifficultyButton) { - _adventureMode = !_adventureMode; - drawMenu(buttonSelected); - } - break; - case Common::KEYCODE_RETURN: - if (buttonSelected != kDifficultyButton) { - drawMenuButtonSelected(buttonSelected); - sound.stopSound(); - setGameMode(buttonSelected); - - if (_gameMode != kMainMenuMode) - return; - - drawMenu(buttonSelected); - sound.loopSound(); - } - break; - case Common::KEYCODE_d: - if (event.kbd.flags & Common::KBD_CTRL) { - _console->attach(); - _console->onFrame(); - } - break; - default: - break; - } - - break; - default: - break; - } - } - - //_system->updateScreen(); - _system->delayMillis(10); - } - - if (shouldQuit()) - return; -} - -void PegasusEngine::drawMenu(int buttonSelected) { - if (isDemo()) { - _gfx->drawPict("Images/Demo/DemoMenu.pict", 0, 0, false); - } else { - _gfx->drawPict("Images/Main Menu/MainMenu.mac", 0, 0, false); - if (!_adventureMode) - _gfx->drawPict("Images/Main Menu/BtnWlk.pict", 320, 340, false); - } - - drawMenuButtonHighlighted(buttonSelected); -} - -// FIXME: Most of these coordinates can use tweaking - -static const int kMainMenuButtonX = 152; -static const char s_mainMenuButtonSuffix[] = { 'L', 'S', 'S', 'L', 'S', 'S' }; -static const int s_mainMenuButtonY[] = { 202, 252, 292, 337, 382, 422 }; -static const char s_demoMainMenuButtonSuffix[] = { 'S', 'S', 'L' }; // SSL! -static const int s_demoMainMenuButtonX[] = { 38, 38, 28 }; -static const int s_demoMainMenuButtonY[] = { 332, 366, 408 }; - -void PegasusEngine::drawMenuButtonHighlighted(int buttonSelected) { - if (isDemo()) - _gfx->drawPictTransparent(Common::String("Images/Demo/Select") + s_demoMainMenuButtonSuffix[buttonSelected] + ".pict", s_demoMainMenuButtonX[buttonSelected], s_demoMainMenuButtonY[buttonSelected], _gfx->getColor(0xff, 0xff, 0xff), true); - else - _gfx->drawPictTransparent(Common::String("Images/Main Menu/Select") + s_mainMenuButtonSuffix[buttonSelected] + ".pict", kMainMenuButtonX, s_mainMenuButtonY[buttonSelected], _gfx->getColor(0xf8, 0xf8, 0xf8), true); -} - -static const char *s_mainMenuButtonSelSuffix[] = { "Overvi", "Start", "Restor", "", "Credit", "Quit" }; -static const char *s_demoMainMenuButtonSel[] = { "Start", "Credits", "Quit" }; -static const int s_mainMenuSelButtonX[] = { 198, 210, 210, 0, 210, 210 }; -static const int s_demoMainMenuSelButtonX[] = { 43, 43, 34 }; -static const int s_demoMainMenuSelButtonY[] = { 338, 373, 410 }; - -void PegasusEngine::drawMenuButtonSelected(int buttonSelected) { - if (isDemo()) - _gfx->drawPict(Common::String("Images/Demo/") + s_demoMainMenuButtonSel[buttonSelected] + ".pict", s_demoMainMenuSelButtonX[buttonSelected], s_demoMainMenuSelButtonY[buttonSelected], false); - else - _gfx->drawPict(Common::String("Images/Main Menu/pb") + s_mainMenuButtonSelSuffix[buttonSelected] + ".pict", s_mainMenuSelButtonX[buttonSelected], s_mainMenuButtonY[buttonSelected] + 5, false); - - drawMenuButtonHighlighted(buttonSelected); -} - -void PegasusEngine::setGameMode(int buttonSelected) { - if (isDemo()) { - switch (buttonSelected) { - case kDemoStartButton: - _gameMode = kMainGameMode; - break; - case kDemoCreditsButton: - runDemoCredits(); - break; - case kDemoQuitButton: - _gameMode = kQuitMode; - break; - } - } else { - switch (buttonSelected) { - case kInterfaceOverviewButton: - runInterfaceOverview(); - break; - case kStartButton: - _gameMode = kMainGameMode; - break; - case kRestoreButton: - showLoadDialog(); - break; - case kCreditsButton: - runCredits(); - break; - case kQuitButton: - _gameMode = kQuitMode; - break; - } - } -} - -} // End of namespace Pegasus diff --git a/engines/pegasus/module.mk b/engines/pegasus/module.mk index 131ec1ff6a..7207e488bd 100644 --- a/engines/pegasus/module.mk +++ b/engines/pegasus/module.mk @@ -2,7 +2,6 @@ MODULE := engines/pegasus MODULE_OBJS = \ console.o \ - credits.o \ cursor.o \ detection.o \ elements.o \ @@ -11,10 +10,8 @@ MODULE_OBJS = \ graphics.o \ hotspot.o \ input.o \ - menu.o \ movie.o \ notification.o \ - overview.o \ pegasus.o \ sound.o \ surface.o \ diff --git a/engines/pegasus/overview.cpp b/engines/pegasus/overview.cpp deleted file mode 100644 index 90fa9a4f16..0000000000 --- a/engines/pegasus/overview.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#include "common/events.h" -#include "common/textconsole.h" -#include "graphics/cursorman.h" -#include "video/qt_decoder.h" - -#include "pegasus/cursor.h" -#include "pegasus/pegasus.h" - -namespace Pegasus { - -void PegasusEngine::runInterfaceOverview() { - _cursor->setCurrentFrameIndex(3); - _cursor->show(); - - Video::QuickTimeDecoder *overviewVideo = new Video::QuickTimeDecoder(); - if (!overviewVideo->loadFile("Images/Interface/Overview Mac.movie")) - error("Could not open overview video"); - - // Pause the video, we're only getting frames from it - overviewVideo->pauseVideo(true); - - static const OverviewHotspot overviewHotspots[] = { - { Common::Rect(0, 0, 640, 480), 1000 }, // Main - { Common::Rect(131, 39, 212, 63), 660 }, // Date - { Common::Rect(210, 33, 326, 63), 330 }, // Compass - { Common::Rect(324, 39, 448, 63), 800 }, // Energy Bar - { Common::Rect(531, 35, 601, 57), 2330 }, // Energy Alert - { Common::Rect(63, 63, 577, 321), 1730 }, // View Window - { Common::Rect(69, 317, 355, 331), 1360 }, // Inventory Panel - { Common::Rect(353, 317, 559, 331), 130 }, // BioChip Panel - { Common::Rect(75, 333, 173, 431), 1460 }, // Inventory Box - { Common::Rect(171, 333, 365, 431), 2060 }, // Inventory/BioChip Display - { Common::Rect(363, 333, 461, 431), 1860 }, // BioChip Box - { Common::Rect(540, 348, 640, 468), 530 }, // Keyboard - }; - - // Draw the rest of the interface - int curHotspot; - for (int i = 0; i < ARRAYSIZE(overviewHotspots); i++) - if (overviewHotspots[i].rect.contains(_eventMan->getMousePos())) - curHotspot = i; - drawInterfaceOverview(overviewHotspots[curHotspot], overviewVideo); - _system->updateScreen(); - - bool continueLooping = true; - while (!shouldQuit() && continueLooping) { - Common::Event event; - while (_eventMan->pollEvent(event)) { - bool updateScreen = false; - - switch (event.type) { - case Common::EVENT_MOUSEMOVE: - updateScreen = true; - break; - case Common::EVENT_KEYDOWN: - // Break on any keypress, but ignore the meta keys - // Except for num lock! num lock on OS9 is 'clear' and we need that for the inventory panel (along with the tilde) - continueLooping = (event.kbd.keycode == Common::KEYCODE_INVALID || (event.kbd.keycode >= Common::KEYCODE_CAPSLOCK && event.kbd.keycode <= Common::KEYCODE_COMPOSE)); - break; - case Common::EVENT_LBUTTONDOWN: - continueLooping = false; - break; - default: - break; - } - - int oldHotspot = curHotspot; - - for (int i = 0; i < ARRAYSIZE(overviewHotspots); i++) - if (overviewHotspots[i].rect.contains(_eventMan->getMousePos())) - curHotspot = i; - - if (oldHotspot != curHotspot) { - drawInterfaceOverview(overviewHotspots[curHotspot], overviewVideo); - updateScreen = true; - } - - if (updateScreen) - _system->updateScreen(); - } - - _system->delayMillis(10); - } - - _cursor->hide(); - delete overviewVideo; -} - -void PegasusEngine::drawInterfaceOverview(const OverviewHotspot &hotspot, Video::QuickTimeDecoder *video) { - _gfx->drawPict("Images/Interface/OVTop.mac", 0, 0, false); - _gfx->drawPict("Images/Interface/OVLeft.mac", 0, kViewScreenOffset, false); - _gfx->drawPict("Images/Interface/OVRight.mac", 640 - kViewScreenOffset, kViewScreenOffset, false); - _gfx->drawPict("Images/Interface/OVBottom.mac", 0, kViewScreenOffset + 256, false); - - video->seekToTime(hotspot.time); - const Graphics::Surface *surf = video->decodeNextFrame(); - _system->copyRectToScreen((byte *)surf->pixels, surf->pitch, kViewScreenOffset, kViewScreenOffset, video->getWidth(), video->getHeight()); - - if (hotspot.time == 530) { - // The keyboard is special - // Interesting how the file is "controller" and not keyboard. The PlayStation/Pippin versions probably - // had similar names... - _gfx->drawPict("Images/Interface/OVcontrollerHilite.mac", hotspot.rect.left, hotspot.rect.top, false); - } else if (hotspot.time != 1000) { - // Draw a yellow outline around the hotspot - Common::Rect rect = hotspot.rect; - uint32 color = _system->getScreenFormat().RGBToColor(232, 232, 0); // Yellow - Graphics::Surface *screen = _system->lockScreen(); - screen->frameRect(rect, color); - rect.grow(1); - screen->frameRect(rect, color); - rect.grow(1); - screen->frameRect(rect, color); - screen->hLine(rect.left + 1, rect.top - 1, rect.right - 2, color); - screen->hLine(rect.left + 1, rect.bottom, rect.right - 2, color); - screen->vLine(rect.left - 1, rect.top + 1, rect.bottom - 2, color); - screen->vLine(rect.right, rect.top + 1, rect.bottom - 2, color); - _system->unlockScreen(); - } -} - -} // End of namespace Pegasus diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp index 0a4e066ca3..08ff821835 100644 --- a/engines/pegasus/pegasus.cpp +++ b/engines/pegasus/pegasus.cpp @@ -23,7 +23,6 @@ #include "common/config-manager.h" #include "common/error.h" #include "common/events.h" -#include "common/file.h" #include "common/fs.h" #include "common/memstream.h" #include "common/savefile.h" @@ -44,13 +43,6 @@ #include "pegasus/items/biochips/biochipitem.h" #include "pegasus/items/inventory/inventoryitem.h" -//#define RUN_INTERFACE_TEST -//#define RUN_OLD_CODE - -#ifdef RUN_INTERFACE_TEST -#include "pegasus/sound.h" -#endif - namespace Pegasus { PegasusEngine::PegasusEngine(OSystem *syst, const PegasusGameDescription *gamedesc) : Engine(syst), InputHandler(0), _gameDescription(gamedesc), @@ -72,8 +64,6 @@ Common::Error PegasusEngine::run() { _gfx = new GraphicsManager(this); _resFork = new Common::MacResManager(); _cursor = new Cursor(); - _gameMode = kIntroMode; - _adventureMode = true; if (!_resFork->open("JMP PP Resources") || !_resFork->hasResFork()) error("Could not load JMP PP Resources"); @@ -100,48 +90,6 @@ Common::Error PegasusEngine::run() { return Common::kNoGameDataFoundError; } -#if defined(RUN_INTERFACE_TEST) - _cursor->setCurrentFrameIndex(0); - _cursor->show(); - drawInterface(); - Sound sound; - sound.initFromAIFFFile("Sounds/Caldoria/Apartment Music.aiff"); - sound.loopSound(); - - while (!shouldQuit()) { - Common::Event event; - // Ignore events for now - while (_eventMan->pollEvent(event)) { - if (event.type == Common::EVENT_MOUSEMOVE) - _system->updateScreen(); - } - - _system->delayMillis(10); - } -#elif defined(RUN_OLD_CODE) - while (!shouldQuit()) { - switch (_gameMode) { - case kIntroMode: - if (!isDemo()) - runIntro(); - _gameMode = kMainMenuMode; - break; - case kMainMenuMode: - runMainMenu(); - break; - case kMainGameMode: - // NOTE: Prehistoric will be our testing location - changeLocation(kPrehistoricID); - mainGameLoop(); - break; - case kQuitMode: - return Common::kNoError; - default: - _gameMode = kMainMenuMode; - break; - } - } -#else // Set up input InputHandler::setInputHandler(this); allowInput(true); @@ -167,7 +115,6 @@ Common::Error PegasusEngine::run() { giveIdleTime(); _gfx->updateDisplay(); } -#endif return Common::kNoError; } @@ -320,29 +267,6 @@ void PegasusEngine::runIntro() { delete video; } -void PegasusEngine::drawInterface() { - _gfx->drawPict("Images/Interface/3DInterface Top", 0, 0, false); - _gfx->drawPict("Images/Interface/3DInterface Left", 0, kViewScreenOffset, false); - _gfx->drawPict("Images/Interface/3DInterface Right", 640 - kViewScreenOffset, kViewScreenOffset, false); - _gfx->drawPict("Images/Interface/3DInterface Bottom", 0, kViewScreenOffset + 256, false); - //drawCompass(); - _system->updateScreen(); -} - -void PegasusEngine::mainGameLoop() { - // TODO: Remove me - _gameMode = kQuitMode; -} - -void PegasusEngine::changeLocation(tNeighborhoodID neighborhood) { - GameState.setCurrentNeighborhood(neighborhood); - - // Just a test... - Neighborhood *neighborhoodPtr = new Neighborhood(this, this, getTimeZoneDesc(neighborhood), neighborhood); - neighborhoodPtr->init(); - delete neighborhoodPtr; -} - void PegasusEngine::showLoadDialog() { GUI::SaveLoadChooser slc(_("Load game:"), _("Load")); slc.setSaveMode(false); @@ -356,24 +280,11 @@ void PegasusEngine::showLoadDialog() { if (slot >= 0) { warning("TODO: Load game"); - _gameMode = kMainGameMode; } slc.close(); } -Common::String PegasusEngine::getTimeZoneDesc(tNeighborhoodID neighborhood) { - static const char *names[] = { "Caldoria", "Full TSA", "Full TSA", "Tiny TSA", "Prehistoric", "Mars", "WSC", "Norad Alpha", "Norad Delta" }; - return names[neighborhood]; -} - -Common::String PegasusEngine::getTimeZoneFolder(tNeighborhoodID neighborhood) { - if (neighborhood == kFullTSAID || neighborhood == kTinyTSAID || neighborhood == kFinalTSAID) - return "TSA"; - - return getTimeZoneDesc(neighborhood); -} - GUI::Debugger *PegasusEngine::getDebugger() { return _console; } diff --git a/engines/pegasus/pegasus.h b/engines/pegasus/pegasus.h index 3e20ddc7de..3a99ddb823 100644 --- a/engines/pegasus/pegasus.h +++ b/engines/pegasus/pegasus.h @@ -53,20 +53,6 @@ class Idler; class Cursor; class TimeBase; -static const int kViewScreenOffset = 64; - -struct OverviewHotspot { - Common::Rect rect; - uint32 time; -}; - -enum GameMode { - kIntroMode, - kMainMenuMode, - kMainGameMode, - kQuitMode -}; - class PegasusEngine : public ::Engine, public InputHandler, public NotificationManager { friend class InputHandler; @@ -105,46 +91,11 @@ protected: virtual void receiveNotification(Notification *notification, const tNotificationFlags flags); private: - // Intro - void runIntro(); - void runMainMenu(); - void drawMenu(int buttonSelected); - void drawMenuButtonHighlighted(int buttonSelected); - void drawMenuButtonSelected(int buttonSelected); - //void runInterfaceOverview(); - void setGameMode(int buttonSelected); - - // Interface - void drawInterface(); - //void drawCompass(); - //void runPauseMenu(); - void showLoadDialog(); - - // Interface Overview - void runInterfaceOverview(); - void drawInterfaceOverview(const OverviewHotspot &hotspot, Video::QuickTimeDecoder *video); - - // Credits - void runCredits(); - void drawCredits(int button, bool highlight, int frame, Video::QuickTimeDecoder *video); - void runDemoCredits(); - - // Main Game Functions - void mainGameLoop(); - void changeLocation(tNeighborhoodID neighborhood); - - // Misc Functions - static Common::String getTimeZoneFolder(tNeighborhoodID neighborhood); - static Common::String getTimeZoneDesc(tNeighborhoodID neighborhood); - - // Game Variables - bool _adventureMode; - GameMode _gameMode; - // Console PegasusConsole *_console; - // Intro Directory Code + // Intro + void runIntro(); bool detectOpeningClosingDirectory(); Common::String _introDirectory; @@ -172,6 +123,7 @@ private: // Misc. Hotspot _returnHotspot; + void showLoadDialog(); }; } // End of namespace Pegasus |