updated to use the new NativeScript and GDNative interface

This commit is contained in:
Karroffel
2017-07-24 14:23:09 +02:00
parent 2195f2e9a8
commit c27af379b8
23 changed files with 67 additions and 47 deletions

View File

@@ -2,10 +2,12 @@
#include "String.hpp"
#include <godot.h>
#include <godot/gdnative.h>
namespace godot {
void *_RegisterState::nativescript_handle;
void Godot::print(const String& message)
{
godot_print((godot_string *) &message);
@@ -22,3 +24,22 @@ void Godot::print_error(const String& description, const String& function, const
}
};
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();
}