aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dists/engine-data/hugo.datbin189529 -> 189541 bytes
-rw-r--r--engines/hugo/hugo.cpp1
-rw-r--r--engines/hugo/hugo.h2
-rw-r--r--engines/hugo/intro_v3d.cpp2
-rw-r--r--engines/hugo/sound.cpp8
-rw-r--r--engines/hugo/sound.h3
-rw-r--r--tools/create_hugo/create_hugo.cpp11
-rw-r--r--tools/create_hugo/create_hugo.h2
8 files changed, 26 insertions, 3 deletions
diff --git a/dists/engine-data/hugo.dat b/dists/engine-data/hugo.dat
index ac82bebbf7..a2cd4339a5 100644
--- a/dists/engine-data/hugo.dat
+++ b/dists/engine-data/hugo.dat
Binary files differ
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 64b4116527..db0d7d5995 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -754,6 +754,7 @@ bool HugoEngine::loadHugoDat() {
_object->loadNumObj(in);
_scheduler->loadAlNewscrIndex(in);
+ _sound->loadIntroSong(in);
_screen->loadFontArr(in);
_topMenu->loadBmpArr(in);
diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h
index 270ca25a48..119a9c3f6b 100644
--- a/engines/hugo/hugo.h
+++ b/engines/hugo/hugo.h
@@ -36,7 +36,7 @@
#include "hugo/file.h"
#define HUGO_DAT_VER_MAJ 0 // 1 byte
-#define HUGO_DAT_VER_MIN 36 // 1 byte
+#define HUGO_DAT_VER_MIN 37 // 1 byte
#define DATAALIGNMENT 4
#define EDGE 10 // Closest object can get to edge of screen
#define EDGE2 (EDGE * 2) // Push object further back on edge collision
diff --git a/engines/hugo/intro_v3d.cpp b/engines/hugo/intro_v3d.cpp
index c56d740c2f..3afe7decd8 100644
--- a/engines/hugo/intro_v3d.cpp
+++ b/engines/hugo/intro_v3d.cpp
@@ -37,6 +37,7 @@
#include "hugo/file.h"
#include "hugo/display.h"
#include "hugo/util.h"
+#include "hugo/sound.h"
namespace Hugo {
@@ -81,6 +82,7 @@ void intro_v3d::introInit() {
_vm->_file->readBackground(22); // display screen MAP_3d
_vm->_screen->displayBackground();
introTicks = 0;
+ _vm->_sound->DOSSongPtr = _vm->_sound->DOSIntroSong;
}
/**
diff --git a/engines/hugo/sound.cpp b/engines/hugo/sound.cpp
index d79146401e..1ce85b9da5 100644
--- a/engines/hugo/sound.cpp
+++ b/engines/hugo/sound.cpp
@@ -472,4 +472,12 @@ void SoundHandler::pcspkr_player() {
}
}
+void SoundHandler::loadIntroSong(Common::File &in) {
+ for (int varnt = 0; varnt < _vm->_numVariant; varnt++) {
+ uint16 numBuf = in.readUint16BE();
+ if (varnt == _vm->_gameVariant)
+ DOSIntroSong = _vm->_textData[numBuf];
+ }
+}
+
} // End of namespace Hugo
diff --git a/engines/hugo/sound.h b/engines/hugo/sound.h
index 74f87d790e..096c66be15 100644
--- a/engines/hugo/sound.h
+++ b/engines/hugo/sound.h
@@ -75,7 +75,6 @@ public:
MidiChannel *getPercussionChannel() { return 0; }
private:
-
static void timerCallback(void *p);
MidiDriver *_driver;
@@ -96,6 +95,7 @@ public:
~SoundHandler();
char *DOSSongPtr;
+ char *DOSIntroSong;
void toggleMusic();
void toggleSound();
@@ -106,6 +106,7 @@ public:
void initSound();
void syncVolume();
void checkMusic();
+ void loadIntroSong(Common::File &in);
private:
HugoEngine *_vm;
diff --git a/tools/create_hugo/create_hugo.cpp b/tools/create_hugo/create_hugo.cpp
index ea28cbd7d7..c10a8e2da2 100644
--- a/tools/create_hugo/create_hugo.cpp
+++ b/tools/create_hugo/create_hugo.cpp
@@ -823,6 +823,17 @@ int main(int argc, char *argv[]) {
writeUint16BE(outFile, 0);
writeUint16BE(outFile, kALnewscr_2d);
writeUint16BE(outFile, 0);
+
+ // DOS Intro music
+ // Win version do not use it
+ // H1 Dos doesn't have an intro
+ // H2 Dos handles the intro song in its scripts
+ writeUint16BE(outFile, 0);
+ writeUint16BE(outFile, 0);
+ writeUint16BE(outFile, 0);
+ writeUint16BE(outFile, 0);
+ writeUint16BE(outFile, 0);
+ writeUint16BE(outFile, kDTsong11_3d);
// The following fonts info have been added to avoid temporarly the .FON
// used in the DOS version
diff --git a/tools/create_hugo/create_hugo.h b/tools/create_hugo/create_hugo.h
index d0960d1166..3c5108ef68 100644
--- a/tools/create_hugo/create_hugo.h
+++ b/tools/create_hugo/create_hugo.h
@@ -31,7 +31,7 @@
#define DATAALIGNMENT 4
#define HUGO_DAT_VER_MAJ 0 // 1 byte
-#define HUGO_DAT_VER_MIN 36 // 1 byte
+#define HUGO_DAT_VER_MIN 37 // 1 byte
typedef unsigned char uint8;
typedef unsigned char byte;