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,8 +2,6 @@
#include <cstdlib>
#include <godot/godot_array.h>
#include "Variant.hpp"
namespace godot {

View File

@@ -1,6 +1,6 @@
#include "Color.hpp"
#include <godot/godot_color.h>
#include <godot/color.h>
#include <cmath>

View File

@@ -4,7 +4,6 @@
#include "Array.hpp"
#include <godot/godot_dictionary.h>
namespace godot {

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();
}

View File

@@ -2,7 +2,7 @@
#include "String.hpp"
#include <godot/godot_node_path.h>
#include <godot/node_path.h>
namespace godot {

View File

@@ -7,7 +7,7 @@
#include "Vector2.hpp"
#include "Vector3.hpp"
#include <godot/godot_pool_arrays.h>
#include <godot/pool_arrays.h>
namespace godot {

View File

@@ -1,6 +1,6 @@
#include "RID.hpp"
#include <godot/godot_rid.h>
#include <godot/rid.h>
namespace godot {

View File

@@ -2,7 +2,7 @@
#include "NodePath.hpp"
#include <godot/godot_string.h>
#include <godot/string.h>
#include <string.h>

View File

@@ -1,6 +1,6 @@
#include "Variant.hpp"
#include <godot/godot_variant.h>
#include <godot/variant.h>
#include "Defs.hpp"

View File

@@ -2,7 +2,7 @@
#include <cmath>
#include <godot/godot_vector2.h>
#include <godot/vector2.h>
#include "String.hpp"