aboutsummaryrefslogtreecommitdiff
path: root/engines/cge2/cge2.cpp
diff options
context:
space:
mode:
authoruruk2014-05-01 22:52:20 +0200
committeruruk2014-05-01 22:52:20 +0200
commit8e3bbbea7c97ac222a7f061b68fe161b455bf0f8 (patch)
tree2782f4b3daab8ec0acd851e351fc7228c94faca8 /engines/cge2/cge2.cpp
parent5b105566a5637edcf73fd6cbc690c1b3b958ff2a (diff)
downloadscummvm-rg350-8e3bbbea7c97ac222a7f061b68fe161b455bf0f8.tar.gz
scummvm-rg350-8e3bbbea7c97ac222a7f061b68fe161b455bf0f8.tar.bz2
scummvm-rg350-8e3bbbea7c97ac222a7f061b68fe161b455bf0f8.zip
CGE2: Add sound code with working MIDI parts.
Diffstat (limited to 'engines/cge2/cge2.cpp')
-rw-r--r--engines/cge2/cge2.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/engines/cge2/cge2.cpp b/engines/cge2/cge2.cpp
index 955c5eb0ea..370846faf7 100644
--- a/engines/cge2/cge2.cpp
+++ b/engines/cge2/cge2.cpp
@@ -30,6 +30,7 @@
#include "cge2/cge2.h"
#include "cge2/bitmap.h"
#include "cge2/vga13h.h"
+#include "cge2/sound.h"
namespace CGE2 {
@@ -38,21 +39,31 @@ CGE2Engine::CGE2Engine(OSystem *syst, const ADGameDescription *gameDescription)
_resman = nullptr;
_vga = nullptr;
_sprite = nullptr;
+ _midiPlayer = nullptr;
+ _fx = nullptr;
+ _sound = nullptr;
_quitFlag = false;
_bitmapPalette = nullptr;
_mode = 0;
+ _music = true;
}
void CGE2Engine::init() {
_resman = new ResourceManager();
_vga = new Vga(this);
+ _fx = new Fx(this, 16);
+ _sound = new Sound(this);
+ _midiPlayer = new MusicPlayer(this);
}
void CGE2Engine::deinit() {
delete _resman;
delete _vga;
delete _sprite;
+ delete _fx;
+ delete _sound;
+ delete _midiPlayer;
}
bool CGE2Engine::hasFeature(EngineFeature f) const {
@@ -77,11 +88,18 @@ Common::Error CGE2Engine::saveGameState(int slot, const Common::String &desc) {
}
Common::Error CGE2Engine::run() {
+ warning("STUB: CGE2Engine::run()");
+
initGraphics(kScrWidth, kScrHeight, false);
init();
- warning("STUB: CGE2Engine::run()");
+
showTitle("WELCOME");
+
+ // Temporary code to test the midi player.
+ _midiPlayer->loadMidi(1);
+ g_system->delayMillis(100000);
+
deinit();
return Common::kNoError;
}