From 7c5d89d711bccfafbfab0b670372ab5d1266d2aa Mon Sep 17 00:00:00 2001 From: somebody_master Date: Sun, 12 Feb 2023 14:04:31 +0100 Subject: [PATCH] =?UTF-8?q?Formateo=20del=20c=C3=B3digo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: somebody_master --- gdextension/src/register_types.cpp | 32 ++++++++++++------------------ gdextension/src/test.h | 4 ++-- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/gdextension/src/register_types.cpp b/gdextension/src/register_types.cpp index 0bff7d2..d0ab6b5 100644 --- a/gdextension/src/register_types.cpp +++ b/gdextension/src/register_types.cpp @@ -16,33 +16,27 @@ using namespace godot; void initialize_test_module(ModuleInitializationLevel p_level) { - if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { - return; - } + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } - ClassDB::register_class(); + ClassDB::register_class(); } void uninitialize_test_module(ModuleInitializationLevel p_level) { - if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { - return; - } + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } } extern "C" { // Initialization. -GDExtensionBool GDE_EXPORT -test_library_init(const GDExtensionInterface *p_interface, - GDExtensionClassLibraryPtr p_library, - GDExtensionInitialization *r_initialization) { - godot::GDExtensionBinding::InitObject init_obj(p_interface, p_library, - r_initialization); +GDExtensionBool GDE_EXPORT test_library_init(const GDExtensionInterface *p_interface, GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization) { + godot::GDExtensionBinding::InitObject init_obj(p_interface, p_library, r_initialization); + init_obj.register_initializer(initialize_test_module); + init_obj.register_terminator(uninitialize_test_module); + init_obj.set_minimum_library_initialization_level(MODULE_INITIALIZATION_LEVEL_SCENE); - init_obj.register_initializer(initialize_test_module); - init_obj.register_terminator(uninitialize_test_module); - init_obj.set_minimum_library_initialization_level( - MODULE_INITIALIZATION_LEVEL_SCENE); - - return init_obj.init(); + return init_obj.init(); } } diff --git a/gdextension/src/test.h b/gdextension/src/test.h index 257b016..954eee3 100644 --- a/gdextension/src/test.h +++ b/gdextension/src/test.h @@ -6,10 +6,10 @@ using namespace godot; class Test : public Node3D { - GDCLASS(Test, Node3D); + GDCLASS(Test, Node3D); protected: - static void _bind_methods() {} + static void _bind_methods() {} }; #endif