-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚧 initial setup, includes and gdscript not adjusted yet
- Loading branch information
Showing
3 changed files
with
52 additions
and
19 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#include "register_types.h" | ||
|
||
#include <godot/gdnative_interface.h> | ||
|
||
#include <godot_cpp/core/class_db.hpp> | ||
This comment has been minimized.
Sorry, something went wrong. |
||
#include <godot_cpp/core/defs.hpp> | ||
#include <godot_cpp/godot.hpp> | ||
|
||
#include "godot_fmod.h" | ||
|
||
using namespace godot; | ||
|
||
void initialize_fmod_module(ModuleInitializationLevel p_level) { | ||
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { | ||
return; | ||
} | ||
|
||
Callbacks::GodotFileRunner::get_singleton(); | ||
|
||
ClassDB::register_class<FMOD>(); | ||
} | ||
|
||
void uninitialize_fmod_module(ModuleInitializationLevel p_level) { | ||
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { | ||
return; | ||
} | ||
} | ||
|
||
extern "C" { | ||
|
||
// Initialization. | ||
|
||
GDNativeBool GDN_EXPORT fmod_library_init(const GDNativeInterface *p_interface, const GDNativeExtensionClassLibraryPtr p_library, GDNativeInitialization *r_initialization) { | ||
godot::GDExtensionBinding::InitObject init_obj(p_interface, p_library, r_initialization); | ||
|
||
init_obj.register_initializer(initialize_fmod_module); | ||
init_obj.register_terminator(uninitialize_fmod_module); | ||
init_obj.set_minimum_library_initialization_level(MODULE_INITIALIZATION_LEVEL_SCENE); | ||
|
||
return init_obj.init(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#ifndef FMOD_REGISTER_TYPES_H | ||
#define FMOD_REGISTER_TYPES_H | ||
|
||
#include <godot_cpp/core/class_db.hpp> | ||
using namespace godot; | ||
|
||
void initialize_example_module(ModuleInitializationLevel p_level); | ||
void uninitialize_example_module(ModuleInitializationLevel p_level); | ||
|
||
#endif // ! FMOD_REGISTER_TYPES_H |
Those need changing. Omit the godot_cpp