From e6ef2348a4cc17fec41556c130045505035adeca Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Sun, 13 May 2007 16:07:33 +0000 Subject: removed duplicated code (BASESON datafiles can be loaded with the existing bundle related functions) svn-id: r26836 --- engines/cine/part.cpp | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'engines/cine/part.cpp') diff --git a/engines/cine/part.cpp b/engines/cine/part.cpp index 99d1109c2b..f915fc3260 100644 --- a/engines/cine/part.cpp +++ b/engines/cine/part.cpp @@ -68,7 +68,7 @@ void loadPart(const char *partName) { partFileHandle.readUint32BE(); // unused } - if (g_cine->getGameType() == Cine::GType_FW && g_cine->getPlatform() == Common::kPlatformPC) + if (g_cine->getGameType() == Cine::GType_FW && g_cine->getPlatform() == Common::kPlatformPC && strcmp(partName, "BASESON.SND") != 0) loadPal(partName); } @@ -420,6 +420,25 @@ byte *readBundleFile(int16 foundFileIdx) { return dataPtr; } +byte *readBundleSoundFile(const char *entryName) { + int16 index; + byte *data = 0; + char previousPartName[15] = ""; + + if (g_cine->getGameType() == Cine::GType_FW) { + strcpy(previousPartName, currentPartName); + loadPart("BASESON.SND"); + } + index = findFileInBundle((const char *)entryName); + if (index != -1) { + data = readBundleFile(index); + } + if (g_cine->getGameType() == Cine::GType_FW) { + loadPart(previousPartName); + } + return data; +} + byte *readFile(const char *filename) { Common::File in; @@ -437,6 +456,9 @@ byte *readFile(const char *filename) { return dataPtr; } +void checkDataDisk(int16 param) { +} + void dumpBundle(const char *fileName) { char tmpPart[15]; -- cgit v1.2.3