aboutsummaryrefslogtreecommitdiff
path: root/sound/mods
diff options
context:
space:
mode:
authorNorbert Lange2009-08-18 11:48:38 +0000
committerNorbert Lange2009-08-18 11:48:38 +0000
commit56c23731e777493e368e33c2305cb7e883dc515c (patch)
tree7ef50ac30947d88c35a5abaacfed56e3cae6a743 /sound/mods
parent5e1e7d01918e694efbc2bbc64f4c67c68596ee40 (diff)
downloadscummvm-rg350-56c23731e777493e368e33c2305cb7e883dc515c.tar.gz
scummvm-rg350-56c23731e777493e368e33c2305cb7e883dc515c.tar.bz2
scummvm-rg350-56c23731e777493e368e33c2305cb7e883dc515c.zip
dont keep some unused parts of the mdatfile in memory
svn-id: r43506
Diffstat (limited to 'sound/mods')
-rw-r--r--sound/mods/tfmx.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/mods/tfmx.cpp b/sound/mods/tfmx.cpp
index ca6c277736..a7490c3f86 100644
--- a/sound/mods/tfmx.cpp
+++ b/sound/mods/tfmx.cpp
@@ -939,7 +939,7 @@ const Tfmx::MdatResource *Tfmx::loadMdatFile(Common::SeekableReadStream &musicDa
uint32 offPatternP, offMacroP;
// This is how MI`s TFMX-Player tests for unpacked Modules.
- if (!offTrackstep) { // unpacked File
+ if (offTrackstep == 0) { // unpacked File
resource->trackstepOffset = 0x600 + 0x200;
offPatternP = 0x200 + 0x200;
offMacroP = 0x400 + 0x200;
@@ -970,7 +970,7 @@ const Tfmx::MdatResource *Tfmx::loadMdatFile(Common::SeekableReadStream &musicDa
// use last PatternOffset (stored at 0x5FC in mdat) if unpacked File
// or fixed offset 0x200 if packed
- resource->sfxTableOffset = !offTrackstep ? resource->patternOffset[127] : 0x200;
+ resource->sfxTableOffset = offTrackstep ? 0x200 : resource->patternOffset[127];
// Read in macro starting offsets
musicData.seek(offMacroP);
@@ -979,7 +979,7 @@ const Tfmx::MdatResource *Tfmx::loadMdatFile(Common::SeekableReadStream &musicDa
// Read in mdat-file
// TODO: we can skip everything thats already stored in the resource-structure.
- const int32 mdatOffset = 0x200; // 0x200 is very conservative
+ const int32 mdatOffset = offTrackstep ? 0x200 : 0x600; // 0x200 is very conservative
const uint32 allocSize = (uint32)mdatSize - mdatOffset;
byte *mdatAlloc = new byte[allocSize];