aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/Checksum.hpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-09-14 21:17:04 +0200
committer GitHub <noreply@github.com>2023-09-14 21:17:04 +0200
commit9de41a0ed5f050f205219ab2a9f114800d048c14 (patch)
tree559681d5a2569adc307409d818311760edc12654 /extension/src/openvic-extension/Checksum.hpp
parent1013b3c21226f703caba954664628694aedde469 (diff)
parent70c040d042cb536e5ce16b0cfff0e0afa39e8ed7 (diff)
Merge pull request #151 from OpenVicProject/dataloading
Build system cleanup + dataloading scaffolding + JSON dataloading removed
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");
+ }
+ };
+}