diff options
author | Einar Johan Trøan Sømåen | 2012-06-11 19:22:03 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-06-11 19:22:03 +0200 |
commit | 43da09f95b2d5e1138b582da9d52c1a23416eae8 (patch) | |
tree | ad7b6eae30367b0f8808a9b38ab8147aa960da39 /engines/wintermute | |
parent | 819d16ea9b44476451c32933977278d80ce52def (diff) | |
download | scummvm-rg350-43da09f95b2d5e1138b582da9d52c1a23416eae8.tar.gz scummvm-rg350-43da09f95b2d5e1138b582da9d52c1a23416eae8.tar.bz2 scummvm-rg350-43da09f95b2d5e1138b582da9d52c1a23416eae8.zip |
WINTERMUTE: Get rid of even more FORBIDDEN SYMBOLs
Diffstat (limited to 'engines/wintermute')
-rw-r--r-- | engines/wintermute/Base/scriptables/SXMemBuffer.cpp | 13 | ||||
-rw-r--r-- | engines/wintermute/Sys/SysClassRegistry.h | 4 |
2 files changed, 6 insertions, 11 deletions
diff --git a/engines/wintermute/Base/scriptables/SXMemBuffer.cpp b/engines/wintermute/Base/scriptables/SXMemBuffer.cpp index dd869477a1..ab00178b21 100644 --- a/engines/wintermute/Base/scriptables/SXMemBuffer.cpp +++ b/engines/wintermute/Base/scriptables/SXMemBuffer.cpp @@ -26,15 +26,12 @@ * Copyright (c) 2011 Jan Nedoma
*/
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-#define FORBIDDEN_SYMBOL_EXCEPTION_fopen
-#define FORBIDDEN_SYMBOL_EXCEPTION_fwrite
-#define FORBIDDEN_SYMBOL_EXCEPTION_fclose
#include "engines/wintermute/Base/BScriptable.h"
#include "engines/wintermute/Base/scriptables/ScStack.h"
#include "engines/wintermute/Base/scriptables/ScScript.h"
#include "engines/wintermute/Base/scriptables/ScValue.h"
#include "engines/wintermute/Base/scriptables/SXMemBuffer.h"
+#include "common/file.h"
namespace WinterMute {
@@ -391,9 +388,11 @@ HRESULT CSXMemBuffer::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack else if (strcmp(Name, "DEBUG_Dump") == 0) {
Stack->CorrectParams(0);
if (_buffer && _size) {
- FILE *f = fopen("c:\\!!buffer.bin", "wb");
- fwrite(_buffer, _size, 1, f);
- fclose(f);
+ warning("SXMemBuffer::ScCallMethod - DEBUG_Dump");
+ Common::DumpFile f;
+ f.open("buffer.bin");
+ f.write(_buffer, _size);
+ f.close();
}
Stack->PushNULL();
return S_OK;
diff --git a/engines/wintermute/Sys/SysClassRegistry.h b/engines/wintermute/Sys/SysClassRegistry.h index 870f07df20..30516d4636 100644 --- a/engines/wintermute/Sys/SysClassRegistry.h +++ b/engines/wintermute/Sys/SysClassRegistry.h @@ -32,15 +32,11 @@ #include "engines/wintermute/wintypes.h"
#include "engines/wintermute/dctypes.h"
#include "engines/wintermute/persistent.h"
-//#include <set>
-//#include <map>
#include "common/hashmap.h"
#include "common/hash-str.h"
#include "common/func.h"
#include "common/stream.h"
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-
namespace WinterMute {
class CSysClass;
}
|