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

bluegr noreply at scummvm.org
Wed Nov 30 21:17:50 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:
c52eaf92fc COMMON: Move Installer VISE loader from mTropolis engine to Common.


Commit: c52eaf92fcdbc030512a9c20a922d6e4c77cb280
    https://github.com/scummvm/scummvm/commit/c52eaf92fcdbc030512a9c20a922d6e4c77cb280
Author: elasota (ejlasota at gmail.com)
Date: 2022-11-30T23:17:47+02:00

Commit Message:
COMMON: Move Installer VISE loader from mTropolis engine to Common.

Changed paths:
  A common/vise.cpp
  A common/vise.h
  R engines/mtropolis/vise.cpp
  R engines/mtropolis/vise.h
    common/module.mk
    engines/mtropolis/boot.cpp
    engines/mtropolis/module.mk


diff --git a/common/module.mk b/common/module.mk
index ee6a7d4cad5..15b38e12083 100644
--- a/common/module.mk
+++ b/common/module.mk
@@ -53,6 +53,7 @@ MODULE_OBJS := \
 	unzip.o \
 	ustr.o \
 	util.o \
+	vise.o \
 	winexe.o \
 	winexe_ne.o \
 	winexe_pe.o \
diff --git a/engines/mtropolis/vise.cpp b/common/vise.cpp
similarity index 98%
rename from engines/mtropolis/vise.cpp
rename to common/vise.cpp
index 68b2879f317..f41c00ac81b 100644
--- a/engines/mtropolis/vise.cpp
+++ b/common/vise.cpp
@@ -19,13 +19,24 @@
  *
  */
 
+#include "common/vise.h"
+
 #include "common/macresman.h"
 #include "common/memstream.h"
 #include "common/zlib.h"
 
-#include "mtropolis/vise.h"
+// Installer VISE archive loader.
+//
+// Supported versions:
+//
+// Macintosh:
+//     Installer VISE 3.5 Lite
+//     Installer VISE 3.6 Lite
+//
+// Windows:
+//     None
 
-namespace MTropolis {
+namespace Common {
 
 class MacVISEArchive : public Common::Archive {
 private:
@@ -414,4 +425,4 @@ Common::Archive *createMacVISEArchive(Common::SeekableReadStream *stream) {
 	return archive;
 }
 
-} // End of namespace MTropolis
+} // End of namespace Common
diff --git a/engines/mtropolis/vise.h b/common/vise.h
similarity index 95%
rename from engines/mtropolis/vise.h
rename to common/vise.h
index 13ea4a41132..8838382d61b 100644
--- a/engines/mtropolis/vise.h
+++ b/common/vise.h
@@ -29,9 +29,9 @@
 #include "common/str.h"
 #include "common/archive.h"
 
-namespace MTropolis {
+namespace Common {
 
 // Loads a Macintosh Installer VISE archive from a stream
 Common::Archive *createMacVISEArchive(Common::SeekableReadStream *stream);
 
-} // End of namespace MTropolis
+} // End of namespace Common
diff --git a/engines/mtropolis/boot.cpp b/engines/mtropolis/boot.cpp
index 5462fdbaf26..c13792c973f 100644
--- a/engines/mtropolis/boot.cpp
+++ b/engines/mtropolis/boot.cpp
@@ -24,6 +24,7 @@
 #include "common/macresman.h"
 #include "common/memstream.h"
 #include "common/stuffit.h"
+#include "common/vise.h"
 #include "common/winexe.h"
 #include "common/zlib.h"
 
@@ -41,8 +42,6 @@
 #include "mtropolis/plugin/standard.h"
 #include "mtropolis/plugins.h"
 
-#include "mtropolis/vise.h"
-
 namespace MTropolis {
 
 namespace Boot {
@@ -450,7 +449,7 @@ void SPQRGameDataHandler::unpackAdditionalFiles(Common::Array<Common::SharedPtr<
 
 		Common::SharedPtr<Common::SeekableReadStream> installerDataForkStream(installerResMan->getDataFork());
 
-		Common::ScopedPtr<Common::Archive> archive(createMacVISEArchive(installerDataForkStream.get()));
+		Common::ScopedPtr<Common::Archive> archive(Common::createMacVISEArchive(installerDataForkStream.get()));
 
 		debug(1, "Unpacking files...");
 
diff --git a/engines/mtropolis/module.mk b/engines/mtropolis/module.mk
index 1e62a22e58c..1d45e895c6b 100644
--- a/engines/mtropolis/module.mk
+++ b/engines/mtropolis/module.mk
@@ -28,7 +28,6 @@ MODULE_OBJS = \
 	runtime.o \
 	saveload.o \
 	subtitles.o \
-	vise.o \
 	vthread.o
 
 # This module can be built as a plugin




More information about the Scummvm-git-logs mailing list