[Scummvm-git-logs] scummvm master -> 1752d2fb36f3070d5c2f86906601b13ad74010d1
aquadran
noreply at scummvm.org
Sun Feb 1 12:11:00 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
1752d2fb36 WINTERMUTE: Added protection plugin for 'Susan Rose: Mysterious Child'
Commit: 1752d2fb36f3070d5c2f86906601b13ad74010d1
https://github.com/scummvm/scummvm/commit/1752d2fb36f3070d5c2f86906601b13ad74010d1
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2026-02-01T13:10:54+01:00
Commit Message:
WINTERMUTE: Added protection plugin for 'Susan Rose: Mysterious Child'
Changed paths:
A engines/wintermute/ext/wme_protection.cpp
A engines/wintermute/ext/wme_protection.h
engines/wintermute/ext/plugins.h
engines/wintermute/module.mk
engines/wintermute/persistent.cpp
diff --git a/engines/wintermute/ext/plugins.h b/engines/wintermute/ext/plugins.h
index f47115f4687..614c43b7473 100644
--- a/engines/wintermute/ext/plugins.h
+++ b/engines/wintermute/ext/plugins.h
@@ -44,6 +44,7 @@ BaseScriptable *makeSXVlink(BaseGame *inGame, ScStack *stack);
BaseScriptable *makeSXBlackAndWhite(BaseGame *inGame, ScStack *stack);
BaseScriptable *makeSXShadowManager(BaseGame *inGame, ScStack *stack);
BaseScriptable *makeSXDisplacement(BaseGame *inGame, ScStack *stack);
+BaseScriptable *makeSXProtection(BaseGame *inGame, ScStack *stack);
bool EmulatePluginCall(BaseGame *inGame, ScStack *stack, ScStack *thisStack, char *name) {
ScValue *thisObj;
@@ -120,6 +121,18 @@ bool EmulatePluginCall(BaseGame *inGame, ScStack *stack, ScStack *thisStack, cha
return STATUS_OK;
}
+ //////////////////////////////////////////////////////////////////////////
+ // Protection class for "Susan Rose: Mysterious Child" game)
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "Protection") == 0) {
+ thisObj = thisStack->getTop();
+
+ thisObj->setNative(makeSXProtection(inGame, stack));
+
+ stack->pushNULL();
+ return STATUS_OK;
+ }
+
#ifdef ENABLE_WME3D
//////////////////////////////////////////////////////////////////////////
// BinkVideo player (from wme_vlink.dll of "Sunrise" game)
diff --git a/engines/wintermute/ext/wme_protection.cpp b/engines/wintermute/ext/wme_protection.cpp
new file mode 100644
index 00000000000..339ef181de3
--- /dev/null
+++ b/engines/wintermute/ext/wme_protection.cpp
@@ -0,0 +1,90 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "engines/metaengine.h"
+#include "engines/wintermute/wintermute.h"
+#include "engines/wintermute/base/base_game.h"
+#include "engines/wintermute/base/base_engine.h"
+#include "engines/wintermute/base/scriptables/script_stack.h"
+#include "engines/wintermute/base/scriptables/script_value.h"
+#include "engines/wintermute/ext/wme_protection.h"
+
+namespace Wintermute {
+
+IMPLEMENT_PERSISTENT(SXProtection, false)
+
+BaseScriptable *makeSXProtection(BaseGame *inGame, ScStack *stack) {
+ return new SXProtection(inGame, stack);
+}
+
+//////////////////////////////////////////////////////////////////////////
+SXProtection::SXProtection(BaseGame *inGame, ScStack *stack) : BaseScriptable(inGame) {
+ stack->correctParams(0);
+}
+
+//////////////////////////////////////////////////////////////////////////
+SXProtection::~SXProtection() {
+}
+
+//////////////////////////////////////////////////////////////////////////
+const char *SXProtection::scToString() {
+ return "[protection object]";
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+bool SXProtection::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) {
+ //////////////////////////////////////////////////////////////////////////
+ // CheckExeProtection
+ // Reference in game scripts in "Susan Rose: Mysterious Child"
+ //////////////////////////////////////////////////////////////////////////
+ if (strcmp(name, "CheckExeProtection") == 0) {
+ stack->correctParams(0);
+
+ stack->pushInt(1);
+ return STATUS_OK;
+ }
+
+
+ return STATUS_FAILED;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+ScValue *SXProtection::scGetProperty(const char *name) {
+ _scValue->setNULL();
+ return _scValue;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+bool SXProtection::scSetProperty(const char *name, ScValue *value) {
+ return STATUS_FAILED;
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+bool SXProtection::persist(BasePersistenceManager *persistMgr) {
+ BaseScriptable::persist(persistMgr);
+ return STATUS_OK;
+}
+
+} // End of namespace Wintermute
diff --git a/engines/wintermute/ext/wme_protection.h b/engines/wintermute/ext/wme_protection.h
new file mode 100644
index 00000000000..840fd7bae4d
--- /dev/null
+++ b/engines/wintermute/ext/wme_protection.h
@@ -0,0 +1,43 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef WINTERMUTE_PROTECTION_H
+#define WINTERMUTE_PROTECTION_H
+
+#include "common/str.h"
+#include "engines/wintermute/base/base_scriptable.h"
+
+namespace Wintermute {
+
+class SXProtection : public BaseScriptable {
+public:
+ DECLARE_PERSISTENT(SXProtection, BaseScriptable)
+ ScValue *scGetProperty(const char *name) override;
+ bool scSetProperty(const char *name, ScValue *value) override;
+ bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
+ const char *scToString() override;
+ SXProtection(BaseGame *inGame, ScStack *stack);
+ ~SXProtection() override;
+};
+
+} // End of namespace Wintermute
+
+#endif
diff --git a/engines/wintermute/module.mk b/engines/wintermute/module.mk
index 44154c6febf..e33ac756a96 100644
--- a/engines/wintermute/module.mk
+++ b/engines/wintermute/module.mk
@@ -104,6 +104,7 @@ MODULE_OBJS := \
ext/wme_commandlinehelper.o \
ext/wme_displacement.o \
ext/wme_galaxy.o \
+ ext/wme_protection.o \
ext/wme_steam.o \
ext/wme_windowmode.o \
debugger/breakpoint.o \
diff --git a/engines/wintermute/persistent.cpp b/engines/wintermute/persistent.cpp
index be87fc95c37..f7325c5b0b4 100644
--- a/engines/wintermute/persistent.cpp
+++ b/engines/wintermute/persistent.cpp
@@ -85,6 +85,7 @@
#include "engines/wintermute/ext/wme_displacement.h"
#include "engines/wintermute/ext/wme_steam.h"
#include "engines/wintermute/ext/wme_galaxy.h"
+#include "engines/wintermute/ext/wme_protection.h"
#include "engines/wintermute/ext/wme_vlink.h"
#include "engines/wintermute/ui/ui_button.h"
#include "engines/wintermute/ui/ui_edit.h"
@@ -179,6 +180,7 @@ void SystemClassRegistry::registerClasses() {
REGISTER_CLASS(SXWMEGalaxyAPI, false)
REGISTER_CLASS(SXCommandLineHelper, false)
REGISTER_CLASS(SXDisplacement, false)
+ REGISTER_CLASS(SXProtection, false)
REGISTER_CLASS(UIButton, false)
REGISTER_CLASS(UIEdit, false)
More information about the Scummvm-git-logs
mailing list