diff options
| author | Karroffel <therzog@mail.de> | 2017-05-13 13:55:04 +0200 |
|---|---|---|
| committer | Karroffel <therzog@mail.de> | 2017-05-13 13:55:04 +0200 |
| commit | fad8f7c9ebd2059775b2d2e24db5c8e7e6979147 (patch) | |
| tree | aa2d58e3c57f0bd197c0782b1aed50fd4ab28404 /src | |
| parent | cf30b0f39ddb2c6acad5d22655c4bca9015d7502 (diff) | |
| download | redot-cpp-fad8f7c9ebd2059775b2d2e24db5c8e7e6979147.tar.gz | |
made script "inheritance" less OOP
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/GodotGlobal.cpp | 24 | ||||
| -rw-r--r-- | src/core/Variant.cpp | 2 |
2 files changed, 25 insertions, 1 deletions
diff --git a/src/core/GodotGlobal.cpp b/src/core/GodotGlobal.cpp new file mode 100644 index 0000000..cd910ff --- /dev/null +++ b/src/core/GodotGlobal.cpp @@ -0,0 +1,24 @@ +#include "GodotGlobal.hpp" + +#include "String.hpp" + +#include <godot.h> + +namespace godot { + +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); +} + +}; diff --git a/src/core/Variant.cpp b/src/core/Variant.cpp index 6442bc2..7b66547 100644 --- a/src/core/Variant.cpp +++ b/src/core/Variant.cpp @@ -399,7 +399,7 @@ Variant::Type Variant::get_type() const Variant Variant::call(const String& method, const Variant **args, const int arg_count) { Variant v; - *(godot_variant *) &v = godot_variant_call(&_godot_variant, (godot_string *) &method, (const godot_variant **)args, arg_count); + *(godot_variant *) &v = godot_variant_call(&_godot_variant, (godot_string *) &method, (const godot_variant **)args, arg_count, nullptr); return v; } |
