mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-24 04:46:48 +01:00
Added module initialization levels (similar idea to what's in godot4, although I added more).
This commit is contained in:
parent
642a590949
commit
e9a19c1a66
@ -35,14 +35,14 @@
|
||||
|
||||
static Ref<ResourceFormatPKM> resource_loader_pkm;
|
||||
|
||||
void register_etc_types() {
|
||||
void register_etc_types(ModuleRegistrationLevel p_level) {
|
||||
resource_loader_pkm.instance();
|
||||
ResourceLoader::add_resource_format_loader(resource_loader_pkm);
|
||||
|
||||
_register_etc_compress_func();
|
||||
}
|
||||
|
||||
void unregister_etc_types() {
|
||||
void unregister_etc_types(ModuleRegistrationLevel p_level) {
|
||||
ResourceLoader::remove_resource_format_loader(resource_loader_pkm);
|
||||
resource_loader_pkm.unref();
|
||||
}
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_etc_types();
|
||||
void unregister_etc_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_etc_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_etc_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // ETC_REGISTER_TYPES_H
|
||||
|
@ -50,7 +50,7 @@ static void _editor_init() {
|
||||
}
|
||||
#endif
|
||||
|
||||
void register_gltf_types() {
|
||||
void register_gltf_types(ModuleRegistrationLevel p_level) {
|
||||
#ifdef TOOLS_ENABLED
|
||||
ClassDB::APIType prev_api = ClassDB::get_current_api();
|
||||
ClassDB::set_current_api(ClassDB::API_EDITOR);
|
||||
@ -78,7 +78,7 @@ void register_gltf_types() {
|
||||
ClassDB::register_class<PackedSceneGLTF>();
|
||||
}
|
||||
|
||||
void unregister_gltf_types() {
|
||||
void unregister_gltf_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
||||
|
||||
#endif // _3D_DISABLED
|
||||
|
@ -32,8 +32,10 @@
|
||||
|
||||
#ifndef _3D_DISABLED
|
||||
|
||||
void register_gltf_types();
|
||||
void unregister_gltf_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_gltf_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_gltf_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // _3D_DISABLED
|
||||
|
||||
|
@ -26,11 +26,11 @@ SOFTWARE.
|
||||
#include "plugin_refresher_editor_plugin.h"
|
||||
#endif
|
||||
|
||||
void register_plugin_refresher_types() {
|
||||
void register_plugin_refresher_types(ModuleRegistrationLevel p_level) {
|
||||
#ifdef TOOLS_ENABLED
|
||||
EditorPlugins::add_by_type<PluginRefresherEditorPlugin>();
|
||||
#endif
|
||||
}
|
||||
|
||||
void unregister_plugin_refresher_types() {
|
||||
void unregister_plugin_refresher_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
||||
|
@ -20,5 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
void register_plugin_refresher_types();
|
||||
void unregister_plugin_refresher_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_plugin_refresher_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_plugin_refresher_types(ModuleRegistrationLevel p_level);
|
||||
|
@ -32,7 +32,7 @@ SOFTWARE.
|
||||
|
||||
Ref<TextEditorTextLoader> text_editor_text_resource_loader;
|
||||
|
||||
void register_text_editor_types() {
|
||||
void register_text_editor_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<TextEditorFile>();
|
||||
|
||||
text_editor_text_resource_loader.instance();
|
||||
@ -43,7 +43,7 @@ void register_text_editor_types() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void unregister_text_editor_types() {
|
||||
void unregister_text_editor_types(ModuleRegistrationLevel p_level) {
|
||||
ResourceLoader::remove_resource_format_loader(text_editor_text_resource_loader);
|
||||
text_editor_text_resource_loader.unref();
|
||||
}
|
||||
|
@ -20,5 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
void register_text_editor_types();
|
||||
void unregister_text_editor_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_text_editor_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_text_editor_types(ModuleRegistrationLevel p_level);
|
||||
|
@ -35,14 +35,14 @@
|
||||
|
||||
static ImageLoaderTinyEXR *image_loader_tinyexr = nullptr;
|
||||
|
||||
void register_tinyexr_types() {
|
||||
void register_tinyexr_types(ModuleRegistrationLevel p_level) {
|
||||
image_loader_tinyexr = memnew(ImageLoaderTinyEXR);
|
||||
ImageLoader::add_image_format_loader(image_loader_tinyexr);
|
||||
|
||||
Image::save_exr_func = save_exr;
|
||||
}
|
||||
|
||||
void unregister_tinyexr_types() {
|
||||
void unregister_tinyexr_types(ModuleRegistrationLevel p_level) {
|
||||
memdelete(image_loader_tinyexr);
|
||||
|
||||
Image::save_exr_func = nullptr;
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_tinyexr_types();
|
||||
void unregister_tinyexr_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_tinyexr_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_tinyexr_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // TINYEXR_REGISTER_TYPES_H
|
||||
|
@ -1520,7 +1520,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
|
||||
MAIN_PRINT("Main: Load Modules, Physics, Drivers, Scripts");
|
||||
|
||||
register_platform_apis();
|
||||
register_module_types();
|
||||
register_module_types(ModuleRegistrationLevel::MODULE_REGISTRATION_LEVEL_CORE);
|
||||
|
||||
// Theme needs modules to be initialized so that sub-resources can be loaded.
|
||||
initialize_theme();
|
||||
@ -2440,7 +2440,7 @@ void Main::cleanup(bool p_force) {
|
||||
ImageLoader::cleanup();
|
||||
|
||||
unregister_driver_types();
|
||||
unregister_module_types();
|
||||
unregister_module_types(ModuleRegistrationLevel::MODULE_REGISTRATION_LEVEL_CORE);
|
||||
unregister_platform_apis();
|
||||
unregister_scene_types();
|
||||
unregister_server_types();
|
||||
|
@ -309,10 +309,10 @@ def write_modules(modules):
|
||||
with open(os.path.join(path, "register_types.h")):
|
||||
includes_cpp += '#include "' + path + '/register_types.h"\n'
|
||||
register_cpp += "#ifdef MODULE_" + name.upper() + "_ENABLED\n"
|
||||
register_cpp += "\tregister_" + name + "_types();\n"
|
||||
register_cpp += "\tregister_" + name + "_types(p_level);\n"
|
||||
register_cpp += "#endif\n"
|
||||
unregister_cpp += "#ifdef MODULE_" + name.upper() + "_ENABLED\n"
|
||||
unregister_cpp += "\tunregister_" + name + "_types();\n"
|
||||
unregister_cpp += "\tunregister_" + name + "_types(p_level);\n"
|
||||
unregister_cpp += "#endif\n"
|
||||
except IOError:
|
||||
pass
|
||||
@ -325,11 +325,11 @@ def write_modules(modules):
|
||||
|
||||
%s
|
||||
|
||||
void register_module_types() {
|
||||
void register_module_types(ModuleRegistrationLevel p_level) {
|
||||
%s
|
||||
}
|
||||
|
||||
void unregister_module_types() {
|
||||
void unregister_module_types(ModuleRegistrationLevel p_level) {
|
||||
%s
|
||||
}
|
||||
""" % (
|
||||
|
@ -34,11 +34,11 @@
|
||||
|
||||
static ImageLoaderBMP *image_loader_bmp = nullptr;
|
||||
|
||||
void register_bmp_types() {
|
||||
void register_bmp_types(ModuleRegistrationLevel p_level) {
|
||||
image_loader_bmp = memnew(ImageLoaderBMP);
|
||||
ImageLoader::add_image_format_loader(image_loader_bmp);
|
||||
}
|
||||
|
||||
void unregister_bmp_types() {
|
||||
void unregister_bmp_types(ModuleRegistrationLevel p_level) {
|
||||
memdelete(image_loader_bmp);
|
||||
}
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_bmp_types();
|
||||
void unregister_bmp_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_bmp_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_bmp_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // BMP_REGISTER_TYPES_H
|
||||
|
@ -26,9 +26,9 @@ SOFTWARE.
|
||||
|
||||
#include "biome_terrain_generator.h"
|
||||
|
||||
void register_broken_seals_module_types() {
|
||||
void register_broken_seals_module_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<BiomeTerrainGenerator>();
|
||||
}
|
||||
|
||||
void unregister_broken_seals_module_types() {
|
||||
void unregister_broken_seals_module_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
||||
|
@ -26,7 +26,9 @@ SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
void register_broken_seals_module_types();
|
||||
void unregister_broken_seals_module_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_broken_seals_module_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_broken_seals_module_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif
|
||||
|
@ -136,7 +136,7 @@ static void _editor_init() {
|
||||
|
||||
#endif // TOOLS_ENABLED
|
||||
|
||||
void register_cscript_types() {
|
||||
void register_cscript_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<CScript>();
|
||||
|
||||
script_language_cscript = memnew(CScriptLanguage);
|
||||
@ -154,7 +154,7 @@ void register_cscript_types() {
|
||||
#endif // TOOLS_ENABLED
|
||||
}
|
||||
|
||||
void unregister_cscript_types() {
|
||||
void unregister_cscript_types(ModuleRegistrationLevel p_level) {
|
||||
ScriptServer::unregister_language(script_language_cscript);
|
||||
|
||||
if (script_language_cscript) {
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_cscript_types();
|
||||
void unregister_cscript_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_cscript_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_cscript_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // CSCRIPT_REGISTER_TYPES_H
|
||||
|
@ -34,11 +34,11 @@
|
||||
|
||||
#include "image_compress_cvtt.h"
|
||||
|
||||
void register_cvtt_types() {
|
||||
void register_cvtt_types(ModuleRegistrationLevel p_level) {
|
||||
Image::set_compress_bptc_func(image_compress_cvtt);
|
||||
Image::_image_decompress_bptc = image_decompress_cvtt;
|
||||
}
|
||||
|
||||
void unregister_cvtt_types() {}
|
||||
void unregister_cvtt_types(ModuleRegistrationLevel p_level) {}
|
||||
|
||||
#endif
|
||||
|
@ -32,8 +32,10 @@
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
|
||||
void register_cvtt_types();
|
||||
void unregister_cvtt_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_cvtt_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_cvtt_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // TOOLS_ENABLED
|
||||
|
||||
|
@ -35,7 +35,7 @@ SOFTWARE.
|
||||
|
||||
DatabaseManager *_database_manager = nullptr;
|
||||
|
||||
void register_database_types() {
|
||||
void register_database_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<Database>();
|
||||
ClassDB::register_class<DatabaseConnection>();
|
||||
ClassDB::register_class<DatabaseManager>();
|
||||
@ -49,7 +49,7 @@ void register_database_types() {
|
||||
Engine::get_singleton()->add_singleton(Engine::Singleton("DatabaseManager", DatabaseManager::get_singleton()));
|
||||
}
|
||||
|
||||
void unregister_database_types() {
|
||||
void unregister_database_types(ModuleRegistrationLevel p_level) {
|
||||
if (_database_manager) {
|
||||
memdelete(_database_manager);
|
||||
}
|
||||
|
@ -20,5 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
void register_database_types();
|
||||
void unregister_database_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_database_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_database_types(ModuleRegistrationLevel p_level);
|
||||
|
@ -24,9 +24,9 @@ SOFTWARE.
|
||||
|
||||
#include "sqlite3_database.h"
|
||||
|
||||
void register_database_sqlite_types() {
|
||||
void register_database_sqlite_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<SQLite3Database>();
|
||||
}
|
||||
|
||||
void unregister_database_sqlite_types() {
|
||||
void unregister_database_sqlite_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
||||
|
@ -20,5 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
void register_database_sqlite_types();
|
||||
void unregister_database_sqlite_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_database_sqlite_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_database_sqlite_types(ModuleRegistrationLevel p_level);
|
||||
|
@ -34,12 +34,12 @@
|
||||
|
||||
static Ref<ResourceFormatDDS> resource_loader_dds;
|
||||
|
||||
void register_dds_types() {
|
||||
void register_dds_types(ModuleRegistrationLevel p_level) {
|
||||
resource_loader_dds.instance();
|
||||
ResourceLoader::add_resource_format_loader(resource_loader_dds);
|
||||
}
|
||||
|
||||
void unregister_dds_types() {
|
||||
void unregister_dds_types(ModuleRegistrationLevel p_level) {
|
||||
ResourceLoader::remove_resource_format_loader(resource_loader_dds);
|
||||
resource_loader_dds.unref();
|
||||
}
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_dds_types();
|
||||
void unregister_dds_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_dds_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_dds_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // DDS_REGISTER_TYPES_H
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
static bool enet_ok = false;
|
||||
|
||||
void register_enet_types() {
|
||||
void register_enet_types(ModuleRegistrationLevel p_level) {
|
||||
if (enet_initialize() != 0) {
|
||||
ERR_PRINT("ENet initialization failure");
|
||||
} else {
|
||||
@ -44,7 +44,7 @@ void register_enet_types() {
|
||||
ClassDB::register_class<NetworkedMultiplayerENet>();
|
||||
}
|
||||
|
||||
void unregister_enet_types() {
|
||||
void unregister_enet_types(ModuleRegistrationLevel p_level) {
|
||||
if (enet_ok) {
|
||||
enet_deinitialize();
|
||||
}
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_enet_types();
|
||||
void unregister_enet_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_enet_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_enet_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // ENET_REGISTER_TYPES_H
|
||||
|
@ -145,7 +145,7 @@ SOFTWARE.
|
||||
static ESS *entity_data_manager = NULL;
|
||||
static ProfileManager *profile_manager = NULL;
|
||||
|
||||
void register_entity_spell_system_types() {
|
||||
void register_entity_spell_system_types(ModuleRegistrationLevel p_level) {
|
||||
#ifdef MODULE_PROPS_ENABLED
|
||||
ClassDB::register_class<PropDataEntity>();
|
||||
#endif
|
||||
@ -288,7 +288,7 @@ void register_entity_spell_system_types() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void unregister_entity_spell_system_types() {
|
||||
void unregister_entity_spell_system_types(ModuleRegistrationLevel p_level) {
|
||||
if (entity_data_manager) {
|
||||
memdelete(entity_data_manager);
|
||||
}
|
||||
|
@ -20,5 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
void register_entity_spell_system_types();
|
||||
void unregister_entity_spell_system_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_entity_spell_system_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_entity_spell_system_types(ModuleRegistrationLevel p_level);
|
||||
|
@ -5,10 +5,10 @@
|
||||
#include "fastnoise_noise_params.h"
|
||||
#include "noise.h"
|
||||
|
||||
void register_fastnoise_types() {
|
||||
void register_fastnoise_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<FastNoise>();
|
||||
ClassDB::register_class<FastnoiseNoiseParams>();
|
||||
}
|
||||
|
||||
void unregister_fastnoise_types() {
|
||||
void unregister_fastnoise_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
||||
|
@ -1,2 +1,7 @@
|
||||
void register_fastnoise_types();
|
||||
void unregister_fastnoise_types();
|
||||
|
||||
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
|
||||
void register_fastnoise_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_fastnoise_types(ModuleRegistrationLevel p_level);
|
||||
|
@ -30,6 +30,6 @@
|
||||
|
||||
#include "register_types.h"
|
||||
|
||||
void register_freetype_types() {}
|
||||
void register_freetype_types(ModuleRegistrationLevel p_level) {}
|
||||
|
||||
void unregister_freetype_types() {}
|
||||
void unregister_freetype_types(ModuleRegistrationLevel p_level) {}
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_freetype_types();
|
||||
void unregister_freetype_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_freetype_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_freetype_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // FREETYPE_REGISTER_TYPES_H
|
||||
|
@ -136,7 +136,7 @@ static void _editor_init() {
|
||||
|
||||
#endif // TOOLS_ENABLED
|
||||
|
||||
void register_gdscript_types() {
|
||||
void register_gdscript_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<GDScript>();
|
||||
ClassDB::register_virtual_class<GDScriptFunctionState>();
|
||||
|
||||
@ -155,7 +155,7 @@ void register_gdscript_types() {
|
||||
#endif // TOOLS_ENABLED
|
||||
}
|
||||
|
||||
void unregister_gdscript_types() {
|
||||
void unregister_gdscript_types(ModuleRegistrationLevel p_level) {
|
||||
ScriptServer::unregister_language(script_language_gd);
|
||||
|
||||
if (script_language_gd) {
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_gdscript_types();
|
||||
void unregister_gdscript_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_gdscript_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_gdscript_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // GDSCRIPT_REGISTER_TYPES_H
|
||||
|
@ -40,7 +40,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void register_gridmap_types() {
|
||||
void register_gridmap_types(ModuleRegistrationLevel p_level) {
|
||||
#ifndef _3D_DISABLED
|
||||
ClassDB::register_class<GridMap>();
|
||||
ClassDB::register_class<MeshLibrary>();
|
||||
@ -51,5 +51,5 @@ void register_gridmap_types() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void unregister_gridmap_types() {
|
||||
void unregister_gridmap_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
||||
|
@ -31,7 +31,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_gridmap_types();
|
||||
void unregister_gridmap_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_gridmap_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_gridmap_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // GRIDMAP_REGISTER_TYPES_H
|
||||
|
@ -34,11 +34,11 @@
|
||||
|
||||
static ImageLoaderHDR *image_loader_hdr = nullptr;
|
||||
|
||||
void register_hdr_types() {
|
||||
void register_hdr_types(ModuleRegistrationLevel p_level) {
|
||||
image_loader_hdr = memnew(ImageLoaderHDR);
|
||||
ImageLoader::add_image_format_loader(image_loader_hdr);
|
||||
}
|
||||
|
||||
void unregister_hdr_types() {
|
||||
void unregister_hdr_types(ModuleRegistrationLevel p_level) {
|
||||
memdelete(image_loader_hdr);
|
||||
}
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_hdr_types();
|
||||
void unregister_hdr_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_hdr_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_hdr_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // HDR_REGISTER_TYPES_H
|
||||
|
@ -25,9 +25,9 @@ SOFTWARE.
|
||||
#include "web_server_simple.h"
|
||||
|
||||
|
||||
void register_http_server_simple_types() {
|
||||
void register_http_server_simple_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<WebServerSimple>();
|
||||
}
|
||||
|
||||
void unregister_http_server_simple_types() {
|
||||
void unregister_http_server_simple_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
||||
|
@ -22,7 +22,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
void register_http_server_simple_types();
|
||||
void unregister_http_server_simple_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_http_server_simple_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_http_server_simple_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif
|
||||
|
@ -34,11 +34,11 @@
|
||||
|
||||
static ImageLoaderJPG *image_loader_jpg = nullptr;
|
||||
|
||||
void register_jpg_types() {
|
||||
void register_jpg_types(ModuleRegistrationLevel p_level) {
|
||||
image_loader_jpg = memnew(ImageLoaderJPG);
|
||||
ImageLoader::add_image_format_loader(image_loader_jpg);
|
||||
}
|
||||
|
||||
void unregister_jpg_types() {
|
||||
void unregister_jpg_types(ModuleRegistrationLevel p_level) {
|
||||
memdelete(image_loader_jpg);
|
||||
}
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_jpg_types();
|
||||
void unregister_jpg_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_jpg_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_jpg_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // JPG_REGISTER_TYPES_H
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
#include "lz4_compressor.h"
|
||||
|
||||
void register_lz4_types() {
|
||||
void register_lz4_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<LZ4Compressor>();
|
||||
}
|
||||
|
||||
void unregister_lz4_types() {
|
||||
void unregister_lz4_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
#ifndef LZ4_REGISTER_TYPES_H
|
||||
#define LZ4_REGISTER_TYPES_H
|
||||
|
||||
void register_lz4_types();
|
||||
void unregister_lz4_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_lz4_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_lz4_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif
|
||||
|
@ -155,7 +155,7 @@ SOFTWARE.
|
||||
|
||||
static _MMAlgos *_mm_algos_singleton = nullptr;
|
||||
|
||||
void register_material_maker_types() {
|
||||
void register_material_maker_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<_MMAlgos>();
|
||||
|
||||
ClassDB::register_class<MMNodeUniversalProperty>();
|
||||
@ -379,7 +379,7 @@ void register_material_maker_types() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void unregister_material_maker_types() {
|
||||
void unregister_material_maker_types(ModuleRegistrationLevel p_level) {
|
||||
if (_mm_algos_singleton) {
|
||||
memdelete(_mm_algos_singleton);
|
||||
}
|
||||
|
@ -20,5 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
void register_material_maker_types();
|
||||
void unregister_material_maker_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_material_maker_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_material_maker_types(ModuleRegistrationLevel p_level);
|
||||
|
@ -35,14 +35,14 @@
|
||||
#include "packet_peer_mbed_dtls.h"
|
||||
#include "stream_peer_mbedtls.h"
|
||||
|
||||
void register_mbedtls_types() {
|
||||
void register_mbedtls_types(ModuleRegistrationLevel p_level) {
|
||||
CryptoMbedTLS::initialize_crypto();
|
||||
StreamPeerMbedTLS::initialize_ssl();
|
||||
PacketPeerMbedDTLS::initialize_dtls();
|
||||
DTLSServerMbedTLS::initialize();
|
||||
}
|
||||
|
||||
void unregister_mbedtls_types() {
|
||||
void unregister_mbedtls_types(ModuleRegistrationLevel p_level) {
|
||||
DTLSServerMbedTLS::finalize();
|
||||
PacketPeerMbedDTLS::finalize_dtls();
|
||||
StreamPeerMbedTLS::finalize_ssl();
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_mbedtls_types();
|
||||
void unregister_mbedtls_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_mbedtls_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_mbedtls_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // MBEDTLS_REGISTER_TYPES_H
|
||||
|
@ -52,7 +52,7 @@ SOFTWARE.
|
||||
#include "props_2d/prop_2d_data_mesh_data.h"
|
||||
#endif
|
||||
|
||||
void register_mesh_data_resource_types() {
|
||||
void register_mesh_data_resource_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<MeshDataResource>();
|
||||
ClassDB::register_class<MeshDataResourceCollection>();
|
||||
|
||||
@ -84,5 +84,5 @@ void register_mesh_data_resource_types() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void unregister_mesh_data_resource_types() {
|
||||
void unregister_mesh_data_resource_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
||||
|
@ -20,5 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
void register_mesh_data_resource_types();
|
||||
void unregister_mesh_data_resource_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_mesh_data_resource_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_mesh_data_resource_types(ModuleRegistrationLevel p_level);
|
||||
|
@ -32,7 +32,7 @@ SOFTWARE.
|
||||
|
||||
static MeshUtils *mesh_utils = NULL;
|
||||
|
||||
void register_mesh_utils_types() {
|
||||
void register_mesh_utils_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<FastQuadraticMeshSimplifier>();
|
||||
ClassDB::register_class<MeshMerger>();
|
||||
|
||||
@ -41,7 +41,7 @@ void register_mesh_utils_types() {
|
||||
Engine::get_singleton()->add_singleton(Engine::Singleton("MeshUtils", MeshUtils::get_singleton()));
|
||||
}
|
||||
|
||||
void unregister_mesh_utils_types() {
|
||||
void unregister_mesh_utils_types(ModuleRegistrationLevel p_level) {
|
||||
if (mesh_utils) {
|
||||
memdelete(mesh_utils);
|
||||
}
|
||||
|
@ -25,7 +25,9 @@ SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
void register_mesh_utils_types();
|
||||
void unregister_mesh_utils_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_mesh_utils_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_mesh_utils_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include "resource_importer_mp3.h"
|
||||
#endif
|
||||
|
||||
void register_minimp3_types() {
|
||||
void register_minimp3_types(ModuleRegistrationLevel p_level) {
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (Engine::get_singleton()->is_editor_hint()) {
|
||||
Ref<ResourceImporterMP3> mp3_import;
|
||||
@ -48,5 +48,5 @@ void register_minimp3_types() {
|
||||
ClassDB::register_class<AudioStreamMP3>();
|
||||
}
|
||||
|
||||
void unregister_minimp3_types() {
|
||||
void unregister_minimp3_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_minimp3_types();
|
||||
void unregister_minimp3_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_minimp3_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_minimp3_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // MINIMP3_REGISTER_TYPES_H
|
||||
|
@ -50,7 +50,7 @@ NavigationServer *new_server() {
|
||||
return memnew(PandemoniumNavigationServer);
|
||||
}
|
||||
|
||||
void register_navigation_types() {
|
||||
void register_navigation_types(ModuleRegistrationLevel p_level) {
|
||||
NavigationServerManager::set_default_server(new_server);
|
||||
|
||||
#ifndef _3D_DISABLED
|
||||
@ -64,7 +64,7 @@ void register_navigation_types() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void unregister_navigation_types() {
|
||||
void unregister_navigation_types(ModuleRegistrationLevel p_level) {
|
||||
#ifndef _3D_DISABLED
|
||||
if (_nav_mesh_generator) {
|
||||
memdelete(_nav_mesh_generator);
|
||||
|
@ -28,5 +28,7 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_navigation_types();
|
||||
void unregister_navigation_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_navigation_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_navigation_types(ModuleRegistrationLevel p_level);
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include "core/config/project_settings.h"
|
||||
|
||||
|
||||
void register_network_synchronizer_types() {
|
||||
void register_network_synchronizer_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<DataBuffer>();
|
||||
ClassDB::register_class<SceneDiff>();
|
||||
ClassDB::register_class<Interpolator>();
|
||||
@ -53,5 +53,5 @@ void register_network_synchronizer_types() {
|
||||
GLOBAL_DEF("NetworkSynchronizer/debug_doll_speedup", false);
|
||||
}
|
||||
|
||||
void unregister_network_synchronizer_types() {
|
||||
void unregister_network_synchronizer_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
||||
|
@ -32,5 +32,7 @@
|
||||
@author AndreaCatania
|
||||
*/
|
||||
|
||||
void register_network_synchronizer_types();
|
||||
void unregister_network_synchronizer_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_network_synchronizer_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_network_synchronizer_types(ModuleRegistrationLevel p_level);
|
||||
|
@ -32,6 +32,6 @@
|
||||
|
||||
// Dummy module as libogg is needed by other modules (vorbis, theora, opus, ...)
|
||||
|
||||
void register_ogg_types() {}
|
||||
void register_ogg_types(ModuleRegistrationLevel p_level) {}
|
||||
|
||||
void unregister_ogg_types() {}
|
||||
void unregister_ogg_types(ModuleRegistrationLevel p_level) {}
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_ogg_types();
|
||||
void unregister_ogg_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_ogg_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_ogg_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // OGG_REGISTER_TYPES_H
|
||||
|
@ -32,10 +32,10 @@
|
||||
#include "noise_texture.h"
|
||||
#include "open_simplex_noise.h"
|
||||
|
||||
void register_opensimplex_types() {
|
||||
void register_opensimplex_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<OpenSimplexNoise>();
|
||||
ClassDB::register_class<NoiseTexture>();
|
||||
}
|
||||
|
||||
void unregister_opensimplex_types() {
|
||||
void unregister_opensimplex_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_opensimplex_types();
|
||||
void unregister_opensimplex_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_opensimplex_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_opensimplex_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // OPENSIMPLEX_REGISTER_TYPES_H
|
||||
|
@ -32,6 +32,6 @@
|
||||
|
||||
// Dummy module as libvorbis is needed by other modules (theora ...)
|
||||
|
||||
void register_opus_types() {}
|
||||
void register_opus_types(ModuleRegistrationLevel p_level) {}
|
||||
|
||||
void unregister_opus_types() {}
|
||||
void unregister_opus_types(ModuleRegistrationLevel p_level) {}
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_opus_types();
|
||||
void unregister_opus_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_opus_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_opus_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // OPUS_REGISTER_TYPES_H
|
||||
|
@ -52,7 +52,7 @@ SOFTWARE.
|
||||
#include "editor/paint_editor_plugin.h"
|
||||
#endif
|
||||
|
||||
void register_paint_types() {
|
||||
void register_paint_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<PaintAction>();
|
||||
|
||||
ClassDB::register_class<BrightenAction>();
|
||||
@ -84,5 +84,5 @@ void register_paint_types() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void unregister_paint_types() {
|
||||
void unregister_paint_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
||||
|
@ -20,5 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
void register_paint_types();
|
||||
void unregister_paint_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_paint_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_paint_types(ModuleRegistrationLevel p_level);
|
||||
|
@ -71,7 +71,7 @@ SOFTWARE.
|
||||
static PropUtils *prop_utils = NULL;
|
||||
static PropCache *prop_texture_cache = NULL;
|
||||
|
||||
void register_props_types() {
|
||||
void register_props_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<TiledWall>();
|
||||
ClassDB::register_class<TiledWallData>();
|
||||
|
||||
@ -138,7 +138,7 @@ void register_props_types() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void unregister_props_types() {
|
||||
void unregister_props_types(ModuleRegistrationLevel p_level) {
|
||||
if (prop_utils) {
|
||||
memdelete(prop_utils);
|
||||
}
|
||||
|
@ -22,7 +22,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
void register_props_types();
|
||||
void unregister_props_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_props_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_props_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif
|
||||
|
@ -71,7 +71,7 @@ SOFTWARE.
|
||||
static Prop2DUtils *prop_utils = NULL;
|
||||
static Prop2DCache *prop_texture_cache = NULL;
|
||||
|
||||
void register_props_2d_types() {
|
||||
void register_props_2d_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<TiledWall2D>();
|
||||
ClassDB::register_class<TiledWall2DData>();
|
||||
|
||||
@ -141,7 +141,7 @@ void register_props_2d_types() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void unregister_props_2d_types() {
|
||||
void unregister_props_2d_types(ModuleRegistrationLevel p_level) {
|
||||
if (prop_utils) {
|
||||
memdelete(prop_utils);
|
||||
}
|
||||
|
@ -22,7 +22,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
void register_props_2d_types();
|
||||
void unregister_props_2d_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_props_2d_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_props_2d_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif
|
||||
|
@ -35,14 +35,14 @@
|
||||
|
||||
static Ref<ResourceFormatPVR> resource_loader_pvr;
|
||||
|
||||
void register_pvr_types() {
|
||||
void register_pvr_types(ModuleRegistrationLevel p_level) {
|
||||
resource_loader_pvr.instance();
|
||||
ResourceLoader::add_resource_format_loader(resource_loader_pvr);
|
||||
|
||||
_register_pvrtc_compress_func();
|
||||
}
|
||||
|
||||
void unregister_pvr_types() {
|
||||
void unregister_pvr_types(ModuleRegistrationLevel p_level) {
|
||||
ResourceLoader::remove_resource_format_loader(resource_loader_pvr);
|
||||
resource_loader_pvr.unref();
|
||||
}
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_pvr_types();
|
||||
void unregister_pvr_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_pvr_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_pvr_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // PVR_REGISTER_TYPES_H
|
||||
|
@ -32,10 +32,10 @@
|
||||
#include "core/object/class_db.h"
|
||||
#include "regex.h"
|
||||
|
||||
void register_regex_types() {
|
||||
void register_regex_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<RegExMatch>();
|
||||
ClassDB::register_class<RegEx>();
|
||||
}
|
||||
|
||||
void unregister_regex_types() {
|
||||
void unregister_regex_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_regex_types();
|
||||
void unregister_regex_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_regex_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_regex_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // REGEX_REGISTER_TYPES_H
|
||||
|
@ -30,7 +30,17 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_module_types();
|
||||
void unregister_module_types();
|
||||
enum ModuleRegistrationLevel {
|
||||
MODULE_REGISTRATION_LEVEL_CORE = 0,
|
||||
MODULE_REGISTRATION_LEVEL_DRIVER,
|
||||
MODULE_REGISTRATION_LEVEL_PLATFORM,
|
||||
MODULE_REGISTRATION_LEVEL_SERVER,
|
||||
MODULE_REGISTRATION_LEVEL_SCENE,
|
||||
MODULE_REGISTRATION_LEVEL_EDITOR,
|
||||
MODULE_REGISTRATION_LEVEL_TEST,
|
||||
};
|
||||
|
||||
void register_module_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_module_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // REGISTER_MODULE_TYPES_H
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "editor/skeleton_2d_editor_plugin.h"
|
||||
#endif
|
||||
|
||||
void register_skeleton_2d_types() {
|
||||
void register_skeleton_2d_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<Skeleton2D>();
|
||||
ClassDB::register_class<Bone2D>();
|
||||
ClassDB::register_class<PhysicalBone2D>();
|
||||
@ -40,5 +40,5 @@ void register_skeleton_2d_types() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void unregister_skeleton_2d_types() {
|
||||
void unregister_skeleton_2d_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
||||
|
@ -1,3 +1,7 @@
|
||||
|
||||
void register_skeleton_2d_types();
|
||||
void unregister_skeleton_2d_types();
|
||||
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
|
||||
void register_skeleton_2d_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_skeleton_2d_types(ModuleRegistrationLevel p_level);
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "editor/physical_bone_plugin.h"
|
||||
#endif
|
||||
|
||||
void register_skeleton_3d_types() {
|
||||
void register_skeleton_3d_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<Skeleton>();
|
||||
ClassDB::register_class<Skin>();
|
||||
ClassDB::register_class<SkinReference>();
|
||||
@ -51,5 +51,5 @@ void register_skeleton_3d_types() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void unregister_skeleton_3d_types() {
|
||||
void unregister_skeleton_3d_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
||||
|
@ -1,3 +1,7 @@
|
||||
|
||||
void register_skeleton_3d_types();
|
||||
void unregister_skeleton_3d_types();
|
||||
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
|
||||
void register_skeleton_3d_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_skeleton_3d_types(ModuleRegistrationLevel p_level);
|
||||
|
@ -31,9 +31,9 @@
|
||||
#include "register_types.h"
|
||||
#include "image_compress_squish.h"
|
||||
|
||||
void register_squish_types() {
|
||||
void register_squish_types(ModuleRegistrationLevel p_level) {
|
||||
Image::set_compress_bc_func(image_compress_squish);
|
||||
Image::_image_decompress_bc = image_decompress_squish;
|
||||
}
|
||||
|
||||
void unregister_squish_types() {}
|
||||
void unregister_squish_types(ModuleRegistrationLevel p_level) {}
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_squish_types();
|
||||
void unregister_squish_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_squish_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_squish_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // SQUISH_REGISTER_TYPES_H
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include "resource_importer_ogg_vorbis.h"
|
||||
#endif
|
||||
|
||||
void register_stb_vorbis_types() {
|
||||
void register_stb_vorbis_types(ModuleRegistrationLevel p_level) {
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (Engine::get_singleton()->is_editor_hint()) {
|
||||
Ref<ResourceImporterOGGVorbis> ogg_import;
|
||||
@ -48,5 +48,5 @@ void register_stb_vorbis_types() {
|
||||
ClassDB::register_class<AudioStreamOGGVorbis>();
|
||||
}
|
||||
|
||||
void unregister_stb_vorbis_types() {
|
||||
void unregister_stb_vorbis_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_stb_vorbis_types();
|
||||
void unregister_stb_vorbis_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_stb_vorbis_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_stb_vorbis_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // STB_VORBIS_REGISTER_TYPES_H
|
||||
|
@ -61,7 +61,7 @@ SOFTWARE.
|
||||
|
||||
static GSAIUtils *gs_ai_utils = NULL;
|
||||
|
||||
void register_steering_ai_types() {
|
||||
void register_steering_ai_types(ModuleRegistrationLevel p_level) {
|
||||
gs_ai_utils = memnew(GSAIUtils);
|
||||
ClassDB::register_class<GSAIUtils>();
|
||||
Engine::get_singleton()->add_singleton(Engine::Singleton("GSAIUtils", GSAIUtils::get_singleton()));
|
||||
@ -99,7 +99,7 @@ void register_steering_ai_types() {
|
||||
ClassDB::register_class<GSAISpecializedAgent>();
|
||||
}
|
||||
|
||||
void unregister_steering_ai_types() {
|
||||
void unregister_steering_ai_types(ModuleRegistrationLevel p_level) {
|
||||
if (gs_ai_utils) {
|
||||
memdelete(gs_ai_utils);
|
||||
}
|
||||
|
@ -25,7 +25,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
void register_steering_ai_types();
|
||||
void unregister_steering_ai_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_steering_ai_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_steering_ai_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif
|
@ -34,11 +34,11 @@
|
||||
|
||||
static ImageLoaderSVG *image_loader_svg = nullptr;
|
||||
|
||||
void register_svg_types() {
|
||||
void register_svg_types(ModuleRegistrationLevel p_level) {
|
||||
image_loader_svg = memnew(ImageLoaderSVG);
|
||||
ImageLoader::add_image_format_loader(image_loader_svg);
|
||||
}
|
||||
|
||||
void unregister_svg_types() {
|
||||
void unregister_svg_types(ModuleRegistrationLevel p_level) {
|
||||
memdelete(image_loader_svg);
|
||||
}
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_svg_types();
|
||||
void unregister_svg_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_svg_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_svg_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // SVG_REGISTER_TYPES_H
|
||||
|
@ -70,7 +70,7 @@ SOFTWARE.
|
||||
#include "world/jobs/terrain_prop_job.h"
|
||||
#include "world/jobs/terrain_terrain_job.h"
|
||||
|
||||
void register_terraman_types() {
|
||||
void register_terraman_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<TerrainMesher>();
|
||||
ClassDB::register_class<TerrainMesherDefault>();
|
||||
|
||||
@ -121,5 +121,5 @@ void register_terraman_types() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void unregister_terraman_types() {
|
||||
void unregister_terraman_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
||||
|
@ -22,7 +22,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
void register_terraman_types();
|
||||
void unregister_terraman_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_terraman_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_terraman_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif
|
||||
|
@ -72,7 +72,7 @@ SOFTWARE.
|
||||
#include "world/jobs/terrain_2d_prop_job.h"
|
||||
#include "world/jobs/terrain_2d_terrain_job.h"
|
||||
|
||||
void register_terraman_2d_types() {
|
||||
void register_terraman_2d_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<Terrain2DMesher>();
|
||||
ClassDB::register_class<Terrain2DMesherDefault>();
|
||||
|
||||
@ -126,5 +126,5 @@ void register_terraman_2d_types() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void unregister_terraman_2d_types() {
|
||||
void unregister_terraman_2d_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
||||
|
@ -22,7 +22,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
void register_terraman_2d_types();
|
||||
void unregister_terraman_2d_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_terraman_2d_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_terraman_2d_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif
|
||||
|
@ -35,7 +35,7 @@ SOFTWARE.
|
||||
#include "texture_resource/editor_plugin_packer_image_resource.h"
|
||||
#endif
|
||||
|
||||
void register_texture_packer_types() {
|
||||
void register_texture_packer_types(ModuleRegistrationLevel p_level) {
|
||||
ClassDB::register_class<TexturePacker>();
|
||||
ClassDB::register_class<TextureMerger>();
|
||||
|
||||
@ -48,5 +48,5 @@ void register_texture_packer_types() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void unregister_texture_packer_types() {
|
||||
void unregister_texture_packer_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
||||
|
@ -20,5 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
void register_texture_packer_types();
|
||||
void unregister_texture_packer_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_texture_packer_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_texture_packer_types(ModuleRegistrationLevel p_level);
|
||||
|
@ -34,11 +34,11 @@
|
||||
|
||||
static ImageLoaderTGA *image_loader_tga = nullptr;
|
||||
|
||||
void register_tga_types() {
|
||||
void register_tga_types(ModuleRegistrationLevel p_level) {
|
||||
image_loader_tga = memnew(ImageLoaderTGA);
|
||||
ImageLoader::add_image_format_loader(image_loader_tga);
|
||||
}
|
||||
|
||||
void unregister_tga_types() {
|
||||
void unregister_tga_types(ModuleRegistrationLevel p_level) {
|
||||
memdelete(image_loader_tga);
|
||||
}
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_tga_types();
|
||||
void unregister_tga_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_tga_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_tga_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // TGA_REGISTER_TYPES_H
|
||||
|
@ -34,14 +34,14 @@
|
||||
|
||||
static Ref<ResourceFormatLoaderTheora> resource_loader_theora;
|
||||
|
||||
void register_theora_types() {
|
||||
void register_theora_types(ModuleRegistrationLevel p_level) {
|
||||
resource_loader_theora.instance();
|
||||
ResourceLoader::add_resource_format_loader(resource_loader_theora, true);
|
||||
|
||||
ClassDB::register_class<VideoStreamTheora>();
|
||||
}
|
||||
|
||||
void unregister_theora_types() {
|
||||
void unregister_theora_types(ModuleRegistrationLevel p_level) {
|
||||
ResourceLoader::remove_resource_format_loader(resource_loader_theora);
|
||||
resource_loader_theora.unref();
|
||||
}
|
||||
|
@ -30,7 +30,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
void register_theora_types();
|
||||
void unregister_theora_types();
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void register_theora_types(ModuleRegistrationLevel p_level);
|
||||
void unregister_theora_types(ModuleRegistrationLevel p_level);
|
||||
|
||||
#endif // THEORA_REGISTER_TYPES_H
|
||||
|
@ -30,7 +30,7 @@ SOFTWARE.
|
||||
#include "tile_set_editor_plugin.h"
|
||||
#endif
|
||||
|
||||
void register_tile_map_types() {
|
||||
void register_tile_map_types(ModuleRegistrationLevel p_level) {
|
||||
#ifdef TOOLS_ENABLED
|
||||
EditorPlugins::add_by_type<TileMapEditorPlugin>();
|
||||
EditorPlugins::add_by_type<TileSetEditorPlugin>();
|
||||
@ -45,5 +45,5 @@ void register_tile_map_types() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void unregister_tile_map_types() {
|
||||
void unregister_tile_map_types(ModuleRegistrationLevel p_level) {
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user