aboutsummaryrefslogtreecommitdiff
path: root/extension/src/register_types.cpp
diff options
context:
space:
mode:
author BrickPi <49528459+BrickPi@users.noreply.github.com>2023-02-27 13:09:41 +0100
committer GitHub <noreply@github.com>2023-02-27 13:09:41 +0100
commite637c3afe2854488d1c2e755e0272f431105c404 (patch)
tree14d5cd52e699d5ebe8602dc3243b71689eec19c5 /extension/src/register_types.cpp
parent93c6b207c11fdaba484410eb53fc11b35fbbb3bd (diff)
Add Main Menu Version and Checksum Labels (#44)
Diffstat (limited to 'extension/src/register_types.cpp')
-rw-r--r--extension/src/register_types.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/extension/src/register_types.cpp b/extension/src/register_types.cpp
index 84e4dc4..aac38b9 100644
--- a/extension/src/register_types.cpp
+++ b/extension/src/register_types.cpp
@@ -7,12 +7,14 @@
#include "TestSingleton.hpp"
#include "Simulation.hpp"
+#include "Checksum.hpp"
using namespace godot;
using namespace OpenVic2;
static TestSingleton* _test_singleton;
static Simulation* _simulation;
+static Checksum* _checksum;
void initialize_openvic2_types(ModuleInitializationLevel p_level)
{
@@ -28,6 +30,10 @@ void initialize_openvic2_types(ModuleInitializationLevel p_level)
_simulation = memnew(Simulation);
Engine::get_singleton()->register_singleton("Simulation", Simulation::get_singleton());
+ ClassDB::register_class<Checksum>();
+ _checksum = memnew(Checksum);
+ Engine::get_singleton()->register_singleton("Checksum", Checksum::get_singleton());
+
}
void uninitialize_openvic2_types(ModuleInitializationLevel p_level) {
@@ -40,6 +46,9 @@ void uninitialize_openvic2_types(ModuleInitializationLevel p_level) {
Engine::get_singleton()->unregister_singleton("Simulation");
memdelete(_simulation);
+
+ Engine::get_singleton()->unregister_singleton("Checksum");
+ memdelete(_checksum);
}
extern "C"