aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kfile.cpp22
-rw-r--r--engines/sci/resource.cpp2
-rw-r--r--engines/sci/vocab_debug.cpp2
3 files changed, 14 insertions, 12 deletions
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index a27268798f..557b72997a 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -836,17 +836,19 @@ reg_t kFileIO(EngineState *s, int funct_nr, int argc, reg_t *argv) {
}
case K_FILEIO_FILE_EXISTS : {
char *name = kernel_dereference_char_pointer(s, argv[1], 0);
- // TODO: Transform the name given by the scripts to us, e.g. by
- // prepending TARGET-
- // TODO: We may have to also check for a regular file with the
- // given name, using File::exists(). Really depends on *how*
- // scripts use this opcode. Need more test data...
- Common::SaveFileManager *saveFileMan = g_engine->getSaveFileManager();
- bool exists = !saveFileMan->listSavefiles(name).empty();
- s->r_acc = make_reg(0, exists);
- debug(3, "K_FILEIO_FILE_EXISTS(%s) -> %d", name, s->r_acc.offset);
- break;
+ // Check for regular file
+ bool exists = Common::File::exists(name);
+
+ if (!exists) {
+ // TODO: Transform the name given by the scripts to us, e.g. by
+ // prepending TARGET-
+ Common::SaveFileManager *saveFileMan = g_engine->getSaveFileManager();
+ exists = !saveFileMan->listSavefiles(name).empty();
+ }
+
+ debug(3, "K_FILEIO_FILE_EXISTS(%s) -> %d", name, exists);
+ return make_reg(0, exists);
}
default :
error("Unknown FileIO() sub-command: %d\n", func_nr);
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 8027d8d1db..0c63075a68 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -847,7 +847,7 @@ void ResourceManager::readResourcePatches(ResourceSource *source) {
ResourceSource *psrcPatch;
bool bAdd;
- for (int i = kResourceTypeView; i < kResourceTypeInvalid; i ++) {
+ for (int i = kResourceTypeView; i < kResourceTypeAudio36; i ++) {
files.clear();
szResType = getResourceTypeName((ResourceType)i);
// SCI0 naming - type.nnn
diff --git a/engines/sci/vocab_debug.cpp b/engines/sci/vocab_debug.cpp
index fc639b4853..aecbdd9814 100644
--- a/engines/sci/vocab_debug.cpp
+++ b/engines/sci/vocab_debug.cpp
@@ -285,7 +285,7 @@ static const char *sci1_default_knames[SCI1_KNAMES_DEFAULT_ENTRIES_NR] = {
/*0x82*/ "TextFonts",
/*0x83*/ "Record",
/*0x84*/ "PlayBack",
- /*0x85*/ SCRIPT_UNKNOWN_FUNCTION_STRING,
+ /*0x85*/ "ShowMovie",
/*0x86*/ "SetVideoMode",
/*0x87*/ "SetQuitStr",
/*0x88*/ "DbugStr"