aboutsummaryrefslogtreecommitdiff
path: root/extension/src/Checksum.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'extension/src/Checksum.hpp')
-rw-r--r--extension/src/Checksum.hpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/extension/src/Checksum.hpp b/extension/src/Checksum.hpp
new file mode 100644
index 0000000..ebdbd43
--- /dev/null
+++ b/extension/src/Checksum.hpp
@@ -0,0 +1,38 @@
+#pragma once
+
+#include <godot_cpp/classes/object.hpp>
+#include <godot_cpp/core/class_db.hpp>
+#include <godot_cpp/variant/utility_functions.hpp>
+
+namespace OpenVic2 {
+ class Checksum : public godot::Object {
+ GDCLASS(Checksum, godot::Object)
+
+ //BEGIN BOILERPLATE
+ static Checksum* _checksum;
+
+ 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
+
+ inline godot::String get_checksum_text() {
+ return godot::String("1234abcd");
+ }
+ };
+
+ Checksum* Checksum::_checksum = nullptr;
+} \ No newline at end of file