aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
authoruruk2014-03-07 18:24:45 +0100
committeruruk2014-03-07 18:24:58 +0100
commit5b9cb372cd3705dd0776e7f431dc98ecff270256 (patch)
treeae5231a0baaf57c710935b96b68b9e4e439aa543 /engines/avalanche
parentfbc63ebd684088ddd8c65f13edf63c708dfa8881 (diff)
downloadscummvm-rg350-5b9cb372cd3705dd0776e7f431dc98ecff270256.tar.gz
scummvm-rg350-5b9cb372cd3705dd0776e7f431dc98ecff270256.tar.bz2
scummvm-rg350-5b9cb372cd3705dd0776e7f431dc98ecff270256.zip
AVALANCHE: Implement Parser::bossKey().
Revise some other parts of the engine during the process.
Diffstat (limited to 'engines/avalanche')
-rw-r--r--engines/avalanche/avalanche.h1
-rw-r--r--engines/avalanche/avalot.cpp12
-rw-r--r--engines/avalanche/background.cpp2
-rw-r--r--engines/avalanche/background.h2
-rw-r--r--engines/avalanche/dropdown.cpp4
-rw-r--r--engines/avalanche/parser.cpp22
-rw-r--r--engines/avalanche/parser.h1
7 files changed, 34 insertions, 10 deletions
diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h
index fcca396fd2..146065ad63 100644
--- a/engines/avalanche/avalanche.h
+++ b/engines/avalanche/avalanche.h
@@ -236,6 +236,7 @@ public:
bool _isLoaded; // Is it a loaded gamestate?
void callVerb(VerbCode id);
+ void loadBackground(byte num);
void loadRoom(byte num);
void thinkAbout(byte object, bool type); // Hey!!! Get it and put it!!!
void incScore(byte num); // Add on no. of points
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp
index 8f619e6a13..e855c71fcf 100644
--- a/engines/avalanche/avalot.cpp
+++ b/engines/avalanche/avalot.cpp
@@ -416,9 +416,7 @@ void AvalancheEngine::loadAlso(byte num) {
}
}
-void AvalancheEngine::loadRoom(byte num) {
- CursorMan.showMouse(false);
-
+void AvalancheEngine::loadBackground(byte num) {
Common::String filename = Common::String::format("place%d.avd", num);
Common::File file;
if (!file.open(filename))
@@ -440,9 +438,15 @@ void AvalancheEngine::loadRoom(byte num) {
_graphics->refreshBackground();
file.close();
+}
+void AvalancheEngine::loadRoom(byte num) {
+ CursorMan.showMouse(false);
+
+ loadBackground(num);
loadAlso(num);
- _background->load(num);
+ _background->loadSprites(num);
+
CursorMan.showMouse(true);
}
diff --git a/engines/avalanche/background.cpp b/engines/avalanche/background.cpp
index c3d6ac3481..f1ba659a55 100644
--- a/engines/avalanche/background.cpp
+++ b/engines/avalanche/background.cpp
@@ -261,7 +261,7 @@ void Background::update() {
}
}
-void Background::load(byte number) {
+void Background::loadSprites(byte number) {
Common::File f;
_filename = _filename.format("chunk%d.avd", number);
if (!f.open(_filename))
diff --git a/engines/avalanche/background.h b/engines/avalanche/background.h
index 98d6d36fed..e994d9eae9 100644
--- a/engines/avalanche/background.h
+++ b/engines/avalanche/background.h
@@ -51,7 +51,7 @@ public:
~Background();
void update();
- void load(byte number);
+ void loadSprites(byte number);
void release();
// Setting the destination to negative coordinates means the picture should be drawn to it's original position.
diff --git a/engines/avalanche/dropdown.cpp b/engines/avalanche/dropdown.cpp
index 0bc1f7eb8b..7c0529811e 100644
--- a/engines/avalanche/dropdown.cpp
+++ b/engines/avalanche/dropdown.cpp
@@ -405,8 +405,8 @@ Common::String DropDownMenu::selectGender(byte x) {
void DropDownMenu::setupMenuGame() {
_activeMenuItem.reset();
_activeMenuItem.setupOption("Help...", 'H', "f1", true);
- _activeMenuItem.setupOption("Boss Key", 'B', "alt-B", false);
- _activeMenuItem.setupOption("Untrash screen", 'U', "ctrl-f7", true);
+ _activeMenuItem.setupOption("Boss Key", 'B', "alt-B", true);
+ _activeMenuItem.setupOption("Untrash screen", 'U', "ctrl-f7", false);
_activeMenuItem.setupOption("Score and rank", 'S', "f9", true);
_activeMenuItem.setupOption("About Avvy...", 'A', "shift-f10", true);
_activeMenuItem.display();
diff --git a/engines/avalanche/parser.cpp b/engines/avalanche/parser.cpp
index 44e8dde9ae..7db0d14890 100644
--- a/engines/avalanche/parser.cpp
+++ b/engines/avalanche/parser.cpp
@@ -2052,8 +2052,7 @@ void Parser::doThat() {
_vm->_dialogs->displayText("Hello, Phaon!");
break;
case kVerbCodeBoss:
- // bosskey();
- warning("STUB: Parser::doThat() - case kVerbCodeboss");
+ bossKey();
break;
case kVerbCodePee:
if (_vm->getFlag('P')) {
@@ -2426,6 +2425,25 @@ void Parser::doThat() {
}
}
+void Parser::bossKey() {
+ _vm->_graphics->saveScreen();
+ _vm->_graphics->blackOutScreen();
+ _vm->_graphics->loadMouse(kCurUpArrow);
+ _vm->loadBackground(98);
+ _vm->_graphics->drawNormalText("Graph/Histo/Draw/Sample: \"JANJUN93.GRA\": (W3-AB3)", _vm->_font, 8, 120, 169, kColorDarkgray);
+ _vm->_graphics->drawNormalText("Press any key or click the mouse to return.", _vm->_font, 8, 144, 182, kColorDarkgray);
+ _vm->_graphics->refreshScreen();
+ Common::Event event;
+ _vm->getEvent(event);
+ while ((!_vm->shouldQuit()) && (event.type != Common::EVENT_KEYDOWN) && (event.type != Common::EVENT_LBUTTONDOWN)){
+ _vm->getEvent(event);
+ _vm->_graphics->refreshScreen();
+ }
+ _vm->_graphics->restoreScreen();
+ _vm->_graphics->removeBackup();
+ _vm->loadBackground(_vm->_room);
+}
+
void Parser::verbOpt(byte verb, Common::String &answer, char &ansKey) {
// kVerbCodegive isn't dealt with by this procedure, but by ddm__with.
switch (verb) {
diff --git a/engines/avalanche/parser.h b/engines/avalanche/parser.h
index 46408f518a..6a15fb2387 100644
--- a/engines/avalanche/parser.h
+++ b/engines/avalanche/parser.h
@@ -146,6 +146,7 @@ private:
void playHarp();
void winSequence();
void wipeText();
+ void bossKey();
};
} // End of namespace Avalanche