aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2009-12-19 16:05:47 +0000
committerFilippos Karapetis2009-12-19 16:05:47 +0000
commitb32748d81050f66b343b4e028207c2472de49d01 (patch)
tree3f17e749f111dc830420d98a0875dfb219e1aa47
parent87c3a9dd8dac510d07ed8e04671864b801438cf1 (diff)
downloadscummvm-rg350-b32748d81050f66b343b4e028207c2472de49d01.tar.gz
scummvm-rg350-b32748d81050f66b343b4e028207c2472de49d01.tar.bz2
scummvm-rg350-b32748d81050f66b343b4e028207c2472de49d01.zip
- Removed unused includes
- Added a new method for constructing a new MidiDriver in the Adlib driver - Added a hack to obtain the resource manager in the default open() method of the overriden Adlib MIDI driver (used in the new sound code) svn-id: r46420
-rw-r--r--engines/sci/sfx/softseq/adlib.cpp5
-rw-r--r--engines/sci/sfx/softseq/mididriver.h6
2 files changed, 9 insertions, 2 deletions
diff --git a/engines/sci/sfx/softseq/adlib.cpp b/engines/sci/sfx/softseq/adlib.cpp
index efc5c4b823..7638eb0b8d 100644
--- a/engines/sci/sfx/softseq/adlib.cpp
+++ b/engines/sci/sfx/softseq/adlib.cpp
@@ -24,7 +24,6 @@
*/
#include "sci/sci.h"
-#include "sci/sfx/iterator.h"
#include "sound/fmopl.h"
#include "sound/softsynth/emumidi.h"
@@ -812,4 +811,8 @@ MidiPlayer *MidiPlayer_Adlib_create() {
return new MidiPlayer_Adlib();
}
+MidiDriver *MidiDriver_Adlib_create() {
+ return new MidiDriver_Adlib(g_system->getMixer());
+}
+
} // End of namespace Sci
diff --git a/engines/sci/sfx/softseq/mididriver.h b/engines/sci/sfx/softseq/mididriver.h
index 01ed3f6573..cded8ab095 100644
--- a/engines/sci/sfx/softseq/mididriver.h
+++ b/engines/sci/sfx/softseq/mididriver.h
@@ -26,6 +26,7 @@
#ifndef SCI_SFX_SOFTSEQ_MIDIDRIVER_H
#define SCI_SFX_SOFTSEQ_MIDIDRIVER_H
+#include "sci/sci.h"
#include "sound/mididrv.h"
#include "sound/softsynth/emumidi.h"
#include "common/error.h"
@@ -67,7 +68,10 @@ class MidiPlayer : public MidiDriver {
protected:
MidiDriver *_driver;
public:
- int open() { return open(NULL); }
+ int open() {
+ ResourceManager *resMan = ((SciEngine *)g_engine)->getResourceManager(); // HACK
+ return open(resMan);
+ }
virtual int open(ResourceManager *resMan) { return _driver->open(); }
virtual void close() { _driver->close(); }
virtual void send(uint32 b) { _driver->send(b); }