[Scummvm-git-logs] scummvm master -> aadbe5e1118ab6f458c199cafd02e0928300ba26

sev- noreply at scummvm.org
Mon Mar 25 13:03:00 UTC 2024


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:
aadbe5e111 MACVENTURE: Fix loading of MacBinary files


Commit: aadbe5e1118ab6f458c199cafd02e0928300ba26
    https://github.com/scummvm/scummvm/commit/aadbe5e1118ab6f458c199cafd02e0928300ba26
Author: polyesterswing (kurianjojo2004 at gmail.com)
Date: 2024-03-25T14:02:55+01:00

Commit Message:
MACVENTURE: Fix loading of MacBinary files

Changed paths:
    engines/macventure/container.cpp
    engines/macventure/saveload.cpp
    engines/macventure/world.cpp


diff --git a/engines/macventure/container.cpp b/engines/macventure/container.cpp
index 7d368d20d73..e99b270b815 100644
--- a/engines/macventure/container.cpp
+++ b/engines/macventure/container.cpp
@@ -27,6 +27,8 @@
  * Used with explicit permission from the author
  */
 
+#include "common/macresman.h"
+
 #include "macventure/container.h"
 
 namespace MacVenture {
@@ -38,7 +40,7 @@ Container::Container(const Common::Path &filename) {
 		error("CONTAINER: Could not open %s", _filename.toString().c_str());
 	}
 
-	_res = _file.readStream(_file.size());
+	_res = Common::MacResManager::openFileOrDataFork(_filename);
 	_header = _res->readUint32BE();
 	_simplified = false;
 
diff --git a/engines/macventure/saveload.cpp b/engines/macventure/saveload.cpp
index 1b18756fe06..84071005474 100644
--- a/engines/macventure/saveload.cpp
+++ b/engines/macventure/saveload.cpp
@@ -140,7 +140,7 @@ void writeMetaData(Common::OutSaveFile *file, Common::String desc) {
 Common::Error MacVentureEngine::loadGameState(int slot) {
 	Common::String saveFileName = getSaveStateName(slot);
 	Common::InSaveFile *file;
-	if(!(file = getSaveFileManager()->openForLoading(saveFileName))) {
+	if (!(file = Common::MacResManager::openFileOrDataFork(Common::Path(saveFileName)))) {
 		error("ENGINE: Missing savegame file %s", saveFileName.c_str());
 	}
 	_world->loadGameFrom(file);
diff --git a/engines/macventure/world.cpp b/engines/macventure/world.cpp
index c4748955119..ca5543b8094 100644
--- a/engines/macventure/world.cpp
+++ b/engines/macventure/world.cpp
@@ -73,7 +73,7 @@ void World::startNewGame() {
 		error("WORLD: Could not load initial game configuration");
 
 	debugC(2, kMVDebugMain, "Loading save game state from %s", _startGameFileName.toString().c_str());
-	Common::SeekableReadStream *saveGameRes = saveGameFile.readStream(saveGameFile.size());
+	Common::SeekableReadStream *saveGameRes = Common::MacResManager::openFileOrDataFork(_startGameFileName);
 
 	_saveGame = new SaveGame(_engine, saveGameRes);
 




More information about the Scummvm-git-logs mailing list