feat: modules moved and engine moved to submodule
This commit is contained in:
parent
dfb5e645cd
commit
c33d2130cc
5136 changed files with 225275 additions and 64485 deletions
|
|
@ -8,11 +8,7 @@ env_minimp3 = env_modules.Clone()
|
|||
|
||||
thirdparty_dir = "#thirdparty/minimp3/"
|
||||
|
||||
# Treat minimp3 headers as system headers to avoid raising warnings. Not supported on MSVC.
|
||||
if not env.msvc:
|
||||
env_minimp3.Append(CPPFLAGS=["-isystem", Dir(thirdparty_dir).path])
|
||||
else:
|
||||
env_minimp3.Prepend(CPPPATH=[thirdparty_dir])
|
||||
env_minimp3.Prepend(CPPEXTPATH=[thirdparty_dir])
|
||||
|
||||
if not env["minimp3_extra_formats"]:
|
||||
env_minimp3.Append(CPPDEFINES=["MINIMP3_ONLY_MP3"])
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@
|
|||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef AUDIO_STREAM_MP3_H
|
||||
#define AUDIO_STREAM_MP3_H
|
||||
#pragma once
|
||||
|
||||
#include "servers/audio/audio_stream.h"
|
||||
|
||||
|
|
@ -151,5 +150,3 @@ public:
|
|||
AudioStreamMP3();
|
||||
virtual ~AudioStreamMP3();
|
||||
};
|
||||
|
||||
#endif // AUDIO_STREAM_MP3_H
|
||||
|
|
|
|||
|
|
@ -32,40 +32,31 @@
|
|||
|
||||
#include "audio_stream_mp3.h"
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
#include "resource_importer_mp3.h"
|
||||
#endif
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
#include "core/config/engine.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "resource_importer_mp3.h"
|
||||
|
||||
static void _editor_init() {
|
||||
Ref<ResourceImporterMP3> mp3_import;
|
||||
mp3_import.instantiate();
|
||||
ResourceFormatImporter::get_singleton()->add_importer(mp3_import);
|
||||
}
|
||||
#endif
|
||||
|
||||
void initialize_minimp3_module(ModuleInitializationLevel p_level) {
|
||||
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
|
||||
return;
|
||||
if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) {
|
||||
GDREGISTER_CLASS(AudioStreamMP3);
|
||||
}
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (Engine::get_singleton()->is_editor_hint()) {
|
||||
Ref<ResourceImporterMP3> mp3_import;
|
||||
mp3_import.instantiate();
|
||||
ResourceFormatImporter::get_singleton()->add_importer(mp3_import);
|
||||
if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) {
|
||||
GDREGISTER_CLASS(ResourceImporterMP3);
|
||||
|
||||
EditorNode::add_init_callback(_editor_init);
|
||||
}
|
||||
|
||||
ClassDB::APIType prev_api = ClassDB::get_current_api();
|
||||
ClassDB::set_current_api(ClassDB::API_EDITOR);
|
||||
|
||||
// Required to document import options in the class reference.
|
||||
GDREGISTER_CLASS(ResourceImporterMP3);
|
||||
|
||||
ClassDB::set_current_api(prev_api);
|
||||
#endif
|
||||
|
||||
GDREGISTER_CLASS(AudioStreamMP3);
|
||||
}
|
||||
|
||||
void uninitialize_minimp3_module(ModuleInitializationLevel p_level) {
|
||||
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,12 +28,9 @@
|
|||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef MINIMP3_REGISTER_TYPES_H
|
||||
#define MINIMP3_REGISTER_TYPES_H
|
||||
#pragma once
|
||||
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void initialize_minimp3_module(ModuleInitializationLevel p_level);
|
||||
void uninitialize_minimp3_module(ModuleInitializationLevel p_level);
|
||||
|
||||
#endif // MINIMP3_REGISTER_TYPES_H
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@
|
|||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef RESOURCE_IMPORTER_MP3_H
|
||||
#define RESOURCE_IMPORTER_MP3_H
|
||||
#pragma once
|
||||
|
||||
#include "audio_stream_mp3.h"
|
||||
|
||||
|
|
@ -62,5 +61,3 @@ public:
|
|||
|
||||
ResourceImporterMP3();
|
||||
};
|
||||
|
||||
#endif // RESOURCE_IMPORTER_MP3_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue