updated bindings

pull/40/head
Ramesh Ravone 2017-10-03 16:07:34 +05:30
parent def39f4862
commit 10bb24cfbc
No known key found for this signature in database
GPG Key ID: 90B471D9AC10312A
19 changed files with 26 additions and 28 deletions

View File

@ -66,7 +66,7 @@ def generate_class_header(used_classes, c):
source.append("") source.append("")
source.append("") source.append("")
source.append("#include <godot/gdnative.h>") source.append("#include <gdnative/gdnative.h>")
source.append("#include <stdint.h>") source.append("#include <stdint.h>")
source.append("") source.append("")
@ -460,7 +460,7 @@ def generate_icall_header(icalls):
source.append("") source.append("")
source.append("#include <godot/gdnative.h>") source.append("#include <gdnative/gdnative.h>")
source.append("#include <stdint.h>") source.append("#include <stdint.h>")
source.append("") source.append("")
@ -510,7 +510,7 @@ def generate_icall_implementation(icalls):
source.append("") source.append("")
source.append("#include <godot/gdnative.h>") source.append("#include <gdnative/gdnative.h>")
source.append("#include <stdint.h>") source.append("#include <stdint.h>")
source.append("") source.append("")

View File

@ -1,7 +1,7 @@
#ifndef ARRAY_H #ifndef ARRAY_H
#define ARRAY_H #define ARRAY_H
#include <godot/array.h> #include <gdnative/array.h>
#include "String.hpp" #include "String.hpp"

View File

@ -1,7 +1,7 @@
#ifndef COLOR_H #ifndef COLOR_H
#define COLOR_H #define COLOR_H
#include <godot/color.h> #include <gdnative/color.h>
#include <cmath> #include <cmath>

View File

@ -5,7 +5,7 @@
#include "Array.hpp" #include "Array.hpp"
#include <godot/dictionary.h> #include <gdnative/dictionary.h>
namespace godot { namespace godot {

View File

@ -4,8 +4,8 @@
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include <godot/gdnative.h> #include <gdnative/gdnative.h>
#include <godot_nativescript.h> #include <nativescript/godot_nativescript.h>
#include <CoreTypes.hpp> #include <CoreTypes.hpp>

View File

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

View File

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

View File

@ -1,7 +1,7 @@
#ifndef RID_H #ifndef RID_H
#define RID_H #define RID_H
#include <godot/rid.h> #include <gdnative/rid.h>
namespace godot { namespace godot {

View File

@ -1,7 +1,7 @@
#ifndef STRING_H #ifndef STRING_H
#define STRING_H #define STRING_H
#include <godot/string.h> #include <gdnative/string.h>
namespace godot { namespace godot {

View File

@ -1,7 +1,7 @@
#ifndef VARIANT_H #ifndef VARIANT_H
#define VARIANT_H #define VARIANT_H
#include <godot/variant.h> #include <gdnative/variant.h>
#include "Defs.hpp" #include "Defs.hpp"
@ -259,7 +259,7 @@ public:
bool hash_compare(const Variant& b) const; bool hash_compare(const Variant& b) const;
bool booleanize(bool &valid) const; bool booleanize() const;
~Variant(); ~Variant();

View File

@ -1,7 +1,7 @@
#ifndef VECTOR2_H #ifndef VECTOR2_H
#define VECTOR2_H #define VECTOR2_H
#include <godot/vector2.h> #include <gdnative/vector2.h>
#include "Defs.hpp" #include "Defs.hpp"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
#include "Variant.hpp" #include "Variant.hpp"
#include <godot/variant.h> #include <gdnative/variant.h>
#include "Defs.hpp" #include "Defs.hpp"
@ -199,9 +199,7 @@ Variant &Variant::operator =(const Variant& v)
Variant::operator bool() const Variant::operator bool() const
{ {
bool valid = false; return booleanize();
bool result = booleanize(valid);
return valid && result;
} }
Variant::operator signed int() const Variant::operator signed int() const
{ {
@ -423,9 +421,9 @@ bool Variant::hash_compare(const Variant& b) const
return godot_variant_hash_compare(&_godot_variant, &b._godot_variant); return godot_variant_hash_compare(&_godot_variant, &b._godot_variant);
} }
bool Variant::booleanize(bool &valid) const bool Variant::booleanize() const
{ {
return godot_variant_booleanize(&_godot_variant, &valid); return godot_variant_booleanize(&_godot_variant);
} }
Variant::~Variant() Variant::~Variant()

View File

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