mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Refactor module initialization
* Changed to use the same stages as extensions. * Makes the initialization more coherent, helping solve problems due to lack of stages. * Makes it easier to port between module and extension. * removed the DRIVER initialization level (no longer needed).
This commit is contained in:
@@ -32,9 +32,17 @@
|
||||
|
||||
#include "ogg_packet_sequence.h"
|
||||
|
||||
void register_ogg_types() {
|
||||
void initialize_ogg_module(ModuleInitializationLevel p_level) {
|
||||
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
|
||||
return;
|
||||
}
|
||||
|
||||
GDREGISTER_CLASS(OGGPacketSequence);
|
||||
GDREGISTER_CLASS(OGGPacketSequencePlayback);
|
||||
}
|
||||
|
||||
void unregister_ogg_types() {}
|
||||
void uninitialize_ogg_module(ModuleInitializationLevel p_level) {
|
||||
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
#ifndef OGG_REGISTER_TYPES_H
|
||||
#define OGG_REGISTER_TYPES_H
|
||||
|
||||
void register_ogg_types();
|
||||
void unregister_ogg_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void initialize_ogg_module(ModuleInitializationLevel p_level);
|
||||
void uninitialize_ogg_module(ModuleInitializationLevel p_level);
|
||||
|
||||
#endif // OGG_REGISTER_TYPES_H
|
||||
|
||||
Reference in New Issue
Block a user