SCUMM/FM-TOWNS: start rewriting audio code

- Start rewriting audio code for FM-TOWNS versions of Loom, Indy3 and Monkey Island 1 using the recently added code in towns_audio.cpp (Zak should work the same way, but I can't test, since I don't own that one).
- All sound types (pcm, euphony and cd audio) now support volume and balance control (e.g. try walking into/out of the kitchen and opening/closing the door in the Scumm Bar in Monkey Island 1 or walking into/out of the circus tent).
- Pcm sounds now support proper loop start/end and note offsets (e.g. try out the hammer sound in the forge in LOOM for example).
- some other minor improvements
- The FM-Towns versions of Indy 4 and Monkey Island 2 are not affected. I don't have Monkey Island 2, but I presume that it will work like Indy 4. Adding support for these will be a separate task, since they work quite differently.

svn-id: r52198
This commit is contained in:
Florian Kagerer 2010-08-18 21:38:43 +00:00
parent c04d3e4689
commit 29a5c6a45b
17 changed files with 771 additions and 331 deletions

View file

@ -32,6 +32,7 @@
#include "scumm/charset.h"
#include "scumm/imuse_digi/dimuse.h"
#include "scumm/imuse/imuse.h"
#include "player_towns.h"
#include "scumm/he/intern_he.h"
#include "scumm/object.h"
#include "scumm/resource.h"
@ -447,6 +448,9 @@ bool ScummEngine::loadState(int slot, bool compat) {
// Update volume settings
syncSoundSettings();
if (_townsPlayer && (hdr.ver >= VER(81)))
_townsPlayer->restoreAfterLoad();
// Init NES costume data
if (_game.platform == Common::kPlatformNES) {
if (hdr.ver < VER(47))
@ -1394,6 +1398,11 @@ void ScummEngine::saveOrLoad(Serializer *s) {
_imuse->save_or_load(s, this);
}
// Save/load FM-Towns audio status
if (_townsPlayer)
_townsPlayer->saveLoadWithSerializer(s);
//
// Save/load the charset renderer state
//