aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/hugo/display.cpp6
-rw-r--r--engines/hugo/hugo.cpp12
-rw-r--r--engines/hugo/hugo.h3
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