aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo
diff options
context:
space:
mode:
Diffstat (limited to 'engines/hugo')
-rw-r--r--engines/hugo/POTFILES1
-rw-r--r--engines/hugo/detection.cpp7
-rw-r--r--engines/hugo/dialogs.cpp3
-rw-r--r--engines/hugo/dialogs.h2
-rw-r--r--engines/hugo/display.cpp1
-rw-r--r--engines/hugo/display.h5
-rw-r--r--engines/hugo/file.cpp5
-rw-r--r--engines/hugo/file.h2
-rw-r--r--engines/hugo/hugo.cpp3
-rw-r--r--engines/hugo/hugo.h13
-rw-r--r--engines/hugo/intro.cpp4
-rw-r--r--engines/hugo/intro.h1
-rw-r--r--engines/hugo/mouse.cpp1
-rw-r--r--engines/hugo/mouse.h7
-rw-r--r--engines/hugo/parser.cpp2
-rw-r--r--engines/hugo/parser.h1
-rw-r--r--engines/hugo/sound.cpp1
-rw-r--r--engines/hugo/sound.h5
-rw-r--r--engines/hugo/text.cpp1
-rw-r--r--engines/hugo/util.cpp6
20 files changed, 52 insertions, 19 deletions
diff --git a/engines/hugo/POTFILES b/engines/hugo/POTFILES
new file mode 100644
index 0000000000..ff61e12ca5
--- /dev/null
+++ b/engines/hugo/POTFILES
@@ -0,0 +1 @@
+engines/hugo/file.cpp
diff --git a/engines/hugo/detection.cpp b/engines/hugo/detection.cpp
index 3907215746..4e4746c002 100644
--- a/engines/hugo/detection.cpp
+++ b/engines/hugo/detection.cpp
@@ -41,7 +41,7 @@ uint32 HugoEngine::getFeatures() const {
}
const char *HugoEngine::getGameId() const {
- return _gameDescription->desc.gameid;
+ return _gameDescription->desc.gameId;
}
@@ -177,10 +177,9 @@ SaveStateList HugoMetaEngine::listSaves(const char *target) const {
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
Common::StringArray filenames;
Common::String pattern = target;
- pattern += "-??.SAV";
+ pattern += "-##.SAV";
filenames = saveFileMan->listSavefiles(pattern);
- sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
char slot[3];
@@ -217,6 +216,8 @@ SaveStateList HugoMetaEngine::listSaves(const char *target) const {
}
}
+ // Sort saves based on slot number.
+ Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;
}
diff --git a/engines/hugo/dialogs.cpp b/engines/hugo/dialogs.cpp
index 8b145b78d8..c741c6a837 100644
--- a/engines/hugo/dialogs.cpp
+++ b/engines/hugo/dialogs.cpp
@@ -26,7 +26,8 @@
#include "image/bmp.h"
#include "hugo/hugo.h"
-#include "hugo/display.h"
+#include "hugo/dialogs.h"
+#include "hugo/file.h"
#include "hugo/parser.h"
#include "hugo/schedule.h"
#include "hugo/sound.h"
diff --git a/engines/hugo/dialogs.h b/engines/hugo/dialogs.h
index 55bb8f9fd0..aebbeee8c1 100644
--- a/engines/hugo/dialogs.h
+++ b/engines/hugo/dialogs.h
@@ -28,6 +28,8 @@
namespace Hugo {
+class HugoEngine;
+
enum MenuOption {
kMenuWhat = 0,
kMenuMusic,
diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp
index a8a22fb4b9..17627608bd 100644
--- a/engines/hugo/display.cpp
+++ b/engines/hugo/display.cpp
@@ -37,6 +37,7 @@
#include "hugo/hugo.h"
#include "hugo/display.h"
+#include "hugo/file.h"
#include "hugo/inventory.h"
#include "hugo/util.h"
#include "hugo/object.h"
diff --git a/engines/hugo/display.h b/engines/hugo/display.h
index e152a7f868..99fda0a638 100644
--- a/engines/hugo/display.h
+++ b/engines/hugo/display.h
@@ -30,6 +30,11 @@
#ifndef HUGO_DISPLAY_H
#define HUGO_DISPLAY_H
+namespace Common {
+class ReadStream;
+class WriteStream;
+}
+
namespace Hugo {
enum OverlayState {kOvlUndef, kOvlForeground, kOvlBackground}; // Overlay state
diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp
index e2633977a8..7a3538ea63 100644
--- a/engines/hugo/file.cpp
+++ b/engines/hugo/file.cpp
@@ -32,6 +32,7 @@
#include "common/savefile.h"
#include "common/textconsole.h"
#include "common/config-manager.h"
+#include "common/translation.h"
#include "graphics/surface.h"
#include "graphics/thumbnail.h"
@@ -294,7 +295,7 @@ bool FileManager::saveGame(const int16 slot, const Common::String &descrip) {
Common::String savegameDescription;
if (slot == -1) {
- GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Save game:", "Save", true);
+ GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
savegameId = dialog->runModalWithCurrentTarget();
savegameDescription = dialog->getResultString();
delete dialog;
@@ -396,7 +397,7 @@ bool FileManager::restoreGame(const int16 slot) {
int16 savegameId;
if (slot == -1) {
- GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Restore game:", "Restore", false);
+ GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false);
savegameId = dialog->runModalWithCurrentTarget();
delete dialog;
} else {
diff --git a/engines/hugo/file.h b/engines/hugo/file.h
index d43528f0f8..731eb70a35 100644
--- a/engines/hugo/file.h
+++ b/engines/hugo/file.h
@@ -30,6 +30,8 @@
#ifndef HUGO_FILE_H
#define HUGO_FILE_H
+#include "common/file.h"
+
namespace Hugo {
/**
* Enumerate overlay file types
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 8f89832f6b..267eb08436 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -29,7 +29,10 @@
#include "common/textconsole.h"
#include "hugo/hugo.h"
+#include "hugo/console.h"
+#include "hugo/dialogs.h"
#include "hugo/file.h"
+#include "hugo/game.h"
#include "hugo/schedule.h"
#include "hugo/display.h"
#include "hugo/mouse.h"
diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h
index cc0fcc6ec2..85209afe06 100644
--- a/engines/hugo/hugo.h
+++ b/engines/hugo/hugo.h
@@ -20,23 +20,20 @@
*
*/
-#ifndef HUGO_H
-#define HUGO_H
+#ifndef HUGO_HUGO_H
+#define HUGO_HUGO_H
#include "engines/engine.h"
-#include "common/file.h"
-#include "hugo/console.h"
-#include "hugo/dialogs.h"
// This include is here temporarily while the engine is being refactored.
#include "hugo/game.h"
-#include "hugo/file.h"
#define HUGO_DAT_VER_MAJ 0 // 1 byte
#define HUGO_DAT_VER_MIN 42 // 1 byte
#define DATAALIGNMENT 4
namespace Common {
+class SeekableReadStream;
class RandomSource;
}
@@ -209,6 +206,8 @@ class SoundHandler;
class IntroHandler;
class ObjectHandler;
class TextHandler;
+class TopMenu;
+class HugoConsole;
class HugoEngine : public Engine {
public:
@@ -342,4 +341,4 @@ private:
} // End of namespace Hugo
-#endif // Hugo_H
+#endif // HUGO_HUGO_H
diff --git a/engines/hugo/intro.cpp b/engines/hugo/intro.cpp
index 26ef65edf8..e15291e03b 100644
--- a/engines/hugo/intro.cpp
+++ b/engines/hugo/intro.cpp
@@ -29,9 +29,13 @@
#include "common/system.h"
#include "common/textconsole.h"
+#include "graphics/font.h"
+#include "graphics/pixelformat.h"
#include "hugo/hugo.h"
#include "hugo/intro.h"
+#include "hugo/file.h"
+#include "hugo/game.h"
#include "hugo/util.h"
#include "hugo/display.h"
#include "hugo/sound.h"
diff --git a/engines/hugo/intro.h b/engines/hugo/intro.h
index 7af53c8922..d40cffbfaf 100644
--- a/engines/hugo/intro.h
+++ b/engines/hugo/intro.h
@@ -29,6 +29,7 @@
#ifndef INTRO_H
#define INTRO_H
+#include "graphics/surface.h"
#include "graphics/fonts/winfont.h"
namespace Hugo {
diff --git a/engines/hugo/mouse.cpp b/engines/hugo/mouse.cpp
index 3674c90757..8c0ba12f8f 100644
--- a/engines/hugo/mouse.cpp
+++ b/engines/hugo/mouse.cpp
@@ -33,6 +33,7 @@
#include "common/system.h"
#include "hugo/hugo.h"
+#include "hugo/dialogs.h"
#include "hugo/game.h"
#include "hugo/mouse.h"
#include "hugo/schedule.h"
diff --git a/engines/hugo/mouse.h b/engines/hugo/mouse.h
index f9d547ec86..0bfa1b0db4 100644
--- a/engines/hugo/mouse.h
+++ b/engines/hugo/mouse.h
@@ -29,6 +29,13 @@
#ifndef HUGO_MOUSE_H
#define HUGO_MOUSE_H
+
+#include "hugo/game.h"
+
+namespace Common {
+class ReadStream;
+}
+
namespace Hugo {
class MouseHandler {
diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp
index 998dd5df58..7ee0198882 100644
--- a/engines/hugo/parser.cpp
+++ b/engines/hugo/parser.cpp
@@ -29,12 +29,12 @@
#include "common/events.h"
#include "common/textconsole.h"
+#include "gui/debugger.h"
#include "hugo/hugo.h"
#include "hugo/display.h"
#include "hugo/parser.h"
#include "hugo/file.h"
-#include "hugo/schedule.h"
#include "hugo/util.h"
#include "hugo/route.h"
#include "hugo/sound.h"
diff --git a/engines/hugo/parser.h b/engines/hugo/parser.h
index 5a2ac7d375..dfdd984832 100644
--- a/engines/hugo/parser.h
+++ b/engines/hugo/parser.h
@@ -32,6 +32,7 @@
namespace Common {
struct Event;
+class ReadStream;
}
namespace Hugo {
diff --git a/engines/hugo/sound.cpp b/engines/hugo/sound.cpp
index 8591709dc3..09de256789 100644
--- a/engines/hugo/sound.cpp
+++ b/engines/hugo/sound.cpp
@@ -37,6 +37,7 @@
#include "audio/decoders/raw.h"
#include "audio/audiostream.h"
#include "audio/midiparser.h"
+#include "audio/softsynth/pcspk.h"
#include "hugo/hugo.h"
#include "hugo/game.h"
diff --git a/engines/hugo/sound.h b/engines/hugo/sound.h
index 6c3420918d..a623569a8b 100644
--- a/engines/hugo/sound.h
+++ b/engines/hugo/sound.h
@@ -32,7 +32,10 @@
#include "audio/mixer.h"
#include "audio/midiplayer.h"
-#include "audio/softsynth/pcspk.h"
+
+namespace Audio {
+class PCSpeaker;
+}
namespace Hugo {
diff --git a/engines/hugo/text.cpp b/engines/hugo/text.cpp
index 50b2b64260..617fccc36d 100644
--- a/engines/hugo/text.cpp
+++ b/engines/hugo/text.cpp
@@ -20,6 +20,7 @@
*
*/
#include "common/system.h"
+#include "common/stream.h"
#include "hugo/hugo.h"
#include "hugo/text.h"
diff --git a/engines/hugo/util.cpp b/engines/hugo/util.cpp
index 7b75bf2bc5..bc1525382c 100644
--- a/engines/hugo/util.cpp
+++ b/engines/hugo/util.cpp
@@ -28,13 +28,11 @@
*/
#include "common/system.h"
+#include "common/util.h"
#include "gui/message.h"
-#include "hugo/game.h"
-#include "hugo/hugo.h"
+#include "hugo/dialogs.h"
#include "hugo/util.h"
-#include "hugo/sound.h"
-#include "hugo/text.h"
namespace Hugo {