aboutsummaryrefslogtreecommitdiff
path: root/engines/access
diff options
context:
space:
mode:
authorStrangerke2015-02-10 07:53:31 +0100
committerStrangerke2015-02-10 07:53:31 +0100
commita54bb5e3515d4fb3630fd6ae1a9727ddc1230e19 (patch)
treeee5bed920ed6432502dba7b07deb9f873789d08a /engines/access
parentbdf3042174d9c91106304f18358421e3ade5ee7b (diff)
downloadscummvm-rg350-a54bb5e3515d4fb3630fd6ae1a9727ddc1230e19.tar.gz
scummvm-rg350-a54bb5e3515d4fb3630fd6ae1a9727ddc1230e19.tar.bz2
scummvm-rg350-a54bb5e3515d4fb3630fd6ae1a9727ddc1230e19.zip
ACCESS: MM - Implement cmdSpecial0
Diffstat (limited to 'engines/access')
-rw-r--r--engines/access/martian/martian_scripts.cpp43
-rw-r--r--engines/access/martian/martian_scripts.h1
-rw-r--r--engines/access/screen.cpp4
-rw-r--r--engines/access/screen.h2
4 files changed, 49 insertions, 1 deletions
diff --git a/engines/access/martian/martian_scripts.cpp b/engines/access/martian/martian_scripts.cpp
index e8eedde279..a9b5de5597 100644
--- a/engines/access/martian/martian_scripts.cpp
+++ b/engines/access/martian/martian_scripts.cpp
@@ -34,6 +34,47 @@ MartianScripts::MartianScripts(AccessEngine *vm) : Scripts(vm) {
_game = (MartianEngine *)_vm;
}
+void MartianScripts::cmdSpecial0() {
+ _vm->_sound->stopSound();
+ _vm->_midi->stopSong();
+
+ _vm->_midi->loadMusic(47, 1);
+ _vm->_midi->midiPlay();
+ _vm->_midi->setLoop(true);
+
+ _vm->_events->_vbCount = 300;
+ while (!_vm->shouldQuit() && _vm->_events->_vbCount > 0)
+ _vm->_events->pollEventsAndWait();
+
+ _vm->_screen->forceFadeOut();
+ _vm->_files->loadScreen("HOUSE.SC");
+
+ _vm->_video->setVideo(_vm->_screen, Common::Point(46, 30), "HVID.VID", 20);
+
+ do {
+ _vm->_video->playVideo();
+ if (_vm->_video->_videoFrame == 4) {
+ _vm->_screen->flashPalette(16);
+ _vm->_sound->playSound(4);
+ do {
+ _vm->_events->pollEvents();
+ } while (!_vm->shouldQuit() && _vm->_sound->_playingSound);
+ _vm->_timers[31]._timer = _vm->_timers[31]._initTm = 40;
+ }
+ } while (!_vm->_video->_videoEnd && !_vm->shouldQuit());
+
+ if (_vm->_video->_videoEnd) {
+ _vm->_screen->flashPalette(12);
+ _vm->_sound->playSound(4);
+ do {
+ _vm->_events->pollEvents();
+ } while (!_vm->shouldQuit() && _vm->_sound->_playingSound);
+ _vm->_midi->stopSong();
+ _vm->_midi->freeMusic();
+ warning("TODO: Pop Midi");
+ }
+}
+
void MartianScripts::cmdSpecial1(int param1) {
_vm->_events->hideCursor();
@@ -261,7 +302,7 @@ void MartianScripts::cmdSpecial7() {
void MartianScripts::executeSpecial(int commandIndex, int param1, int param2) {
switch (commandIndex) {
case 0:
- warning("TODO: cmdSpecial0");
+ cmdSpecial0();
break;
case 1:
cmdSpecial1(param1);
diff --git a/engines/access/martian/martian_scripts.h b/engines/access/martian/martian_scripts.h
index fb553fe6b4..9c2141276e 100644
--- a/engines/access/martian/martian_scripts.h
+++ b/engines/access/martian/martian_scripts.h
@@ -36,6 +36,7 @@ class MartianScripts : public Scripts {
private:
MartianEngine *_game;
+ void cmdSpecial0();
void cmdSpecial1(int param1);
void cmdSpecial3();
void doIntro(int param1);
diff --git a/engines/access/screen.cpp b/engines/access/screen.cpp
index 2b535b64d0..5130d8ed5f 100644
--- a/engines/access/screen.cpp
+++ b/engines/access/screen.cpp
@@ -336,6 +336,10 @@ void Screen::cyclePaletteBackwards() {
}
}
+void Screen::flashPalette(int count) {
+ warning("TODO: Implement flashPalette");
+}
+
void Screen::addDirtyRect(const Common::Rect &r) {
_dirtyRects.push_back(r);
assert(r.isValidRect() && r.width() > 0 && r.height() > 0);
diff --git a/engines/access/screen.h b/engines/access/screen.h
index a5431bcfcb..97ec59d1d1 100644
--- a/engines/access/screen.h
+++ b/engines/access/screen.h
@@ -158,6 +158,8 @@ public:
void getPalette(byte *pal);
+ void flashPalette(int count);
+
/**
* Copy a buffer to the screen
*/