More IMuse cleanup
svn-id: r7578
This commit is contained in:
parent
0ece527a69
commit
053e7cb71e
3 changed files with 9 additions and 12 deletions
|
@ -21,12 +21,10 @@
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "scumm/scumm.h"
|
#include "scumm/scumm.h"
|
||||||
#include "sound/fmopl.h"
|
|
||||||
#include "sound/mididrv.h"
|
#include "sound/mididrv.h"
|
||||||
#include "scumm/imuse.h"
|
#include "scumm/imuse.h"
|
||||||
#include "scumm/instrument.h"
|
#include "scumm/instrument.h"
|
||||||
#include "scumm/saveload.h"
|
#include "scumm/saveload.h"
|
||||||
#include "scumm/sound.h"
|
|
||||||
#include "common/util.h"
|
#include "common/util.h"
|
||||||
|
|
||||||
// Unremark this statement to activate some of
|
// Unremark this statement to activate some of
|
||||||
|
@ -382,7 +380,7 @@ public:
|
||||||
}
|
}
|
||||||
~IMuseInternal();
|
~IMuseInternal();
|
||||||
|
|
||||||
int initialize(OSystem *syst, MidiDriver *midi, SoundMixer *mixer);
|
int initialize(OSystem *syst, MidiDriver *midi);
|
||||||
void reallocateMidiChannels (MidiDriver *midi);
|
void reallocateMidiChannels (MidiDriver *midi);
|
||||||
void setGlobalAdlibInstrument (byte slot, byte *data);
|
void setGlobalAdlibInstrument (byte slot, byte *data);
|
||||||
void copyGlobalAdlibInstrument (byte slot, Instrument *dest);
|
void copyGlobalAdlibInstrument (byte slot, Instrument *dest);
|
||||||
|
@ -408,7 +406,7 @@ public:
|
||||||
|
|
||||||
uint32 property(int prop, uint32 value);
|
uint32 property(int prop, uint32 value);
|
||||||
|
|
||||||
static IMuseInternal *create(OSystem *syst, MidiDriver *midi, SoundMixer *mixer);
|
static IMuseInternal *create(OSystem *syst, MidiDriver *midi);
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////
|
////////////////////////////////////////
|
||||||
|
@ -1615,13 +1613,13 @@ void IMuseInternal::setBase(byte **base) {
|
||||||
_base_sounds = base;
|
_base_sounds = base;
|
||||||
}
|
}
|
||||||
|
|
||||||
IMuseInternal *IMuseInternal::create(OSystem *syst, MidiDriver *midi, SoundMixer *mixer) {
|
IMuseInternal *IMuseInternal::create(OSystem *syst, MidiDriver *midi) {
|
||||||
IMuseInternal *i = new IMuseInternal;
|
IMuseInternal *i = new IMuseInternal;
|
||||||
i->initialize(syst, midi, mixer);
|
i->initialize(syst, midi);
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
int IMuseInternal::initialize(OSystem *syst, MidiDriver *midi, SoundMixer *mixer) {
|
int IMuseInternal::initialize(OSystem *syst, MidiDriver *midi) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (midi == NULL)
|
if (midi == NULL)
|
||||||
|
@ -3416,8 +3414,8 @@ uint32 IMuse::property(int prop, uint32 value) { in(); uint32 ret = _target->pro
|
||||||
// The IMuse::create method provides a front-end factory
|
// The IMuse::create method provides a front-end factory
|
||||||
// for creating IMuseInternal without exposing that class
|
// for creating IMuseInternal without exposing that class
|
||||||
// to the client.
|
// to the client.
|
||||||
IMuse *IMuse::create (OSystem *syst, MidiDriver *midi, SoundMixer *mixer) {
|
IMuse *IMuse::create (OSystem *syst, MidiDriver *midi) {
|
||||||
IMuseInternal *engine = IMuseInternal::create (syst, midi, mixer);
|
IMuseInternal *engine = IMuseInternal::create (syst, midi);
|
||||||
if (midi)
|
if (midi)
|
||||||
midi->property (MidiDriver::PROP_SMALLHEADER, (g_scumm->_features & GF_SMALL_HEADER) ? 1 : 0);
|
midi->property (MidiDriver::PROP_SMALLHEADER, (g_scumm->_features & GF_SMALL_HEADER) ? 1 : 0);
|
||||||
return new IMuse (syst, engine);
|
return new IMuse (syst, engine);
|
||||||
|
|
|
@ -65,8 +65,7 @@ public:
|
||||||
uint32 property(int prop, uint32 value);
|
uint32 property(int prop, uint32 value);
|
||||||
|
|
||||||
// Factory methods
|
// Factory methods
|
||||||
static IMuse *create(OSystem *syst, MidiDriver *midi, SoundMixer *mixer);
|
static IMuse *create(OSystem *syst, MidiDriver *midi);
|
||||||
static IMuse *create_midi(OSystem *syst, MidiDriver *midi) { return create(syst, midi, NULL); }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -600,7 +600,7 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst)
|
||||||
_imuse = NULL;
|
_imuse = NULL;
|
||||||
} else {
|
} else {
|
||||||
_imuseDigital = NULL;
|
_imuseDigital = NULL;
|
||||||
_imuse = IMuse::create_midi(syst, detector->createMidi());
|
_imuse = IMuse::create (syst, detector->createMidi());
|
||||||
if (_imuse) {
|
if (_imuse) {
|
||||||
if (detector->_gameTempo != 0)
|
if (detector->_gameTempo != 0)
|
||||||
_imuse->property(IMuse::PROP_TEMPO_BASE, detector->_gameTempo);
|
_imuse->property(IMuse::PROP_TEMPO_BASE, detector->_gameTempo);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue