diff options
author | strangerke | 2011-02-24 19:59:36 +0100 |
---|---|---|
committer | strangerke | 2011-02-24 19:59:36 +0100 |
commit | fbf41fc66a5e6c24903e4fbe51b28c9f03ed1628 (patch) | |
tree | 446a7ad6fe0bd34aa0bf7214896c1294b065ac1f /engines/hugo | |
parent | 3194d2dac6669c421d02a33b4c78348d81a27cbb (diff) | |
download | scummvm-rg350-fbf41fc66a5e6c24903e4fbe51b28c9f03ed1628.tar.gz scummvm-rg350-fbf41fc66a5e6c24903e4fbe51b28c9f03ed1628.tar.bz2 scummvm-rg350-fbf41fc66a5e6c24903e4fbe51b28c9f03ed1628.zip |
HUGO:
- Increase savegame version, as it has changed due to RGBa->RGB modification
- Fix regression in restorePal()
- Implement load from GMM
Diffstat (limited to 'engines/hugo')
-rw-r--r-- | engines/hugo/display.cpp | 6 | ||||
-rw-r--r-- | engines/hugo/hugo.cpp | 12 | ||||
-rw-r--r-- | engines/hugo/hugo.h | 3 |
3 files changed, 14 insertions, 7 deletions
diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp index 0210eb8f04..6c363184f6 100644 --- a/engines/hugo/display.cpp +++ b/engines/hugo/display.cpp @@ -214,10 +214,10 @@ void Screen::savePal(Common::WriteStream *f) const { void Screen::restorePal(Common::ReadStream *f) { debugC(1, kDebugDisplay, "restorePal()"); - for (int i = 0; i < _paletteSize; i++) { + for (int i = 0; i < _paletteSize; i++) _curPalette[i] = f->readByte(); - g_system->getPaletteManager()->setPalette(_curPalette, i, 1); - } + + g_system->getPaletteManager()->setPalette(_curPalette, 0, _paletteSize / 3); } diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp index 2143b8cfde..8d5fa877c6 100644 --- a/engines/hugo/hugo.cpp +++ b/engines/hugo/hugo.cpp @@ -28,6 +28,7 @@ #include "common/events.h" #include "common/EventRecorder.h" #include "common/debug-channels.h" +#include "common/config-manager.h" #include "hugo/hugo.h" #include "hugo/game.h" @@ -253,14 +254,20 @@ Common::Error HugoEngine::run() { // Start the state machine _status.viewState = kViewIntroInit; - _status.doQuitFl = false; + int16 loadSlot = Common::ConfigManager::instance().getInt("save_slot"); + if (loadSlot >= 0) { + _status.skipIntroFl = true; + _file->restoreGame(loadSlot); + _scheduler->restoreScreen(*_screen_p); + _status.viewState = kViewPlay; + } while (!_status.doQuitFl) { _screen->drawBoundaries(); - g_system->updateScreen(); runMachine(); + // Handle input Common::Event event; while (_eventMan->pollEvent(event)) { @@ -285,6 +292,7 @@ Common::Error HugoEngine::run() { break; } } + _mouse->mouseHandler(); // Mouse activity - adds to display list _screen->displayList(kDisplayDisplay); // Blit the display list to screen _status.doQuitFl |= shouldQuit(); // update game quit flag diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h index b2739c829e..ca069ca82e 100644 --- a/engines/hugo/hugo.h +++ b/engines/hugo/hugo.h @@ -58,7 +58,7 @@ class RandomSource; */ namespace Hugo { -static const int kSavegameVersion = 3; +static const int kSavegameVersion = 4; static const int kInvDx = 32; // Width of an inventory icon static const int kInvDy = 32; // Height of inventory icon static const int kMaxTunes = 16; // Max number of tunes @@ -242,7 +242,6 @@ public: object_t *_hero; byte *_screen_p; byte _heroImage; - byte *_screenStates; command_t _line; // Line of user text input config_t _config; // User's config |