aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2010-10-30 21:25:52 +0000
committerMax Horn2010-10-30 21:25:52 +0000
commitc07e58ba069a6594305396cdec0e451ebce9f197 (patch)
tree7e50b66f9c1df3b7ae4b97a0ec6f18314999feba /engines
parent9995c7bd980352be55807db03bf0bf2ed55e1d78 (diff)
downloadscummvm-rg350-c07e58ba069a6594305396cdec0e451ebce9f197.tar.gz
scummvm-rg350-c07e58ba069a6594305396cdec0e451ebce9f197.tar.bz2
scummvm-rg350-c07e58ba069a6594305396cdec0e451ebce9f197.zip
M4: Disable code using FILE, fopen, etc. and add explantory FIXME
svn-id: r53958
Diffstat (limited to 'engines')
-rw-r--r--engines/m4/console.cpp8
-rw-r--r--engines/m4/m4.cpp4
2 files changed, 12 insertions, 0 deletions
diff --git a/engines/m4/console.cpp b/engines/m4/console.cpp
index 3e7f9624cf..32ccdab787 100644
--- a/engines/m4/console.cpp
+++ b/engines/m4/console.cpp
@@ -321,17 +321,25 @@ bool MadsConsole::cmdMessage(int argc, const char **argv) {
DebugPrintf("message 'objnum'\n");
} else if (!strcmp(argv[1], "list_quotes")) {
// Dump the quotes list
+#if 0
+ // FIXME: The following code is not portable and hence has been disabled.
+ // Try replacing FILE by Common::DumpFile.
FILE *destFile = fopen("mads_quotes.txt", "wb");
for (uint i = 0; i < _vm->globals()->getQuotesSize(); ++i)
fprintf(destFile, "%.3d - %s\n", i, _vm->globals()->getQuote(i));
fclose(destFile);
+#endif
} else if (!strcmp(argv[1], "list_vocab")) {
// Dump the vocab list
+#if 0
+ // FIXME: The following code is not portable and hence has been disabled.
+ // Try replacing FILE by Common::DumpFile.
FILE *destFile = fopen("mads_vocab.txt", "wb");
for (uint i = 1; i <= _vm->globals()->getVocabSize(); ++i)
fprintf(destFile, "%.3d/%.3x - %s\n", i, i, _vm->globals()->getVocab(i));
fclose(destFile);
+#endif
} else {
int messageIdx = strToInt(argv[1]);
diff --git a/engines/m4/m4.cpp b/engines/m4/m4.cpp
index a999a6bd5a..34fcef7c88 100644
--- a/engines/m4/m4.cpp
+++ b/engines/m4/m4.cpp
@@ -267,6 +267,9 @@ void MadsM4Engine::loadMenu(MenuType menuType, bool loadSaveFromHotkey, bool cal
}
void MadsM4Engine::dumpFile(const char* filename, bool uncompress) {
+#if 0
+ // FIXME: The following code is not portable and hence has been disabled.
+ // Try replacing FILE by Common::DumpFile.
Common::SeekableReadStream *fileS = res()->get(filename);
byte buffer[256];
FILE *destFile = fopen(filename, "wb");
@@ -295,6 +298,7 @@ void MadsM4Engine::dumpFile(const char* filename, bool uncompress) {
fclose(destFile);
res()->toss(filename);
res()->purge();
+#endif
}
/*--------------------------------------------------------------------------*/