[Scummvm-cvs-logs] SF.net SVN: scummvm:[55145] scummvm/trunk

strangerke at users.sourceforge.net strangerke at users.sourceforge.net
Fri Jan 7 16:14:38 CET 2011


Revision: 55145
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55145&view=rev
Author:   strangerke
Date:     2011-01-07 15:14:38 +0000 (Fri, 07 Jan 2011)

Log Message:
-----------
TOOLS: Add Dos intro music number in hugo.dat

Modified Paths:
--------------
    scummvm/trunk/dists/engine-data/hugo.dat
    scummvm/trunk/engines/hugo/hugo.cpp
    scummvm/trunk/engines/hugo/hugo.h
    scummvm/trunk/engines/hugo/intro_v3d.cpp
    scummvm/trunk/engines/hugo/sound.cpp
    scummvm/trunk/engines/hugo/sound.h
    scummvm/trunk/tools/create_hugo/create_hugo.cpp
    scummvm/trunk/tools/create_hugo/create_hugo.h

Modified: scummvm/trunk/dists/engine-data/hugo.dat
===================================================================
(Binary files differ)

Modified: scummvm/trunk/engines/hugo/hugo.cpp
===================================================================
--- scummvm/trunk/engines/hugo/hugo.cpp	2011-01-07 14:40:25 UTC (rev 55144)
+++ scummvm/trunk/engines/hugo/hugo.cpp	2011-01-07 15:14:38 UTC (rev 55145)
@@ -754,6 +754,7 @@
 
 	_object->loadNumObj(in);
 	_scheduler->loadAlNewscrIndex(in);
+	_sound->loadIntroSong(in);
 	_screen->loadFontArr(in);
 	_topMenu->loadBmpArr(in);
 

Modified: scummvm/trunk/engines/hugo/hugo.h
===================================================================
--- scummvm/trunk/engines/hugo/hugo.h	2011-01-07 14:40:25 UTC (rev 55144)
+++ scummvm/trunk/engines/hugo/hugo.h	2011-01-07 15:14:38 UTC (rev 55145)
@@ -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

Modified: scummvm/trunk/engines/hugo/intro_v3d.cpp
===================================================================
--- scummvm/trunk/engines/hugo/intro_v3d.cpp	2011-01-07 14:40:25 UTC (rev 55144)
+++ scummvm/trunk/engines/hugo/intro_v3d.cpp	2011-01-07 15:14:38 UTC (rev 55145)
@@ -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 @@
 	_vm->_file->readBackground(22); // display screen MAP_3d
 	_vm->_screen->displayBackground();
 	introTicks = 0;
+	_vm->_sound->DOSSongPtr = _vm->_sound->DOSIntroSong;
 }
 
 /**

Modified: scummvm/trunk/engines/hugo/sound.cpp
===================================================================
--- scummvm/trunk/engines/hugo/sound.cpp	2011-01-07 14:40:25 UTC (rev 55144)
+++ scummvm/trunk/engines/hugo/sound.cpp	2011-01-07 15:14:38 UTC (rev 55145)
@@ -472,4 +472,12 @@
 	}
 }
 
+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

Modified: scummvm/trunk/engines/hugo/sound.h
===================================================================
--- scummvm/trunk/engines/hugo/sound.h	2011-01-07 14:40:25 UTC (rev 55144)
+++ scummvm/trunk/engines/hugo/sound.h	2011-01-07 15:14:38 UTC (rev 55145)
@@ -75,7 +75,6 @@
 	MidiChannel *getPercussionChannel() { return 0; }
 
 private:
-
 	static void timerCallback(void *p);
 
 	MidiDriver *_driver;
@@ -96,6 +95,7 @@
 	~SoundHandler();
 
 	char *DOSSongPtr;
+	char *DOSIntroSong;
 
 	void toggleMusic();
 	void toggleSound();
@@ -106,6 +106,7 @@
 	void initSound();
 	void syncVolume();
 	void checkMusic();
+	void loadIntroSong(Common::File &in);
 
 private:
 	HugoEngine *_vm;

Modified: scummvm/trunk/tools/create_hugo/create_hugo.cpp
===================================================================
--- scummvm/trunk/tools/create_hugo/create_hugo.cpp	2011-01-07 14:40:25 UTC (rev 55144)
+++ scummvm/trunk/tools/create_hugo/create_hugo.cpp	2011-01-07 15:14:38 UTC (rev 55145)
@@ -823,6 +823,17 @@
 	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

Modified: scummvm/trunk/tools/create_hugo/create_hugo.h
===================================================================
--- scummvm/trunk/tools/create_hugo/create_hugo.h	2011-01-07 14:40:25 UTC (rev 55144)
+++ scummvm/trunk/tools/create_hugo/create_hugo.h	2011-01-07 15:14:38 UTC (rev 55145)
@@ -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;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list