[Scummvm-git-logs] scummvm master -> a22e5f56632bab60ab9c6cda67bb904d261aad2b
sev-
noreply at scummvm.org
Tue Nov 22 12:30:06 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:
f8e01d687a MADS: Add detection for Once Upon a Forest
a22e5f5663 MADS: Skip some segments for the Nebular, Dragonsphere and Phantom demos
Commit: f8e01d687a758fb68d67fc25392105c5da388236
https://github.com/scummvm/scummvm/commit/f8e01d687a758fb68d67fc25392105c5da388236
Author: eientei (einstein95 at users.noreply.github.com)
Date: 2022-11-22T13:30:02+01:00
Commit Message:
MADS: Add detection for Once Upon a Forest
Changed paths:
engines/mads/audio.cpp
engines/mads/detection.cpp
engines/mads/detection.h
engines/mads/detection_tables.h
diff --git a/engines/mads/audio.cpp b/engines/mads/audio.cpp
index edadd5742c2..42b95f23014 100644
--- a/engines/mads/audio.cpp
+++ b/engines/mads/audio.cpp
@@ -54,6 +54,7 @@ void AudioPlayer::setDefaultSoundGroup() {
setSoundGroup("rex009.dsr");
break;
case GType_Dragonsphere:
+ case GType_Forest:
setSoundGroup("drag009.dsr");
break;
case GType_Phantom:
diff --git a/engines/mads/detection.cpp b/engines/mads/detection.cpp
index 33aee907255..5658d1c2bcf 100644
--- a/engines/mads/detection.cpp
+++ b/engines/mads/detection.cpp
@@ -32,6 +32,7 @@ static const PlainGameDescriptor MADSGames[] = {
{"dragonsphere", "Dragonsphere"},
{"nebular", "Rex Nebular and the Cosmic Gender Bender"},
{"phantom", "Return of the Phantom"},
+ {"forest", "Once Upon a Forest"},
{nullptr, nullptr}
};
diff --git a/engines/mads/detection.h b/engines/mads/detection.h
index 476491cf6c0..84491a5b037 100644
--- a/engines/mads/detection.h
+++ b/engines/mads/detection.h
@@ -30,7 +30,8 @@ namespace MADS {
enum {
GType_RexNebular = 0,
GType_Dragonsphere = 1,
- GType_Phantom = 2
+ GType_Phantom = 2,
+ GType_Forest = 3
};
enum {
diff --git a/engines/mads/detection_tables.h b/engines/mads/detection_tables.h
index 894a496b20e..ade028541d7 100644
--- a/engines/mads/detection_tables.h
+++ b/engines/mads/detection_tables.h
@@ -152,6 +152,21 @@ static const MADSGameDescription gameDescriptions[] = {
0
},
+ {
+ // Once Upon a Forest DOS English
+ {
+ "forest",
+ "",
+ AD_ENTRY1s("section1.hag", "042518994daa7f96f9602e3b7e14a672", 816076),
+ Common::EN_ANY,
+ Common::kPlatformDOS,
+ ADGF_UNSTABLE,
+ GUIO1(GAMEOPTION_EASY_MOUSE)
+ },
+ GType_Forest,
+ 0
+ },
+
#endif
{ AD_TABLE_END_MARKER, 0, 0 }
Commit: a22e5f56632bab60ab9c6cda67bb904d261aad2b
https://github.com/scummvm/scummvm/commit/a22e5f56632bab60ab9c6cda67bb904d261aad2b
Author: eientei (einstein95 at users.noreply.github.com)
Date: 2022-11-22T13:30:02+01:00
Commit Message:
MADS: Skip some segments for the Nebular, Dragonsphere and Phantom demos
Changed paths:
engines/mads/mads.h
engines/mads/metaengine.cpp
engines/mads/resources.cpp
diff --git a/engines/mads/mads.h b/engines/mads/mads.h
index 1607d436aa6..bcca576750b 100644
--- a/engines/mads/mads.h
+++ b/engines/mads/mads.h
@@ -113,6 +113,7 @@ public:
uint16 getVersion() const;
uint32 getGameID() const;
uint32 getGameFeatures() const;
+ bool isDemo() const;
int getRandomNumber(int maxNumber);
int getRandomNumber(int minNumber, int maxNumber);
diff --git a/engines/mads/metaengine.cpp b/engines/mads/metaengine.cpp
index de1b4bf4039..5a7ef5b238f 100644
--- a/engines/mads/metaengine.cpp
+++ b/engines/mads/metaengine.cpp
@@ -130,6 +130,10 @@ uint32 MADSEngine::getFeatures() const {
return _gameDescription->desc.flags;
}
+bool MADSEngine::isDemo() const {
+ return (bool)(_gameDescription->desc.flags & ADGF_DEMO);
+}
+
Common::Language MADSEngine::getLanguage() const {
return _gameDescription->desc.language;
}
diff --git a/engines/mads/resources.cpp b/engines/mads/resources.cpp
index 8cf51835170..a5f1298bd0b 100644
--- a/engines/mads/resources.cpp
+++ b/engines/mads/resources.cpp
@@ -156,14 +156,26 @@ void HagArchive::loadIndex(MADSEngine *vm) {
if (sectionIndex == 0 && !Common::File::exists("SECTION0.HAG"))
continue;
+ // Rex Nebular and Dragonsphere demos only have sections 1 and 9 - skip the rest
+ if ((vm->getGameID() == GType_RexNebular || vm->getGameID() == GType_Dragonsphere) && vm->isDemo()) {
+ if (sectionIndex != 1 && sectionIndex != 9)
+ continue;
+ }
+
+ // Phantom demo only has sections 1, 2 and 9 - skip the rest
+ if (vm->getGameID() == GType_Phantom && vm->isDemo()) {
+ if (sectionIndex != 1 && sectionIndex != 2 && sectionIndex != 9)
+ continue;
+ }
+
// Dragonsphere does not have some sections - skip them
if (vm->getGameID() == GType_Dragonsphere) {
if (sectionIndex == 7 || sectionIndex == 8)
continue;
}
- // Phantom does not have some sections - skip them
- if (vm->getGameID() == GType_Phantom) {
+ // Phantom and Forest don't have some sections - skip them
+ if (vm->getGameID() == GType_Phantom || vm->getGameID() == GType_Forest) {
if (sectionIndex == 6 || sectionIndex == 7 || sectionIndex == 8)
continue;
}
More information about the Scummvm-git-logs
mailing list