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 installerDataForkStream(installerResMan->getDataFork()); - Common::ScopedPtr archive(createMacVISEArchive(installerDataForkStream.get())); + Common::ScopedPtr 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