[Scummvm-cvs-logs] scummvm master -> 5b9cb372cd3705dd0776e7f431dc98ecff270256

urukgit urukgit at users.noreply.github.com
Fri Mar 7 18:25:34 CET 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
5b9cb372cd AVALANCHE: Implement Parser::bossKey().


Commit: 5b9cb372cd3705dd0776e7f431dc98ecff270256
    https://github.com/scummvm/scummvm/commit/5b9cb372cd3705dd0776e7f431dc98ecff270256
Author: uruk (koppirnyo at gmail.com)
Date: 2014-03-07T18:24:58+01:00

Commit Message:
AVALANCHE: Implement Parser::bossKey().

Revise some other parts of the engine during the process.

Changed paths:
    engines/avalanche/avalanche.h
    engines/avalanche/avalot.cpp
    engines/avalanche/background.cpp
    engines/avalanche/background.h
    engines/avalanche/dropdown.cpp
    engines/avalanche/parser.cpp
    engines/avalanche/parser.h



diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h
index fcca396..146065a 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 8f619e6..e855c71 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 c3d6ac3..f1ba659 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 98d6d36..e994d9e 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 0bc1f7e..7c05298 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 44e8dde..7db0d14 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 46408f5..6a15fb2 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






More information about the Scummvm-git-logs mailing list