[Scummvm-cvs-logs] SF.net SVN: scummvm:[43506] scummvm/branches/gsoc2009-mods/sound/mods/tfmx. cpp
nolange at users.sourceforge.net
nolange at users.sourceforge.net
Tue Aug 18 13:48:38 CEST 2009
Revision: 43506
http://scummvm.svn.sourceforge.net/scummvm/?rev=43506&view=rev
Author: nolange
Date: 2009-08-18 11:48:38 +0000 (Tue, 18 Aug 2009)
Log Message:
-----------
dont keep some unused parts of the mdatfile in memory
Modified Paths:
--------------
scummvm/branches/gsoc2009-mods/sound/mods/tfmx.cpp
Modified: scummvm/branches/gsoc2009-mods/sound/mods/tfmx.cpp
===================================================================
--- scummvm/branches/gsoc2009-mods/sound/mods/tfmx.cpp 2009-08-18 11:34:55 UTC (rev 43505)
+++ scummvm/branches/gsoc2009-mods/sound/mods/tfmx.cpp 2009-08-18 11:48:38 UTC (rev 43506)
@@ -939,7 +939,7 @@
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 @@
// 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 @@
// 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];
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