aboutsummaryrefslogtreecommitdiff
path: root/scumm/resource.cpp
diff options
context:
space:
mode:
authorMax Horn2003-09-08 23:18:11 +0000
committerMax Horn2003-09-08 23:18:11 +0000
commitb8d72d8854551d3bfc20d118b8e5c6a07cdf3818 (patch)
treeeb7a1c8df63a068db874894d384ac102a4cf8a62 /scumm/resource.cpp
parentaa61764b2f904b30dcdc8e0d107d2a60f51a7158 (diff)
downloadscummvm-rg350-b8d72d8854551d3bfc20d118b8e5c6a07cdf3818.tar.gz
scummvm-rg350-b8d72d8854551d3bfc20d118b8e5c6a07cdf3818.tar.bz2
scummvm-rg350-b8d72d8854551d3bfc20d118b8e5c6a07cdf3818.zip
added comment describing Mac0 format
svn-id: r10115
Diffstat (limited to 'scumm/resource.cpp')
-rw-r--r--scumm/resource.cpp53
1 files changed, 52 insertions, 1 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp
index 111e8a8c45..bab7018b60 100644
--- a/scumm/resource.cpp
+++ b/scumm/resource.cpp
@@ -837,10 +837,61 @@ int Scumm::readSoundResource(int type, int idx) {
Maybe I am mistaken when I think it's four byte, some other parts
seem to suggest it's 2 byte oriented, or even variable length...
- */
+ */
+ /*
+ From Markus Magnuson (superqult) we got this information:
+ Mac0
+ ---
+ 4 bytes - 'SOUN'
+ BE 4 bytes - block length
+
+ 4 bytes - 'Mac0'
+ BE 4 bytes - (blockLength - 27)
+ 28 bytes - ???
+
+ do this three times (once for each channel):
+ 4 bytes - 'Chan'
+ BE 4 bytes - channel length
+ 4 bytes - instrument name (e.g. 'MARI')
+
+ do this for ((chanLength-24)/4) times:
+ 2 bytes - note duration
+ 1 byte - note value
+ 1 byte - note velocity
+
+ 4 bytes - ???
+ 4 bytes - 'Loop'/'Done'
+ 4 bytes - ???
+
+ 1 byte - 0x09
+ ---
+
+ Instruments:
+ "MARI" - Marimba
+ "PLUC" - Pizzicato Strings
+ "HARM" - Harmonica
+ "PIPE" - Church Organ?
+ "TROM" - Trombone
+ "STRI" - String Ensemble
+ "HORN" - French Horn?
+ "VIBE" - Vibraphone
+ "SHAK" - Shakuhachi?
+ "PANP" - Pan Flute
+ "WHIS" - Whistle/Bottle
+ "ORGA" - Drawbar Organ
+ "BONG" - Woodblock?
+ "BASS" - Bass
+
+
+ Now the task could be to convert this into MIDI, to be fed into iMuse.
+ Or we do something similiar to what is done in Player_V3, assuming
+ we can identify SFX in the MI datafiles for each of the instruments
+ listed above.
+ */
_fileHandle.seek(-12, SEEK_CUR);
total_size = _fileHandle.readUint32BE();
_fileHandle.read(createResource(type, idx, total_size), total_size - 8);
+// dumpResource("sound-", idx, getResourceAddress(type, idx));
return 1;
} else if (basetag == MKID('Mac1')) {
_fileHandle.seek(-12, SEEK_CUR);