[Scummvm-git-logs] scummvm master -> 751c79e6ff9e749ee4ae0a54a8406d3acaabb409

sev- noreply at scummvm.org
Sat Apr 29 11:42:26 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
751c79e6ff AGS: Add stubs for AGSTrans plugin


Commit: 751c79e6ff9e749ee4ae0a54a8406d3acaabb409
    https://github.com/scummvm/scummvm/commit/751c79e6ff9e749ee4ae0a54a8406d3acaabb409
Author: Walter Agazzi (walter.agazzi at protonmail.com)
Date: 2023-04-29T13:42:23+02:00

Commit Message:
AGS: Add stubs for AGSTrans plugin

This plugin was used in Death Wore Endless Feathers
to draw semi transparent window backgrounds.

Changed paths:
  A engines/ags/plugins/ags_trans/ags_trans.cpp
  A engines/ags/plugins/ags_trans/ags_trans.h
    engines/ags/module.mk
    engines/ags/plugins/plugin_base.cpp


diff --git a/engines/ags/module.mk b/engines/ags/module.mk
index 354b522c404..6f1d3a50488 100644
--- a/engines/ags/module.mk
+++ b/engines/ags/module.mk
@@ -351,6 +351,7 @@ MODULE_OBJS = \
 	plugins/ags_shell/ags_shell.o \
 	plugins/ags_tcp_ip/ags_tcp_ip.o \
 	plugins/ags_touch/ags_touch.o \
+	plugins/ags_trans/ags_trans.o \
 	plugins/ags_wadjet_util/ags_wadjet_util.o \
 	plugins/ags_waves/ags_waves.o \
 	plugins/ags_waves/data.o \
diff --git a/engines/ags/plugins/ags_trans/ags_trans.cpp b/engines/ags/plugins/ags_trans/ags_trans.cpp
new file mode 100644
index 00000000000..9993f51c832
--- /dev/null
+++ b/engines/ags/plugins/ags_trans/ags_trans.cpp
@@ -0,0 +1,81 @@
+/* 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
+ * 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 "ags/plugins/ags_trans/ags_trans.h"
+
+namespace AGS3 {
+namespace Plugins {
+namespace AGSTrans {
+
+const char *AGSTrans::AGS_GetPluginName() {
+	return "AGS Trans";
+}
+
+void AGSTrans::AGS_EngineStartup(IAGSEngine *engine) {
+	PluginBase::AGS_EngineStartup(engine);
+
+	SCRIPT_METHOD(GenerateArray, AGSTrans::GenerateArray);
+	SCRIPT_METHOD(LoadArray, AGSTrans::LoadArray);
+	SCRIPT_METHOD(CreateTransparentOverlay, AGSTrans::CreateTransparentOverlay);
+	SCRIPT_METHOD(CreateColorisedOverlay, AGSTrans::CreateColorisedOverlay);
+	SCRIPT_METHOD(RemoveTransOverlay, AGSTrans::RemoveTransOverlay);
+	SCRIPT_METHOD(ChangeOverlayAlpha, AGSTrans::ChangeOverlayAlpha);
+	SCRIPT_METHOD(ChangeOverlayPosition, AGSTrans::ChangeOverlayPosition);
+}
+
+void AGSTrans::GenerateArray(ScriptMethodParams &params) {
+	// TODO
+	warning("STUB: AGSTrans::GenerateArray");
+}
+
+void AGSTrans::LoadArray(ScriptMethodParams &params) {
+	// TODO
+	warning("STUB: AGSTrans::LoadArray");
+}
+
+void AGSTrans::CreateTransparentOverlay(ScriptMethodParams &params) {
+	// TODO
+	warning("STUB: AGSTrans::CreateTransparentOverlay");
+}
+
+void AGSTrans::CreateColorisedOverlay(ScriptMethodParams &params) {
+	// TODO
+	warning("STUB: AGSTrans::CreateColorisedOverlay");
+}
+
+void AGSTrans::RemoveTransOverlay(ScriptMethodParams &params) {
+	// TODO
+	warning("STUB: AGSTrans::RemoveTransOverlay");
+}
+
+void AGSTrans::ChangeOverlayAlpha(ScriptMethodParams &params) {
+	// TODO
+	warning("STUB: AGSTrans::ChangeOverlayAlpha");
+}
+
+void AGSTrans::ChangeOverlayPosition(ScriptMethodParams &params) {
+	// TODO
+	warning("STUB: AGSTrans::ChangeOverlayPosition");
+}
+
+} // namespace AGSTrans
+} // namespace Plugins
+} // namespace AGS3
diff --git a/engines/ags/plugins/ags_trans/ags_trans.h b/engines/ags/plugins/ags_trans/ags_trans.h
new file mode 100644
index 00000000000..9000659b2d7
--- /dev/null
+++ b/engines/ags/plugins/ags_trans/ags_trans.h
@@ -0,0 +1,56 @@
+/* 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
+ * 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 AGS_PLUGINS_AGS_TRANS_H
+#define AGS_PLUGINS_AGS_TRANS_H
+
+#include "ags/plugins/ags_plugin.h"
+
+namespace AGS3 {
+namespace Plugins {
+namespace AGSTrans {
+
+class AGSTrans : public PluginBase {
+	SCRIPT_HASH(AGSTrans)
+
+private:
+	void GenerateArray(ScriptMethodParams &params);
+	void LoadArray(ScriptMethodParams &params);
+	void CreateTransparentOverlay(ScriptMethodParams &params);
+	void CreateColorisedOverlay(ScriptMethodParams &params);
+	void RemoveTransOverlay(ScriptMethodParams &params);
+	void ChangeOverlayAlpha(ScriptMethodParams &params);
+	void ChangeOverlayPosition(ScriptMethodParams &params);
+
+public:
+	AGSTrans() : PluginBase() {}
+	virtual ~AGSTrans() {}
+
+	const char *AGS_GetPluginName() override;
+	void AGS_EngineStartup(IAGSEngine *engine) override;
+
+};
+
+} // namespace AGSTrans
+} // namespace Plugins
+} // namespace AGS3
+
+#endif
diff --git a/engines/ags/plugins/plugin_base.cpp b/engines/ags/plugins/plugin_base.cpp
index da2736cc12d..d52dfd9871d 100644
--- a/engines/ags/plugins/plugin_base.cpp
+++ b/engines/ags/plugins/plugin_base.cpp
@@ -43,6 +43,7 @@
 #include "ags/plugins/ags_sprite_font/ags_sprite_font_clifftop.h"
 #include "ags/plugins/ags_tcp_ip/ags_tcp_ip.h"
 #include "ags/plugins/ags_touch/ags_touch.h"
+#include "ags/plugins/ags_trans/ags_trans.h"
 #include "ags/plugins/ags_wadjet_util/ags_wadjet_util.h"
 #include "ags/plugins/ags_waves/ags_waves.h"
 #include "ags/ags.h"
@@ -137,6 +138,9 @@ Plugins::PluginBase *pluginOpen(const char *filename) {
 	if (fname.equalsIgnoreCase("AGSTouch"))
 		return new AGSTouch::AGSTouch();
 
+	if (fname.equalsIgnoreCase("AGSTrans"))
+		return new AGSTrans::AGSTrans();
+
 	if (fname.equalsIgnoreCase("AGSWadjetUtil"))
 		return new AGSWadjetUtil::AGSWadjetUtil();
 




More information about the Scummvm-git-logs mailing list