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
|
|
@ -42,11 +42,11 @@ if env["builtin_libvorbis"]:
|
|||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_vorbis.Prepend(CPPPATH=[thirdparty_dir])
|
||||
env_vorbis.Prepend(CPPEXTPATH=[thirdparty_dir])
|
||||
|
||||
# also requires libogg
|
||||
if env["builtin_libogg"]:
|
||||
env_vorbis.Prepend(CPPPATH=["#thirdparty/libogg"])
|
||||
env_vorbis.Prepend(CPPEXTPATH=["#thirdparty/libogg"])
|
||||
|
||||
env_thirdparty = env_vorbis.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@
|
|||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef AUDIO_STREAM_OGG_VORBIS_H
|
||||
#define AUDIO_STREAM_OGG_VORBIS_H
|
||||
#pragma once
|
||||
|
||||
#include "core/variant/variant.h"
|
||||
#include "servers/audio/audio_stream.h"
|
||||
|
|
@ -177,5 +176,3 @@ public:
|
|||
AudioStreamOggVorbis();
|
||||
virtual ~AudioStreamOggVorbis();
|
||||
};
|
||||
|
||||
#endif // AUDIO_STREAM_OGG_VORBIS_H
|
||||
|
|
|
|||
|
|
@ -33,36 +33,30 @@
|
|||
#include "audio_stream_ogg_vorbis.h"
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
#include "editor/editor_node.h"
|
||||
#include "resource_importer_ogg_vorbis.h"
|
||||
|
||||
static void _editor_init() {
|
||||
Ref<ResourceImporterOggVorbis> ogg_vorbis_importer;
|
||||
ogg_vorbis_importer.instantiate();
|
||||
ResourceFormatImporter::get_singleton()->add_importer(ogg_vorbis_importer);
|
||||
}
|
||||
#endif
|
||||
|
||||
void initialize_vorbis_module(ModuleInitializationLevel p_level) {
|
||||
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
|
||||
return;
|
||||
if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) {
|
||||
GDREGISTER_CLASS(AudioStreamOggVorbis);
|
||||
GDREGISTER_CLASS(AudioStreamPlaybackOggVorbis);
|
||||
}
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (Engine::get_singleton()->is_editor_hint()) {
|
||||
Ref<ResourceImporterOggVorbis> ogg_vorbis_importer;
|
||||
ogg_vorbis_importer.instantiate();
|
||||
ResourceFormatImporter::get_singleton()->add_importer(ogg_vorbis_importer);
|
||||
if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) {
|
||||
GDREGISTER_CLASS(ResourceImporterOggVorbis);
|
||||
|
||||
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(ResourceImporterOggVorbis);
|
||||
|
||||
ClassDB::set_current_api(prev_api);
|
||||
#endif
|
||||
|
||||
GDREGISTER_CLASS(AudioStreamOggVorbis);
|
||||
GDREGISTER_CLASS(AudioStreamPlaybackOggVorbis);
|
||||
}
|
||||
|
||||
void uninitialize_vorbis_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 VORBIS_REGISTER_TYPES_H
|
||||
#define VORBIS_REGISTER_TYPES_H
|
||||
#pragma once
|
||||
|
||||
#include "modules/register_module_types.h"
|
||||
|
||||
void initialize_vorbis_module(ModuleInitializationLevel p_level);
|
||||
void uninitialize_vorbis_module(ModuleInitializationLevel p_level);
|
||||
|
||||
#endif // VORBIS_REGISTER_TYPES_H
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ String ResourceImporterOggVorbis::get_importer_name() const {
|
|||
}
|
||||
|
||||
String ResourceImporterOggVorbis::get_visible_name() const {
|
||||
return "oggvorbisstr";
|
||||
return "Ogg Vorbis";
|
||||
}
|
||||
|
||||
void ResourceImporterOggVorbis::get_recognized_extensions(List<String> *p_extensions) const {
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@
|
|||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef RESOURCE_IMPORTER_OGG_VORBIS_H
|
||||
#define RESOURCE_IMPORTER_OGG_VORBIS_H
|
||||
#pragma once
|
||||
|
||||
#include "audio_stream_ogg_vorbis.h"
|
||||
|
||||
|
|
@ -68,5 +67,3 @@ public:
|
|||
|
||||
ResourceImporterOggVorbis();
|
||||
};
|
||||
|
||||
#endif // RESOURCE_IMPORTER_OGG_VORBIS_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue