diff options
author | Arnaud Boutonné | 2011-01-07 15:14:38 +0000 |
---|---|---|
committer | Arnaud Boutonné | 2011-01-07 15:14:38 +0000 |
commit | 868717b444ff0755663037a6c9aa4ccdc8437010 (patch) | |
tree | 5c966411e1b0f42ab3733cd063b9be2e0e9e7aac | |
parent | 710e41c3e8e55dfd643aa08752bb6565de1efe57 (diff) | |
download | scummvm-rg350-868717b444ff0755663037a6c9aa4ccdc8437010.tar.gz scummvm-rg350-868717b444ff0755663037a6c9aa4ccdc8437010.tar.bz2 scummvm-rg350-868717b444ff0755663037a6c9aa4ccdc8437010.zip |
TOOLS: Add Dos intro music number in hugo.dat
svn-id: r55145
-rw-r--r-- | dists/engine-data/hugo.dat | bin | 189529 -> 189541 bytes | |||
-rw-r--r-- | engines/hugo/hugo.cpp | 1 | ||||
-rw-r--r-- | engines/hugo/hugo.h | 2 | ||||
-rw-r--r-- | engines/hugo/intro_v3d.cpp | 2 | ||||
-rw-r--r-- | engines/hugo/sound.cpp | 8 | ||||
-rw-r--r-- | engines/hugo/sound.h | 3 | ||||
-rw-r--r-- | tools/create_hugo/create_hugo.cpp | 11 | ||||
-rw-r--r-- | tools/create_hugo/create_hugo.h | 2 |
8 files changed, 26 insertions, 3 deletions
diff --git a/dists/engine-data/hugo.dat b/dists/engine-data/hugo.dat Binary files differindex ac82bebbf7..a2cd4339a5 100644 --- a/dists/engine-data/hugo.dat +++ b/dists/engine-data/hugo.dat 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; |