diff options
author | md5 | 2011-05-13 16:12:52 +0300 |
---|---|---|
committer | md5 | 2011-05-13 16:12:52 +0300 |
commit | bd2bfe85c97189e72199e5d0554ec4bd192a80b2 (patch) | |
tree | 3fd31dc25242678cc1080fa01c24720dc08c5605 /engines/sci/sound | |
parent | 9ec64a66fe2f20eb1be0811b5f733332efff1b93 (diff) | |
download | scummvm-rg350-bd2bfe85c97189e72199e5d0554ec4bd192a80b2.tar.gz scummvm-rg350-bd2bfe85c97189e72199e5d0554ec4bd192a80b2.tar.bz2 scummvm-rg350-bd2bfe85c97189e72199e5d0554ec4bd192a80b2.zip |
SCI: Don't include several debug tables when REDUCE_MEMORY_USAGE is defined
Diffstat (limited to 'engines/sci/sound')
-rw-r--r-- | engines/sci/sound/drivers/gm_names.h | 7 | ||||
-rw-r--r-- | engines/sci/sound/drivers/midi.cpp | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/engines/sci/sound/drivers/gm_names.h b/engines/sci/sound/drivers/gm_names.h index 915996e4f7..bfe5ff88c7 100644 --- a/engines/sci/sound/drivers/gm_names.h +++ b/engines/sci/sound/drivers/gm_names.h @@ -25,6 +25,11 @@ namespace Sci { +// These tables are only used for debugging. Don't include them for devices +// with not enough available memory (e.g. phones), where REDUCE_MEMORY_USAGE +// is defined +#ifndef REDUCE_MEMORY_USAGE + static const char *GmInstrumentNames[] = { /*000*/ "Acoustic Grand Piano", /*001*/ "Bright Acoustic Piano", @@ -212,6 +217,8 @@ static const char *GmPercussionNames[] = { /*81*/ "Open Triangle" }; +#endif // REDUCE_MEMORY_USAGE + } // End of namespace Sci #endif // SCI_SOUND_DRIVERS_GM_NAMES_H diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp index ac240769c0..93a2308410 100644 --- a/engines/sci/sound/drivers/midi.cpp +++ b/engines/sci/sound/drivers/midi.cpp @@ -816,11 +816,13 @@ void MidiPlayer_Midi::mapMt32ToGm(byte *data, size_t size) { if (_patchMap[i] == MIDI_UNMAPPED) { debugC(kDebugLevelSound, "[Unmapped]"); } else { +#ifndef REDUCE_MEMORY_USAGE if (_patchMap[i] >= 128) { debugC(kDebugLevelSound, "%s [Rhythm]", GmPercussionNames[_patchMap[i] - 128]); } else { debugC(kDebugLevelSound, "%s", GmInstrumentNames[_patchMap[i]]); } +#endif } _keyShift[i] = CLIP<uint8>(keyshift, 0, 48) - 24; @@ -852,10 +854,12 @@ void MidiPlayer_Midi::mapMt32ToGm(byte *data, size_t size) { } } +#ifndef REDUCE_MEMORY_USAGE if (_percussionMap[ins] == MIDI_UNMAPPED) debugC(kDebugLevelSound, "[Unmapped]"); else debugC(kDebugLevelSound, "%s", GmPercussionNames[_percussionMap[ins]]); +#endif _percussionVelocityScale[ins] = *(data + pos + 4 * i + 3) * 127 / 100; } |