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

This commit is contained in:
elasota 2022-11-29 19:13:04 -05:00 committed by Filippos Karapetis
parent bf47637280
commit c52eaf92fc
5 changed files with 19 additions and 9 deletions

View File

@ -53,6 +53,7 @@ MODULE_OBJS := \
unzip.o \
ustr.o \
util.o \
vise.o \
winexe.o \
winexe_ne.o \
winexe_pe.o \

View File

@ -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

View File

@ -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

View File

@ -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...");

View File

@ -28,7 +28,6 @@ MODULE_OBJS = \
runtime.o \
saveload.o \
subtitles.o \
vise.o \
vthread.o
# This module can be built as a plugin