[Scummvm-git-logs] scummvm master -> 8c62ce9a140ff6ffcb704ffa8921abae6e4f3391
dreammaster
dreammaster at scummvm.org
Wed Mar 3 03:59:49 UTC 2021
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
6e92a0e743 AGS: Remove deprecated builtin plugin array
8f6884b21c AGS: Implemented skeleton AGSJoy plugin
7029b58187 AGS: Implemented skeleton AGSWadgetUtil plugin
8c62ce9a14 AGS: Remove deprecated global_plugin.cpp
Commit: 6e92a0e74367fdc38460233ea6a9a5a8e1d84b21
https://github.com/scummvm/scummvm/commit/6e92a0e74367fdc38460233ea6a9a5a8e1d84b21
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-03-02T19:01:22-08:00
Commit Message:
AGS: Remove deprecated builtin plugin array
Changed paths:
R engines/ags/plugins/plugin_builtin.h
engines/ags/plugins/agsplugin.cpp
diff --git a/engines/ags/plugins/agsplugin.cpp b/engines/ags/plugins/agsplugin.cpp
index 80915a6e26..a856c41383 100644
--- a/engines/ags/plugins/agsplugin.cpp
+++ b/engines/ags/plugins/agsplugin.cpp
@@ -56,7 +56,6 @@
#include "ags/engine/main/engine.h"
#include "ags/plugins/agsplugin.h"
#include "ags/plugins/plugin_engine.h"
-#include "ags/plugins/plugin_builtin.h"
#include "ags/plugins/pluginobjectreader.h"
#include "ags/engine/script/script.h"
#include "ags/engine/script/script_runtime.h"
@@ -136,8 +135,6 @@ EnginePlugin plugins[MAXPLUGINS];
int numPlugins = 0;
int pluginsWantingDebugHooks = 0;
-std::vector<InbuiltPluginDetails> _registered_builtin_plugins;
-
void IAGSEngine::AbortGame(const char *reason) {
quit((const char *)reason);
}
@@ -891,11 +888,6 @@ void pl_run_plugin_init_gfx_hooks(const char *driverName, void *data) {
}
}
-int pl_register_builtin_plugin(InbuiltPluginDetails const &details) {
- _registered_builtin_plugins.push_back(details);
- return 0;
-}
-
Engine::GameInitError pl_register_plugins(const std::vector<Shared::PluginInfo> &infos) {
// WORKAROUND: Zak2 uses AGSFlashlight, but doesn't list it as a requirement.
// So allow ScummVM plugins specified to be added to the list
diff --git a/engines/ags/plugins/plugin_builtin.h b/engines/ags/plugins/plugin_builtin.h
deleted file mode 100644
index ed698989a7..0000000000
--- a/engines/ags/plugins/plugin_builtin.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* 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 2
- * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-//=============================================================================
-//
-// Plugin system functions.
-//
-//=============================================================================
-
-#ifndef AGS_ENGINE_PLUGIN_PLUGIN_BUILTIN_H
-#define AGS_ENGINE_PLUGIN_PLUGIN_BUILTIN_H
-
-namespace AGS3 {
-
-#define PLUGIN_FILENAME_MAX (49)
-
-class IAGSEngine;
-
-// Initial implementation for apps to register their own inbuilt plugins
-
-struct InbuiltPluginDetails {
- char filename[PLUGIN_FILENAME_MAX + 1];
- void (*engineStartup)(IAGSEngine *);
- void (*engineShutdown)();
- NumberPtr (*onEvent)(int, NumberPtr);
- void (*initGfxHook)(const char *driverName, void *data);
- int (*debugHook)(const char *whichscript, int lineNumber, int reserved);
-};
-
-// Register a builtin plugin.
-int pl_register_builtin_plugin(InbuiltPluginDetails const &details);
-
-} // namespace AGS3
-
-#endif
Commit: 8f6884b21c2376a4eec98b108491d56b513b0427
https://github.com/scummvm/scummvm/commit/8f6884b21c2376a4eec98b108491d56b513b0427
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-03-02T19:22:50-08:00
Commit Message:
AGS: Implemented skeleton AGSJoy plugin
Changed paths:
A engines/ags/plugins/ags_joy/ags_joy.cpp
A engines/ags/plugins/ags_joy/ags_joy.h
engines/ags/module.mk
engines/ags/plugins/plugin_base.cpp
diff --git a/engines/ags/module.mk b/engines/ags/module.mk
index fad4fd4b31..471e237a09 100644
--- a/engines/ags/module.mk
+++ b/engines/ags/module.mk
@@ -297,6 +297,7 @@ MODULE_OBJS = \
plugins/ags_flashlight/ags_flashlight.o \
plugins/ags_galaxy_steam/ags_blackwell_steam.o \
plugins/ags_galaxy_steam/ags_galaxy_steam.o \
+ plugins/ags_joy/ags_joy.o \
plugins/ags_pal_render/ags_pal_render.o \
plugins/ags_pal_render/raycast.o \
plugins/ags_parallax/ags_parallax.o \
diff --git a/engines/ags/plugins/ags_joy/ags_joy.cpp b/engines/ags/plugins/ags_joy/ags_joy.cpp
new file mode 100644
index 0000000000..d819297dec
--- /dev/null
+++ b/engines/ags/plugins/ags_joy/ags_joy.cpp
@@ -0,0 +1,124 @@
+/* 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "ags/plugins/ags_joy/ags_joy.h"
+#include "ags/shared/core/platform.h"
+
+namespace AGS3 {
+namespace Plugins {
+namespace AGSJoy {
+
+IAGSEngine *AGSJoy::_engine;
+
+AGSJoy::AGSJoy() : PluginBase() {
+ DLL_METHOD(AGS_GetPluginName);
+ DLL_METHOD(AGS_EngineStartup);
+}
+
+const char *AGSJoy::AGS_GetPluginName() {
+ return "AGSJoy";
+}
+
+void AGSJoy::AGS_EngineStartup(IAGSEngine *engine) {
+ _engine = engine;
+
+ // Register functions
+ SCRIPT_METHOD_EXT(JoystickCount, Count);
+ SCRIPT_METHOD_EXT(JoystickName, Name);
+ SCRIPT_METHOD_EXT(JoystickRescan, Rescan);
+ SCRIPT_METHOD_EXT(Joystick::Open, Open);
+ SCRIPT_METHOD_EXT(Joystick::IsOpen, IsOpen);
+ SCRIPT_METHOD_EXT(Joystick::Click, Click);
+ SCRIPT_METHOD_EXT(Joystick::Close, Close);
+ SCRIPT_METHOD_EXT(Joystick::Valid, Valid);
+ SCRIPT_METHOD_EXT(Joystick::Unplugged, Unplugged);
+ SCRIPT_METHOD_EXT(Joystick::GetName, GetName);
+ SCRIPT_METHOD_EXT(Joystick::GetAxis, GetAxis);
+ SCRIPT_METHOD_EXT(Joystick::IsButtonDown, IsButtonDown);
+ SCRIPT_METHOD_EXT(Joystick::IsJoyBtnDown, IsJoyBtnDown);
+ SCRIPT_METHOD_EXT(Joystick::Update, Update);
+ SCRIPT_METHOD_EXT(Joystick::DisableEvents, DisableEvents);
+ SCRIPT_METHOD_EXT(Joystick::EnableEvents, EnableEvents);
+}
+
+NumberPtr AGSJoy::Count(const ScriptMethodParams ¶ms) {
+ return 0;
+}
+
+NumberPtr AGSJoy::Name(const ScriptMethodParams ¶ms) {
+ return 0;
+}
+
+NumberPtr AGSJoy::Rescan(const ScriptMethodParams ¶ms) {
+ return 0;
+}
+
+NumberPtr AGSJoy::Open(const ScriptMethodParams ¶ms) {
+ return 0;
+}
+
+NumberPtr AGSJoy::IsOpen(const ScriptMethodParams ¶ms) {
+ return 0;
+}
+
+void AGSJoy::Click(const ScriptMethodParams ¶ms) {
+}
+
+void AGSJoy::Close(const ScriptMethodParams ¶ms) {
+}
+
+NumberPtr AGSJoy::Valid(const ScriptMethodParams ¶ms) {
+ return 0;
+}
+
+NumberPtr AGSJoy::Unplugged(const ScriptMethodParams ¶ms) {
+ return 0;
+}
+
+NumberPtr AGSJoy::GetName(const ScriptMethodParams ¶ms) {
+ return NumberPtr();
+}
+
+NumberPtr AGSJoy::GetAxis(const ScriptMethodParams ¶ms) {
+ return 0;
+}
+
+NumberPtr AGSJoy::IsButtonDown(const ScriptMethodParams ¶ms) {
+ return 0;
+}
+
+NumberPtr AGSJoy::IsJoyBtnDown(const ScriptMethodParams ¶ms) {
+ return 0;
+}
+
+void AGSJoy::Update(const ScriptMethodParams ¶ms) {
+}
+
+void AGSJoy::DisableEvents(const ScriptMethodParams ¶ms) {
+}
+
+void AGSJoy::EnableEvents(const ScriptMethodParams ¶ms) {
+}
+
+} // namespace AGSJoy
+} // namespace Plugins
+} // namespace AGS3
diff --git a/engines/ags/plugins/ags_joy/ags_joy.h b/engines/ags/plugins/ags_joy/ags_joy.h
new file mode 100644
index 0000000000..0cd4278f11
--- /dev/null
+++ b/engines/ags/plugins/ags_joy/ags_joy.h
@@ -0,0 +1,65 @@
+/* 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef AGS_PLUGINS_AGS_JOY_AGS_JOY_H
+#define AGS_PLUGINS_AGS_JOY_AGS_JOY_H
+
+#include "ags/plugins/plugin_base.h"
+
+namespace AGS3 {
+namespace Plugins {
+namespace AGSJoy {
+
+class AGSJoy : public PluginBase {
+private:
+ static IAGSEngine *_engine;
+private:
+ static const char *AGS_GetPluginName();
+ static void AGS_EngineStartup(IAGSEngine *lpEngine);
+
+private:
+ static NumberPtr Count(const ScriptMethodParams ¶ms);
+ static NumberPtr Name(const ScriptMethodParams ¶ms);
+ static NumberPtr Rescan(const ScriptMethodParams ¶ms);
+ static NumberPtr Open(const ScriptMethodParams ¶ms);
+ static NumberPtr IsOpen(const ScriptMethodParams ¶ms);
+ static void Click(const ScriptMethodParams ¶ms);
+ static void Close(const ScriptMethodParams ¶ms);
+ static NumberPtr Valid(const ScriptMethodParams ¶ms);
+ static NumberPtr Unplugged(const ScriptMethodParams ¶ms);
+ static NumberPtr GetName(const ScriptMethodParams ¶ms);
+ static NumberPtr GetAxis(const ScriptMethodParams ¶ms);
+ static NumberPtr IsButtonDown(const ScriptMethodParams ¶ms);
+ static NumberPtr IsJoyBtnDown(const ScriptMethodParams ¶ms);
+ static void Update(const ScriptMethodParams ¶ms);
+ static void DisableEvents(const ScriptMethodParams ¶ms);
+ static void EnableEvents(const ScriptMethodParams ¶ms);
+
+public:
+ AGSJoy();
+};
+
+} // namespace AGSJoy
+} // namespace Plugins
+} // namespace AGS3
+
+#endif
diff --git a/engines/ags/plugins/plugin_base.cpp b/engines/ags/plugins/plugin_base.cpp
index 00c3f33292..0e6a1fe62a 100644
--- a/engines/ags/plugins/plugin_base.cpp
+++ b/engines/ags/plugins/plugin_base.cpp
@@ -28,6 +28,7 @@
#include "ags/plugins/ags_flashlight/ags_flashlight.h"
#include "ags/plugins/ags_galaxy_steam/ags_blackwell_steam.h"
#include "ags/plugins/ags_galaxy_steam/ags_galaxy_steam.h"
+#include "ags/plugins/ags_joy/ags_joy.h"
#include "ags/plugins/ags_pal_render/ags_pal_render.h"
#include "ags/plugins/ags_snow_rain/ags_snow_rain.h"
#include "ags/plugins/ags_sprite_font/ags_sprite_font.h"
@@ -67,6 +68,9 @@ void *pluginOpen(const char *filename) {
if (fname.equalsIgnoreCase("AGSFlashlight"))
return new AGSFlashlight::AGSFlashlight();
+ if (fname.equalsIgnoreCase("AGSJoy"))
+ return new AGSJoy::AGSJoy();
+
if (fname.equalsIgnoreCase("AGSPalRender"))
return new AGSPalRender::AGSPalRender();
Commit: 7029b58187477aec0a73a2b9dbbb91717f72c4c6
https://github.com/scummvm/scummvm/commit/7029b58187477aec0a73a2b9dbbb91717f72c4c6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-03-02T19:34:56-08:00
Commit Message:
AGS: Implemented skeleton AGSWadgetUtil plugin
Changed paths:
A engines/ags/plugins/ags_wadjet_util/ags_wadjet_util.cpp
A engines/ags/plugins/ags_wadjet_util/ags_wadjet_util.h
engines/ags/module.mk
engines/ags/plugins/plugin_base.cpp
diff --git a/engines/ags/module.mk b/engines/ags/module.mk
index 471e237a09..5d52210a62 100644
--- a/engines/ags/module.mk
+++ b/engines/ags/module.mk
@@ -310,7 +310,8 @@ MODULE_OBJS = \
plugins/ags_sprite_font/sprite_font_renderer.o \
plugins/ags_sprite_font/variable_width_font.o \
plugins/ags_sprite_font/variable_width_sprite_font.o \
- plugins/ags_tcp_ip/ags_tcp_ip.o
+ plugins/ags_tcp_ip/ags_tcp_ip.o \
+ plugins/ags_wadjet_util/ags_wadjet_util.o
ifdef ENABLE_AGS_TESTS
MODULE_OBJS += \
diff --git a/engines/ags/plugins/ags_wadjet_util/ags_wadjet_util.cpp b/engines/ags/plugins/ags_wadjet_util/ags_wadjet_util.cpp
new file mode 100644
index 0000000000..b60b769705
--- /dev/null
+++ b/engines/ags/plugins/ags_wadjet_util/ags_wadjet_util.cpp
@@ -0,0 +1,93 @@
+/* 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "ags/plugins/ags_wadjet_util/ags_wadjet_util.h"
+#include "ags/shared/core/platform.h"
+
+namespace AGS3 {
+namespace Plugins {
+namespace AGSWadgetUtil {
+
+IAGSEngine *AGSWadgetUtil::_engine;
+
+AGSWadgetUtil::AGSWadgetUtil() : PluginBase() {
+ DLL_METHOD(AGS_GetPluginName);
+ DLL_METHOD(AGS_EngineStartup);
+}
+
+const char *AGSWadgetUtil::AGS_GetPluginName() {
+ return "AGSWadgetUtil";
+}
+
+void AGSWadgetUtil::AGS_EngineStartup(IAGSEngine *engine) {
+ _engine = engine;
+
+ // Register functions
+ SCRIPT_METHOD(IsOnPhone);
+ SCRIPT_METHOD(FakeKeypress);
+ SCRIPT_METHOD(IosSetAchievementValue);
+ SCRIPT_METHOD(IosGetAchievementValue);
+ SCRIPT_METHOD(IosShowAchievements);
+ SCRIPT_METHOD(IosResetAchievements);
+ SCRIPT_METHOD(MobileGetAchievement);
+ SCRIPT_METHOD(MobileSetAchievement);
+ SCRIPT_METHOD(MobileShowAchievements);
+ SCRIPT_METHOD(MobileResetAchievements);
+}
+
+NumberPtr AGSWadgetUtil::IsOnPhone(const ScriptMethodParams ¶ms) {
+ return false;
+}
+
+void AGSWadgetUtil::FakeKeypress(const ScriptMethodParams ¶ms) {
+}
+
+void AGSWadgetUtil::IosSetAchievementValue(const ScriptMethodParams ¶ms) {
+}
+
+NumberPtr AGSWadgetUtil::IosGetAchievementValue(const ScriptMethodParams ¶ms) {
+ return -1;
+}
+
+void AGSWadgetUtil::IosShowAchievements(const ScriptMethodParams ¶ms) {
+}
+
+void AGSWadgetUtil::IosResetAchievements(const ScriptMethodParams ¶ms) {
+}
+
+NumberPtr AGSWadgetUtil::MobileGetAchievement(const ScriptMethodParams ¶ms) {
+ return NumberPtr();
+}
+
+NumberPtr AGSWadgetUtil::MobileSetAchievement(const ScriptMethodParams ¶ms) {
+ return 0;
+}
+
+void AGSWadgetUtil::MobileShowAchievements(const ScriptMethodParams ¶ms) {
+}
+
+void AGSWadgetUtil::MobileResetAchievements(const ScriptMethodParams ¶ms) {
+}
+
+} // namespace AGSWadgetUtil
+} // namespace Plugins
+} // namespace AGS3
diff --git a/engines/ags/plugins/ags_wadjet_util/ags_wadjet_util.h b/engines/ags/plugins/ags_wadjet_util/ags_wadjet_util.h
new file mode 100644
index 0000000000..d0a4f90a7a
--- /dev/null
+++ b/engines/ags/plugins/ags_wadjet_util/ags_wadjet_util.h
@@ -0,0 +1,59 @@
+/* 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef AGS_PLUGINS_AGS_WADGET_UTIL_AGS_WADGET_UTIL_H
+#define AGS_PLUGINS_AGS_WADGET_UTIL_AGS_WADGET_UTIL_H
+
+#include "ags/plugins/plugin_base.h"
+
+namespace AGS3 {
+namespace Plugins {
+namespace AGSWadgetUtil {
+
+class AGSWadgetUtil : public PluginBase {
+private:
+ static IAGSEngine *_engine;
+private:
+ static const char *AGS_GetPluginName();
+ static void AGS_EngineStartup(IAGSEngine *lpEngine);
+
+private:
+ static NumberPtr IsOnPhone(const ScriptMethodParams ¶ms);
+ static void FakeKeypress(const ScriptMethodParams ¶ms);
+ static void IosSetAchievementValue(const ScriptMethodParams ¶ms);
+ static NumberPtr IosGetAchievementValue(const ScriptMethodParams ¶ms);
+ static void IosShowAchievements(const ScriptMethodParams & params);
+ static void IosResetAchievements(const ScriptMethodParams ¶ms);
+ static NumberPtr MobileGetAchievement(const ScriptMethodParams ¶ms);
+ static NumberPtr MobileSetAchievement(const ScriptMethodParams ¶ms);
+ static void MobileShowAchievements(const ScriptMethodParams ¶ms);
+ static void MobileResetAchievements(const ScriptMethodParams ¶ms);
+
+public:
+ AGSWadgetUtil();
+};
+
+} // namespace AGSWadgetUtil
+} // namespace Plugins
+} // namespace AGS3
+
+#endif
diff --git a/engines/ags/plugins/plugin_base.cpp b/engines/ags/plugins/plugin_base.cpp
index 0e6a1fe62a..b3546718ba 100644
--- a/engines/ags/plugins/plugin_base.cpp
+++ b/engines/ags/plugins/plugin_base.cpp
@@ -33,6 +33,7 @@
#include "ags/plugins/ags_snow_rain/ags_snow_rain.h"
#include "ags/plugins/ags_sprite_font/ags_sprite_font.h"
#include "ags/plugins/ags_tcp_ip/ags_tcp_ip.h"
+#include "ags/plugins/ags_wadjet_util/ags_wadjet_util.h"
#include "ags/ags.h"
#include "ags/detection.h"
#include "common/str.h"
@@ -91,6 +92,9 @@ void *pluginOpen(const char *filename) {
fname.equalsIgnoreCase("agsteam-disjoint"))
return new AGSGalaxySteam::AGSSteam();
+ if (fname.equalsIgnoreCase("AGSWadgetUtil"))
+ return new AGSWadgetUtil::AGSWadgetUtil();
+
return nullptr;
}
Commit: 8c62ce9a140ff6ffcb704ffa8921abae6e4f3391
https://github.com/scummvm/scummvm/commit/8c62ce9a140ff6ffcb704ffa8921abae6e4f3391
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-03-02T19:59:35-08:00
Commit Message:
AGS: Remove deprecated global_plugin.cpp
Changed paths:
R engines/ags/engine/ac/global_plugin.h
R engines/ags/plugins/global_plugin.cpp
engines/ags/engine/ac/mouse.cpp
engines/ags/engine/ac/sys_events.cpp
engines/ags/module.mk
engines/ags/plugins/agsplugin.cpp
engines/ags/plugins/agsplugin.h
diff --git a/engines/ags/engine/ac/global_plugin.h b/engines/ags/engine/ac/global_plugin.h
deleted file mode 100644
index 308f2f148e..0000000000
--- a/engines/ags/engine/ac/global_plugin.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* 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 2
- * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef AGS_ENGINE_AC_GLOBAL_PLUGIN_H
-#define AGS_ENGINE_AC_GLOBAL_PLUGIN_H
-
-namespace AGS3 {
-
-void PluginSimulateMouseClick(int pluginButtonID);
-bool RegisterPluginStubs(const char *name);
-
-} // namespace AGS3
-
-#endif
diff --git a/engines/ags/engine/ac/mouse.cpp b/engines/ags/engine/ac/mouse.cpp
index 569b236656..b91c7299e6 100644
--- a/engines/ags/engine/ac/mouse.cpp
+++ b/engines/ags/engine/ac/mouse.cpp
@@ -30,7 +30,6 @@
#include "ags/shared/ac/gamesetupstruct.h"
#include "ags/engine/ac/gamestate.h"
#include "ags/engine/ac/global_mouse.h"
-#include "ags/engine/ac/global_plugin.h"
#include "ags/engine/ac/global_screen.h"
#include "ags/engine/ac/system.h"
#include "ags/engine/ac/viewframe.h"
@@ -45,6 +44,7 @@
#include "ags/engine/script/script_api.h"
#include "ags/engine/script/script_runtime.h"
#include "ags/engine/ac/global_game.h"
+#include "ags/plugins/agsplugin.h"
#include "ags/globals.h"
namespace AGS3 {
diff --git a/engines/ags/engine/ac/sys_events.cpp b/engines/ags/engine/ac/sys_events.cpp
index 0211c7c81f..dba630c58a 100644
--- a/engines/ags/engine/ac/sys_events.cpp
+++ b/engines/ags/engine/ac/sys_events.cpp
@@ -40,7 +40,7 @@ using namespace AGS::Shared;
using namespace AGS::Engine;
extern volatile unsigned long globalTimerCounter;
-extern int pluginSimulatedClick;
+int pluginSimulatedClick;
extern int displayed_room;
extern char check_dynamic_sprites_at_exit;
diff --git a/engines/ags/module.mk b/engines/ags/module.mk
index 5d52210a62..128e7451d9 100644
--- a/engines/ags/module.mk
+++ b/engines/ags/module.mk
@@ -286,7 +286,6 @@ MODULE_OBJS = \
engine/script/script_runtime.o \
engine/script/systemimports.o \
plugins/agsplugin.o \
- plugins/global_plugin.o \
plugins/plugin_base.o \
plugins/pluginobjectreader.o \
plugins/ags_blend/ags_blend.o \
diff --git a/engines/ags/plugins/agsplugin.cpp b/engines/ags/plugins/agsplugin.cpp
index a856c41383..2becd2404a 100644
--- a/engines/ags/plugins/agsplugin.cpp
+++ b/engines/ags/plugins/agsplugin.cpp
@@ -35,7 +35,6 @@
#include "ags/engine/ac/gamesetup.h"
#include "ags/shared/ac/gamesetupstruct.h"
#include "ags/engine/ac/global_audio.h"
-#include "ags/engine/ac/global_plugin.h"
#include "ags/engine/ac/global_walkablearea.h"
#include "ags/engine/ac/keycode.h"
#include "ags/engine/ac/mouse.h"
@@ -95,13 +94,14 @@ extern color palette[256];
extern PluginObjectReader pluginReaders[MAX_PLUGIN_OBJECT_READERS];
extern int numPluginReaders;
extern RuntimeScriptValue GlobalReturnValue;
+extern int pluginSimulatedClick;
+void PluginSimulateMouseClick(int pluginButtonID) {
+ pluginSimulatedClick = pluginButtonID - 1;
+}
// **************** PLUGIN IMPLEMENTATION ****************
-
-
-
struct EnginePlugin {
char filename[PLUGIN_FILENAME_MAX + 1];
AGS::Engine::Library library;
@@ -958,14 +958,8 @@ Engine::GameInitError pl_register_plugins(const std::vector<Shared::PluginInfo>
apl->debugHook = (int(*)(const char *, int, int))apl->library.GetFunctionAddress("AGS_EngineDebugHook");
apl->initGfxHook = (void(*)(const char *, void *))apl->library.GetFunctionAddress("AGS_EngineInitGfx");
} else {
- AGS::Shared::Debug::Printf(kDbgMsg_Info, "Plugin '%s' could not be loaded (expected '%s'), trying built-in plugins...",
+ AGS::Shared::Debug::Printf(kDbgMsg_Info, "Plugin '%s' could not be loaded (expected '%s')",
apl->filename, expect_filename.GetCStr());
-
- // Plugin loading has failed at this point, try using built-in plugin function stubs
- if (RegisterPluginStubs((const char *)apl->filename))
- AGS::Shared::Debug::Printf(kDbgMsg_Info, "Placeholder functions for the plugin '%s' found.", apl->filename);
- else
- AGS::Shared::Debug::Printf(kDbgMsg_Info, "No placeholder functions for the plugin '%s' found. The game might fail to load!", apl->filename);
continue;
}
diff --git a/engines/ags/plugins/agsplugin.h b/engines/ags/plugins/agsplugin.h
index d76b67bee7..892d8e899d 100644
--- a/engines/ags/plugins/agsplugin.h
+++ b/engines/ags/plugins/agsplugin.h
@@ -564,6 +564,8 @@ public:
AGSIFUNC(IAGSFontRenderer *) ReplaceFontRenderer(int fontNumber, IAGSFontRenderer *newRenderer);
};
+extern void PluginSimulateMouseClick(int pluginButtonID);
+
} // namespace AGS3
#endif
diff --git a/engines/ags/plugins/global_plugin.cpp b/engines/ags/plugins/global_plugin.cpp
deleted file mode 100644
index cc84eca682..0000000000
--- a/engines/ags/plugins/global_plugin.cpp
+++ /dev/null
@@ -1,250 +0,0 @@
-/* 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 2
- * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-//=============================================================================
-//
-// Stubs for plugin functions.
-//
-//=============================================================================
-
-//include <string.h>
-#include "ags/engine/ac/global_plugin.h"
-#include "ags/engine/ac/mouse.h"
-#include "ags/shared/util/string_compat.h"
-#include "ags/engine/script/script_runtime.h"
-
-namespace AGS3 {
-
-int pluginSimulatedClick = NONE;
-
-void PluginSimulateMouseClick(int pluginButtonID) {
- pluginSimulatedClick = pluginButtonID - 1;
-}
-
-//=============================================================================
-//
-// Script API Functions
-//
-//=============================================================================
-
-RuntimeScriptValue Sc_PluginStub_Void(const RuntimeScriptValue *params, int32_t param_count) {
- return RuntimeScriptValue((int32_t)0);
-}
-
-RuntimeScriptValue Sc_PluginStub_Int0(const RuntimeScriptValue *params, int32_t param_count) {
- return RuntimeScriptValue().SetInt32(0);
-}
-
-RuntimeScriptValue Sc_PluginStub_IntNeg1(const RuntimeScriptValue *params, int32_t param_count) {
- return RuntimeScriptValue().SetInt32(-1);
-}
-
-RuntimeScriptValue Sc_PluginStub_NullStr(const RuntimeScriptValue *params, int32_t param_count) {
- return RuntimeScriptValue().SetStringLiteral(NULL);
-}
-
-bool RegisterPluginStubs(const char *name) {
- // Stubs for plugin functions.
-
- bool is_agsteam = (ags_stricmp(name, "agsteam") == 0) || (ags_stricmp(name, "agsteam-unified") == 0) ||
- (ags_stricmp(name, "agsteam-disjoint") == 0);
- bool is_agsgalaxy = (ags_stricmp(name, "agsgalaxy") == 0) || (ags_stricmp(name, "agsgalaxy-unified") == 0) ||
- (ags_stricmp(name, "agsgalaxy-disjoint") == 0);
-
- if (ags_stricmp(name, "ags_shell") == 0) {
- // ags_shell.dll
- ccAddExternalStaticFunction("ShellExecute", Sc_PluginStub_Void);
- return true;
- } else if (ags_stricmp(name, "ags_snowrain") == 0) {
- // ags_snowrain.dll
- ccAddExternalStaticFunction("srSetSnowDriftRange", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("srSetSnowDriftSpeed", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("srSetSnowFallSpeed", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("srChangeSnowAmount", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("srSetSnowBaseline", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("srSetSnowTransparency", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("srSetSnowDefaultView", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("srSetSnowWindSpeed", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("srSetSnowAmount", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("srSetSnowView", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("srChangeRainAmount", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("srSetRainView", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("srSetRainDefaultView", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("srSetRainTransparency", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("srSetRainWindSpeed", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("srSetRainBaseline", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("srSetRainAmount", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("srSetRainFallSpeed", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("srSetWindSpeed", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("srSetBaseline", Sc_PluginStub_Void);
- return true;
- } else if (ags_stricmp(name, "agsjoy") == 0) {
- // agsjoy.dll
- ccAddExternalStaticFunction("JoystickCount", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("JoystickName", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("JoystickRescan", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("Joystick::Open^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("Joystick::IsOpen^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("Joystick::Click^1", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("Joystick::Close^0", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("Joystick::Valid^0", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("Joystick::Unplugged^0", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("Joystick::GetName^0", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("Joystick::GetAxis^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("Joystick::IsButtonDown^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("Joystick::IsJoyBtnDown^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("Joystick::Update^0", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("Joystick::DisableEvents^0", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("Joystick::EnableEvents^1", Sc_PluginStub_Void);
- return true;
- } else if (ags_stricmp(name, "agsblend") == 0) {
- // agsblend.dll
- ccAddExternalStaticFunction("DrawAlpha", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("GetAlpha", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("PutAlpha", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("Blur", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("HighPass", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("DrawAdd", Sc_PluginStub_Int0);
- return true;
- } else if (ags_stricmp(name, "agsflashlight") == 0) {
- // agsflashlight.dll
- ccAddExternalStaticFunction("SetFlashlightTint", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("GetFlashlightTintRed", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("GetFlashlightTintGreen", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("GetFlashlightTintBlue", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("GetFlashlightMinLightLevel", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("GetFlashlightMaxLightLevel", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("SetFlashlightDarkness", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("GetFlashlightDarkness", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("SetFlashlightDarknessSize", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("GetFlashlightDarknessSize", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("SetFlashlightBrightness", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("GetFlashlightBrightness", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("SetFlashlightBrightnessSize", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("GetFlashlightBrightnessSize", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("SetFlashlightPosition", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("GetFlashlightPositionX", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("GetFlashlightPositionY", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("SetFlashlightFollowMouse", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("GetFlashlightFollowMouse", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("SetFlashlightFollowCharacter", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("GetFlashlightFollowCharacter", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("GetFlashlightCharacterDX", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("GetFlashlightCharacterDY", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("GetFlashlightCharacterHorz", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("GetFlashlightCharacterVert", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("SetFlashlightMask", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("GetFlashlightMask", Sc_PluginStub_Int0);
- return true;
- } else if (ags_stricmp(name, "agswadjetutil") == 0) {
- // agswadjetutil.dll
- ccAddExternalStaticFunction("IsOnPhone", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("FakeKeypress", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("IosSetAchievementValue", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("IosGetAchievementValue", Sc_PluginStub_IntNeg1);
- ccAddExternalStaticFunction("IosShowAchievements", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("IosResetAchievements", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("MobileGetAchievement", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("MobileSetAchievement", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("MobileShowAchievements", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("MobileResetAchievements", Sc_PluginStub_Void);
- return true;
- } else if (ags_stricmp(name, "agsspritefont") == 0) {
- ccAddExternalStaticFunction("SetSpriteFont", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("SetVariableSpriteFont", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("SetGlyph", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("SetSpacing", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("SetLineHeightAdjust", Sc_PluginStub_Void);
- return true;
- } else if (is_agsteam || is_agsgalaxy) {
- // agsteam.dll or agsgalaxy.dll
- ccAddExternalStaticFunction("AGS2Client::IsAchievementAchieved^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGS2Client::SetAchievementAchieved^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGS2Client::ResetAchievement^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGS2Client::GetIntStat^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGS2Client::GetFloatStat^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGS2Client::GetAverageRateStat^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGS2Client::SetIntStat^2", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGS2Client::SetFloatStat^2", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGS2Client::UpdateAverageRateStat^3", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGS2Client::ResetStatsAndAchievements^0", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("AGS2Client::get_Initialized", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGS2Client::get_CurrentLeaderboardName", Sc_PluginStub_NullStr);
- ccAddExternalStaticFunction("AGS2Client::RequestLeaderboard^3", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("AGS2Client::UploadScore^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGS2Client::geti_LeaderboardNames", Sc_PluginStub_NullStr);
- ccAddExternalStaticFunction("AGS2Client::geti_LeaderboardScores", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGS2Client::get_LeaderboardCount", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGS2Client::GetUserName^0", Sc_PluginStub_NullStr);
- ccAddExternalStaticFunction("AGS2Client::GetCurrentGameLanguage^0", Sc_PluginStub_NullStr);
- ccAddExternalStaticFunction("AGS2Client::FindLeaderboard^1", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("AGS2Client::Initialize^2", Sc_PluginStub_Int0);
- if (is_agsteam) {
- ccAddExternalStaticFunction("AGSteam::IsAchievementAchieved^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSteam::SetAchievementAchieved^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSteam::ResetAchievement^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSteam::GetIntStat^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSteam::GetFloatStat^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSteam::GetAverageRateStat^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSteam::SetIntStat^2", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSteam::SetFloatStat^2", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSteam::UpdateAverageRateStat^3", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSteam::ResetStatsAndAchievements^0", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("AGSteam::get_Initialized", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSteam::get_CurrentLeaderboardName", Sc_PluginStub_NullStr);
- ccAddExternalStaticFunction("AGSteam::RequestLeaderboard^3", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("AGSteam::UploadScore^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSteam::geti_LeaderboardNames", Sc_PluginStub_NullStr);
- ccAddExternalStaticFunction("AGSteam::geti_LeaderboardScores", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSteam::get_LeaderboardCount", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSteam::GetUserName^0", Sc_PluginStub_NullStr);
- ccAddExternalStaticFunction("AGSteam::GetCurrentGameLanguage^0", Sc_PluginStub_NullStr);
- ccAddExternalStaticFunction("AGSteam::FindLeaderboard^1", Sc_PluginStub_Void);
- } else { // agsgalaxy
- ccAddExternalStaticFunction("AGSGalaxy::IsAchievementAchieved^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSGalaxy::SetAchievementAchieved^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSGalaxy::ResetAchievement^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSGalaxy::GetIntStat^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSGalaxy::GetFloatStat^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSGalaxy::GetAverageRateStat^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSGalaxy::SetIntStat^2", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSGalaxy::SetFloatStat^2", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSGalaxy::UpdateAverageRateStat^3", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSGalaxy::ResetStatsAndAchievements^0", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("AGSGalaxy::get_Initialized", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSGalaxy::get_CurrentLeaderboardName", Sc_PluginStub_NullStr);
- ccAddExternalStaticFunction("AGSGalaxy::RequestLeaderboard^3", Sc_PluginStub_Void);
- ccAddExternalStaticFunction("AGSGalaxy::UploadScore^1", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSGalaxy::geti_LeaderboardNames", Sc_PluginStub_NullStr);
- ccAddExternalStaticFunction("AGSGalaxy::geti_LeaderboardScores", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSGalaxy::get_LeaderboardCount", Sc_PluginStub_Int0);
- ccAddExternalStaticFunction("AGSGalaxy::GetUserName^0", Sc_PluginStub_NullStr);
- ccAddExternalStaticFunction("AGSGalaxy::GetCurrentGameLanguage^0", Sc_PluginStub_NullStr);
- ccAddExternalStaticFunction("AGSGalaxy::Initialize^2", Sc_PluginStub_Int0);
- }
- return true;
- }
-
- return false;
-}
-
-} // namespace AGS3
More information about the Scummvm-git-logs
mailing list