aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/Checksum.hpp
diff options
context:
space:
mode:
author George L. Albany <Megacake1234@gmail.com>2023-11-10 23:39:21 +0100
committer GitHub <noreply@github.com>2023-11-10 23:39:21 +0100
commit0008bd6bf3d00cc284199be668c0b03d9f2c5d77 (patch)
tree65ca78284e4ed1a2b07716018a721aaaf68d3830 /extension/src/openvic-extension/Checksum.hpp
parentf8da0860795d273452501fa4d7fbfcc40073a884 (diff)
parentcf591eddfa59839c2620ebf119727f069b965dfe (diff)
Merge pull request #163 from Spartan322/improve-binding
Diffstat (limited to 'extension/src/openvic-extension/Checksum.hpp')
-rw-r--r--extension/src/openvic-extension/Checksum.hpp27
1 files changed, 7 insertions, 20 deletions
diff --git a/extension/src/openvic-extension/Checksum.hpp b/extension/src/openvic-extension/Checksum.hpp
index c5d8daf..2b2f959 100644
--- a/extension/src/openvic-extension/Checksum.hpp
+++ b/extension/src/openvic-extension/Checksum.hpp
@@ -1,6 +1,8 @@
#pragma once
#include <godot_cpp/core/class_db.hpp>
+#include <godot_cpp/core/object.hpp>
+#include <godot_cpp/variant/string.hpp>
namespace OpenVic {
class Checksum : public godot::Object {
@@ -10,30 +12,15 @@ namespace OpenVic {
static inline Checksum* _checksum = nullptr;
protected:
- static void _bind_methods() {
- godot::ClassDB::bind_method(godot::D_METHOD("get_checksum_text"), &Checksum::get_checksum_text);
- }
+ static void _bind_methods();
public:
- static inline Checksum* get_singleton() {
- return _checksum;
- }
+ static Checksum* get_singleton();
- inline Checksum() {
- ERR_FAIL_COND(_checksum != nullptr);
- _checksum = this;
- }
- inline ~Checksum() {
- ERR_FAIL_COND(_checksum != this);
- _checksum = nullptr;
- }
+ Checksum();
+ ~Checksum();
// END BOILERPLATE
- /* REQUIREMENTS:
- * DAT-8
- */
- inline godot::String get_checksum_text() {
- return godot::String("1234abcd");
- }
+ godot::String get_checksum_text();
};
}