diff options
author | Jerome Fisher | 2004-11-28 21:08:37 +0000 |
---|---|---|
committer | Jerome Fisher | 2004-11-28 21:08:37 +0000 |
commit | 6c84bbf2bd808c7e72cdcc9e5d5f68562916606b (patch) | |
tree | 6bade0a959d02fca159b8dca73a195e7c4471807 /backends/midi/mt32/synth.cpp | |
parent | 0d951de5e952e03ce67d4272ff025adda1522194 (diff) | |
download | scummvm-rg350-6c84bbf2bd808c7e72cdcc9e5d5f68562916606b.tar.gz scummvm-rg350-6c84bbf2bd808c7e72cdcc9e5d5f68562916606b.tar.bz2 scummvm-rg350-6c84bbf2bd808c7e72cdcc9e5d5f68562916606b.zip |
- Cleanup.
- Signedness fix.
- Changed partial age to 32-bit... They don't exactly run until the heat-death of the universe.
svn-id: r15943
Diffstat (limited to 'backends/midi/mt32/synth.cpp')
-rw-r--r-- | backends/midi/mt32/synth.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/backends/midi/mt32/synth.cpp b/backends/midi/mt32/synth.cpp index 40812feef6..ef0766018c 100644 --- a/backends/midi/mt32/synth.cpp +++ b/backends/midi/mt32/synth.cpp @@ -278,7 +278,7 @@ bool Synth::loadPCMROM(const char *filename) { return rc; } -struct TempPCMStruct +struct ControlROMPCMStruct { Bit8u pos; Bit8u len; @@ -287,7 +287,7 @@ struct TempPCMStruct }; void Synth::initPCMList() { - TempPCMStruct *tps = (TempPCMStruct *)&controlROMData[0x3000]; + ControlROMPCMStruct *tps = (ControlROMPCMStruct *)&controlROMData[0x3000]; for (int i = 0; i < 128; i++) { int rAddr = tps[i].pos * 0x800; int rLenExp = (tps[i].len & 0x70) >> 4; @@ -322,11 +322,10 @@ void Synth::initRhythmTimbre(int timbreNum, const Bit8u *mem) { } void Synth::initRhythmTimbres() { - //TempPCMStruct *tps = (TempPCMStruct *)&controlROMData[0x3000]; - //const Bit8u *drumMap = &controlROMData[0x3200]; + const Bit8u *drumMap = &controlROMData[0x3200]; int timbreNum = 192; - for (Bit16u i = 0x3200; i < 0x323C; i += 2) { - Bit16u address = (controlROMData[i + 1] << 8) | controlROMData[i]; + for (Bit16u i = 0; i < 60; i += 2) { + Bit16u address = (drumMap[i + 1] << 8) | drumMap[i]; initRhythmTimbre(timbreNum++, &controlROMData[address]); } } |