[Scummvm-git-logs] scummvm master -> aa05a2cb303c9ae4b5f88c4f1c82d6df8060c781
phcoder
noreply at scummvm.org
Wed Oct 26 18:43:14 UTC 2022
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d2e1b1994d HADESCH: Replace explicit delete with ScopedPtr for convenience
1fd9bcd36a HADESCH: Support US Big Box release (windows variant).
aa05a2cb30 HADESCH: Fix a typo
Commit: d2e1b1994d160caed52bc7397aa657f0292ea613
https://github.com/scummvm/scummvm/commit/d2e1b1994d160caed52bc7397aa657f0292ea613
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2022-10-26T20:42:52+02:00
Commit Message:
HADESCH: Replace explicit delete with ScopedPtr for convenience
Changed paths:
engines/hadesch/hadesch.cpp
engines/hadesch/hadesch.h
diff --git a/engines/hadesch/hadesch.cpp b/engines/hadesch/hadesch.cpp
index 422e79b38fc..78ee35a0e1c 100644
--- a/engines/hadesch/hadesch.cpp
+++ b/engines/hadesch/hadesch.cpp
@@ -174,9 +174,9 @@ Common::MemoryReadStream *readWiseFile(Common::File &setupFile, const struct Wis
}
#endif
-Common::ErrorCode HadeschEngine::loadWindowsCursors(Common::PEResources *exe) {
+Common::ErrorCode HadeschEngine::loadWindowsCursors(const Common::ScopedPtr<Common::PEResources>& exe) {
for (unsigned i = 0; i < ARRAYSIZE(cursorids); i++) {
- Graphics::WinCursorGroup *group = Graphics::WinCursorGroup::createCursorGroup(exe, cursorids[i]);
+ Graphics::WinCursorGroup *group = Graphics::WinCursorGroup::createCursorGroup(exe.get(), cursorids[i]);
if (!group) {
debug("Cannot find cursor group %d", cursorids[i]);
@@ -193,13 +193,11 @@ Common::ErrorCode HadeschEngine::loadWindowsCursors(Common::PEResources *exe) {
Common::ErrorCode HadeschEngine::loadCursors() {
debug("HadeschEngine: loading cursors");
- Common::PEResources *exe = new Common::PEResources();
- if (exe->loadFromEXE("HADESCH.EXE")) {
- Common::ErrorCode status = loadWindowsCursors(exe);
- delete exe;
- return status;
- } else {
- delete exe;
+ {
+ Common::ScopedPtr<Common::PEResources> exe = Common::ScopedPtr<Common::PEResources>(new Common::PEResources());
+ if (exe->loadFromEXE("HADESCH.EXE")) {
+ return loadWindowsCursors(exe);
+ }
}
const char *const macPaths[] = {
@@ -214,7 +212,8 @@ Common::ErrorCode HadeschEngine::loadCursors() {
}
for (unsigned i = 0; i < ARRAYSIZE(cursorids); i++) {
- Common::SeekableReadStream *stream = resMan.getResource(MKTAG('c','r','s','r'), cursorids[i]);
+ Common::ScopedPtr<Common::SeekableReadStream> stream = Common::ScopedPtr<Common::SeekableReadStream>(
+ resMan.getResource(MKTAG('c','r','s','r'), cursorids[i]));
if (!stream) {
debug("Couldn't load cursor %d", cursorids[i]);
return Common::kUnsupportedGameidError;
@@ -222,7 +221,6 @@ Common::ErrorCode HadeschEngine::loadCursors() {
Graphics::MacCursor *macCursor = new Graphics::MacCursor();
macCursor->readFromStream(*stream);
_cursors.push_back(macCursor);
- delete stream;
_macCursors.push_back(macCursor);
}
return Common::kNoError;
@@ -249,13 +247,10 @@ Common::ErrorCode HadeschEngine::loadCursors() {
return Common::kUnsupportedGameidError;
}
- exe = new Common::PEResources();
+ Common::ScopedPtr<Common::PEResources> exe = Common::ScopedPtr<Common::PEResources>(new Common::PEResources());
if (exe->loadFromEXE(hadeschExe)) {
Common::ErrorCode status = loadWindowsCursors(exe);
- delete exe;
return status;
- } else {
- delete exe;
}
}
}
diff --git a/engines/hadesch/hadesch.h b/engines/hadesch/hadesch.h
index 79d254f42c2..025d2073186 100644
--- a/engines/hadesch/hadesch.h
+++ b/engines/hadesch/hadesch.h
@@ -190,7 +190,7 @@ private:
RoomId roomId);
Common::ErrorCode loadCursors();
bool handleGenericCheat(const Common::String &cheat);
- Common::ErrorCode loadWindowsCursors(Common::PEResources *exe);
+ Common::ErrorCode loadWindowsCursors(const Common::ScopedPtr<Common::PEResources>& exe);
struct Timer {
int32 next_time;
Commit: 1fd9bcd36afc58140e9f7db1b08a220630736c41
https://github.com/scummvm/scummvm/commit/1fd9bcd36afc58140e9f7db1b08a220630736c41
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2022-10-26T20:42:52+02:00
Commit Message:
HADESCH: Support US Big Box release (windows variant).
This commit doesn't cover Mac portion of the disk
Changed paths:
engines/hadesch/detection.cpp
engines/hadesch/detection_tables.h
engines/hadesch/hadesch.cpp
diff --git a/engines/hadesch/detection.cpp b/engines/hadesch/detection.cpp
index 7c97801dfd4..9a81c1afe5e 100644
--- a/engines/hadesch/detection.cpp
+++ b/engines/hadesch/detection.cpp
@@ -47,12 +47,15 @@ static const PlainGameDescriptor hadeschGames[] = {
// in pretty deep paths:
// * Setup.exe [Russian-Windows]
// * WIN9x/WORLD/wd.pod [English-Windows]
+// * WIN95/WORLD/wd.pod [English-Windows, alternative]
+// * WIN95/HADESCH.EXE [English-Windows]
// * CDAssets/OLYMPUS/ol.pod [English-Windows]
// * Scenes/OLYMPUS/ol.pod [English-Mac and Russian-Windows]
// * Hades - Copy To Hard Drive/Hades Challenge/World/wd.pod [English-Mac]
// * Hades - Copy To Hard Drive/Hades Challenge/World/wd.pod [English-Mac]
// The difference between 2 last one is how the files were copied
static const char *const directoryGlobs[] = {
+ "WIN95",
"WIN9x",
"WORLD",
"CDAssets",
diff --git a/engines/hadesch/detection_tables.h b/engines/hadesch/detection_tables.h
index e82816db085..c2dfb1e0e1f 100644
--- a/engines/hadesch/detection_tables.h
+++ b/engines/hadesch/detection_tables.h
@@ -58,6 +58,20 @@ static const ADGameDescription gameDescriptions[] = {
GUIO1(GUIO_NOMIDI)
},
+ {
+ "hadesch",
+ 0,
+ {
+ {"hadesch.exe", 0, "660735787346ab1bfe0d219bea441486", 1007616},
+ {"ol.pod", 0, "7cabba8d1d4f1239e312e045ef4e9735", 5621074},
+ {"WD.POD", 0, "be7030fc4229e69e719ee2c756eb6ba1", 7479768},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_DROPPLATFORM,
+ GUIO1(GUIO_NOMIDI)
+ },
{
"hadesch",
0,
diff --git a/engines/hadesch/hadesch.cpp b/engines/hadesch/hadesch.cpp
index 78ee35a0e1c..b5e9f9cb3f6 100644
--- a/engines/hadesch/hadesch.cpp
+++ b/engines/hadesch/hadesch.cpp
@@ -193,18 +193,23 @@ Common::ErrorCode HadeschEngine::loadWindowsCursors(const Common::ScopedPtr<Comm
Common::ErrorCode HadeschEngine::loadCursors() {
debug("HadeschEngine: loading cursors");
- {
- Common::ScopedPtr<Common::PEResources> exe = Common::ScopedPtr<Common::PEResources>(new Common::PEResources());
- if (exe->loadFromEXE("HADESCH.EXE")) {
- return loadWindowsCursors(exe);
- }
- }
+ const char *const winPaths[] = {
+ "HADESCH.EXE",
+ "WIN95/HADESCH.EXE"
+ };
const char *const macPaths[] = {
"Hades_-_Copy_To_Hard_Drive/Hades_Challenge/Hades_Challenge_PPC",
"Hades - Copy To Hard Drive/Hades Challenge/Hades Challenge PPC"
};
+ for (uint j = 0; j < ARRAYSIZE(macPaths); ++j) {
+ Common::ScopedPtr<Common::PEResources> exe = Common::ScopedPtr<Common::PEResources>(new Common::PEResources());
+ if (exe->loadFromEXE(winPaths[j])) {
+ return loadWindowsCursors(exe);
+ }
+ }
+
for (uint j = 0; j < ARRAYSIZE(macPaths); ++j) {
Common::MacResManager resMan = Common::MacResManager();
if (!resMan.open(macPaths[j])) {
@@ -484,9 +489,10 @@ Common::Error HadeschEngine::run() {
if (!_wdPodFile) {
const char *const wdpodpaths[] = {
- "WIN9x/WORLD/WD.POD", "WD.POD",
+ "WIN9x/WORLD/WD.POD", "WIN95/WORLD/WD.POD", "WD.POD",
"Hades_-_Copy_To_Hard_Drive/Hades_Challenge/World/wd.pod",
- "Hades - Copy To Hard Drive/Hades Challenge/World/wd.pod"};
+ "Hades - Copy To Hard Drive/Hades Challenge/World/wd.pod"
+ };
debug("HadeschEngine: loading wd.pod");
for (uint i = 0; i < ARRAYSIZE(wdpodpaths); ++i) {
Common::SharedPtr<Common::File> file(new Common::File());
Commit: aa05a2cb303c9ae4b5f88c4f1c82d6df8060c781
https://github.com/scummvm/scummvm/commit/aa05a2cb303c9ae4b5f88c4f1c82d6df8060c781
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2022-10-26T20:42:52+02:00
Commit Message:
HADESCH: Fix a typo
Changed paths:
engines/hadesch/detection.cpp
diff --git a/engines/hadesch/detection.cpp b/engines/hadesch/detection.cpp
index 9a81c1afe5e..56abdf6ef22 100644
--- a/engines/hadesch/detection.cpp
+++ b/engines/hadesch/detection.cpp
@@ -51,7 +51,7 @@ static const PlainGameDescriptor hadeschGames[] = {
// * WIN95/HADESCH.EXE [English-Windows]
// * CDAssets/OLYMPUS/ol.pod [English-Windows]
// * Scenes/OLYMPUS/ol.pod [English-Mac and Russian-Windows]
-// * Hades - Copy To Hard Drive/Hades Challenge/World/wd.pod [English-Mac]
+// * Hades_-_Copy_To_Hard_Drive/Hades_Challenge/World/wd.pod [English-Mac]
// * Hades - Copy To Hard Drive/Hades Challenge/World/wd.pod [English-Mac]
// The difference between 2 last one is how the files were copied
static const char *const directoryGlobs[] = {
More information about the Scummvm-git-logs
mailing list