aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/Checksum.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'extension/src/openvic-extension/Checksum.hpp')
-rw-r--r--extension/src/openvic-extension/Checksum.hpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/extension/src/openvic-extension/Checksum.hpp b/extension/src/openvic-extension/Checksum.hpp
new file mode 100644
index 0000000..b12a9cd
--- /dev/null
+++ b/extension/src/openvic-extension/Checksum.hpp
@@ -0,0 +1,37 @@
+#pragma once
+
+#include <godot_cpp/core/class_db.hpp>
+
+namespace OpenVic {
+ class Checksum : public godot::Object {
+ GDCLASS(Checksum, godot::Object)
+
+ // BEGIN BOILERPLATE
+ inline static Checksum* _checksum = nullptr;
+
+ protected:
+ static void _bind_methods() {
+ godot::ClassDB::bind_method(godot::D_METHOD("get_checksum_text"), &Checksum::get_checksum_text);
+ }
+
+ public:
+ inline static Checksum* get_singleton() { return _checksum; }
+
+ inline Checksum() {
+ ERR_FAIL_COND(_checksum != nullptr);
+ _checksum = this;
+ }
+ inline ~Checksum() {
+ ERR_FAIL_COND(_checksum != this);
+ _checksum = nullptr;
+ }
+ // END BOILERPLATE
+
+ /* REQUIREMENTS:
+ * DAT-8
+ */
+ inline godot::String get_checksum_text() {
+ return godot::String("1234abcd");
+ }
+ };
+}