aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/Checksum.hpp
blob: 38839df3cb74862fbcbd7586fe489ee7bf6a821a (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
      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");
      }
   };
}