updated to use the new NativeScript and GDNative interface
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#include <godot/godot_array.h>
|
||||
|
||||
#include "Variant.hpp"
|
||||
|
||||
namespace godot {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "Color.hpp"
|
||||
|
||||
#include <godot/godot_color.h>
|
||||
#include <godot/color.h>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
#include "Array.hpp"
|
||||
|
||||
#include <godot/godot_dictionary.h>
|
||||
|
||||
namespace godot {
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "String.hpp"
|
||||
|
||||
#include <godot/godot_node_path.h>
|
||||
#include <godot/node_path.h>
|
||||
|
||||
namespace godot {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "Vector2.hpp"
|
||||
#include "Vector3.hpp"
|
||||
|
||||
#include <godot/godot_pool_arrays.h>
|
||||
#include <godot/pool_arrays.h>
|
||||
|
||||
namespace godot {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "RID.hpp"
|
||||
|
||||
#include <godot/godot_rid.h>
|
||||
#include <godot/rid.h>
|
||||
|
||||
namespace godot {
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "NodePath.hpp"
|
||||
|
||||
#include <godot/godot_string.h>
|
||||
#include <godot/string.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "Variant.hpp"
|
||||
|
||||
#include <godot/godot_variant.h>
|
||||
#include <godot/variant.h>
|
||||
|
||||
#include "Defs.hpp"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include <godot/godot_vector2.h>
|
||||
#include <godot/vector2.h>
|
||||
|
||||
#include "String.hpp"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user