aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/Checksum.cpp
diff options
context:
space:
mode:
author Spartan322 <Megacake1234@gmail.com>2023-11-10 05:14:58 +0100
committer Spartan322 <Megacake1234@gmail.com>2023-11-10 23:15:32 +0100
commitcf591eddfa59839c2620ebf119727f069b965dfe (patch)
tree65ca78284e4ed1a2b07716018a721aaaf68d3830 /extension/src/openvic-extension/Checksum.cpp
parentf8da0860795d273452501fa4d7fbfcc40073a884 (diff)
Add ClassBinding helpers
OV_BIND_METHOD OV_BIND_SMETHOD OV_BIND_SMETHOD_L Change _bind_methods to use ClassBinding helpers Add utility/StringLiteral Make `GameSingleton::singleton` inline Move `OpenVic::Checksum` implementation to source file Update scripts to ce1aef8d7d9d5ba9851a1abdd981d3b796024079
Diffstat (limited to 'extension/src/openvic-extension/Checksum.cpp')
-rw-r--r--extension/src/openvic-extension/Checksum.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/extension/src/openvic-extension/Checksum.cpp b/extension/src/openvic-extension/Checksum.cpp
new file mode 100644
index 0000000..6da5afe
--- /dev/null
+++ b/extension/src/openvic-extension/Checksum.cpp
@@ -0,0 +1,34 @@
+#include "Checksum.hpp"
+
+#include <godot_cpp/core/error_macros.hpp>
+#include <godot_cpp/variant/string.hpp>
+
+#include "openvic-extension/utility/ClassBindings.hpp"
+
+using namespace OpenVic;
+using namespace godot;
+
+void Checksum::_bind_methods() {
+ OV_BIND_METHOD(Checksum::get_checksum_text);
+}
+
+Checksum* Checksum::get_singleton() {
+ return _checksum;
+}
+
+Checksum::Checksum() {
+ ERR_FAIL_COND(_checksum != nullptr);
+ _checksum = this;
+}
+
+Checksum::~Checksum() {
+ ERR_FAIL_COND(_checksum != this);
+ _checksum = nullptr;
+}
+
+/* REQUIREMENTS:
+ * DAT-8
+ */
+godot::String Checksum::get_checksum_text() {
+ return godot::String("1234abcd");
+}