Updated register_types.h and cpp to the current godot 4 style.

This commit is contained in:
Relintai 2023-01-08 15:56:11 +01:00
parent 46bb1f610b
commit 6d0449cdac
2 changed files with 17 additions and 13 deletions

View File

@ -8,19 +8,15 @@
#include "core/object/class_db.h" #include "core/object/class_db.h"
#endif #endif
#include "noise.h"
#include "fastnoise_noise_params.h" #include "fastnoise_noise_params.h"
#include "noise.h"
void initialize_fastnoise_module(ModuleInitializationLevel p_level) {
void register_fastnoise_types() { if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) {
GDREGISTER_CLASS(FastNoise);
ClassDB::register_class<FastNoise>(); GDREGISTER_CLASS(FastnoiseNoiseParams);
ClassDB::register_class<FastnoiseNoiseParams>(); }
} }
void uninitialize_fastnoise_module(ModuleInitializationLevel p_level) {
void unregister_fastnoise_types() {
} }

View File

@ -1,2 +1,10 @@
void register_fastnoise_types();
void unregister_fastnoise_types(); #ifndef GODOT_FASTNOISE_REGISTER_TYPES_H
#define GODOT_FASTNOISE_REGISTER_TYPES_H
#include "modules/register_module_types.h"
void initialize_fastnoise_module(ModuleInitializationLevel p_level);
void uninitialize_fastnoise_module(ModuleInitializationLevel p_level);
#endif