aboutsummaryrefslogtreecommitdiff
path: root/engines/cine/part.cpp
diff options
context:
space:
mode:
authorGregory Montoir2007-05-13 16:07:33 +0000
committerGregory Montoir2007-05-13 16:07:33 +0000
commite6ef2348a4cc17fec41556c130045505035adeca (patch)
tree7e67c3efede702e4ff33e900047c4132a6907ebb /engines/cine/part.cpp
parenta1733f8bbec378a44883de20cdc2b4792a2a33a8 (diff)
downloadscummvm-rg350-e6ef2348a4cc17fec41556c130045505035adeca.tar.gz
scummvm-rg350-e6ef2348a4cc17fec41556c130045505035adeca.tar.bz2
scummvm-rg350-e6ef2348a4cc17fec41556c130045505035adeca.zip
removed duplicated code (BASESON datafiles can be loaded with the existing bundle related functions)
svn-id: r26836
Diffstat (limited to 'engines/cine/part.cpp')
-rw-r--r--engines/cine/part.cpp24
1 files changed, 23 insertions, 1 deletions
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];