From 0781584dfcf02ed063cd114fa02572a0bf7f81ee Mon Sep 17 00:00:00 2001 From: lolbot-iichan Date: Tue, 16 Jul 2019 01:20:39 +0300 Subject: WINTERMUTE: Suppress warning on Directory.Create() for Hamlet --- engines/wintermute/base/scriptables/script_ext_directory.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'engines/wintermute/base') diff --git a/engines/wintermute/base/scriptables/script_ext_directory.cpp b/engines/wintermute/base/scriptables/script_ext_directory.cpp index 2926edb31f..faf3ac1377 100644 --- a/engines/wintermute/base/scriptables/script_ext_directory.cpp +++ b/engines/wintermute/base/scriptables/script_ext_directory.cpp @@ -29,6 +29,7 @@ #include "engines/wintermute/base/scriptables/script_ext_directory.h" #include "engines/wintermute/base/scriptables/script_stack.h" #include "engines/wintermute/base/scriptables/script_value.h" +#include "engines/wintermute/base/base_engine.h" #include "engines/wintermute/persistent.h" namespace Wintermute { @@ -65,9 +66,14 @@ bool SXDirectory::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisSt stack->correctParams(1); const char *path = stack->pop()->getString(); - warning("Directory.Create is not implemented! Returning false..."); + if (BaseEngine::instance().getGameId() == "hamlet") { + // No need to actually create anything since "gamelet.save" is stored at SavefileManager + stack->pushBool(true); + } else { + warning("Directory.Create is not implemented! Returning false..."); + stack->pushBool(false); + } - stack->pushBool(false); return STATUS_OK; } -- cgit v1.2.3