2017-05-13 11:55:04 +00:00
|
|
|
#include "GodotGlobal.hpp"
|
|
|
|
|
|
|
|
#include "String.hpp"
|
|
|
|
|
2017-10-03 10:37:34 +00:00
|
|
|
#include <gdnative/gdnative.h>
|
2017-05-13 11:55:04 +00:00
|
|
|
|
|
|
|
namespace godot {
|
|
|
|
|
2017-07-24 12:23:09 +00:00
|
|
|
void *_RegisterState::nativescript_handle;
|
|
|
|
|
2017-05-13 11:55:04 +00:00
|
|
|
void Godot::print(const String& message)
|
|
|
|
{
|
|
|
|
godot_print((godot_string *) &message);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Godot::print_warning(const String& description, const String& function, const String& file, int line)
|
|
|
|
{
|
|
|
|
godot_print_warning(description.c_string(), function.c_string(), file.c_string(), line);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Godot::print_error(const String& description, const String& function, const String& file, int line)
|
|
|
|
{
|
|
|
|
godot_print_error(description.c_string(), function.c_string(), file.c_string(), line);
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
2017-07-24 12:23:09 +00:00
|
|
|
|
|
|
|
void gdnative_init(godot_gdnative_init_options *options);
|
|
|
|
extern "C" void GDN_EXPORT godot_gdnative_init(godot_gdnative_init_options *options)
|
|
|
|
{
|
|
|
|
gdnative_init(options);
|
|
|
|
}
|
|
|
|
|
|
|
|
void gdnative_terminate(godot_gdnative_terminate_options *options);
|
|
|
|
extern "C" void GDN_EXPORT godot_gdnative_terminate(godot_gdnative_terminate_options *options)
|
|
|
|
{
|
|
|
|
gdnative_terminate(options);
|
|
|
|
}
|
|
|
|
|
|
|
|
void nativescript_init();
|
|
|
|
extern "C" void GDN_EXPORT godot_nativescript_init(void *handle)
|
|
|
|
{
|
|
|
|
godot::_RegisterState::nativescript_handle = handle;
|
|
|
|
nativescript_init();
|
|
|
|
}
|