aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/Checksum.hpp
blob: c5d8dafbf534558fea2af7ed0dd6bb01d262d2ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once

#include <godot_cpp/core/class_db.hpp>

namespace OpenVic {
   class Checksum : public godot::Object {
      GDCLASS(Checksum, godot::Object)

      // BEGIN BOILERPLATE
      static inline Checksum* _checksum = nullptr;

   protected:
      static void _bind_methods() {
         godot::ClassDB::bind_method(godot::D_METHOD("get_checksum_text"), &Checksum::get_checksum_text);
      }

   public:
      static inline 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");
      }
   };
}