[Scummvm-git-logs] scummvm master -> d836707b120e037ac419e649f1c8a1628f0d6582
neuromancer
noreply at scummvm.org
Wed May 4 21:39:34 UTC 2022
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
b79e10766f HYPNO: added new demo variant for wet
d836707b12 HYPNO: added another non-interactive demo for wet
Commit: b79e10766f5cef51f2fcc1033b40feba7b6ff27a
https://github.com/scummvm/scummvm/commit/b79e10766f5cef51f2fcc1033b40feba7b6ff27a
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-04T21:42:00+02:00
Commit Message:
HYPNO: added new demo variant for wet
Changed paths:
engines/hypno/detection.cpp
engines/hypno/hypno.h
engines/hypno/wet/arcade.cpp
engines/hypno/wet/wet.cpp
diff --git a/engines/hypno/detection.cpp b/engines/hypno/detection.cpp
index 658bba939f0..cdaf1d19d90 100644
--- a/engines/hypno/detection.cpp
+++ b/engines/hypno/detection.cpp
@@ -131,6 +131,17 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_TESTING | ADGF_DEMO,
GUIO1(GUIO_NOMIDI)
},
+ {
+ "wetlands", // Génération 4 (FR) - Number 81 (October 1995) - Chapters 31/52 demo
+ "Gen4",
+ AD_ENTRY2s("wetlands.exe", "15a6b1b3819ef002438df340509b5373", 629503,
+ "missions.lib", "34b922fac8f64546c0690aa83f09e98e", 40891),
+ Common::EN_USA,
+ Common::kPlatformDOS,
+ ADGF_TESTING | ADGF_DEMO,
+ GUIO1(GUIO_NOMIDI)
+ },
+
{
"wetlands", // Non Interactive demo featured in several game magazines
"NonInteractive",
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index 372f9086291..a92b235dbcc 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -381,6 +381,7 @@ public:
void loadAssets() override;
void loadAssetsDemoDisc();
+ void loadAssetsGen4();
void loadAssetsPCW();
void loadAssetsPCG();
void loadAssetsFullGame();
diff --git a/engines/hypno/wet/arcade.cpp b/engines/hypno/wet/arcade.cpp
index 21564fb44a1..40933ae30c3 100644
--- a/engines/hypno/wet/arcade.cpp
+++ b/engines/hypno/wet/arcade.cpp
@@ -387,7 +387,7 @@ void WetEngine::runAfterArcade(ArcadeShooting *arc) {
if (isDemo() && _variant != "Demo" && _restoredContentEnabled) {
showDemoScore();
- } else if (!isDemo() || _variant == "Demo") {
+ } else if (!isDemo() || _variant == "Demo" || _variant == "Gen4") {
byte *palette;
Graphics::Surface *frame = decodeFrame("c_misc/zones.smk", 12, &palette);
loadPalette(palette, 0, 256);
diff --git a/engines/hypno/wet/wet.cpp b/engines/hypno/wet/wet.cpp
index 01fbc9fb24f..50c2feb7364 100644
--- a/engines/hypno/wet/wet.cpp
+++ b/engines/hypno/wet/wet.cpp
@@ -93,6 +93,8 @@ void WetEngine::loadAssets() {
if (_variant == "Demo" || _variant == "DemoHebrew")
loadAssetsDemoDisc();
+ else if (_variant == "Gen4")
+ loadAssetsGen4();
else if (_variant == "PCWDemo")
loadAssetsPCW();
else if (_variant == "PCGDemo")
@@ -203,6 +205,37 @@ void WetEngine::loadAssetsDemoDisc() {
_nextLevel = "<start>";
}
+void WetEngine::loadAssetsGen4() {
+
+ bool encrypted = false;
+ LibFile *missions = loadLib("", "c_misc/missions.lib", encrypted);
+ Common::ArchiveMemberList files;
+ if (missions->listMembers(files) == 0)
+ error(failedDetectionError);
+
+ Transition *intro;
+ intro = new Transition("c31.mis");
+
+ intro->intros.push_back("c_misc/nw_logo.smk");
+ intro->intros.push_back("c_misc/h.s");
+ intro->intros.push_back("c_misc/w.s");
+ intro->frameImage = "c_misc/c.s";
+ intro->frameNumber = 0;
+ _levels["<start>"] = intro;
+
+ loadArcadeLevel("c31.mis", "c52.mis", "c52.mis", "");
+ loadArcadeLevel("c52.mis", "<game_over>", "<quit>", "");
+
+ Transition *over = new Transition("<quit>");
+ over->intros.push_back("c_misc/g.s");
+ _levels["<game_over>"] = over;
+
+ loadLib("", "c_misc/fonts.lib", true);
+ loadFonts();
+ loadLib("sound/", "c_misc/sound.lib", true);
+ _nextLevel = "<start>";
+}
+
void WetEngine::loadAssetsNI() {
playSound("wetmusic.81m", 0, 11025);
Transition *movies = new Transition("<quit>");
Commit: d836707b120e037ac419e649f1c8a1628f0d6582
https://github.com/scummvm/scummvm/commit/d836707b120e037ac419e649f1c8a1628f0d6582
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-05-04T23:40:01+02:00
Commit Message:
HYPNO: added another non-interactive demo for wet
Changed paths:
engines/hypno/detection.cpp
engines/hypno/grammar.h
engines/hypno/hypno.cpp
engines/hypno/hypno.h
engines/hypno/wet/wet.cpp
diff --git a/engines/hypno/detection.cpp b/engines/hypno/detection.cpp
index cdaf1d19d90..f3965c79ef5 100644
--- a/engines/hypno/detection.cpp
+++ b/engines/hypno/detection.cpp
@@ -141,9 +141,8 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_TESTING | ADGF_DEMO,
GUIO1(GUIO_NOMIDI)
},
-
{
- "wetlands", // Non Interactive demo featured in several game magazines
+ "wetlands", // Non Interactive: PC Review 49 (November 1995)
"NonInteractive",
AD_ENTRY2s("playsmks.exe", "edc5b0c0caf3d5b01d344cb555d9a085", 422607,
"wetmusic.81m", "0d99c63ce19633d09569b1fdcdff1505", 2833439),
@@ -152,6 +151,16 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_TESTING | ADGF_DEMO,
GUIO1(GUIO_NOMIDI)
},
+ {
+ "wetlands", // Non Interactive: Joystick HS 7 (September 1995)
+ "NonInteractiveJoystick",
+ AD_ENTRY2s("playsmks.exe", "edc5b0c0caf3d5b01d344cb555d9a085", 422607,
+ "c44_22k.raw", "4b2279af59ce3049cc5177b0047e8447", 5247618),
+ Common::EN_USA,
+ Common::kPlatformDOS,
+ ADGF_TESTING | ADGF_DEMO,
+ GUIO1(GUIO_NOMIDI)
+ },
{
"wetlands", // Wetlands (US)
nullptr,
diff --git a/engines/hypno/grammar.h b/engines/hypno/grammar.h
index 95da7c5577e..fd0133d5cff 100644
--- a/engines/hypno/grammar.h
+++ b/engines/hypno/grammar.h
@@ -339,6 +339,7 @@ public:
Level() {
type = CodeLevel;
musicRate = 22050;
+ playMusicDuringIntro = false;
}
virtual ~Level() {} // needed to make Level polymorphic
LevelType type;
@@ -346,6 +347,7 @@ public:
Filename prefix;
Filename levelIfWin;
Filename levelIfLose;
+ bool playMusicDuringIntro;
Filename music;
uint32 musicRate;
};
diff --git a/engines/hypno/hypno.cpp b/engines/hypno/hypno.cpp
index 5719d80d33a..c82ae2685ab 100644
--- a/engines/hypno/hypno.cpp
+++ b/engines/hypno/hypno.cpp
@@ -55,7 +55,7 @@ HypnoEngine::HypnoEngine(OSystem *syst, const ADGameDescription *gd)
_countdown(0), _timerStarted(false), _score(0), _lives(0),
_defaultCursor(""), _checkpoint(""), _skipDefeatVideo(false),
_background(nullptr), _masks(nullptr), _ammo(0), _maxAmmo(0),
- _screenW(0), _screenH(0) { // Every games initializes its own resolution
+ _doNotStopSounds(false), _screenW(0), _screenH(0) { // Every games initializes its own resolution
_rnd = new Common::RandomSource("hypno");
if (gd->extra)
@@ -172,12 +172,20 @@ void HypnoEngine::runLevel(Common::String &name) {
// Play intros
disableCursor();
+
+ if (_levels[name]->playMusicDuringIntro && !_levels[name]->music.empty()) {
+ playSound(_levels[name]->music, 0, _levels[name]->musicRate);
+ _doNotStopSounds = true;
+ }
+
debug("Number of videos to play: %d", _levels[name]->intros.size());
for (Filenames::iterator it = _levels[name]->intros.begin(); it != _levels[name]->intros.end(); ++it) {
MVideo v(*it, Common::Point(0, 0), false, true, false);
runIntro(v);
}
+ _doNotStopSounds = false;
+
if (_levels[name]->type == TransitionLevel) {
debugC(1, kHypnoDebugScene, "Executing transition level %s", name.c_str());
runTransition((Transition *)_levels[name]);
@@ -204,7 +212,8 @@ void HypnoEngine::runLevel(Common::String &name) {
void HypnoEngine::runIntros(Videos &videos) {
debugC(1, kHypnoDebugScene, "Starting run intros with %d videos!", videos.size());
Common::Event event;
- stopSound();
+ if (!_doNotStopSounds)
+ stopSound();
bool skip = false;
int clicked[3] = {-1, -1, -1};
int clicks = 0;
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index a92b235dbcc..1f827c2f337 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -236,6 +236,7 @@ public:
// Sounds
Filename _soundPath;
Filename _music;
+ bool _doNotStopSounds;
void playSound(const Filename &filename, uint32 loops, uint32 sampleRate = 22050);
void stopSound();
diff --git a/engines/hypno/wet/wet.cpp b/engines/hypno/wet/wet.cpp
index 50c2feb7364..b3e7619c4f7 100644
--- a/engines/hypno/wet/wet.cpp
+++ b/engines/hypno/wet/wet.cpp
@@ -99,7 +99,7 @@ void WetEngine::loadAssets() {
loadAssetsPCW();
else if (_variant == "PCGDemo")
loadAssetsPCG();
- else if (_variant == "NonInteractive")
+ else if (_variant == "NonInteractive" || _variant == "NonInteractiveJoystick")
loadAssetsNI();
else
error("Invalid demo version: \"%s\"", _variant.c_str());
@@ -237,8 +237,13 @@ void WetEngine::loadAssetsGen4() {
}
void WetEngine::loadAssetsNI() {
- playSound("wetmusic.81m", 0, 11025);
+ Common::String musicFile = _variant == "NonInteractive" ? "wetmusic.81m" : "c44_22k.raw";
+ int musicRate = _variant == "NonInteractive" ? 11025 : 22050;
+
Transition *movies = new Transition("<quit>");
+ movies->music = musicFile;
+ movies->musicRate = musicRate;
+ movies->playMusicDuringIntro = true;
movies->intros.push_back("demo/nw_logo.smk");
movies->intros.push_back("demo/hypnotix.smk");
movies->intros.push_back("demo/wetlogo.smk");
More information about the Scummvm-git-logs
mailing list