[Scummvm-git-logs] scummvm master -> 72bf7f2cb5244ae86bb44736d66a77bd30feb56c
neuromancer
noreply at scummvm.org
Sat Mar 5 07:47:44 UTC 2022
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:
72bf7f2cb5 HYPNO: added credits after last level in wet
Commit: 72bf7f2cb5244ae86bb44736d66a77bd30feb56c
https://github.com/scummvm/scummvm/commit/72bf7f2cb5244ae86bb44736d66a77bd30feb56c
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-03-05T08:46:43+01:00
Commit Message:
HYPNO: added credits after last level in wet
Changed paths:
engines/hypno/arcade.cpp
engines/hypno/hypno.h
engines/hypno/wet/wet.cpp
diff --git a/engines/hypno/arcade.cpp b/engines/hypno/arcade.cpp
index 62fdffd06de..7804daaaf43 100644
--- a/engines/hypno/arcade.cpp
+++ b/engines/hypno/arcade.cpp
@@ -229,8 +229,16 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
if (event.kbd.keycode == Common::KEYCODE_c) {
background.decoder->pauseVideo(true);
showCredits();
+
+ if (transition && !arc->transitionPalette.empty())
+ loadPalette(arc->transitionPalette);
+ else
+ loadPalette(arc->backgroundPalette);
+
changeScreenMode("320x200");
background.decoder->pauseVideo(false);
+ updateScreen(background);
+ drawScreen();
} else if (event.kbd.keycode == Common::KEYCODE_k) { // Added for testing
_health = 0;
} else if (event.kbd.keycode == Common::KEYCODE_LEFT) {
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index 843c92b0e9f..704b0fdf5cb 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -320,6 +320,7 @@ public:
private:
void runMainMenu(Code *code);
void runCheckLives(Code *code);
+ void endCredits(Code *code);
Common::BitArray _font05;
Common::BitArray _font08;
diff --git a/engines/hypno/wet/wet.cpp b/engines/hypno/wet/wet.cpp
index 605fa258300..5374294d978 100644
--- a/engines/hypno/wet/wet.cpp
+++ b/engines/hypno/wet/wet.cpp
@@ -259,6 +259,9 @@ void WetEngine::loadAssetsFullGame() {
Code *check_lives = new Code("<check_lives>");
_levels["<check_lives>"] = check_lives;
+ Code *end_credits = new Code("<credits>");
+ _levels["<credits>"] = end_credits;
+
loadArcadeLevel("c110.mi_", "c10", "<check_lives>", "");
loadArcadeLevel("c111.mi_", "c10", "<check_lives>", "");
loadArcadeLevel("c112.mi_", "c10", "<check_lives>", "");
@@ -359,9 +362,9 @@ void WetEngine::loadAssetsFullGame() {
loadArcadeLevel("c611.mi_", "c60", "<check_lives>", "");
loadArcadeLevel("c612.mi_", "c60", "<check_lives>", "");
- loadArcadeLevel("c600.mi_", "<quit>", "<check_lives>", "");
- loadArcadeLevel("c601.mi_", "<quit>", "<check_lives>", "");
- loadArcadeLevel("c602.mi_", "<quit>", "<check_lives>", "");
+ loadArcadeLevel("c600.mi_", "<credits>", "<check_lives>", "");
+ loadArcadeLevel("c601.mi_", "<credits>", "<check_lives>", "");
+ loadArcadeLevel("c602.mi_", "<credits>", "<check_lives>", "");
loadLib("", "c_misc/fonts.lib", true);
loadFonts();
@@ -376,17 +379,24 @@ void WetEngine::showCredits() {
}
if (!isDemo() || _variant == "Demo") {
- MVideo video("c_misc/credits.smk", Common::Point(0, 0), false, false, false);
+ MVideo video("c_misc/credits.smk", Common::Point(0, 0), false, true, false);
runIntro(video);
}
}
+void WetEngine::endCredits(Code *code) {
+ showCredits();
+ _nextLevel = "<main_menu>";
+}
+
void WetEngine::runCode(Code *code) {
changeScreenMode("320x200");
if (code->name == "<main_menu>")
runMainMenu(code);
else if (code->name == "<check_lives>")
runCheckLives(code);
+ else if (code->name == "<credits>")
+ endCredits(code);
else
error("invalid hardcoded level: %s", code->name.c_str());
}
More information about the Scummvm-git-logs
mailing list