Reorganized core/ directory, it was too fatty already

-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
This commit is contained in:
reduz 2020-11-07 19:33:38 -03:00
parent 30b6db99a9
commit 127458ed17
811 changed files with 2232 additions and 2488 deletions

View File

@ -34,7 +34,7 @@ if "SCRIPT_AES256_ENCRYPTION_KEY" in os.environ:
# NOTE: It is safe to generate this file here, since this is still executed serially # NOTE: It is safe to generate this file here, since this is still executed serially
with open("script_encryption_key.gen.cpp", "w") as f: with open("script_encryption_key.gen.cpp", "w") as f:
f.write('#include "core/project_settings.h"\nuint8_t script_encryption_key[32]={' + txt + "};\n") f.write('#include "core/config/project_settings.h"\nuint8_t script_encryption_key[32]={' + txt + "};\n")
# Add required thirdparty code. # Add required thirdparty code.
@ -174,7 +174,12 @@ SConscript("crypto/SCsub")
SConscript("io/SCsub") SConscript("io/SCsub")
SConscript("debugger/SCsub") SConscript("debugger/SCsub")
SConscript("input/SCsub") SConscript("input/SCsub")
SConscript("bind/SCsub") SConscript("variant/SCsub")
SConscript("object/SCsub")
SConscript("templates/SCsub")
SConscript("string/SCsub")
SConscript("config/SCsub")
SConscript("error/SCsub")
# Build it all as a library # Build it all as a library

View File

@ -1,5 +0,0 @@
#!/usr/bin/env python
Import("env")
env.add_source_files(env.core_sources, "*.cpp")

View File

@ -1,155 +0,0 @@
// Names from https://en.wikipedia.org/wiki/X11_color_names
#include "core/map.h"
static Map<String, Color> _named_colors;
static void _populate_named_colors() {
if (!_named_colors.empty()) {
return;
}
_named_colors.insert("aliceblue", Color(0.94, 0.97, 1.00));
_named_colors.insert("antiquewhite", Color(0.98, 0.92, 0.84));
_named_colors.insert("aqua", Color(0.00, 1.00, 1.00));
_named_colors.insert("aquamarine", Color(0.50, 1.00, 0.83));
_named_colors.insert("azure", Color(0.94, 1.00, 1.00));
_named_colors.insert("beige", Color(0.96, 0.96, 0.86));
_named_colors.insert("bisque", Color(1.00, 0.89, 0.77));
_named_colors.insert("black", Color(0.00, 0.00, 0.00));
_named_colors.insert("blanchedalmond", Color(1.00, 0.92, 0.80));
_named_colors.insert("blue", Color(0.00, 0.00, 1.00));
_named_colors.insert("blueviolet", Color(0.54, 0.17, 0.89));
_named_colors.insert("brown", Color(0.65, 0.16, 0.16));
_named_colors.insert("burlywood", Color(0.87, 0.72, 0.53));
_named_colors.insert("cadetblue", Color(0.37, 0.62, 0.63));
_named_colors.insert("chartreuse", Color(0.50, 1.00, 0.00));
_named_colors.insert("chocolate", Color(0.82, 0.41, 0.12));
_named_colors.insert("coral", Color(1.00, 0.50, 0.31));
_named_colors.insert("cornflower", Color(0.39, 0.58, 0.93));
_named_colors.insert("cornsilk", Color(1.00, 0.97, 0.86));
_named_colors.insert("crimson", Color(0.86, 0.08, 0.24));
_named_colors.insert("cyan", Color(0.00, 1.00, 1.00));
_named_colors.insert("darkblue", Color(0.00, 0.00, 0.55));
_named_colors.insert("darkcyan", Color(0.00, 0.55, 0.55));
_named_colors.insert("darkgoldenrod", Color(0.72, 0.53, 0.04));
_named_colors.insert("darkgray", Color(0.66, 0.66, 0.66));
_named_colors.insert("darkgreen", Color(0.00, 0.39, 0.00));
_named_colors.insert("darkkhaki", Color(0.74, 0.72, 0.42));
_named_colors.insert("darkmagenta", Color(0.55, 0.00, 0.55));
_named_colors.insert("darkolivegreen", Color(0.33, 0.42, 0.18));
_named_colors.insert("darkorange", Color(1.00, 0.55, 0.00));
_named_colors.insert("darkorchid", Color(0.60, 0.20, 0.80));
_named_colors.insert("darkred", Color(0.55, 0.00, 0.00));
_named_colors.insert("darksalmon", Color(0.91, 0.59, 0.48));
_named_colors.insert("darkseagreen", Color(0.56, 0.74, 0.56));
_named_colors.insert("darkslateblue", Color(0.28, 0.24, 0.55));
_named_colors.insert("darkslategray", Color(0.18, 0.31, 0.31));
_named_colors.insert("darkturquoise", Color(0.00, 0.81, 0.82));
_named_colors.insert("darkviolet", Color(0.58, 0.00, 0.83));
_named_colors.insert("deeppink", Color(1.00, 0.08, 0.58));
_named_colors.insert("deepskyblue", Color(0.00, 0.75, 1.00));
_named_colors.insert("dimgray", Color(0.41, 0.41, 0.41));
_named_colors.insert("dodgerblue", Color(0.12, 0.56, 1.00));
_named_colors.insert("firebrick", Color(0.70, 0.13, 0.13));
_named_colors.insert("floralwhite", Color(1.00, 0.98, 0.94));
_named_colors.insert("forestgreen", Color(0.13, 0.55, 0.13));
_named_colors.insert("fuchsia", Color(1.00, 0.00, 1.00));
_named_colors.insert("gainsboro", Color(0.86, 0.86, 0.86));
_named_colors.insert("ghostwhite", Color(0.97, 0.97, 1.00));
_named_colors.insert("gold", Color(1.00, 0.84, 0.00));
_named_colors.insert("goldenrod", Color(0.85, 0.65, 0.13));
_named_colors.insert("gray", Color(0.75, 0.75, 0.75));
_named_colors.insert("webgray", Color(0.50, 0.50, 0.50));
_named_colors.insert("green", Color(0.00, 1.00, 0.00));
_named_colors.insert("webgreen", Color(0.00, 0.50, 0.00));
_named_colors.insert("greenyellow", Color(0.68, 1.00, 0.18));
_named_colors.insert("honeydew", Color(0.94, 1.00, 0.94));
_named_colors.insert("hotpink", Color(1.00, 0.41, 0.71));
_named_colors.insert("indianred", Color(0.80, 0.36, 0.36));
_named_colors.insert("indigo", Color(0.29, 0.00, 0.51));
_named_colors.insert("ivory", Color(1.00, 1.00, 0.94));
_named_colors.insert("khaki", Color(0.94, 0.90, 0.55));
_named_colors.insert("lavender", Color(0.90, 0.90, 0.98));
_named_colors.insert("lavenderblush", Color(1.00, 0.94, 0.96));
_named_colors.insert("lawngreen", Color(0.49, 0.99, 0.00));
_named_colors.insert("lemonchiffon", Color(1.00, 0.98, 0.80));
_named_colors.insert("lightblue", Color(0.68, 0.85, 0.90));
_named_colors.insert("lightcoral", Color(0.94, 0.50, 0.50));
_named_colors.insert("lightcyan", Color(0.88, 1.00, 1.00));
_named_colors.insert("lightgoldenrod", Color(0.98, 0.98, 0.82));
_named_colors.insert("lightgray", Color(0.83, 0.83, 0.83));
_named_colors.insert("lightgreen", Color(0.56, 0.93, 0.56));
_named_colors.insert("lightpink", Color(1.00, 0.71, 0.76));
_named_colors.insert("lightsalmon", Color(1.00, 0.63, 0.48));
_named_colors.insert("lightseagreen", Color(0.13, 0.70, 0.67));
_named_colors.insert("lightskyblue", Color(0.53, 0.81, 0.98));
_named_colors.insert("lightslategray", Color(0.47, 0.53, 0.60));
_named_colors.insert("lightsteelblue", Color(0.69, 0.77, 0.87));
_named_colors.insert("lightyellow", Color(1.00, 1.00, 0.88));
_named_colors.insert("lime", Color(0.00, 1.00, 0.00));
_named_colors.insert("limegreen", Color(0.20, 0.80, 0.20));
_named_colors.insert("linen", Color(0.98, 0.94, 0.90));
_named_colors.insert("magenta", Color(1.00, 0.00, 1.00));
_named_colors.insert("maroon", Color(0.69, 0.19, 0.38));
_named_colors.insert("webmaroon", Color(0.50, 0.00, 0.00));
_named_colors.insert("mediumaquamarine", Color(0.40, 0.80, 0.67));
_named_colors.insert("mediumblue", Color(0.00, 0.00, 0.80));
_named_colors.insert("mediumorchid", Color(0.73, 0.33, 0.83));
_named_colors.insert("mediumpurple", Color(0.58, 0.44, 0.86));
_named_colors.insert("mediumseagreen", Color(0.24, 0.70, 0.44));
_named_colors.insert("mediumslateblue", Color(0.48, 0.41, 0.93));
_named_colors.insert("mediumspringgreen", Color(0.00, 0.98, 0.60));
_named_colors.insert("mediumturquoise", Color(0.28, 0.82, 0.80));
_named_colors.insert("mediumvioletred", Color(0.78, 0.08, 0.52));
_named_colors.insert("midnightblue", Color(0.10, 0.10, 0.44));
_named_colors.insert("mintcream", Color(0.96, 1.00, 0.98));
_named_colors.insert("mistyrose", Color(1.00, 0.89, 0.88));
_named_colors.insert("moccasin", Color(1.00, 0.89, 0.71));
_named_colors.insert("navajowhite", Color(1.00, 0.87, 0.68));
_named_colors.insert("navyblue", Color(0.00, 0.00, 0.50));
_named_colors.insert("oldlace", Color(0.99, 0.96, 0.90));
_named_colors.insert("olive", Color(0.50, 0.50, 0.00));
_named_colors.insert("olivedrab", Color(0.42, 0.56, 0.14));
_named_colors.insert("orange", Color(1.00, 0.65, 0.00));
_named_colors.insert("orangered", Color(1.00, 0.27, 0.00));
_named_colors.insert("orchid", Color(0.85, 0.44, 0.84));
_named_colors.insert("palegoldenrod", Color(0.93, 0.91, 0.67));
_named_colors.insert("palegreen", Color(0.60, 0.98, 0.60));
_named_colors.insert("paleturquoise", Color(0.69, 0.93, 0.93));
_named_colors.insert("palevioletred", Color(0.86, 0.44, 0.58));
_named_colors.insert("papayawhip", Color(1.00, 0.94, 0.84));
_named_colors.insert("peachpuff", Color(1.00, 0.85, 0.73));
_named_colors.insert("peru", Color(0.80, 0.52, 0.25));
_named_colors.insert("pink", Color(1.00, 0.75, 0.80));
_named_colors.insert("plum", Color(0.87, 0.63, 0.87));
_named_colors.insert("powderblue", Color(0.69, 0.88, 0.90));
_named_colors.insert("purple", Color(0.63, 0.13, 0.94));
_named_colors.insert("webpurple", Color(0.50, 0.00, 0.50));
_named_colors.insert("rebeccapurple", Color(0.40, 0.20, 0.60));
_named_colors.insert("red", Color(1.00, 0.00, 0.00));
_named_colors.insert("rosybrown", Color(0.74, 0.56, 0.56));
_named_colors.insert("royalblue", Color(0.25, 0.41, 0.88));
_named_colors.insert("saddlebrown", Color(0.55, 0.27, 0.07));
_named_colors.insert("salmon", Color(0.98, 0.50, 0.45));
_named_colors.insert("sandybrown", Color(0.96, 0.64, 0.38));
_named_colors.insert("seagreen", Color(0.18, 0.55, 0.34));
_named_colors.insert("seashell", Color(1.00, 0.96, 0.93));
_named_colors.insert("sienna", Color(0.63, 0.32, 0.18));
_named_colors.insert("silver", Color(0.75, 0.75, 0.75));
_named_colors.insert("skyblue", Color(0.53, 0.81, 0.92));
_named_colors.insert("slateblue", Color(0.42, 0.35, 0.80));
_named_colors.insert("slategray", Color(0.44, 0.50, 0.56));
_named_colors.insert("snow", Color(1.00, 0.98, 0.98));
_named_colors.insert("springgreen", Color(0.00, 1.00, 0.50));
_named_colors.insert("steelblue", Color(0.27, 0.51, 0.71));
_named_colors.insert("tan", Color(0.82, 0.71, 0.55));
_named_colors.insert("teal", Color(0.00, 0.50, 0.50));
_named_colors.insert("thistle", Color(0.85, 0.75, 0.85));
_named_colors.insert("tomato", Color(1.00, 0.39, 0.28));
_named_colors.insert("turquoise", Color(0.25, 0.88, 0.82));
_named_colors.insert("transparent", Color(1.00, 1.00, 1.00, 0.00));
_named_colors.insert("violet", Color(0.93, 0.51, 0.93));
_named_colors.insert("wheat", Color(0.96, 0.87, 0.70));
_named_colors.insert("white", Color(1.00, 1.00, 1.00));
_named_colors.insert("whitesmoke", Color(0.96, 0.96, 0.96));
_named_colors.insert("yellow", Color(1.00, 1.00, 0.00));
_named_colors.insert("yellowgreen", Color(0.60, 0.80, 0.20));
}

7
core/config/SCsub Normal file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env python
Import("env")
env_config = env.Clone()
env_config.add_source_files(env.core_sources, "*.cpp")

View File

@ -31,10 +31,10 @@
#ifndef ENGINE_H #ifndef ENGINE_H
#define ENGINE_H #define ENGINE_H
#include "core/list.h"
#include "core/os/main_loop.h" #include "core/os/main_loop.h"
#include "core/ustring.h" #include "core/string/ustring.h"
#include "core/vector.h" #include "core/templates/list.h"
#include "core/templates/vector.h"
class Engine { class Engine {
public: public:

View File

@ -30,7 +30,7 @@
#include "project_settings.h" #include "project_settings.h"
#include "core/bind/core_bind.h" #include "core/core_bind.h"
#include "core/core_string_names.h" #include "core/core_string_names.h"
#include "core/io/file_access_network.h" #include "core/io/file_access_network.h"
#include "core/io/file_access_pack.h" #include "core/io/file_access_pack.h"
@ -39,7 +39,7 @@
#include "core/os/file_access.h" #include "core/os/file_access.h"
#include "core/os/keyboard.h" #include "core/os/keyboard.h"
#include "core/os/os.h" #include "core/os/os.h"
#include "core/variant_parser.h" #include "core/variant/variant_parser.h"
#include <zlib.h> #include <zlib.h>

View File

@ -31,9 +31,9 @@
#ifndef PROJECT_SETTINGS_H #ifndef PROJECT_SETTINGS_H
#define PROJECT_SETTINGS_H #define PROJECT_SETTINGS_H
#include "core/class_db.h" #include "core/object/class_db.h"
#include "core/os/thread_safe.h" #include "core/os/thread_safe.h"
#include "core/set.h" #include "core/templates/set.h"
class ProjectSettings : public Object { class ProjectSettings : public Object {
GDCLASS(ProjectSettings, Object); GDCLASS(ProjectSettings, Object);

View File

@ -30,6 +30,7 @@
#include "core_bind.h" #include "core_bind.h"
#include "core/config/project_settings.h"
#include "core/crypto/crypto_core.h" #include "core/crypto/crypto_core.h"
#include "core/debugger/engine_debugger.h" #include "core/debugger/engine_debugger.h"
#include "core/io/file_access_compressed.h" #include "core/io/file_access_compressed.h"
@ -40,7 +41,6 @@
#include "core/math/geometry_3d.h" #include "core/math/geometry_3d.h"
#include "core/os/keyboard.h" #include "core/os/keyboard.h"
#include "core/os/os.h" #include "core/os/os.h"
#include "core/project_settings.h"
/** /**
* Time constants borrowed from loc_time.h * Time constants borrowed from loc_time.h

View File

@ -31,8 +31,8 @@
#ifndef CORE_BIND_H #ifndef CORE_BIND_H
#define CORE_BIND_H #define CORE_BIND_H
#include "core/image.h"
#include "core/io/compression.h" #include "core/io/compression.h"
#include "core/io/image.h"
#include "core/io/resource_loader.h" #include "core/io/resource_loader.h"
#include "core/io/resource_saver.h" #include "core/io/resource_saver.h"
#include "core/os/dir_access.h" #include "core/os/dir_access.h"

690
core/core_constants.cpp Normal file
View File

@ -0,0 +1,690 @@
/*************************************************************************/
/* core_constants.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "core_constants.h"
#include "core/input/input_event.h"
#include "core/object/class_db.h"
#include "core/os/keyboard.h"
#include "core/variant/variant.h"
struct _CoreConstant {
#ifdef DEBUG_METHODS_ENABLED
StringName enum_name;
bool ignore_value_in_docs;
#endif
const char *name;
int value;
_CoreConstant() {}
#ifdef DEBUG_METHODS_ENABLED
_CoreConstant(const StringName &p_enum_name, const char *p_name, int p_value, bool p_ignore_value_in_docs = false) :
enum_name(p_enum_name),
ignore_value_in_docs(p_ignore_value_in_docs),
name(p_name),
value(p_value) {
}
#else
_CoreConstant(const char *p_name, int p_value) :
name(p_name),
value(p_value) {
}
#endif
};
static Vector<_CoreConstant> _global_constants;
#ifdef DEBUG_METHODS_ENABLED
#define BIND_CORE_CONSTANT(m_constant) \
_global_constants.push_back(_CoreConstant(StringName(), #m_constant, m_constant));
#define BIND_CORE_ENUM_CONSTANT(m_constant) \
_global_constants.push_back(_CoreConstant(__constant_get_enum_name(m_constant, #m_constant), #m_constant, m_constant));
#define BIND_CORE_ENUM_CONSTANT_CUSTOM(m_custom_name, m_constant) \
_global_constants.push_back(_CoreConstant(__constant_get_enum_name(m_constant, #m_constant), m_custom_name, m_constant));
#define BIND_CORE_CONSTANT_NO_VAL(m_constant) \
_global_constants.push_back(_CoreConstant(StringName(), #m_constant, m_constant, true));
#define BIND_CORE_ENUM_CONSTANT_NO_VAL(m_constant) \
_global_constants.push_back(_CoreConstant(__constant_get_enum_name(m_constant, #m_constant), #m_constant, m_constant, true));
#define BIND_CORE_ENUM_CONSTANT_CUSTOM_NO_VAL(m_custom_name, m_constant) \
_global_constants.push_back(_CoreConstant(__constant_get_enum_name(m_constant, #m_constant), m_custom_name, m_constant, true));
#else
#define BIND_CORE_CONSTANT(m_constant) \
_global_constants.push_back(_CoreConstant(#m_constant, m_constant));
#define BIND_CORE_ENUM_CONSTANT(m_constant) \
_global_constants.push_back(_CoreConstant(#m_constant, m_constant));
#define BIND_CORE_ENUM_CONSTANT_CUSTOM(m_custom_name, m_constant) \
_global_constants.push_back(_CoreConstant(m_custom_name, m_constant));
#define BIND_CORE_CONSTANT_NO_VAL(m_constant) \
_global_constants.push_back(_CoreConstant(#m_constant, m_constant));
#define BIND_CORE_ENUM_CONSTANT_NO_VAL(m_constant) \
_global_constants.push_back(_CoreConstant(#m_constant, m_constant));
#define BIND_CORE_ENUM_CONSTANT_CUSTOM_NO_VAL(m_custom_name, m_constant) \
_global_constants.push_back(_CoreConstant(m_custom_name, m_constant));
#endif
VARIANT_ENUM_CAST(KeyList);
VARIANT_ENUM_CAST(KeyModifierMask);
VARIANT_ENUM_CAST(ButtonList);
VARIANT_ENUM_CAST(JoyButtonList);
VARIANT_ENUM_CAST(JoyAxisList);
VARIANT_ENUM_CAST(MidiMessageList);
void register_global_constants() {
BIND_CORE_ENUM_CONSTANT(MARGIN_LEFT);
BIND_CORE_ENUM_CONSTANT(MARGIN_TOP);
BIND_CORE_ENUM_CONSTANT(MARGIN_RIGHT);
BIND_CORE_ENUM_CONSTANT(MARGIN_BOTTOM);
BIND_CORE_ENUM_CONSTANT(CORNER_TOP_LEFT);
BIND_CORE_ENUM_CONSTANT(CORNER_TOP_RIGHT);
BIND_CORE_ENUM_CONSTANT(CORNER_BOTTOM_RIGHT);
BIND_CORE_ENUM_CONSTANT(CORNER_BOTTOM_LEFT);
BIND_CORE_ENUM_CONSTANT(VERTICAL);
BIND_CORE_ENUM_CONSTANT(HORIZONTAL);
BIND_CORE_ENUM_CONSTANT(HALIGN_LEFT);
BIND_CORE_ENUM_CONSTANT(HALIGN_CENTER);
BIND_CORE_ENUM_CONSTANT(HALIGN_RIGHT);
BIND_CORE_ENUM_CONSTANT(VALIGN_TOP);
BIND_CORE_ENUM_CONSTANT(VALIGN_CENTER);
BIND_CORE_ENUM_CONSTANT(VALIGN_BOTTOM);
// huge list of keys
BIND_CORE_CONSTANT(SPKEY);
BIND_CORE_ENUM_CONSTANT(KEY_ESCAPE);
BIND_CORE_ENUM_CONSTANT(KEY_TAB);
BIND_CORE_ENUM_CONSTANT(KEY_BACKTAB);
BIND_CORE_ENUM_CONSTANT(KEY_BACKSPACE);
BIND_CORE_ENUM_CONSTANT(KEY_ENTER);
BIND_CORE_ENUM_CONSTANT(KEY_KP_ENTER);
BIND_CORE_ENUM_CONSTANT(KEY_INSERT);
BIND_CORE_ENUM_CONSTANT(KEY_DELETE);
BIND_CORE_ENUM_CONSTANT(KEY_PAUSE);
BIND_CORE_ENUM_CONSTANT(KEY_PRINT);
BIND_CORE_ENUM_CONSTANT(KEY_SYSREQ);
BIND_CORE_ENUM_CONSTANT(KEY_CLEAR);
BIND_CORE_ENUM_CONSTANT(KEY_HOME);
BIND_CORE_ENUM_CONSTANT(KEY_END);
BIND_CORE_ENUM_CONSTANT(KEY_LEFT);
BIND_CORE_ENUM_CONSTANT(KEY_UP);
BIND_CORE_ENUM_CONSTANT(KEY_RIGHT);
BIND_CORE_ENUM_CONSTANT(KEY_DOWN);
BIND_CORE_ENUM_CONSTANT(KEY_PAGEUP);
BIND_CORE_ENUM_CONSTANT(KEY_PAGEDOWN);
BIND_CORE_ENUM_CONSTANT(KEY_SHIFT);
BIND_CORE_ENUM_CONSTANT(KEY_CONTROL);
BIND_CORE_ENUM_CONSTANT(KEY_META);
BIND_CORE_ENUM_CONSTANT(KEY_ALT);
BIND_CORE_ENUM_CONSTANT(KEY_CAPSLOCK);
BIND_CORE_ENUM_CONSTANT(KEY_NUMLOCK);
BIND_CORE_ENUM_CONSTANT(KEY_SCROLLLOCK);
BIND_CORE_ENUM_CONSTANT(KEY_F1);
BIND_CORE_ENUM_CONSTANT(KEY_F2);
BIND_CORE_ENUM_CONSTANT(KEY_F3);
BIND_CORE_ENUM_CONSTANT(KEY_F4);
BIND_CORE_ENUM_CONSTANT(KEY_F5);
BIND_CORE_ENUM_CONSTANT(KEY_F6);
BIND_CORE_ENUM_CONSTANT(KEY_F7);
BIND_CORE_ENUM_CONSTANT(KEY_F8);
BIND_CORE_ENUM_CONSTANT(KEY_F9);
BIND_CORE_ENUM_CONSTANT(KEY_F10);
BIND_CORE_ENUM_CONSTANT(KEY_F11);
BIND_CORE_ENUM_CONSTANT(KEY_F12);
BIND_CORE_ENUM_CONSTANT(KEY_F13);
BIND_CORE_ENUM_CONSTANT(KEY_F14);
BIND_CORE_ENUM_CONSTANT(KEY_F15);
BIND_CORE_ENUM_CONSTANT(KEY_F16);
BIND_CORE_ENUM_CONSTANT(KEY_KP_MULTIPLY);
BIND_CORE_ENUM_CONSTANT(KEY_KP_DIVIDE);
BIND_CORE_ENUM_CONSTANT(KEY_KP_SUBTRACT);
BIND_CORE_ENUM_CONSTANT(KEY_KP_PERIOD);
BIND_CORE_ENUM_CONSTANT(KEY_KP_ADD);
BIND_CORE_ENUM_CONSTANT(KEY_KP_0);
BIND_CORE_ENUM_CONSTANT(KEY_KP_1);
BIND_CORE_ENUM_CONSTANT(KEY_KP_2);
BIND_CORE_ENUM_CONSTANT(KEY_KP_3);
BIND_CORE_ENUM_CONSTANT(KEY_KP_4);
BIND_CORE_ENUM_CONSTANT(KEY_KP_5);
BIND_CORE_ENUM_CONSTANT(KEY_KP_6);
BIND_CORE_ENUM_CONSTANT(KEY_KP_7);
BIND_CORE_ENUM_CONSTANT(KEY_KP_8);
BIND_CORE_ENUM_CONSTANT(KEY_KP_9);
BIND_CORE_ENUM_CONSTANT(KEY_SUPER_L);
BIND_CORE_ENUM_CONSTANT(KEY_SUPER_R);
BIND_CORE_ENUM_CONSTANT(KEY_MENU);
BIND_CORE_ENUM_CONSTANT(KEY_HYPER_L);
BIND_CORE_ENUM_CONSTANT(KEY_HYPER_R);
BIND_CORE_ENUM_CONSTANT(KEY_HELP);
BIND_CORE_ENUM_CONSTANT(KEY_DIRECTION_L);
BIND_CORE_ENUM_CONSTANT(KEY_DIRECTION_R);
BIND_CORE_ENUM_CONSTANT(KEY_BACK);
BIND_CORE_ENUM_CONSTANT(KEY_FORWARD);
BIND_CORE_ENUM_CONSTANT(KEY_STOP);
BIND_CORE_ENUM_CONSTANT(KEY_REFRESH);
BIND_CORE_ENUM_CONSTANT(KEY_VOLUMEDOWN);
BIND_CORE_ENUM_CONSTANT(KEY_VOLUMEMUTE);
BIND_CORE_ENUM_CONSTANT(KEY_VOLUMEUP);
BIND_CORE_ENUM_CONSTANT(KEY_BASSBOOST);
BIND_CORE_ENUM_CONSTANT(KEY_BASSUP);
BIND_CORE_ENUM_CONSTANT(KEY_BASSDOWN);
BIND_CORE_ENUM_CONSTANT(KEY_TREBLEUP);
BIND_CORE_ENUM_CONSTANT(KEY_TREBLEDOWN);
BIND_CORE_ENUM_CONSTANT(KEY_MEDIAPLAY);
BIND_CORE_ENUM_CONSTANT(KEY_MEDIASTOP);
BIND_CORE_ENUM_CONSTANT(KEY_MEDIAPREVIOUS);
BIND_CORE_ENUM_CONSTANT(KEY_MEDIANEXT);
BIND_CORE_ENUM_CONSTANT(KEY_MEDIARECORD);
BIND_CORE_ENUM_CONSTANT(KEY_HOMEPAGE);
BIND_CORE_ENUM_CONSTANT(KEY_FAVORITES);
BIND_CORE_ENUM_CONSTANT(KEY_SEARCH);
BIND_CORE_ENUM_CONSTANT(KEY_STANDBY);
BIND_CORE_ENUM_CONSTANT(KEY_OPENURL);
BIND_CORE_ENUM_CONSTANT(KEY_LAUNCHMAIL);
BIND_CORE_ENUM_CONSTANT(KEY_LAUNCHMEDIA);
BIND_CORE_ENUM_CONSTANT(KEY_LAUNCH0);
BIND_CORE_ENUM_CONSTANT(KEY_LAUNCH1);
BIND_CORE_ENUM_CONSTANT(KEY_LAUNCH2);
BIND_CORE_ENUM_CONSTANT(KEY_LAUNCH3);
BIND_CORE_ENUM_CONSTANT(KEY_LAUNCH4);
BIND_CORE_ENUM_CONSTANT(KEY_LAUNCH5);
BIND_CORE_ENUM_CONSTANT(KEY_LAUNCH6);
BIND_CORE_ENUM_CONSTANT(KEY_LAUNCH7);
BIND_CORE_ENUM_CONSTANT(KEY_LAUNCH8);
BIND_CORE_ENUM_CONSTANT(KEY_LAUNCH9);
BIND_CORE_ENUM_CONSTANT(KEY_LAUNCHA);
BIND_CORE_ENUM_CONSTANT(KEY_LAUNCHB);
BIND_CORE_ENUM_CONSTANT(KEY_LAUNCHC);
BIND_CORE_ENUM_CONSTANT(KEY_LAUNCHD);
BIND_CORE_ENUM_CONSTANT(KEY_LAUNCHE);
BIND_CORE_ENUM_CONSTANT(KEY_LAUNCHF);
BIND_CORE_ENUM_CONSTANT(KEY_UNKNOWN);
BIND_CORE_ENUM_CONSTANT(KEY_SPACE);
BIND_CORE_ENUM_CONSTANT(KEY_EXCLAM);
BIND_CORE_ENUM_CONSTANT(KEY_QUOTEDBL);
BIND_CORE_ENUM_CONSTANT(KEY_NUMBERSIGN);
BIND_CORE_ENUM_CONSTANT(KEY_DOLLAR);
BIND_CORE_ENUM_CONSTANT(KEY_PERCENT);
BIND_CORE_ENUM_CONSTANT(KEY_AMPERSAND);
BIND_CORE_ENUM_CONSTANT(KEY_APOSTROPHE);
BIND_CORE_ENUM_CONSTANT(KEY_PARENLEFT);
BIND_CORE_ENUM_CONSTANT(KEY_PARENRIGHT);
BIND_CORE_ENUM_CONSTANT(KEY_ASTERISK);
BIND_CORE_ENUM_CONSTANT(KEY_PLUS);
BIND_CORE_ENUM_CONSTANT(KEY_COMMA);
BIND_CORE_ENUM_CONSTANT(KEY_MINUS);
BIND_CORE_ENUM_CONSTANT(KEY_PERIOD);
BIND_CORE_ENUM_CONSTANT(KEY_SLASH);
BIND_CORE_ENUM_CONSTANT(KEY_0);
BIND_CORE_ENUM_CONSTANT(KEY_1);
BIND_CORE_ENUM_CONSTANT(KEY_2);
BIND_CORE_ENUM_CONSTANT(KEY_3);
BIND_CORE_ENUM_CONSTANT(KEY_4);
BIND_CORE_ENUM_CONSTANT(KEY_5);
BIND_CORE_ENUM_CONSTANT(KEY_6);
BIND_CORE_ENUM_CONSTANT(KEY_7);
BIND_CORE_ENUM_CONSTANT(KEY_8);
BIND_CORE_ENUM_CONSTANT(KEY_9);
BIND_CORE_ENUM_CONSTANT(KEY_COLON);
BIND_CORE_ENUM_CONSTANT(KEY_SEMICOLON);
BIND_CORE_ENUM_CONSTANT(KEY_LESS);
BIND_CORE_ENUM_CONSTANT(KEY_EQUAL);
BIND_CORE_ENUM_CONSTANT(KEY_GREATER);
BIND_CORE_ENUM_CONSTANT(KEY_QUESTION);
BIND_CORE_ENUM_CONSTANT(KEY_AT);
BIND_CORE_ENUM_CONSTANT(KEY_A);
BIND_CORE_ENUM_CONSTANT(KEY_B);
BIND_CORE_ENUM_CONSTANT(KEY_C);
BIND_CORE_ENUM_CONSTANT(KEY_D);
BIND_CORE_ENUM_CONSTANT(KEY_E);
BIND_CORE_ENUM_CONSTANT(KEY_F);
BIND_CORE_ENUM_CONSTANT(KEY_G);
BIND_CORE_ENUM_CONSTANT(KEY_H);
BIND_CORE_ENUM_CONSTANT(KEY_I);
BIND_CORE_ENUM_CONSTANT(KEY_J);
BIND_CORE_ENUM_CONSTANT(KEY_K);
BIND_CORE_ENUM_CONSTANT(KEY_L);
BIND_CORE_ENUM_CONSTANT(KEY_M);
BIND_CORE_ENUM_CONSTANT(KEY_N);
BIND_CORE_ENUM_CONSTANT(KEY_O);
BIND_CORE_ENUM_CONSTANT(KEY_P);
BIND_CORE_ENUM_CONSTANT(KEY_Q);
BIND_CORE_ENUM_CONSTANT(KEY_R);
BIND_CORE_ENUM_CONSTANT(KEY_S);
BIND_CORE_ENUM_CONSTANT(KEY_T);
BIND_CORE_ENUM_CONSTANT(KEY_U);
BIND_CORE_ENUM_CONSTANT(KEY_V);
BIND_CORE_ENUM_CONSTANT(KEY_W);
BIND_CORE_ENUM_CONSTANT(KEY_X);
BIND_CORE_ENUM_CONSTANT(KEY_Y);
BIND_CORE_ENUM_CONSTANT(KEY_Z);
BIND_CORE_ENUM_CONSTANT(KEY_BRACKETLEFT);
BIND_CORE_ENUM_CONSTANT(KEY_BACKSLASH);
BIND_CORE_ENUM_CONSTANT(KEY_BRACKETRIGHT);
BIND_CORE_ENUM_CONSTANT(KEY_ASCIICIRCUM);
BIND_CORE_ENUM_CONSTANT(KEY_UNDERSCORE);
BIND_CORE_ENUM_CONSTANT(KEY_QUOTELEFT);
BIND_CORE_ENUM_CONSTANT(KEY_BRACELEFT);
BIND_CORE_ENUM_CONSTANT(KEY_BAR);
BIND_CORE_ENUM_CONSTANT(KEY_BRACERIGHT);
BIND_CORE_ENUM_CONSTANT(KEY_ASCIITILDE);
BIND_CORE_ENUM_CONSTANT(KEY_NOBREAKSPACE);
BIND_CORE_ENUM_CONSTANT(KEY_EXCLAMDOWN);
BIND_CORE_ENUM_CONSTANT(KEY_CENT);
BIND_CORE_ENUM_CONSTANT(KEY_STERLING);
BIND_CORE_ENUM_CONSTANT(KEY_CURRENCY);
BIND_CORE_ENUM_CONSTANT(KEY_YEN);
BIND_CORE_ENUM_CONSTANT(KEY_BROKENBAR);
BIND_CORE_ENUM_CONSTANT(KEY_SECTION);
BIND_CORE_ENUM_CONSTANT(KEY_DIAERESIS);
BIND_CORE_ENUM_CONSTANT(KEY_COPYRIGHT);
BIND_CORE_ENUM_CONSTANT(KEY_ORDFEMININE);
BIND_CORE_ENUM_CONSTANT(KEY_GUILLEMOTLEFT);
BIND_CORE_ENUM_CONSTANT(KEY_NOTSIGN);
BIND_CORE_ENUM_CONSTANT(KEY_HYPHEN);
BIND_CORE_ENUM_CONSTANT(KEY_REGISTERED);
BIND_CORE_ENUM_CONSTANT(KEY_MACRON);
BIND_CORE_ENUM_CONSTANT(KEY_DEGREE);
BIND_CORE_ENUM_CONSTANT(KEY_PLUSMINUS);
BIND_CORE_ENUM_CONSTANT(KEY_TWOSUPERIOR);
BIND_CORE_ENUM_CONSTANT(KEY_THREESUPERIOR);
BIND_CORE_ENUM_CONSTANT(KEY_ACUTE);
BIND_CORE_ENUM_CONSTANT(KEY_MU);
BIND_CORE_ENUM_CONSTANT(KEY_PARAGRAPH);
BIND_CORE_ENUM_CONSTANT(KEY_PERIODCENTERED);
BIND_CORE_ENUM_CONSTANT(KEY_CEDILLA);
BIND_CORE_ENUM_CONSTANT(KEY_ONESUPERIOR);
BIND_CORE_ENUM_CONSTANT(KEY_MASCULINE);
BIND_CORE_ENUM_CONSTANT(KEY_GUILLEMOTRIGHT);
BIND_CORE_ENUM_CONSTANT(KEY_ONEQUARTER);
BIND_CORE_ENUM_CONSTANT(KEY_ONEHALF);
BIND_CORE_ENUM_CONSTANT(KEY_THREEQUARTERS);
BIND_CORE_ENUM_CONSTANT(KEY_QUESTIONDOWN);
BIND_CORE_ENUM_CONSTANT(KEY_AGRAVE);
BIND_CORE_ENUM_CONSTANT(KEY_AACUTE);
BIND_CORE_ENUM_CONSTANT(KEY_ACIRCUMFLEX);
BIND_CORE_ENUM_CONSTANT(KEY_ATILDE);
BIND_CORE_ENUM_CONSTANT(KEY_ADIAERESIS);
BIND_CORE_ENUM_CONSTANT(KEY_ARING);
BIND_CORE_ENUM_CONSTANT(KEY_AE);
BIND_CORE_ENUM_CONSTANT(KEY_CCEDILLA);
BIND_CORE_ENUM_CONSTANT(KEY_EGRAVE);
BIND_CORE_ENUM_CONSTANT(KEY_EACUTE);
BIND_CORE_ENUM_CONSTANT(KEY_ECIRCUMFLEX);
BIND_CORE_ENUM_CONSTANT(KEY_EDIAERESIS);
BIND_CORE_ENUM_CONSTANT(KEY_IGRAVE);
BIND_CORE_ENUM_CONSTANT(KEY_IACUTE);
BIND_CORE_ENUM_CONSTANT(KEY_ICIRCUMFLEX);
BIND_CORE_ENUM_CONSTANT(KEY_IDIAERESIS);
BIND_CORE_ENUM_CONSTANT(KEY_ETH);
BIND_CORE_ENUM_CONSTANT(KEY_NTILDE);
BIND_CORE_ENUM_CONSTANT(KEY_OGRAVE);
BIND_CORE_ENUM_CONSTANT(KEY_OACUTE);
BIND_CORE_ENUM_CONSTANT(KEY_OCIRCUMFLEX);
BIND_CORE_ENUM_CONSTANT(KEY_OTILDE);
BIND_CORE_ENUM_CONSTANT(KEY_ODIAERESIS);
BIND_CORE_ENUM_CONSTANT(KEY_MULTIPLY);
BIND_CORE_ENUM_CONSTANT(KEY_OOBLIQUE);
BIND_CORE_ENUM_CONSTANT(KEY_UGRAVE);
BIND_CORE_ENUM_CONSTANT(KEY_UACUTE);
BIND_CORE_ENUM_CONSTANT(KEY_UCIRCUMFLEX);
BIND_CORE_ENUM_CONSTANT(KEY_UDIAERESIS);
BIND_CORE_ENUM_CONSTANT(KEY_YACUTE);
BIND_CORE_ENUM_CONSTANT(KEY_THORN);
BIND_CORE_ENUM_CONSTANT(KEY_SSHARP);
BIND_CORE_ENUM_CONSTANT(KEY_DIVISION);
BIND_CORE_ENUM_CONSTANT(KEY_YDIAERESIS);
BIND_CORE_ENUM_CONSTANT(KEY_CODE_MASK);
BIND_CORE_ENUM_CONSTANT(KEY_MODIFIER_MASK);
BIND_CORE_ENUM_CONSTANT(KEY_MASK_SHIFT);
BIND_CORE_ENUM_CONSTANT(KEY_MASK_ALT);
BIND_CORE_ENUM_CONSTANT(KEY_MASK_META);
BIND_CORE_ENUM_CONSTANT(KEY_MASK_CTRL);
BIND_CORE_ENUM_CONSTANT_NO_VAL(KEY_MASK_CMD);
BIND_CORE_ENUM_CONSTANT(KEY_MASK_KPAD);
BIND_CORE_ENUM_CONSTANT(KEY_MASK_GROUP_SWITCH);
// mouse
BIND_CORE_ENUM_CONSTANT(BUTTON_LEFT);
BIND_CORE_ENUM_CONSTANT(BUTTON_RIGHT);
BIND_CORE_ENUM_CONSTANT(BUTTON_MIDDLE);
BIND_CORE_ENUM_CONSTANT(BUTTON_XBUTTON1);
BIND_CORE_ENUM_CONSTANT(BUTTON_XBUTTON2);
BIND_CORE_ENUM_CONSTANT(BUTTON_WHEEL_UP);
BIND_CORE_ENUM_CONSTANT(BUTTON_WHEEL_DOWN);
BIND_CORE_ENUM_CONSTANT(BUTTON_WHEEL_LEFT);
BIND_CORE_ENUM_CONSTANT(BUTTON_WHEEL_RIGHT);
BIND_CORE_ENUM_CONSTANT(BUTTON_MASK_LEFT);
BIND_CORE_ENUM_CONSTANT(BUTTON_MASK_RIGHT);
BIND_CORE_ENUM_CONSTANT(BUTTON_MASK_MIDDLE);
BIND_CORE_ENUM_CONSTANT(BUTTON_MASK_XBUTTON1);
BIND_CORE_ENUM_CONSTANT(BUTTON_MASK_XBUTTON2);
// Joypad buttons
BIND_CORE_ENUM_CONSTANT(JOY_INVALID_BUTTON);
BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_A);
BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_B);
BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_X);
BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_Y);
BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_BACK);
BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_GUIDE);
BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_START);
BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_LEFT_STICK);
BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_RIGHT_STICK);
BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_LEFT_SHOULDER);
BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_RIGHT_SHOULDER);
BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_DPAD_UP);
BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_DPAD_DOWN);
BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_DPAD_LEFT);
BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_DPAD_RIGHT);
BIND_CORE_ENUM_CONSTANT(JOY_SDL_BUTTONS);
BIND_CORE_ENUM_CONSTANT(JOY_SONY_X);
BIND_CORE_ENUM_CONSTANT(JOY_SONY_CROSS);
BIND_CORE_ENUM_CONSTANT(JOY_SONY_CIRCLE);
BIND_CORE_ENUM_CONSTANT(JOY_SONY_SQUARE);
BIND_CORE_ENUM_CONSTANT(JOY_SONY_TRIANGLE);
BIND_CORE_ENUM_CONSTANT(JOY_SONY_SELECT);
BIND_CORE_ENUM_CONSTANT(JOY_SONY_START);
BIND_CORE_ENUM_CONSTANT(JOY_SONY_PS);
BIND_CORE_ENUM_CONSTANT(JOY_SONY_L1);
BIND_CORE_ENUM_CONSTANT(JOY_SONY_R1);
BIND_CORE_ENUM_CONSTANT(JOY_SONY_L3);
BIND_CORE_ENUM_CONSTANT(JOY_SONY_R3);
BIND_CORE_ENUM_CONSTANT(JOY_XBOX_A);
BIND_CORE_ENUM_CONSTANT(JOY_XBOX_B);
BIND_CORE_ENUM_CONSTANT(JOY_XBOX_X);
BIND_CORE_ENUM_CONSTANT(JOY_XBOX_Y);
BIND_CORE_ENUM_CONSTANT(JOY_XBOX_BACK);
BIND_CORE_ENUM_CONSTANT(JOY_XBOX_START);
BIND_CORE_ENUM_CONSTANT(JOY_XBOX_HOME);
BIND_CORE_ENUM_CONSTANT(JOY_XBOX_LS);
BIND_CORE_ENUM_CONSTANT(JOY_XBOX_RS);
BIND_CORE_ENUM_CONSTANT(JOY_XBOX_LB);
BIND_CORE_ENUM_CONSTANT(JOY_XBOX_RB);
BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_MAX);
// Joypad axes
BIND_CORE_ENUM_CONSTANT(JOY_INVALID_AXIS);
BIND_CORE_ENUM_CONSTANT(JOY_AXIS_LEFT_X);
BIND_CORE_ENUM_CONSTANT(JOY_AXIS_LEFT_Y);
BIND_CORE_ENUM_CONSTANT(JOY_AXIS_RIGHT_X);
BIND_CORE_ENUM_CONSTANT(JOY_AXIS_RIGHT_Y);
BIND_CORE_ENUM_CONSTANT(JOY_AXIS_TRIGGER_LEFT);
BIND_CORE_ENUM_CONSTANT(JOY_AXIS_TRIGGER_RIGHT);
BIND_CORE_ENUM_CONSTANT(JOY_SDL_AXES);
BIND_CORE_ENUM_CONSTANT(JOY_AXIS_0_X);
BIND_CORE_ENUM_CONSTANT(JOY_AXIS_0_Y);
BIND_CORE_ENUM_CONSTANT(JOY_AXIS_1_X);
BIND_CORE_ENUM_CONSTANT(JOY_AXIS_1_Y);
BIND_CORE_ENUM_CONSTANT(JOY_AXIS_2_X);
BIND_CORE_ENUM_CONSTANT(JOY_AXIS_2_Y);
BIND_CORE_ENUM_CONSTANT(JOY_AXIS_3_X);
BIND_CORE_ENUM_CONSTANT(JOY_AXIS_3_Y);
BIND_CORE_ENUM_CONSTANT(JOY_AXIS_4_X);
BIND_CORE_ENUM_CONSTANT(JOY_AXIS_4_Y);
BIND_CORE_ENUM_CONSTANT(JOY_AXIS_MAX);
// midi
BIND_CORE_ENUM_CONSTANT(MIDI_MESSAGE_NOTE_OFF);
BIND_CORE_ENUM_CONSTANT(MIDI_MESSAGE_NOTE_ON);
BIND_CORE_ENUM_CONSTANT(MIDI_MESSAGE_AFTERTOUCH);
BIND_CORE_ENUM_CONSTANT(MIDI_MESSAGE_CONTROL_CHANGE);
BIND_CORE_ENUM_CONSTANT(MIDI_MESSAGE_PROGRAM_CHANGE);
BIND_CORE_ENUM_CONSTANT(MIDI_MESSAGE_CHANNEL_PRESSURE);
BIND_CORE_ENUM_CONSTANT(MIDI_MESSAGE_PITCH_BEND);
// error list
BIND_CORE_ENUM_CONSTANT(OK); // (0)
BIND_CORE_ENUM_CONSTANT(FAILED);
BIND_CORE_ENUM_CONSTANT(ERR_UNAVAILABLE);
BIND_CORE_ENUM_CONSTANT(ERR_UNCONFIGURED);
BIND_CORE_ENUM_CONSTANT(ERR_UNAUTHORIZED);
BIND_CORE_ENUM_CONSTANT(ERR_PARAMETER_RANGE_ERROR); // (5)
BIND_CORE_ENUM_CONSTANT(ERR_OUT_OF_MEMORY);
BIND_CORE_ENUM_CONSTANT(ERR_FILE_NOT_FOUND);
BIND_CORE_ENUM_CONSTANT(ERR_FILE_BAD_DRIVE);
BIND_CORE_ENUM_CONSTANT(ERR_FILE_BAD_PATH);
BIND_CORE_ENUM_CONSTANT(ERR_FILE_NO_PERMISSION); // (10)
BIND_CORE_ENUM_CONSTANT(ERR_FILE_ALREADY_IN_USE);
BIND_CORE_ENUM_CONSTANT(ERR_FILE_CANT_OPEN);
BIND_CORE_ENUM_CONSTANT(ERR_FILE_CANT_WRITE);
BIND_CORE_ENUM_CONSTANT(ERR_FILE_CANT_READ);
BIND_CORE_ENUM_CONSTANT(ERR_FILE_UNRECOGNIZED); // (15)
BIND_CORE_ENUM_CONSTANT(ERR_FILE_CORRUPT);
BIND_CORE_ENUM_CONSTANT(ERR_FILE_MISSING_DEPENDENCIES);
BIND_CORE_ENUM_CONSTANT(ERR_FILE_EOF);
BIND_CORE_ENUM_CONSTANT(ERR_CANT_OPEN);
BIND_CORE_ENUM_CONSTANT(ERR_CANT_CREATE); // (20)
BIND_CORE_ENUM_CONSTANT(ERR_QUERY_FAILED);
BIND_CORE_ENUM_CONSTANT(ERR_ALREADY_IN_USE);
BIND_CORE_ENUM_CONSTANT(ERR_LOCKED);
BIND_CORE_ENUM_CONSTANT(ERR_TIMEOUT);
BIND_CORE_ENUM_CONSTANT(ERR_CANT_CONNECT); // (25)
BIND_CORE_ENUM_CONSTANT(ERR_CANT_RESOLVE);
BIND_CORE_ENUM_CONSTANT(ERR_CONNECTION_ERROR);
BIND_CORE_ENUM_CONSTANT(ERR_CANT_ACQUIRE_RESOURCE);
BIND_CORE_ENUM_CONSTANT(ERR_CANT_FORK);
BIND_CORE_ENUM_CONSTANT(ERR_INVALID_DATA); // (30)
BIND_CORE_ENUM_CONSTANT(ERR_INVALID_PARAMETER);
BIND_CORE_ENUM_CONSTANT(ERR_ALREADY_EXISTS);
BIND_CORE_ENUM_CONSTANT(ERR_DOES_NOT_EXIST);
BIND_CORE_ENUM_CONSTANT(ERR_DATABASE_CANT_READ);
BIND_CORE_ENUM_CONSTANT(ERR_DATABASE_CANT_WRITE); // (35)
BIND_CORE_ENUM_CONSTANT(ERR_COMPILATION_FAILED);
BIND_CORE_ENUM_CONSTANT(ERR_METHOD_NOT_FOUND);
BIND_CORE_ENUM_CONSTANT(ERR_LINK_FAILED);
BIND_CORE_ENUM_CONSTANT(ERR_SCRIPT_FAILED);
BIND_CORE_ENUM_CONSTANT(ERR_CYCLIC_LINK); // (40)
BIND_CORE_ENUM_CONSTANT(ERR_INVALID_DECLARATION);
BIND_CORE_ENUM_CONSTANT(ERR_DUPLICATE_SYMBOL);
BIND_CORE_ENUM_CONSTANT(ERR_PARSE_ERROR);
BIND_CORE_ENUM_CONSTANT(ERR_BUSY);
BIND_CORE_ENUM_CONSTANT(ERR_SKIP); // (45)
BIND_CORE_ENUM_CONSTANT(ERR_HELP);
BIND_CORE_ENUM_CONSTANT(ERR_BUG);
BIND_CORE_ENUM_CONSTANT(ERR_PRINTER_ON_FIRE);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_NONE);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_RANGE);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_EXP_RANGE);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_ENUM);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_EXP_EASING);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_LENGTH);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_KEY_ACCEL);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_FLAGS);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_LAYERS_2D_RENDER);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_LAYERS_2D_PHYSICS);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_LAYERS_3D_RENDER);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_LAYERS_3D_PHYSICS);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_FILE);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_DIR);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_GLOBAL_FILE);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_GLOBAL_DIR);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_RESOURCE_TYPE);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_MULTILINE_TEXT);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_PLACEHOLDER_TEXT);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_COLOR_NO_ALPHA);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_IMAGE_COMPRESS_LOSSY);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_STORAGE);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_EDITOR);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_NETWORK);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_EDITOR_HELPER);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_CHECKABLE);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_CHECKED);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_INTERNATIONALIZED);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_GROUP);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_CATEGORY);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_SUBGROUP);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_NO_INSTANCE_STATE);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_RESTART_IF_CHANGED);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_SCRIPT_VARIABLE);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_DEFAULT);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_DEFAULT_INTL);
BIND_CORE_ENUM_CONSTANT(PROPERTY_USAGE_NOEDITOR);
BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_NORMAL);
BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_EDITOR);
BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_NOSCRIPT);
BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_CONST);
BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_REVERSE);
BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_VIRTUAL);
BIND_CORE_ENUM_CONSTANT(METHOD_FLAG_FROM_SCRIPT);
BIND_CORE_ENUM_CONSTANT(METHOD_FLAGS_DEFAULT);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_NIL", Variant::NIL);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_BOOL", Variant::BOOL);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_INT", Variant::INT);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_REAL", Variant::FLOAT);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_STRING", Variant::STRING);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2", Variant::VECTOR2);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2I", Variant::VECTOR2I);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_RECT2", Variant::RECT2);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_RECT2I", Variant::RECT2I);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3", Variant::VECTOR3);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3I", Variant::VECTOR3I);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_TRANSFORM2D", Variant::TRANSFORM2D);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_PLANE", Variant::PLANE);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_QUAT", Variant::QUAT);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_AABB", Variant::AABB);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_BASIS", Variant::BASIS);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_TRANSFORM", Variant::TRANSFORM);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_COLOR", Variant::COLOR);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_STRING_NAME", Variant::STRING_NAME);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_NODE_PATH", Variant::NODE_PATH);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_RID", Variant::_RID);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_OBJECT", Variant::OBJECT);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_CALLABLE", Variant::CALLABLE);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_SIGNAL", Variant::SIGNAL);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_DICTIONARY", Variant::DICTIONARY);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_ARRAY", Variant::ARRAY);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_RAW_ARRAY", Variant::PACKED_BYTE_ARRAY);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_INT32_ARRAY", Variant::PACKED_INT32_ARRAY);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_INT64_ARRAY", Variant::PACKED_INT64_ARRAY);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_FLOAT32_ARRAY", Variant::PACKED_FLOAT32_ARRAY);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_FLOAT64_ARRAY", Variant::PACKED_FLOAT64_ARRAY);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_STRING_ARRAY", Variant::PACKED_STRING_ARRAY);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2_ARRAY", Variant::PACKED_VECTOR2_ARRAY);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3_ARRAY", Variant::PACKED_VECTOR3_ARRAY);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_COLOR_ARRAY", Variant::PACKED_COLOR_ARRAY);
BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_MAX", Variant::VARIANT_MAX);
//comparison
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_EQUAL", Variant::OP_EQUAL);
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_NOT_EQUAL", Variant::OP_NOT_EQUAL);
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_LESS", Variant::OP_LESS);
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_LESS_EQUAL", Variant::OP_LESS_EQUAL);
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_GREATER", Variant::OP_GREATER);
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_GREATER_EQUAL", Variant::OP_GREATER_EQUAL);
//mathematic
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_ADD", Variant::OP_ADD);
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_SUBTRACT", Variant::OP_SUBTRACT);
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_MULTIPLY", Variant::OP_MULTIPLY);
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_DIVIDE", Variant::OP_DIVIDE);
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_NEGATE", Variant::OP_NEGATE);
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_POSITIVE", Variant::OP_POSITIVE);
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_MODULE", Variant::OP_MODULE);
//bitwise
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_SHIFT_LEFT", Variant::OP_SHIFT_LEFT);
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_SHIFT_RIGHT", Variant::OP_SHIFT_RIGHT);
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_BIT_AND", Variant::OP_BIT_AND);
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_BIT_OR", Variant::OP_BIT_OR);
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_BIT_XOR", Variant::OP_BIT_XOR);
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_BIT_NEGATE", Variant::OP_BIT_NEGATE);
//logic
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_AND", Variant::OP_AND);
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_OR", Variant::OP_OR);
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_XOR", Variant::OP_XOR);
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_NOT", Variant::OP_NOT);
//containment
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_IN", Variant::OP_IN);
BIND_CORE_ENUM_CONSTANT_CUSTOM("OP_MAX", Variant::OP_MAX);
}
void unregister_global_constants() {
_global_constants.clear();
}
int CoreConstants::get_global_constant_count() {
return _global_constants.size();
}
#ifdef DEBUG_METHODS_ENABLED
StringName CoreConstants::get_global_constant_enum(int p_idx) {
return _global_constants[p_idx].enum_name;
}
bool CoreConstants::get_ignore_value_in_docs(int p_idx) {
return _global_constants[p_idx].ignore_value_in_docs;
}
#else
StringName CoreConstants::get_global_constant_enum(int p_idx) {
return StringName();
}
bool CoreConstants::get_ignore_value_in_docs(int p_idx) {
return false;
}
#endif
const char *CoreConstants::get_global_constant_name(int p_idx) {
return _global_constants[p_idx].name;
}
int CoreConstants::get_global_constant_value(int p_idx) {
return _global_constants[p_idx].value;
}

View File

@ -1,5 +1,5 @@
/*************************************************************************/ /*************************************************************************/
/* global_constants.h */ /* core_constants.h */
/*************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* GODOT ENGINE */ /* GODOT ENGINE */
@ -28,12 +28,12 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/ /*************************************************************************/
#ifndef GLOBAL_CONSTANTS_H #ifndef CORE_CONSTANTS_H
#define GLOBAL_CONSTANTS_H #define CORE_CONSTANTS_H
#include "core/string_name.h" #include "core/string/string_name.h"
class GlobalConstants { class CoreConstants {
public: public:
static int get_global_constant_count(); static int get_global_constant_count();
static StringName get_global_constant_enum(int p_idx); static StringName get_global_constant_enum(int p_idx);

View File

@ -31,7 +31,7 @@
#ifndef CORE_STRING_NAMES_H #ifndef CORE_STRING_NAMES_H
#define CORE_STRING_NAMES_H #define CORE_STRING_NAMES_H
#include "core/string_name.h" #include "core/string/string_name.h"
class CoreStringNames { class CoreStringNames {
friend void register_core_types(); friend void register_core_types();

View File

@ -32,7 +32,7 @@
#define AES_CONTEXT_H #define AES_CONTEXT_H
#include "core/crypto/crypto_core.h" #include "core/crypto/crypto_core.h"
#include "core/reference.h" #include "core/object/reference.h"
class AESContext : public Reference { class AESContext : public Reference {
GDCLASS(AESContext, Reference); GDCLASS(AESContext, Reference);

View File

@ -30,7 +30,7 @@
#include "crypto.h" #include "crypto.h"
#include "core/engine.h" #include "core/config/engine.h"
#include "core/io/certs_compressed.gen.h" #include "core/io/certs_compressed.gen.h"
#include "core/io/compression.h" #include "core/io/compression.h"

View File

@ -32,10 +32,10 @@
#define CRYPTO_H #define CRYPTO_H
#include "core/crypto/hashing_context.h" #include "core/crypto/hashing_context.h"
#include "core/io/resource.h"
#include "core/io/resource_loader.h" #include "core/io/resource_loader.h"
#include "core/io/resource_saver.h" #include "core/io/resource_saver.h"
#include "core/reference.h" #include "core/object/reference.h"
#include "core/resource.h"
class CryptoKey : public Resource { class CryptoKey : public Resource {
GDCLASS(CryptoKey, Resource); GDCLASS(CryptoKey, Resource);

View File

@ -31,7 +31,7 @@
#ifndef CRYPTO_CORE_H #ifndef CRYPTO_CORE_H
#define CRYPTO_CORE_H #define CRYPTO_CORE_H
#include "core/reference.h" #include "core/object/reference.h"
class CryptoCore { class CryptoCore {
public: public:

View File

@ -31,7 +31,7 @@
#ifndef HASHING_CONTEXT_H #ifndef HASHING_CONTEXT_H
#define HASHING_CONTEXT_H #define HASHING_CONTEXT_H
#include "core/reference.h" #include "core/object/reference.h"
class HashingContext : public Reference { class HashingContext : public Reference {
GDCLASS(HashingContext, Reference); GDCLASS(HashingContext, Reference);

View File

@ -31,7 +31,7 @@
#ifndef DEBUGGER_MARSHARLLS_H #ifndef DEBUGGER_MARSHARLLS_H
#define DEBUGGER_MARSHARLLS_H #define DEBUGGER_MARSHARLLS_H
#include "core/script_language.h" #include "core/object/script_language.h"
#include "servers/rendering_server.h" #include "servers/rendering_server.h"
struct DebuggerMarshalls { struct DebuggerMarshalls {

View File

@ -31,12 +31,12 @@
#ifndef ENGINE_DEBUGGER_H #ifndef ENGINE_DEBUGGER_H
#define ENGINE_DEBUGGER_H #define ENGINE_DEBUGGER_H
#include "core/array.h" #include "core/string/string_name.h"
#include "core/map.h" #include "core/string/ustring.h"
#include "core/string_name.h" #include "core/templates/map.h"
#include "core/ustring.h" #include "core/templates/vector.h"
#include "core/variant.h" #include "core/variant/array.h"
#include "core/vector.h" #include "core/variant/variant.h"
class RemoteDebuggerPeer; class RemoteDebuggerPeer;
class ScriptDebugger; class ScriptDebugger;

View File

@ -32,8 +32,8 @@
#define LOCAL_DEBUGGER_H #define LOCAL_DEBUGGER_H
#include "core/debugger/engine_debugger.h" #include "core/debugger/engine_debugger.h"
#include "core/list.h" #include "core/object/script_language.h"
#include "core/script_language.h" #include "core/templates/list.h"
class LocalDebugger : public EngineDebugger { class LocalDebugger : public EngineDebugger {
private: private:

View File

@ -30,13 +30,13 @@
#include "remote_debugger.h" #include "remote_debugger.h"
#include "core/config/project_settings.h"
#include "core/debugger/debugger_marshalls.h" #include "core/debugger/debugger_marshalls.h"
#include "core/debugger/engine_debugger.h" #include "core/debugger/engine_debugger.h"
#include "core/debugger/script_debugger.h" #include "core/debugger/script_debugger.h"
#include "core/input/input.h" #include "core/input/input.h"
#include "core/object/script_language.h"
#include "core/os/os.h" #include "core/os/os.h"
#include "core/project_settings.h"
#include "core/script_language.h"
#include "scene/main/node.h" #include "scene/main/node.h"
#include "servers/display_server.h" #include "servers/display_server.h"

View File

@ -31,13 +31,13 @@
#ifndef REMOTE_DEBUGGER_H #ifndef REMOTE_DEBUGGER_H
#define REMOTE_DEBUGGER_H #define REMOTE_DEBUGGER_H
#include "core/array.h"
#include "core/class_db.h"
#include "core/debugger/debugger_marshalls.h" #include "core/debugger/debugger_marshalls.h"
#include "core/debugger/engine_debugger.h" #include "core/debugger/engine_debugger.h"
#include "core/debugger/remote_debugger_peer.h" #include "core/debugger/remote_debugger_peer.h"
#include "core/string_name.h" #include "core/object/class_db.h"
#include "core/ustring.h" #include "core/string/string_name.h"
#include "core/string/ustring.h"
#include "core/variant/array.h"
class RemoteDebugger : public EngineDebugger { class RemoteDebugger : public EngineDebugger {
public: public:

View File

@ -30,9 +30,9 @@
#include "remote_debugger_peer.h" #include "remote_debugger_peer.h"
#include "core/config/project_settings.h"
#include "core/io/marshalls.h" #include "core/io/marshalls.h"
#include "core/os/os.h" #include "core/os/os.h"
#include "core/project_settings.h"
bool RemoteDebuggerPeerTCP::is_peer_connected() { bool RemoteDebuggerPeerTCP::is_peer_connected() {
return connected; return connected;

View File

@ -32,10 +32,10 @@
#define REMOTE_DEBUGGER_PEER_H #define REMOTE_DEBUGGER_PEER_H
#include "core/io/stream_peer_tcp.h" #include "core/io/stream_peer_tcp.h"
#include "core/object/reference.h"
#include "core/os/mutex.h" #include "core/os/mutex.h"
#include "core/os/thread.h" #include "core/os/thread.h"
#include "core/reference.h" #include "core/string/ustring.h"
#include "core/ustring.h"
class RemoteDebuggerPeer : public Reference { class RemoteDebuggerPeer : public Reference {
protected: protected:

View File

@ -31,11 +31,11 @@
#ifndef SCRIPT_DEBUGGER_H #ifndef SCRIPT_DEBUGGER_H
#define SCRIPT_DEBUGGER_H #define SCRIPT_DEBUGGER_H
#include "core/map.h" #include "core/object/script_language.h"
#include "core/script_language.h" #include "core/string/string_name.h"
#include "core/set.h" #include "core/templates/map.h"
#include "core/string_name.h" #include "core/templates/set.h"
#include "core/vector.h" #include "core/templates/vector.h"
class ScriptDebugger { class ScriptDebugger {
typedef ScriptLanguage::StackInfo StackInfo; typedef ScriptLanguage::StackInfo StackInfo;

7
core/error/SCsub Normal file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env python
Import("env")
env_error = env.Clone()
env_error.add_source_files(env.core_sources, "*.cpp")

View File

@ -31,8 +31,8 @@
#include "error_macros.h" #include "error_macros.h"
#include "core/io/logger.h" #include "core/io/logger.h"
#include "core/ustring.h" #include "core/os/os.h"
#include "os/os.h" #include "core/string/ustring.h"
static ErrorHandlerList *error_handler_list = nullptr; static ErrorHandlerList *error_handler_list = nullptr;

View File

@ -1,101 +0,0 @@
/*************************************************************************/
/* func_ref.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "func_ref.h"
Variant FuncRef::call_func(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (id.is_null()) {
r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL;
return Variant();
}
Object *obj = ObjectDB::get_instance(id);
if (!obj) {
r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL;
return Variant();
}
return obj->call(function, p_args, p_argcount, r_error);
}
Variant FuncRef::call_funcv(const Array &p_args) {
ERR_FAIL_COND_V(id.is_null(), Variant());
Object *obj = ObjectDB::get_instance(id);
ERR_FAIL_COND_V(!obj, Variant());
return obj->callv(function, p_args);
}
void FuncRef::set_instance(Object *p_obj) {
ERR_FAIL_NULL(p_obj);
id = p_obj->get_instance_id();
}
void FuncRef::set_function(const StringName &p_func) {
function = p_func;
}
StringName FuncRef::get_function() {
return function;
}
bool FuncRef::is_valid() const {
if (id.is_null()) {
return false;
}
Object *obj = ObjectDB::get_instance(id);
if (!obj) {
return false;
}
return obj->has_method(function);
}
void FuncRef::_bind_methods() {
{
MethodInfo mi;
mi.name = "call_func";
Vector<Variant> defargs;
ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "call_func", &FuncRef::call_func, mi, defargs);
}
ClassDB::bind_method(D_METHOD("call_funcv", "arg_array"), &FuncRef::call_funcv);
ClassDB::bind_method(D_METHOD("set_instance", "instance"), &FuncRef::set_instance);
ClassDB::bind_method(D_METHOD("is_valid"), &FuncRef::is_valid);
ClassDB::bind_method(D_METHOD("set_function", "name"), &FuncRef::set_function);
ClassDB::bind_method(D_METHOD("get_function"), &FuncRef::get_function);
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "function"), "set_function", "get_function");
}

View File

@ -1,55 +0,0 @@
/*************************************************************************/
/* func_ref.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef FUNC_REF_H
#define FUNC_REF_H
#include "core/reference.h"
class FuncRef : public Reference {
GDCLASS(FuncRef, Reference);
ObjectID id;
StringName function;
protected:
static void _bind_methods();
public:
Variant call_func(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
Variant call_funcv(const Array &p_args);
void set_instance(Object *p_obj);
void set_function(const StringName &p_func);
StringName get_function();
bool is_valid() const;
FuncRef() {}
};
#endif // FUNC_REF_H

View File

@ -1,690 +0,0 @@
/*************************************************************************/
/* global_constants.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "global_constants.h"
#include "core/class_db.h"
#include "core/input/input_event.h"
#include "core/os/keyboard.h"
#include "core/variant.h"
struct _GlobalConstant {
#ifdef DEBUG_METHODS_ENABLED
StringName enum_name;
bool ignore_value_in_docs;
#endif
const char *name;
int value;
_GlobalConstant() {}
#ifdef DEBUG_METHODS_ENABLED
_GlobalConstant(const StringName &p_enum_name, const char *p_name, int p_value, bool p_ignore_value_in_docs = false) :
enum_name(p_enum_name),
ignore_value_in_docs(p_ignore_value_in_docs),
name(p_name),
value(p_value) {
}
#else
_GlobalConstant(const char *p_name, int p_value) :
name(p_name),
value(p_value) {
}
#endif
};
static Vector<_GlobalConstant> _global_constants;
#ifdef DEBUG_METHODS_ENABLED
#define BIND_GLOBAL_CONSTANT(m_constant) \
_global_constants.push_back(_GlobalConstant(StringName(), #m_constant, m_constant));
#define BIND_GLOBAL_ENUM_CONSTANT(m_constant) \
_global_constants.push_back(_GlobalConstant(__constant_get_enum_name(m_constant, #m_constant), #m_constant, m_constant));
#define BIND_GLOBAL_ENUM_CONSTANT_CUSTOM(m_custom_name, m_constant) \
_global_constants.push_back(_GlobalConstant(__constant_get_enum_name(m_constant, #m_constant), m_custom_name, m_constant));
#define BIND_GLOBAL_CONSTANT_NO_VAL(m_constant) \
_global_constants.push_back(_GlobalConstant(StringName(), #m_constant, m_constant, true));
#define BIND_GLOBAL_ENUM_CONSTANT_NO_VAL(m_constant) \
_global_constants.push_back(_GlobalConstant(__constant_get_enum_name(m_constant, #m_constant), #m_constant, m_constant, true));
#define BIND_GLOBAL_ENUM_CONSTANT_CUSTOM_NO_VAL(m_custom_name, m_constant) \
_global_constants.push_back(_GlobalConstant(__constant_get_enum_name(m_constant, #m_constant), m_custom_name, m_constant, true));
#else
#define BIND_GLOBAL_CONSTANT(m_constant) \
_global_constants.push_back(_GlobalConstant(#m_constant, m_constant));
#define BIND_GLOBAL_ENUM_CONSTANT(m_constant) \
_global_constants.push_back(_GlobalConstant(#m_constant, m_constant));
#define BIND_GLOBAL_ENUM_CONSTANT_CUSTOM(m_custom_name, m_constant) \
_global_constants.push_back(_GlobalConstant(m_custom_name, m_constant));
#define BIND_GLOBAL_CONSTANT_NO_VAL(m_constant) \
_global_constants.push_back(_GlobalConstant(#m_constant, m_constant));
#define BIND_GLOBAL_ENUM_CONSTANT_NO_VAL(m_constant) \
_global_constants.push_back(_GlobalConstant(#m_constant, m_constant));
#define BIND_GLOBAL_ENUM_CONSTANT_CUSTOM_NO_VAL(m_custom_name, m_constant) \
_global_constants.push_back(_GlobalConstant(m_custom_name, m_constant));
#endif
VARIANT_ENUM_CAST(KeyList);
VARIANT_ENUM_CAST(KeyModifierMask);
VARIANT_ENUM_CAST(ButtonList);
VARIANT_ENUM_CAST(JoyButtonList);
VARIANT_ENUM_CAST(JoyAxisList);
VARIANT_ENUM_CAST(MidiMessageList);
void register_global_constants() {
BIND_GLOBAL_ENUM_CONSTANT(MARGIN_LEFT);
BIND_GLOBAL_ENUM_CONSTANT(MARGIN_TOP);
BIND_GLOBAL_ENUM_CONSTANT(MARGIN_RIGHT);
BIND_GLOBAL_ENUM_CONSTANT(MARGIN_BOTTOM);
BIND_GLOBAL_ENUM_CONSTANT(CORNER_TOP_LEFT);
BIND_GLOBAL_ENUM_CONSTANT(CORNER_TOP_RIGHT);
BIND_GLOBAL_ENUM_CONSTANT(CORNER_BOTTOM_RIGHT);
BIND_GLOBAL_ENUM_CONSTANT(CORNER_BOTTOM_LEFT);
BIND_GLOBAL_ENUM_CONSTANT(VERTICAL);
BIND_GLOBAL_ENUM_CONSTANT(HORIZONTAL);
BIND_GLOBAL_ENUM_CONSTANT(HALIGN_LEFT);
BIND_GLOBAL_ENUM_CONSTANT(HALIGN_CENTER);
BIND_GLOBAL_ENUM_CONSTANT(HALIGN_RIGHT);
BIND_GLOBAL_ENUM_CONSTANT(VALIGN_TOP);
BIND_GLOBAL_ENUM_CONSTANT(VALIGN_CENTER);
BIND_GLOBAL_ENUM_CONSTANT(VALIGN_BOTTOM);
// huge list of keys
BIND_GLOBAL_CONSTANT(SPKEY);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ESCAPE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_TAB);
BIND_GLOBAL_ENUM_CONSTANT(KEY_BACKTAB);
BIND_GLOBAL_ENUM_CONSTANT(KEY_BACKSPACE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ENTER);
BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_ENTER);
BIND_GLOBAL_ENUM_CONSTANT(KEY_INSERT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_DELETE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_PAUSE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_PRINT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_SYSREQ);
BIND_GLOBAL_ENUM_CONSTANT(KEY_CLEAR);
BIND_GLOBAL_ENUM_CONSTANT(KEY_HOME);
BIND_GLOBAL_ENUM_CONSTANT(KEY_END);
BIND_GLOBAL_ENUM_CONSTANT(KEY_LEFT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_UP);
BIND_GLOBAL_ENUM_CONSTANT(KEY_RIGHT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_DOWN);
BIND_GLOBAL_ENUM_CONSTANT(KEY_PAGEUP);
BIND_GLOBAL_ENUM_CONSTANT(KEY_PAGEDOWN);
BIND_GLOBAL_ENUM_CONSTANT(KEY_SHIFT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_CONTROL);
BIND_GLOBAL_ENUM_CONSTANT(KEY_META);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ALT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_CAPSLOCK);
BIND_GLOBAL_ENUM_CONSTANT(KEY_NUMLOCK);
BIND_GLOBAL_ENUM_CONSTANT(KEY_SCROLLLOCK);
BIND_GLOBAL_ENUM_CONSTANT(KEY_F1);
BIND_GLOBAL_ENUM_CONSTANT(KEY_F2);
BIND_GLOBAL_ENUM_CONSTANT(KEY_F3);
BIND_GLOBAL_ENUM_CONSTANT(KEY_F4);
BIND_GLOBAL_ENUM_CONSTANT(KEY_F5);
BIND_GLOBAL_ENUM_CONSTANT(KEY_F6);
BIND_GLOBAL_ENUM_CONSTANT(KEY_F7);
BIND_GLOBAL_ENUM_CONSTANT(KEY_F8);
BIND_GLOBAL_ENUM_CONSTANT(KEY_F9);
BIND_GLOBAL_ENUM_CONSTANT(KEY_F10);
BIND_GLOBAL_ENUM_CONSTANT(KEY_F11);
BIND_GLOBAL_ENUM_CONSTANT(KEY_F12);
BIND_GLOBAL_ENUM_CONSTANT(KEY_F13);
BIND_GLOBAL_ENUM_CONSTANT(KEY_F14);
BIND_GLOBAL_ENUM_CONSTANT(KEY_F15);
BIND_GLOBAL_ENUM_CONSTANT(KEY_F16);
BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_MULTIPLY);
BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_DIVIDE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_SUBTRACT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_PERIOD);
BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_ADD);
BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_0);
BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_1);
BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_2);
BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_3);
BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_4);
BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_5);
BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_6);
BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_7);
BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_8);
BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_9);
BIND_GLOBAL_ENUM_CONSTANT(KEY_SUPER_L);
BIND_GLOBAL_ENUM_CONSTANT(KEY_SUPER_R);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MENU);
BIND_GLOBAL_ENUM_CONSTANT(KEY_HYPER_L);
BIND_GLOBAL_ENUM_CONSTANT(KEY_HYPER_R);
BIND_GLOBAL_ENUM_CONSTANT(KEY_HELP);
BIND_GLOBAL_ENUM_CONSTANT(KEY_DIRECTION_L);
BIND_GLOBAL_ENUM_CONSTANT(KEY_DIRECTION_R);
BIND_GLOBAL_ENUM_CONSTANT(KEY_BACK);
BIND_GLOBAL_ENUM_CONSTANT(KEY_FORWARD);
BIND_GLOBAL_ENUM_CONSTANT(KEY_STOP);
BIND_GLOBAL_ENUM_CONSTANT(KEY_REFRESH);
BIND_GLOBAL_ENUM_CONSTANT(KEY_VOLUMEDOWN);
BIND_GLOBAL_ENUM_CONSTANT(KEY_VOLUMEMUTE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_VOLUMEUP);
BIND_GLOBAL_ENUM_CONSTANT(KEY_BASSBOOST);
BIND_GLOBAL_ENUM_CONSTANT(KEY_BASSUP);
BIND_GLOBAL_ENUM_CONSTANT(KEY_BASSDOWN);
BIND_GLOBAL_ENUM_CONSTANT(KEY_TREBLEUP);
BIND_GLOBAL_ENUM_CONSTANT(KEY_TREBLEDOWN);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MEDIAPLAY);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MEDIASTOP);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MEDIAPREVIOUS);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MEDIANEXT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MEDIARECORD);
BIND_GLOBAL_ENUM_CONSTANT(KEY_HOMEPAGE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_FAVORITES);
BIND_GLOBAL_ENUM_CONSTANT(KEY_SEARCH);
BIND_GLOBAL_ENUM_CONSTANT(KEY_STANDBY);
BIND_GLOBAL_ENUM_CONSTANT(KEY_OPENURL);
BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHMAIL);
BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHMEDIA);
BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH0);
BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH1);
BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH2);
BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH3);
BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH4);
BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH5);
BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH6);
BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH7);
BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH8);
BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH9);
BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHA);
BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHB);
BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHC);
BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHD);
BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHF);
BIND_GLOBAL_ENUM_CONSTANT(KEY_UNKNOWN);
BIND_GLOBAL_ENUM_CONSTANT(KEY_SPACE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_EXCLAM);
BIND_GLOBAL_ENUM_CONSTANT(KEY_QUOTEDBL);
BIND_GLOBAL_ENUM_CONSTANT(KEY_NUMBERSIGN);
BIND_GLOBAL_ENUM_CONSTANT(KEY_DOLLAR);
BIND_GLOBAL_ENUM_CONSTANT(KEY_PERCENT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_AMPERSAND);
BIND_GLOBAL_ENUM_CONSTANT(KEY_APOSTROPHE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_PARENLEFT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_PARENRIGHT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ASTERISK);
BIND_GLOBAL_ENUM_CONSTANT(KEY_PLUS);
BIND_GLOBAL_ENUM_CONSTANT(KEY_COMMA);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MINUS);
BIND_GLOBAL_ENUM_CONSTANT(KEY_PERIOD);
BIND_GLOBAL_ENUM_CONSTANT(KEY_SLASH);
BIND_GLOBAL_ENUM_CONSTANT(KEY_0);
BIND_GLOBAL_ENUM_CONSTANT(KEY_1);
BIND_GLOBAL_ENUM_CONSTANT(KEY_2);
BIND_GLOBAL_ENUM_CONSTANT(KEY_3);
BIND_GLOBAL_ENUM_CONSTANT(KEY_4);
BIND_GLOBAL_ENUM_CONSTANT(KEY_5);
BIND_GLOBAL_ENUM_CONSTANT(KEY_6);
BIND_GLOBAL_ENUM_CONSTANT(KEY_7);
BIND_GLOBAL_ENUM_CONSTANT(KEY_8);
BIND_GLOBAL_ENUM_CONSTANT(KEY_9);
BIND_GLOBAL_ENUM_CONSTANT(KEY_COLON);
BIND_GLOBAL_ENUM_CONSTANT(KEY_SEMICOLON);
BIND_GLOBAL_ENUM_CONSTANT(KEY_LESS);
BIND_GLOBAL_ENUM_CONSTANT(KEY_EQUAL);
BIND_GLOBAL_ENUM_CONSTANT(KEY_GREATER);
BIND_GLOBAL_ENUM_CONSTANT(KEY_QUESTION);
BIND_GLOBAL_ENUM_CONSTANT(KEY_AT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_A);
BIND_GLOBAL_ENUM_CONSTANT(KEY_B);
BIND_GLOBAL_ENUM_CONSTANT(KEY_C);
BIND_GLOBAL_ENUM_CONSTANT(KEY_D);
BIND_GLOBAL_ENUM_CONSTANT(KEY_E);
BIND_GLOBAL_ENUM_CONSTANT(KEY_F);
BIND_GLOBAL_ENUM_CONSTANT(KEY_G);
BIND_GLOBAL_ENUM_CONSTANT(KEY_H);
BIND_GLOBAL_ENUM_CONSTANT(KEY_I);
BIND_GLOBAL_ENUM_CONSTANT(KEY_J);
BIND_GLOBAL_ENUM_CONSTANT(KEY_K);
BIND_GLOBAL_ENUM_CONSTANT(KEY_L);
BIND_GLOBAL_ENUM_CONSTANT(KEY_M);
BIND_GLOBAL_ENUM_CONSTANT(KEY_N);
BIND_GLOBAL_ENUM_CONSTANT(KEY_O);
BIND_GLOBAL_ENUM_CONSTANT(KEY_P);
BIND_GLOBAL_ENUM_CONSTANT(KEY_Q);
BIND_GLOBAL_ENUM_CONSTANT(KEY_R);
BIND_GLOBAL_ENUM_CONSTANT(KEY_S);
BIND_GLOBAL_ENUM_CONSTANT(KEY_T);
BIND_GLOBAL_ENUM_CONSTANT(KEY_U);
BIND_GLOBAL_ENUM_CONSTANT(KEY_V);
BIND_GLOBAL_ENUM_CONSTANT(KEY_W);
BIND_GLOBAL_ENUM_CONSTANT(KEY_X);
BIND_GLOBAL_ENUM_CONSTANT(KEY_Y);
BIND_GLOBAL_ENUM_CONSTANT(KEY_Z);
BIND_GLOBAL_ENUM_CONSTANT(KEY_BRACKETLEFT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_BACKSLASH);
BIND_GLOBAL_ENUM_CONSTANT(KEY_BRACKETRIGHT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ASCIICIRCUM);
BIND_GLOBAL_ENUM_CONSTANT(KEY_UNDERSCORE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_QUOTELEFT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_BRACELEFT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_BAR);
BIND_GLOBAL_ENUM_CONSTANT(KEY_BRACERIGHT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ASCIITILDE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_NOBREAKSPACE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_EXCLAMDOWN);
BIND_GLOBAL_ENUM_CONSTANT(KEY_CENT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_STERLING);
BIND_GLOBAL_ENUM_CONSTANT(KEY_CURRENCY);
BIND_GLOBAL_ENUM_CONSTANT(KEY_YEN);
BIND_GLOBAL_ENUM_CONSTANT(KEY_BROKENBAR);
BIND_GLOBAL_ENUM_CONSTANT(KEY_SECTION);
BIND_GLOBAL_ENUM_CONSTANT(KEY_DIAERESIS);
BIND_GLOBAL_ENUM_CONSTANT(KEY_COPYRIGHT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ORDFEMININE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_GUILLEMOTLEFT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_NOTSIGN);
BIND_GLOBAL_ENUM_CONSTANT(KEY_HYPHEN);
BIND_GLOBAL_ENUM_CONSTANT(KEY_REGISTERED);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MACRON);
BIND_GLOBAL_ENUM_CONSTANT(KEY_DEGREE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_PLUSMINUS);
BIND_GLOBAL_ENUM_CONSTANT(KEY_TWOSUPERIOR);
BIND_GLOBAL_ENUM_CONSTANT(KEY_THREESUPERIOR);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ACUTE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MU);
BIND_GLOBAL_ENUM_CONSTANT(KEY_PARAGRAPH);
BIND_GLOBAL_ENUM_CONSTANT(KEY_PERIODCENTERED);
BIND_GLOBAL_ENUM_CONSTANT(KEY_CEDILLA);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ONESUPERIOR);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MASCULINE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_GUILLEMOTRIGHT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ONEQUARTER);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ONEHALF);
BIND_GLOBAL_ENUM_CONSTANT(KEY_THREEQUARTERS);
BIND_GLOBAL_ENUM_CONSTANT(KEY_QUESTIONDOWN);
BIND_GLOBAL_ENUM_CONSTANT(KEY_AGRAVE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_AACUTE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ACIRCUMFLEX);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ATILDE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ADIAERESIS);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ARING);
BIND_GLOBAL_ENUM_CONSTANT(KEY_AE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_CCEDILLA);
BIND_GLOBAL_ENUM_CONSTANT(KEY_EGRAVE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_EACUTE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ECIRCUMFLEX);
BIND_GLOBAL_ENUM_CONSTANT(KEY_EDIAERESIS);
BIND_GLOBAL_ENUM_CONSTANT(KEY_IGRAVE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_IACUTE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ICIRCUMFLEX);
BIND_GLOBAL_ENUM_CONSTANT(KEY_IDIAERESIS);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ETH);
BIND_GLOBAL_ENUM_CONSTANT(KEY_NTILDE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_OGRAVE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_OACUTE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_OCIRCUMFLEX);
BIND_GLOBAL_ENUM_CONSTANT(KEY_OTILDE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_ODIAERESIS);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MULTIPLY);
BIND_GLOBAL_ENUM_CONSTANT(KEY_OOBLIQUE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_UGRAVE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_UACUTE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_UCIRCUMFLEX);
BIND_GLOBAL_ENUM_CONSTANT(KEY_UDIAERESIS);
BIND_GLOBAL_ENUM_CONSTANT(KEY_YACUTE);
BIND_GLOBAL_ENUM_CONSTANT(KEY_THORN);
BIND_GLOBAL_ENUM_CONSTANT(KEY_SSHARP);
BIND_GLOBAL_ENUM_CONSTANT(KEY_DIVISION);
BIND_GLOBAL_ENUM_CONSTANT(KEY_YDIAERESIS);
BIND_GLOBAL_ENUM_CONSTANT(KEY_CODE_MASK);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MODIFIER_MASK);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_SHIFT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_ALT);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_META);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_CTRL);
BIND_GLOBAL_ENUM_CONSTANT_NO_VAL(KEY_MASK_CMD);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_KPAD);
BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_GROUP_SWITCH);
// mouse
BIND_GLOBAL_ENUM_CONSTANT(BUTTON_LEFT);
BIND_GLOBAL_ENUM_CONSTANT(BUTTON_RIGHT);
BIND_GLOBAL_ENUM_CONSTANT(BUTTON_MIDDLE);
BIND_GLOBAL_ENUM_CONSTANT(BUTTON_XBUTTON1);
BIND_GLOBAL_ENUM_CONSTANT(BUTTON_XBUTTON2);
BIND_GLOBAL_ENUM_CONSTANT(BUTTON_WHEEL_UP);
BIND_GLOBAL_ENUM_CONSTANT(BUTTON_WHEEL_DOWN);
BIND_GLOBAL_ENUM_CONSTANT(BUTTON_WHEEL_LEFT);
BIND_GLOBAL_ENUM_CONSTANT(BUTTON_WHEEL_RIGHT);
BIND_GLOBAL_ENUM_CONSTANT(BUTTON_MASK_LEFT);
BIND_GLOBAL_ENUM_CONSTANT(BUTTON_MASK_RIGHT);
BIND_GLOBAL_ENUM_CONSTANT(BUTTON_MASK_MIDDLE);
BIND_GLOBAL_ENUM_CONSTANT(BUTTON_MASK_XBUTTON1);
BIND_GLOBAL_ENUM_CONSTANT(BUTTON_MASK_XBUTTON2);
// Joypad buttons
BIND_GLOBAL_ENUM_CONSTANT(JOY_INVALID_BUTTON);
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_A);
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_B);
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_X);
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_Y);
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_BACK);
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_GUIDE);
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_START);
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_LEFT_STICK);
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_RIGHT_STICK);
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_LEFT_SHOULDER);
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_RIGHT_SHOULDER);
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_DPAD_UP);
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_DPAD_DOWN);
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_DPAD_LEFT);
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_DPAD_RIGHT);
BIND_GLOBAL_ENUM_CONSTANT(JOY_SDL_BUTTONS);
BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_X);
BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_CROSS);
BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_CIRCLE);
BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_SQUARE);
BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_TRIANGLE);
BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_SELECT);
BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_START);
BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_PS);
BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_L1);
BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_R1);
BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_L3);
BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_R3);
BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_A);
BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_B);
BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_X);
BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_Y);
BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_BACK);
BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_START);
BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_HOME);
BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_LS);
BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_RS);
BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_LB);
BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_RB);
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_MAX);
// Joypad axes
BIND_GLOBAL_ENUM_CONSTANT(JOY_INVALID_AXIS);
BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_LEFT_X);
BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_LEFT_Y);
BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_RIGHT_X);
BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_RIGHT_Y);
BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_TRIGGER_LEFT);
BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_TRIGGER_RIGHT);
BIND_GLOBAL_ENUM_CONSTANT(JOY_SDL_AXES);
BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_0_X);
BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_0_Y);
BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_1_X);
BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_1_Y);
BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_2_X);
BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_2_Y);
BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_3_X);
BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_3_Y);
BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_4_X);
BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_4_Y);
BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_MAX);
// midi
BIND_GLOBAL_ENUM_CONSTANT(MIDI_MESSAGE_NOTE_OFF);
BIND_GLOBAL_ENUM_CONSTANT(MIDI_MESSAGE_NOTE_ON);
BIND_GLOBAL_ENUM_CONSTANT(MIDI_MESSAGE_AFTERTOUCH);
BIND_GLOBAL_ENUM_CONSTANT(MIDI_MESSAGE_CONTROL_CHANGE);
BIND_GLOBAL_ENUM_CONSTANT(MIDI_MESSAGE_PROGRAM_CHANGE);
BIND_GLOBAL_ENUM_CONSTANT(MIDI_MESSAGE_CHANNEL_PRESSURE);
BIND_GLOBAL_ENUM_CONSTANT(MIDI_MESSAGE_PITCH_BEND);
// error list
BIND_GLOBAL_ENUM_CONSTANT(OK); // (0)
BIND_GLOBAL_ENUM_CONSTANT(FAILED);
BIND_GLOBAL_ENUM_CONSTANT(ERR_UNAVAILABLE);
BIND_GLOBAL_ENUM_CONSTANT(ERR_UNCONFIGURED);
BIND_GLOBAL_ENUM_CONSTANT(ERR_UNAUTHORIZED);
BIND_GLOBAL_ENUM_CONSTANT(ERR_PARAMETER_RANGE_ERROR); // (5)
BIND_GLOBAL_ENUM_CONSTANT(ERR_OUT_OF_MEMORY);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_NOT_FOUND);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_BAD_DRIVE);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_BAD_PATH);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_NO_PERMISSION); // (10)
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_ALREADY_IN_USE);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_CANT_OPEN);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_CANT_WRITE);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_CANT_READ);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_UNRECOGNIZED); // (15)
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_CORRUPT);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_MISSING_DEPENDENCIES);
BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_EOF);
BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_OPEN);
BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_CREATE); // (20)
BIND_GLOBAL_ENUM_CONSTANT(ERR_QUERY_FAILED);
BIND_GLOBAL_ENUM_CONSTANT(ERR_ALREADY_IN_USE);
BIND_GLOBAL_ENUM_CONSTANT(ERR_LOCKED);
BIND_GLOBAL_ENUM_CONSTANT(ERR_TIMEOUT);
BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_CONNECT); // (25)
BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_RESOLVE);
BIND_GLOBAL_ENUM_CONSTANT(ERR_CONNECTION_ERROR);
BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_ACQUIRE_RESOURCE);
BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_FORK);
BIND_GLOBAL_ENUM_CONSTANT(ERR_INVALID_DATA); // (30)
BIND_GLOBAL_ENUM_CONSTANT(ERR_INVALID_PARAMETER);
BIND_GLOBAL_ENUM_CONSTANT(ERR_ALREADY_EXISTS);
BIND_GLOBAL_ENUM_CONSTANT(ERR_DOES_NOT_EXIST);
BIND_GLOBAL_ENUM_CONSTANT(ERR_DATABASE_CANT_READ);
BIND_GLOBAL_ENUM_CONSTANT(ERR_DATABASE_CANT_WRITE); // (35)
BIND_GLOBAL_ENUM_CONSTANT(ERR_COMPILATION_FAILED);
BIND_GLOBAL_ENUM_CONSTANT(ERR_METHOD_NOT_FOUND);
BIND_GLOBAL_ENUM_CONSTANT(ERR_LINK_FAILED);
BIND_GLOBAL_ENUM_CONSTANT(ERR_SCRIPT_FAILED);
BIND_GLOBAL_ENUM_CONSTANT(ERR_CYCLIC_LINK); // (40)
BIND_GLOBAL_ENUM_CONSTANT(ERR_INVALID_DECLARATION);
BIND_GLOBAL_ENUM_CONSTANT(ERR_DUPLICATE_SYMBOL);
BIND_GLOBAL_ENUM_CONSTANT(ERR_PARSE_ERROR);
BIND_GLOBAL_ENUM_CONSTANT(ERR_BUSY);
BIND_GLOBAL_ENUM_CONSTANT(ERR_SKIP); // (45)
BIND_GLOBAL_ENUM_CONSTANT(ERR_HELP);
BIND_GLOBAL_ENUM_CONSTANT(ERR_BUG);
BIND_GLOBAL_ENUM_CONSTANT(ERR_PRINTER_ON_FIRE);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_NONE);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_RANGE);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_EXP_RANGE);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_ENUM);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_EXP_EASING);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_LENGTH);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_KEY_ACCEL);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_FLAGS);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_LAYERS_2D_RENDER);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_LAYERS_2D_PHYSICS);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_LAYERS_3D_RENDER);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_LAYERS_3D_PHYSICS);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_FILE);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_DIR);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_GLOBAL_FILE);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_GLOBAL_DIR);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_RESOURCE_TYPE);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_MULTILINE_TEXT);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_PLACEHOLDER_TEXT);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_COLOR_NO_ALPHA);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_IMAGE_COMPRESS_LOSSY);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_STORAGE);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_EDITOR);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_NETWORK);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_EDITOR_HELPER);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_CHECKABLE);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_CHECKED);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_INTERNATIONALIZED);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_GROUP);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_CATEGORY);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_SUBGROUP);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_NO_INSTANCE_STATE);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_RESTART_IF_CHANGED);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_SCRIPT_VARIABLE);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_DEFAULT);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_DEFAULT_INTL);
BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_NOEDITOR);
BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAG_NORMAL);
BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAG_EDITOR);
BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAG_NOSCRIPT);
BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAG_CONST);
BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAG_REVERSE);
BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAG_VIRTUAL);
BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAG_FROM_SCRIPT);
BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAGS_DEFAULT);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_NIL", Variant::NIL);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_BOOL", Variant::BOOL);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT", Variant::INT);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_REAL", Variant::FLOAT);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING", Variant::STRING);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2", Variant::VECTOR2);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2I", Variant::VECTOR2I);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RECT2", Variant::RECT2);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RECT2I", Variant::RECT2I);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3", Variant::VECTOR3);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3I", Variant::VECTOR3I);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_TRANSFORM2D", Variant::TRANSFORM2D);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_PLANE", Variant::PLANE);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_QUAT", Variant::QUAT);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_AABB", Variant::AABB);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_BASIS", Variant::BASIS);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_TRANSFORM", Variant::TRANSFORM);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_COLOR", Variant::COLOR);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING_NAME", Variant::STRING_NAME);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_NODE_PATH", Variant::NODE_PATH);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RID", Variant::_RID);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_OBJECT", Variant::OBJECT);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_CALLABLE", Variant::CALLABLE);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_SIGNAL", Variant::SIGNAL);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_DICTIONARY", Variant::DICTIONARY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_ARRAY", Variant::ARRAY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RAW_ARRAY", Variant::PACKED_BYTE_ARRAY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT32_ARRAY", Variant::PACKED_INT32_ARRAY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT64_ARRAY", Variant::PACKED_INT64_ARRAY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_FLOAT32_ARRAY", Variant::PACKED_FLOAT32_ARRAY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_FLOAT64_ARRAY", Variant::PACKED_FLOAT64_ARRAY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING_ARRAY", Variant::PACKED_STRING_ARRAY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2_ARRAY", Variant::PACKED_VECTOR2_ARRAY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3_ARRAY", Variant::PACKED_VECTOR3_ARRAY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_COLOR_ARRAY", Variant::PACKED_COLOR_ARRAY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_MAX", Variant::VARIANT_MAX);
//comparison
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_EQUAL", Variant::OP_EQUAL);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_NOT_EQUAL", Variant::OP_NOT_EQUAL);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_LESS", Variant::OP_LESS);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_LESS_EQUAL", Variant::OP_LESS_EQUAL);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_GREATER", Variant::OP_GREATER);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_GREATER_EQUAL", Variant::OP_GREATER_EQUAL);
//mathematic
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_ADD", Variant::OP_ADD);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_SUBTRACT", Variant::OP_SUBTRACT);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_MULTIPLY", Variant::OP_MULTIPLY);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_DIVIDE", Variant::OP_DIVIDE);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_NEGATE", Variant::OP_NEGATE);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_POSITIVE", Variant::OP_POSITIVE);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_MODULE", Variant::OP_MODULE);
//bitwise
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_SHIFT_LEFT", Variant::OP_SHIFT_LEFT);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_SHIFT_RIGHT", Variant::OP_SHIFT_RIGHT);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_BIT_AND", Variant::OP_BIT_AND);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_BIT_OR", Variant::OP_BIT_OR);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_BIT_XOR", Variant::OP_BIT_XOR);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_BIT_NEGATE", Variant::OP_BIT_NEGATE);
//logic
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_AND", Variant::OP_AND);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_OR", Variant::OP_OR);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_XOR", Variant::OP_XOR);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_NOT", Variant::OP_NOT);
//containment
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_IN", Variant::OP_IN);
BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("OP_MAX", Variant::OP_MAX);
}
void unregister_global_constants() {
_global_constants.clear();
}
int GlobalConstants::get_global_constant_count() {
return _global_constants.size();
}
#ifdef DEBUG_METHODS_ENABLED
StringName GlobalConstants::get_global_constant_enum(int p_idx) {
return _global_constants[p_idx].enum_name;
}
bool GlobalConstants::get_ignore_value_in_docs(int p_idx) {
return _global_constants[p_idx].ignore_value_in_docs;
}
#else
StringName GlobalConstants::get_global_constant_enum(int p_idx) {
return StringName();
}
bool GlobalConstants::get_ignore_value_in_docs(int p_idx) {
return false;
}
#endif
const char *GlobalConstants::get_global_constant_name(int p_idx) {
return _global_constants[p_idx].name;
}
int GlobalConstants::get_global_constant_value(int p_idx) {
return _global_constants[p_idx].value;
}

View File

@ -30,10 +30,10 @@
#include "input.h" #include "input.h"
#include "core/config/project_settings.h"
#include "core/input/default_controller_mappings.h" #include "core/input/default_controller_mappings.h"
#include "core/input/input_map.h" #include "core/input/input_map.h"
#include "core/os/os.h" #include "core/os/os.h"
#include "core/project_settings.h"
#ifdef TOOLS_ENABLED #ifdef TOOLS_ENABLED
#include "editor/editor_settings.h" #include "editor/editor_settings.h"

View File

@ -32,7 +32,7 @@
#define INPUT_H #define INPUT_H
#include "core/input/input_event.h" #include "core/input/input_event.h"
#include "core/object.h" #include "core/object/object.h"
#include "core/os/thread_safe.h" #include "core/os/thread_safe.h"
class Input : public Object { class Input : public Object {

View File

@ -31,11 +31,11 @@
#ifndef INPUT_EVENT_H #ifndef INPUT_EVENT_H
#define INPUT_EVENT_H #define INPUT_EVENT_H
#include "core/io/resource.h"
#include "core/math/transform_2d.h" #include "core/math/transform_2d.h"
#include "core/os/copymem.h" #include "core/os/copymem.h"
#include "core/resource.h" #include "core/string/ustring.h"
#include "core/typedefs.h" #include "core/typedefs.h"
#include "core/ustring.h"
/** /**
* Input Event classes. These are used in the main loop. * Input Event classes. These are used in the main loop.

View File

@ -30,8 +30,8 @@
#include "input_map.h" #include "input_map.h"
#include "core/config/project_settings.h"
#include "core/os/keyboard.h" #include "core/os/keyboard.h"
#include "core/project_settings.h"
InputMap *InputMap::singleton = nullptr; InputMap *InputMap::singleton = nullptr;

View File

@ -31,8 +31,8 @@
#ifndef INPUT_MAP_H #ifndef INPUT_MAP_H
#define INPUT_MAP_H #define INPUT_MAP_H
#include "core/class_db.h"
#include "core/input/input_event.h" #include "core/input/input_event.h"
#include "core/object/class_db.h"
class InputMap : public Object { class InputMap : public Object {
GDCLASS(InputMap, Object); GDCLASS(InputMap, Object);

View File

@ -1,62 +0,0 @@
/*************************************************************************/
/* int_types.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef INT_TYPES_H
#define INT_TYPES_H
#ifdef _MSC_VER
typedef signed __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef signed __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef signed __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
#else
#ifdef NO_STDINT_H
typedef unsigned char uint8_t;
typedef signed char int8_t;
typedef unsigned short uint16_t;
typedef signed short int16_t;
typedef unsigned int uint32_t;
typedef signed int int32_t;
typedef long long int64_t;
typedef unsigned long long uint64_t;
#else
#include <stdint.h>
#endif
#endif // _MSC_VER
#endif // INT_TYPES_H

View File

@ -30,9 +30,9 @@
#include "compression.h" #include "compression.h"
#include "core/config/project_settings.h"
#include "core/io/zip_io.h" #include "core/io/zip_io.h"
#include "core/os/copymem.h" #include "core/os/copymem.h"
#include "core/project_settings.h"
#include "thirdparty/misc/fastlz.h" #include "thirdparty/misc/fastlz.h"

View File

@ -31,8 +31,8 @@
#ifndef COMPRESSION_H #ifndef COMPRESSION_H
#define COMPRESSION_H #define COMPRESSION_H
#include "core/templates/vector.h"
#include "core/typedefs.h" #include "core/typedefs.h"
#include "core/vector.h"
class Compression { class Compression {
public: public:

View File

@ -32,7 +32,7 @@
#include "core/io/file_access_encrypted.h" #include "core/io/file_access_encrypted.h"
#include "core/os/keyboard.h" #include "core/os/keyboard.h"
#include "core/variant_parser.h" #include "core/variant/variant_parser.h"
PackedStringArray ConfigFile::_get_sections() const { PackedStringArray ConfigFile::_get_sections() const {
List<String> s; List<String> s;

View File

@ -31,10 +31,10 @@
#ifndef CONFIG_FILE_H #ifndef CONFIG_FILE_H
#define CONFIG_FILE_H #define CONFIG_FILE_H
#include "core/ordered_hash_map.h" #include "core/object/reference.h"
#include "core/os/file_access.h" #include "core/os/file_access.h"
#include "core/reference.h" #include "core/templates/ordered_hash_map.h"
#include "core/variant_parser.h" #include "core/variant/variant_parser.h"
class ConfigFile : public Reference { class ConfigFile : public Reference {
GDCLASS(ConfigFile, Reference); GDCLASS(ConfigFile, Reference);

View File

@ -30,8 +30,8 @@
#include "dtls_server.h" #include "dtls_server.h"
#include "core/config/project_settings.h"
#include "core/os/file_access.h" #include "core/os/file_access.h"
#include "core/project_settings.h"
DTLSServer *(*DTLSServer::_create)() = nullptr; DTLSServer *(*DTLSServer::_create)() = nullptr;
bool DTLSServer::available = false; bool DTLSServer::available = false;

View File

@ -30,7 +30,7 @@
#include "file_access_buffered.h" #include "file_access_buffered.h"
#include "core/error_macros.h" #include "core/error/error_macros.h"
Error FileAccessBuffered::set_error(Error p_error) const { Error FileAccessBuffered::set_error(Error p_error) const {
return (last_error = p_error); return (last_error = p_error);

View File

@ -33,7 +33,7 @@
#include "core/os/file_access.h" #include "core/os/file_access.h"
#include "core/ustring.h" #include "core/string/ustring.h"
class FileAccessBuffered : public FileAccess { class FileAccessBuffered : public FileAccess {
public: public:

View File

@ -30,7 +30,7 @@
#include "file_access_compressed.h" #include "file_access_compressed.h"
#include "core/print_string.h" #include "core/string/print_string.h"
void FileAccessCompressed::configure(const String &p_magic, Compression::Mode p_mode, int p_block_size) { void FileAccessCompressed::configure(const String &p_magic, Compression::Mode p_mode, int p_block_size) {
magic = p_magic.ascii().get_data(); magic = p_magic.ascii().get_data();

View File

@ -32,8 +32,8 @@
#include "core/crypto/crypto_core.h" #include "core/crypto/crypto_core.h"
#include "core/os/copymem.h" #include "core/os/copymem.h"
#include "core/print_string.h" #include "core/string/print_string.h"
#include "core/variant.h" #include "core/variant/variant.h"
#include <stdio.h> #include <stdio.h>

View File

@ -30,10 +30,10 @@
#include "file_access_memory.h" #include "file_access_memory.h"
#include "core/map.h" #include "core/config/project_settings.h"
#include "core/os/copymem.h" #include "core/os/copymem.h"
#include "core/os/dir_access.h" #include "core/os/dir_access.h"
#include "core/project_settings.h" #include "core/templates/map.h"
static Map<String, Vector<uint8_t>> *files = nullptr; static Map<String, Vector<uint8_t>> *files = nullptr;

View File

@ -30,10 +30,10 @@
#include "file_access_network.h" #include "file_access_network.h"
#include "core/config/project_settings.h"
#include "core/io/ip.h" #include "core/io/ip.h"
#include "core/io/marshalls.h" #include "core/io/marshalls.h"
#include "core/os/os.h" #include "core/os/os.h"
#include "core/project_settings.h"
//#define DEBUG_PRINT(m_p) print_line(m_p) //#define DEBUG_PRINT(m_p) print_line(m_p)
//#define DEBUG_TIME(m_what) printf("MS: %s - %lli\n",m_what,OS::get_singleton()->get_ticks_usec()); //#define DEBUG_TIME(m_what) printf("MS: %s - %lli\n",m_what,OS::get_singleton()->get_ticks_usec());

View File

@ -31,7 +31,7 @@
#include "file_access_pack.h" #include "file_access_pack.h"
#include "core/io/file_access_encrypted.h" #include "core/io/file_access_encrypted.h"
#include "core/script_language.h" #include "core/object/script_language.h"
#include "core/version.h" #include "core/version.h"
#include <stdio.h> #include <stdio.h>

View File

@ -31,11 +31,11 @@
#ifndef FILE_ACCESS_PACK_H #ifndef FILE_ACCESS_PACK_H
#define FILE_ACCESS_PACK_H #define FILE_ACCESS_PACK_H
#include "core/list.h"
#include "core/map.h"
#include "core/os/dir_access.h" #include "core/os/dir_access.h"
#include "core/os/file_access.h" #include "core/os/file_access.h"
#include "core/print_string.h" #include "core/string/print_string.h"
#include "core/templates/list.h"
#include "core/templates/map.h"
// Godot's packed file magic header ("GDPC" in ASCII). // Godot's packed file magic header ("GDPC" in ASCII).
#define PACK_HEADER_MAGIC 0x43504447 #define PACK_HEADER_MAGIC 0x43504447

View File

@ -34,7 +34,7 @@
#ifdef MINIZIP_ENABLED #ifdef MINIZIP_ENABLED
#include "core/io/file_access_pack.h" #include "core/io/file_access_pack.h"
#include "core/map.h" #include "core/templates/map.h"
#include "thirdparty/minizip/unzip.h" #include "thirdparty/minizip/unzip.h"

View File

@ -34,7 +34,7 @@
#include "core/io/ip.h" #include "core/io/ip.h"
#include "core/io/stream_peer.h" #include "core/io/stream_peer.h"
#include "core/io/stream_peer_tcp.h" #include "core/io/stream_peer_tcp.h"
#include "core/reference.h" #include "core/object/reference.h"
class HTTPClient : public Reference { class HTTPClient : public Reference {
GDCLASS(HTTPClient, Reference); GDCLASS(HTTPClient, Reference);

View File

@ -30,13 +30,13 @@
#include "image.h" #include "image.h"
#include "core/error_macros.h" #include "core/error/error_macros.h"
#include "core/hash_map.h"
#include "core/io/image_loader.h" #include "core/io/image_loader.h"
#include "core/io/resource_loader.h" #include "core/io/resource_loader.h"
#include "core/math/math_funcs.h" #include "core/math/math_funcs.h"
#include "core/os/copymem.h" #include "core/os/copymem.h"
#include "core/print_string.h" #include "core/string/print_string.h"
#include "core/templates/hash_map.h"
#include <stdio.h> #include <stdio.h>

View File

@ -31,9 +31,9 @@
#ifndef IMAGE_H #ifndef IMAGE_H
#define IMAGE_H #define IMAGE_H
#include "core/color.h" #include "core/io/resource.h"
#include "core/math/color.h"
#include "core/math/rect2.h" #include "core/math/rect2.h"
#include "core/resource.h"
/** /**
* @author Juan Linietsky <reduzio@gmail.com> * @author Juan Linietsky <reduzio@gmail.com>

View File

@ -30,7 +30,7 @@
#include "image_loader.h" #include "image_loader.h"
#include "core/print_string.h" #include "core/string/print_string.h"
bool ImageFormatLoader::recognize(const String &p_extension) const { bool ImageFormatLoader::recognize(const String &p_extension) const {
List<String> extensions; List<String> extensions;

View File

@ -31,11 +31,11 @@
#ifndef IMAGE_LOADER_H #ifndef IMAGE_LOADER_H
#define IMAGE_LOADER_H #define IMAGE_LOADER_H
#include "core/image.h" #include "core/io/image.h"
#include "core/io/resource_loader.h" #include "core/io/resource_loader.h"
#include "core/list.h"
#include "core/os/file_access.h" #include "core/os/file_access.h"
#include "core/ustring.h" #include "core/string/ustring.h"
#include "core/templates/list.h"
class ImageLoader; class ImageLoader;

View File

@ -30,9 +30,9 @@
#include "ip.h" #include "ip.h"
#include "core/hash_map.h"
#include "core/os/semaphore.h" #include "core/os/semaphore.h"
#include "core/os/thread.h" #include "core/os/thread.h"
#include "core/templates/hash_map.h"
VARIANT_ENUM_CAST(IP::ResolverStatus); VARIANT_ENUM_CAST(IP::ResolverStatus);

View File

@ -31,7 +31,7 @@
#ifndef IP_ADDRESS_H #ifndef IP_ADDRESS_H
#define IP_ADDRESS_H #define IP_ADDRESS_H
#include "core/ustring.h" #include "core/string/ustring.h"
struct IP_Address { struct IP_Address {
private: private:

View File

@ -30,7 +30,7 @@
#include "json.h" #include "json.h"
#include "core/print_string.h" #include "core/string/print_string.h"
const char *JSON::tk_name[TK_MAX] = { const char *JSON::tk_name[TK_MAX] = {
"'{'", "'{'",

View File

@ -31,7 +31,7 @@
#ifndef JSON_H #ifndef JSON_H
#define JSON_H #define JSON_H
#include "core/variant.h" #include "core/variant/variant.h"
class JSON { class JSON {
enum TokenType { enum TokenType {

View File

@ -32,7 +32,7 @@
#include "core/os/dir_access.h" #include "core/os/dir_access.h"
#include "core/os/os.h" #include "core/os/os.h"
#include "core/print_string.h" #include "core/string/print_string.h"
#if defined(MINGW_ENABLED) || defined(_MSC_VER) #if defined(MINGW_ENABLED) || defined(_MSC_VER)
#define sprintf sprintf_s #define sprintf sprintf_s

View File

@ -32,8 +32,8 @@
#define LOGGER_H #define LOGGER_H
#include "core/os/file_access.h" #include "core/os/file_access.h"
#include "core/ustring.h" #include "core/string/ustring.h"
#include "core/vector.h" #include "core/templates/vector.h"
#include <stdarg.h> #include <stdarg.h>

View File

@ -30,9 +30,9 @@
#include "marshalls.h" #include "marshalls.h"
#include "core/object/reference.h"
#include "core/os/keyboard.h" #include "core/os/keyboard.h"
#include "core/print_string.h" #include "core/string/print_string.h"
#include "core/reference.h"
#include <limits.h> #include <limits.h>
#include <stdio.h> #include <stdio.h>

View File

@ -31,9 +31,9 @@
#ifndef MARSHALLS_H #ifndef MARSHALLS_H
#define MARSHALLS_H #define MARSHALLS_H
#include "core/reference.h" #include "core/object/reference.h"
#include "core/typedefs.h" #include "core/typedefs.h"
#include "core/variant.h" #include "core/variant/variant.h"
/** /**
* Miscellaneous helpers for marshalling data types, and encoding * Miscellaneous helpers for marshalling data types, and encoding

View File

@ -32,7 +32,7 @@
#define MULTIPLAYER_API_H #define MULTIPLAYER_API_H
#include "core/io/networked_multiplayer_peer.h" #include "core/io/networked_multiplayer_peer.h"
#include "core/reference.h" #include "core/object/reference.h"
class MultiplayerAPI : public Reference { class MultiplayerAPI : public Reference {
GDCLASS(MultiplayerAPI, Reference); GDCLASS(MultiplayerAPI, Reference);

View File

@ -32,7 +32,7 @@
#define NET_SOCKET_H #define NET_SOCKET_H
#include "core/io/ip.h" #include "core/io/ip.h"
#include "core/reference.h" #include "core/object/reference.h"
class NetSocket : public Reference { class NetSocket : public Reference {
protected: protected:

View File

@ -31,7 +31,7 @@
#ifndef PACKED_DATA_CONTAINER_H #ifndef PACKED_DATA_CONTAINER_H
#define PACKED_DATA_CONTAINER_H #define PACKED_DATA_CONTAINER_H
#include "core/resource.h" #include "core/io/resource.h"
class PackedDataContainer : public Resource { class PackedDataContainer : public Resource {
GDCLASS(PackedDataContainer, Resource); GDCLASS(PackedDataContainer, Resource);

View File

@ -30,8 +30,8 @@
#include "packet_peer.h" #include "packet_peer.h"
#include "core/config/project_settings.h"
#include "core/io/marshalls.h" #include "core/io/marshalls.h"
#include "core/project_settings.h"
/* helpers / binders */ /* helpers / binders */

View File

@ -31,9 +31,9 @@
#ifndef PACKET_PEER_H #ifndef PACKET_PEER_H
#define PACKET_PEER_H #define PACKET_PEER_H
#include "core/class_db.h"
#include "core/io/stream_peer.h" #include "core/io/stream_peer.h"
#include "core/ring_buffer.h" #include "core/object/class_db.h"
#include "core/templates/ring_buffer.h"
class PacketPeer : public Reference { class PacketPeer : public Reference {
GDCLASS(PacketPeer, Reference); GDCLASS(PacketPeer, Reference);

View File

@ -29,8 +29,8 @@
/*************************************************************************/ /*************************************************************************/
#include "packet_peer_dtls.h" #include "packet_peer_dtls.h"
#include "core/config/project_settings.h"
#include "core/os/file_access.h" #include "core/os/file_access.h"
#include "core/project_settings.h"
PacketPeerDTLS *(*PacketPeerDTLS::_create)() = nullptr; PacketPeerDTLS *(*PacketPeerDTLS::_create)() = nullptr;
bool PacketPeerDTLS::available = false; bool PacketPeerDTLS::available = false;

View File

@ -31,7 +31,7 @@
#ifndef PCK_PACKER_H #ifndef PCK_PACKER_H
#define PCK_PACKER_H #define PCK_PACKER_H
#include "core/reference.h" #include "core/object/reference.h"
class FileAccess; class FileAccess;

View File

@ -32,9 +32,9 @@
#include "core/core_string_names.h" #include "core/core_string_names.h"
#include "core/io/resource_loader.h" #include "core/io/resource_loader.h"
#include "core/object/script_language.h"
#include "core/os/file_access.h" #include "core/os/file_access.h"
#include "core/os/os.h" #include "core/os/os.h"
#include "core/script_language.h"
#include "scene/main/node.h" //only so casting works #include "scene/main/node.h" //only so casting works
#include <stdio.h> #include <stdio.h>

View File

@ -31,10 +31,10 @@
#ifndef RESOURCE_H #ifndef RESOURCE_H
#define RESOURCE_H #define RESOURCE_H
#include "core/class_db.h" #include "core/object/class_db.h"
#include "core/reference.h" #include "core/object/reference.h"
#include "core/safe_refcount.h" #include "core/templates/safe_refcount.h"
#include "core/self_list.h" #include "core/templates/self_list.h"
#define RES_BASE_EXTENSION(m_ext) \ #define RES_BASE_EXTENSION(m_ext) \
public: \ public: \

View File

@ -30,11 +30,11 @@
#include "resource_format_binary.h" #include "resource_format_binary.h"
#include "core/image.h" #include "core/config/project_settings.h"
#include "core/io/file_access_compressed.h" #include "core/io/file_access_compressed.h"
#include "core/io/image.h"
#include "core/io/marshalls.h" #include "core/io/marshalls.h"
#include "core/os/dir_access.h" #include "core/os/dir_access.h"
#include "core/project_settings.h"
#include "core/version.h" #include "core/version.h"
//#define print_bl(m_what) print_line(m_what) //#define print_bl(m_what) print_line(m_what)

View File

@ -30,9 +30,9 @@
#include "resource_importer.h" #include "resource_importer.h"
#include "core/config/project_settings.h"
#include "core/os/os.h" #include "core/os/os.h"
#include "core/project_settings.h" #include "core/variant/variant_parser.h"
#include "core/variant_parser.h"
bool ResourceFormatImporter::SortImporterByName::operator()(const Ref<ResourceImporter> &p_a, const Ref<ResourceImporter> &p_b) const { bool ResourceFormatImporter::SortImporterByName::operator()(const Ref<ResourceImporter> &p_a, const Ref<ResourceImporter> &p_b) const {
return p_a->get_importer_name() < p_b->get_importer_name(); return p_a->get_importer_name() < p_b->get_importer_name();

View File

@ -30,13 +30,13 @@
#include "resource_loader.h" #include "resource_loader.h"
#include "core/config/project_settings.h"
#include "core/io/resource_importer.h" #include "core/io/resource_importer.h"
#include "core/os/file_access.h" #include "core/os/file_access.h"
#include "core/os/os.h" #include "core/os/os.h"
#include "core/print_string.h" #include "core/string/print_string.h"
#include "core/project_settings.h" #include "core/string/translation.h"
#include "core/translation.h" #include "core/variant/variant_parser.h"
#include "core/variant_parser.h"
#ifdef DEBUG_LOAD_THREADED #ifdef DEBUG_LOAD_THREADED
#define print_lt(m_text) print_line(m_text) #define print_lt(m_text) print_line(m_text)

View File

@ -31,9 +31,9 @@
#ifndef RESOURCE_LOADER_H #ifndef RESOURCE_LOADER_H
#define RESOURCE_LOADER_H #define RESOURCE_LOADER_H
#include "core/io/resource.h"
#include "core/os/semaphore.h" #include "core/os/semaphore.h"
#include "core/os/thread.h" #include "core/os/thread.h"
#include "core/resource.h"
class ResourceFormatLoader : public Reference { class ResourceFormatLoader : public Reference {
GDCLASS(ResourceFormatLoader, Reference); GDCLASS(ResourceFormatLoader, Reference);

View File

@ -29,10 +29,10 @@
/*************************************************************************/ /*************************************************************************/
#include "resource_saver.h" #include "resource_saver.h"
#include "core/config/project_settings.h"
#include "core/io/resource_loader.h" #include "core/io/resource_loader.h"
#include "core/object/script_language.h"
#include "core/os/file_access.h" #include "core/os/file_access.h"
#include "core/project_settings.h"
#include "core/script_language.h"
Ref<ResourceFormatSaver> ResourceSaver::saver[MAX_SAVERS]; Ref<ResourceFormatSaver> ResourceSaver::saver[MAX_SAVERS];

View File

@ -31,7 +31,7 @@
#ifndef RESOURCE_SAVER_H #ifndef RESOURCE_SAVER_H
#define RESOURCE_SAVER_H #define RESOURCE_SAVER_H
#include "core/resource.h" #include "core/io/resource.h"
class ResourceFormatSaver : public Reference { class ResourceFormatSaver : public Reference {
GDCLASS(ResourceFormatSaver, Reference); GDCLASS(ResourceFormatSaver, Reference);

View File

@ -31,7 +31,7 @@
#ifndef STREAM_PEER_H #ifndef STREAM_PEER_H
#define STREAM_PEER_H #define STREAM_PEER_H
#include "core/reference.h" #include "core/object/reference.h"
class StreamPeer : public Reference { class StreamPeer : public Reference {
GDCLASS(StreamPeer, Reference); GDCLASS(StreamPeer, Reference);

View File

@ -30,7 +30,7 @@
#include "stream_peer_ssl.h" #include "stream_peer_ssl.h"
#include "core/engine.h" #include "core/config/engine.h"
StreamPeerSSL *(*StreamPeerSSL::_create)() = nullptr; StreamPeerSSL *(*StreamPeerSSL::_create)() = nullptr;

View File

@ -30,7 +30,7 @@
#include "stream_peer_tcp.h" #include "stream_peer_tcp.h"
#include "core/project_settings.h" #include "core/config/project_settings.h"
Error StreamPeerTCP::_poll_connection() { Error StreamPeerTCP::_poll_connection() {
ERR_FAIL_COND_V(status != STATUS_CONNECTING || !_sock.is_valid() || !_sock->is_open(), FAILED); ERR_FAIL_COND_V(status != STATUS_CONNECTING || !_sock.is_valid() || !_sock->is_open(), FAILED);

View File

@ -31,8 +31,8 @@
#include "translation_loader_po.h" #include "translation_loader_po.h"
#include "core/os/file_access.h" #include "core/os/file_access.h"
#include "core/translation.h" #include "core/string/translation.h"
#include "core/translation_po.h" #include "core/string/translation_po.h"
RES TranslationLoaderPO::load_translation(FileAccess *f, Error *r_error) { RES TranslationLoaderPO::load_translation(FileAccess *f, Error *r_error) {
enum Status { enum Status {

View File

@ -33,7 +33,7 @@
#include "core/io/resource_loader.h" #include "core/io/resource_loader.h"
#include "core/os/file_access.h" #include "core/os/file_access.h"
#include "core/translation.h" #include "core/string/translation.h"
class TranslationLoaderPO : public ResourceFormatLoader { class TranslationLoaderPO : public ResourceFormatLoader {
public: public:

View File

@ -30,7 +30,7 @@
#include "xml_parser.h" #include "xml_parser.h"
#include "core/print_string.h" #include "core/string/print_string.h"
//#define DEBUG_XML //#define DEBUG_XML

View File

@ -31,10 +31,10 @@
#ifndef XML_PARSER_H #ifndef XML_PARSER_H
#define XML_PARSER_H #define XML_PARSER_H
#include "core/object/reference.h"
#include "core/os/file_access.h" #include "core/os/file_access.h"
#include "core/reference.h" #include "core/string/ustring.h"
#include "core/ustring.h" #include "core/templates/vector.h"
#include "core/vector.h"
/* /*
Based on irrXML (see their zlib license). Added mainly for compatibility with their Collada loader. Based on irrXML (see their zlib license). Added mainly for compatibility with their Collada loader.

View File

@ -31,7 +31,7 @@
#include "a_star.h" #include "a_star.h"
#include "core/math/geometry_3d.h" #include "core/math/geometry_3d.h"
#include "core/script_language.h" #include "core/object/script_language.h"
#include "scene/scene_string_names.h" #include "scene/scene_string_names.h"
int AStar::get_available_point_id() const { int AStar::get_available_point_id() const {

View File

@ -31,8 +31,8 @@
#ifndef A_STAR_H #ifndef A_STAR_H
#define A_STAR_H #define A_STAR_H
#include "core/oa_hash_map.h" #include "core/object/reference.h"
#include "core/reference.h" #include "core/templates/oa_hash_map.h"
/** /**
A* pathfinding algorithm A* pathfinding algorithm

View File

@ -30,8 +30,8 @@
#include "aabb.h" #include "aabb.h"
#include "core/print_string.h" #include "core/string/print_string.h"
#include "core/variant.h" #include "core/variant/variant.h"
real_t AABB::get_area() const { real_t AABB::get_area() const {
return size.x * size.y * size.z; return size.x * size.y * size.z;

View File

@ -32,7 +32,7 @@
#include "core/math/math_funcs.h" #include "core/math/math_funcs.h"
#include "core/os/copymem.h" #include "core/os/copymem.h"
#include "core/print_string.h" #include "core/string/print_string.h"
#define cofac(row1, col1, row2, col2) \ #define cofac(row1, col1, row2, col2) \
(elements[row1][col1] * elements[row2][col2] - elements[row1][col2] * elements[row2][col1]) (elements[row1][col1] * elements[row2][col2] - elements[row1][col2] * elements[row2][col1])

View File

@ -31,7 +31,7 @@
#include "camera_matrix.h" #include "camera_matrix.h"
#include "core/math/math_funcs.h" #include "core/math/math_funcs.h"
#include "core/print_string.h" #include "core/string/print_string.h"
float CameraMatrix::determinant() const { float CameraMatrix::determinant() const {
return matrix[0][3] * matrix[1][2] * matrix[2][1] * matrix[3][0] - matrix[0][2] * matrix[1][3] * matrix[2][1] * matrix[3][0] - return matrix[0][3] * matrix[1][2] * matrix[2][1] * matrix[3][0] - matrix[0][2] * matrix[1][3] * matrix[2][1] * matrix[3][0] -

View File

@ -30,10 +30,10 @@
#include "color.h" #include "color.h"
#include "core/color_names.inc" #include "color_names.inc"
#include "core/map.h"
#include "core/math/math_funcs.h" #include "core/math/math_funcs.h"
#include "core/print_string.h" #include "core/string/print_string.h"
#include "core/templates/map.h"
uint32_t Color::to_argb32() const { uint32_t Color::to_argb32() const {
uint32_t c = (uint8_t)Math::round(a * 255); uint32_t c = (uint8_t)Math::round(a * 255);
@ -355,9 +355,6 @@ bool Color::html_is_valid(const String &p_color) {
} }
Color Color::named(const String &p_name) { Color Color::named(const String &p_name) {
if (_named_colors.empty()) {
_populate_named_colors(); // from color_names.inc
}
String name = p_name; String name = p_name;
// Normalize name // Normalize name
name = name.replace(" ", ""); name = name.replace(" ", "");
@ -367,9 +364,31 @@ Color Color::named(const String &p_name) {
name = name.replace(".", ""); name = name.replace(".", "");
name = name.to_lower(); name = name.to_lower();
const Map<String, Color>::Element *color = _named_colors.find(name); int idx = 0;
ERR_FAIL_NULL_V_MSG(color, Color(), "Invalid color name: " + p_name + "."); while (named_colors[idx].name != nullptr) {
return color->value(); if (name == named_colors[idx].name) {
return named_colors[idx].color;
}
idx++;
}
ERR_FAIL_V_MSG(Color(), "Invalid color name: " + p_name + ".");
return Color();
}
int Color::get_named_color_count() {
int idx = 0;
while (named_colors[idx].name != nullptr) {
idx++;
}
return idx;
}
String Color::get_named_color_name(int p_idx) {
return named_colors[p_idx].name;
}
Color Color::get_named_color(int p_idx) {
return named_colors[p_idx].color;
} }
String _to_hex(float p_val) { String _to_hex(float p_val) {

View File

@ -32,7 +32,7 @@
#define COLOR_H #define COLOR_H
#include "core/math/math_funcs.h" #include "core/math/math_funcs.h"
#include "core/ustring.h" #include "core/string/ustring.h"
struct Color { struct Color {
union { union {
@ -186,6 +186,9 @@ struct Color {
static Color html(const String &p_rgba); static Color html(const String &p_rgba);
static bool html_is_valid(const String &p_color); static bool html_is_valid(const String &p_color);
static Color named(const String &p_name); static Color named(const String &p_name);
static int get_named_color_count();
static String get_named_color_name(int p_idx);
static Color get_named_color(int p_idx);
String to_html(bool p_alpha = true) const; String to_html(bool p_alpha = true) const;
Color from_hsv(float p_h, float p_s, float p_v, float p_a) const; Color from_hsv(float p_h, float p_s, float p_v, float p_a) const;
static Color from_rgbe9995(uint32_t p_rgbe); static Color from_rgbe9995(uint32_t p_rgbe);

160
core/math/color_names.inc Normal file
View File

@ -0,0 +1,160 @@
// Names from https://en.wikipedia.org/wiki/X11_color_names
// So this in a way that does not require memory allocation
// the old way leaked memory
// this is not used as often as for more performance to make sense
struct NamedColor {
const char *name;
Color color;
};
static NamedColor named_colors[] = {
{ "aliceblue", Color(0.94, 0.97, 1.00) },
{ "antiquewhite", Color(0.98, 0.92, 0.84) },
{ "aqua", Color(0.00, 1.00, 1.00) },
{ "aquamarine", Color(0.50, 1.00, 0.83) },
{ "azure", Color(0.94, 1.00, 1.00) },
{ "beige", Color(0.96, 0.96, 0.86) },
{ "bisque", Color(1.00, 0.89, 0.77) },
{ "black", Color(0.00, 0.00, 0.00) },
{ "blanchedalmond", Color(1.00, 0.92, 0.80) },
{ "blue", Color(0.00, 0.00, 1.00) },
{ "blueviolet", Color(0.54, 0.17, 0.89) },
{ "brown", Color(0.65, 0.16, 0.16) },
{ "burlywood", Color(0.87, 0.72, 0.53) },
{ "cadetblue", Color(0.37, 0.62, 0.63) },
{ "chartreuse", Color(0.50, 1.00, 0.00) },
{ "chocolate", Color(0.82, 0.41, 0.12) },
{ "coral", Color(1.00, 0.50, 0.31) },
{ "cornflower", Color(0.39, 0.58, 0.93) },
{ "cornsilk", Color(1.00, 0.97, 0.86) },
{ "crimson", Color(0.86, 0.08, 0.24) },
{ "cyan", Color(0.00, 1.00, 1.00) },
{ "darkblue", Color(0.00, 0.00, 0.55) },
{ "darkcyan", Color(0.00, 0.55, 0.55) },
{ "darkgoldenrod", Color(0.72, 0.53, 0.04) },
{ "darkgray", Color(0.66, 0.66, 0.66) },
{ "darkgreen", Color(0.00, 0.39, 0.00) },
{ "darkkhaki", Color(0.74, 0.72, 0.42) },
{ "darkmagenta", Color(0.55, 0.00, 0.55) },
{ "darkolivegreen", Color(0.33, 0.42, 0.18) },
{ "darkorange", Color(1.00, 0.55, 0.00) },
{ "darkorchid", Color(0.60, 0.20, 0.80) },
{ "darkred", Color(0.55, 0.00, 0.00) },
{ "darksalmon", Color(0.91, 0.59, 0.48) },
{ "darkseagreen", Color(0.56, 0.74, 0.56) },
{ "darkslateblue", Color(0.28, 0.24, 0.55) },
{ "darkslategray", Color(0.18, 0.31, 0.31) },
{ "darkturquoise", Color(0.00, 0.81, 0.82) },
{ "darkviolet", Color(0.58, 0.00, 0.83) },
{ "deeppink", Color(1.00, 0.08, 0.58) },
{ "deepskyblue", Color(0.00, 0.75, 1.00) },
{ "dimgray", Color(0.41, 0.41, 0.41) },
{ "dodgerblue", Color(0.12, 0.56, 1.00) },
{ "firebrick", Color(0.70, 0.13, 0.13) },
{ "floralwhite", Color(1.00, 0.98, 0.94) },
{ "forestgreen", Color(0.13, 0.55, 0.13) },
{ "fuchsia", Color(1.00, 0.00, 1.00) },
{ "gainsboro", Color(0.86, 0.86, 0.86) },
{ "ghostwhite", Color(0.97, 0.97, 1.00) },
{ "gold", Color(1.00, 0.84, 0.00) },
{ "goldenrod", Color(0.85, 0.65, 0.13) },
{ "gray", Color(0.75, 0.75, 0.75) },
{ "webgray", Color(0.50, 0.50, 0.50) },
{ "green", Color(0.00, 1.00, 0.00) },
{ "webgreen", Color(0.00, 0.50, 0.00) },
{ "greenyellow", Color(0.68, 1.00, 0.18) },
{ "honeydew", Color(0.94, 1.00, 0.94) },
{ "hotpink", Color(1.00, 0.41, 0.71) },
{ "indianred", Color(0.80, 0.36, 0.36) },
{ "indigo", Color(0.29, 0.00, 0.51) },
{ "ivory", Color(1.00, 1.00, 0.94) },
{ "khaki", Color(0.94, 0.90, 0.55) },
{ "lavender", Color(0.90, 0.90, 0.98) },
{ "lavenderblush", Color(1.00, 0.94, 0.96) },
{ "lawngreen", Color(0.49, 0.99, 0.00) },
{ "lemonchiffon", Color(1.00, 0.98, 0.80) },
{ "lightblue", Color(0.68, 0.85, 0.90) },
{ "lightcoral", Color(0.94, 0.50, 0.50) },
{ "lightcyan", Color(0.88, 1.00, 1.00) },
{ "lightgoldenrod", Color(0.98, 0.98, 0.82) },
{ "lightgray", Color(0.83, 0.83, 0.83) },
{ "lightgreen", Color(0.56, 0.93, 0.56) },
{ "lightpink", Color(1.00, 0.71, 0.76) },
{ "lightsalmon", Color(1.00, 0.63, 0.48) },
{ "lightseagreen", Color(0.13, 0.70, 0.67) },
{ "lightskyblue", Color(0.53, 0.81, 0.98) },
{ "lightslategray", Color(0.47, 0.53, 0.60) },
{ "lightsteelblue", Color(0.69, 0.77, 0.87) },
{ "lightyellow", Color(1.00, 1.00, 0.88) },
{ "lime", Color(0.00, 1.00, 0.00) },
{ "limegreen", Color(0.20, 0.80, 0.20) },
{ "linen", Color(0.98, 0.94, 0.90) },
{ "magenta", Color(1.00, 0.00, 1.00) },
{ "maroon", Color(0.69, 0.19, 0.38) },
{ "webmaroon", Color(0.50, 0.00, 0.00) },
{ "mediumaquamarine", Color(0.40, 0.80, 0.67) },
{ "mediumblue", Color(0.00, 0.00, 0.80) },
{ "mediumorchid", Color(0.73, 0.33, 0.83) },
{ "mediumpurple", Color(0.58, 0.44, 0.86) },
{ "mediumseagreen", Color(0.24, 0.70, 0.44) },
{ "mediumslateblue", Color(0.48, 0.41, 0.93) },
{ "mediumspringgreen", Color(0.00, 0.98, 0.60) },
{ "mediumturquoise", Color(0.28, 0.82, 0.80) },
{ "mediumvioletred", Color(0.78, 0.08, 0.52) },
{ "midnightblue", Color(0.10, 0.10, 0.44) },
{ "mintcream", Color(0.96, 1.00, 0.98) },
{ "mistyrose", Color(1.00, 0.89, 0.88) },
{ "moccasin", Color(1.00, 0.89, 0.71) },
{ "navajowhite", Color(1.00, 0.87, 0.68) },
{ "navyblue", Color(0.00, 0.00, 0.50) },
{ "oldlace", Color(0.99, 0.96, 0.90) },
{ "olive", Color(0.50, 0.50, 0.00) },
{ "olivedrab", Color(0.42, 0.56, 0.14) },
{ "orange", Color(1.00, 0.65, 0.00) },
{ "orangered", Color(1.00, 0.27, 0.00) },
{ "orchid", Color(0.85, 0.44, 0.84) },
{ "palegoldenrod", Color(0.93, 0.91, 0.67) },
{ "palegreen", Color(0.60, 0.98, 0.60) },
{ "paleturquoise", Color(0.69, 0.93, 0.93) },
{ "palevioletred", Color(0.86, 0.44, 0.58) },
{ "papayawhip", Color(1.00, 0.94, 0.84) },
{ "peachpuff", Color(1.00, 0.85, 0.73) },
{ "peru", Color(0.80, 0.52, 0.25) },
{ "pink", Color(1.00, 0.75, 0.80) },
{ "plum", Color(0.87, 0.63, 0.87) },
{ "powderblue", Color(0.69, 0.88, 0.90) },
{ "purple", Color(0.63, 0.13, 0.94) },
{ "webpurple", Color(0.50, 0.00, 0.50) },
{ "rebeccapurple", Color(0.40, 0.20, 0.60) },
{ "red", Color(1.00, 0.00, 0.00) },
{ "rosybrown", Color(0.74, 0.56, 0.56) },
{ "royalblue", Color(0.25, 0.41, 0.88) },
{ "saddlebrown", Color(0.55, 0.27, 0.07) },
{ "salmon", Color(0.98, 0.50, 0.45) },
{ "sandybrown", Color(0.96, 0.64, 0.38) },
{ "seagreen", Color(0.18, 0.55, 0.34) },
{ "seashell", Color(1.00, 0.96, 0.93) },
{ "sienna", Color(0.63, 0.32, 0.18) },
{ "silver", Color(0.75, 0.75, 0.75) },
{ "skyblue", Color(0.53, 0.81, 0.92) },
{ "slateblue", Color(0.42, 0.35, 0.80) },
{ "slategray", Color(0.44, 0.50, 0.56) },
{ "snow", Color(1.00, 0.98, 0.98) },
{ "springgreen", Color(0.00, 1.00, 0.50) },
{ "steelblue", Color(0.27, 0.51, 0.71) },
{ "tan", Color(0.82, 0.71, 0.55) },
{ "teal", Color(0.00, 0.50, 0.50) },
{ "thistle", Color(0.85, 0.75, 0.85) },
{ "tomato", Color(1.00, 0.39, 0.28) },
{ "turquoise", Color(0.25, 0.88, 0.82) },
{ "transparent", Color(1.00, 1.00, 1.00, 0.00) },
{ "violet", Color(0.93, 0.51, 0.93) },
{ "wheat", Color(0.96, 0.87, 0.70) },
{ "white", Color(1.00, 1.00, 1.00) },
{ "whitesmoke", Color(0.96, 0.96, 0.96) },
{ "yellow", Color(1.00, 1.00, 0.00) },
{ "yellowgreen", Color(0.60, 0.80, 0.20) },
{ nullptr, Color(0.60, 0.80, 0.20) },
};

View File

@ -31,15 +31,15 @@
#ifndef DELAUNAY_3D_H #ifndef DELAUNAY_3D_H
#define DELAUNAY_3D_H #define DELAUNAY_3D_H
#include "core/local_vector.h"
#include "core/math/aabb.h" #include "core/math/aabb.h"
#include "core/math/camera_matrix.h" #include "core/math/camera_matrix.h"
#include "core/math/vector3.h" #include "core/math/vector3.h"
#include "core/oa_hash_map.h"
#include "core/os/file_access.h" #include "core/os/file_access.h"
#include "core/print_string.h" #include "core/string/print_string.h"
#include "core/variant.h" #include "core/templates/local_vector.h"
#include "core/vector.h" #include "core/templates/oa_hash_map.h"
#include "core/templates/vector.h"
#include "core/variant/variant.h"
#include "thirdparty/misc/r128.h" #include "thirdparty/misc/r128.h"

View File

@ -31,8 +31,8 @@
#ifndef DISJOINT_SET_H #ifndef DISJOINT_SET_H
#define DISJOINT_SET_H #define DISJOINT_SET_H
#include "core/map.h" #include "core/templates/map.h"
#include "core/vector.h" #include "core/templates/vector.h"
/** /**
@author Marios Staikopoulos <marios@staik.net> @author Marios Staikopoulos <marios@staik.net>

View File

@ -30,13 +30,12 @@
#include "expression.h" #include "expression.h"
#include "core/class_db.h"
#include "core/func_ref.h"
#include "core/io/marshalls.h" #include "core/io/marshalls.h"
#include "core/math/math_funcs.h" #include "core/math/math_funcs.h"
#include "core/object/class_db.h"
#include "core/object/reference.h"
#include "core/os/os.h" #include "core/os/os.h"
#include "core/reference.h" #include "core/variant/variant_parser.h"
#include "core/variant_parser.h"
const char *Expression::func_name[Expression::FUNC_MAX] = { const char *Expression::func_name[Expression::FUNC_MAX] = {
"sin", "sin",
@ -93,7 +92,6 @@ const char *Expression::func_name[Expression::FUNC_MAX] = {
"clamp", "clamp",
"nearest_po2", "nearest_po2",
"weakref", "weakref",
"funcref",
"convert", "convert",
"typeof", "typeof",
"type_exists", "type_exists",
@ -185,7 +183,6 @@ int Expression::get_func_argument_count(BuiltinFunc p_func) {
case MATH_CARTESIAN2POLAR: case MATH_CARTESIAN2POLAR:
case LOGIC_MAX: case LOGIC_MAX:
case LOGIC_MIN: case LOGIC_MIN:
case FUNC_FUNCREF:
case TYPE_CONVERT: case TYPE_CONVERT:
case COLORN: case COLORN:
return 2; return 2;
@ -555,30 +552,6 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
*r_return = wref; *r_return = wref;
} }
} break;
case FUNC_FUNCREF: {
if (p_inputs[0]->get_type() != Variant::OBJECT) {
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::OBJECT;
return;
}
if (p_inputs[1]->get_type() != Variant::STRING && p_inputs[1]->get_type() != Variant::NODE_PATH) {
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 1;
r_error.expected = Variant::STRING;
return;
}
Ref<FuncRef> fr = memnew(FuncRef);
fr->set_instance(*p_inputs[0]);
fr->set_function(*p_inputs[1]);
*r_return = fr;
} break; } break;
case TYPE_CONVERT: { case TYPE_CONVERT: {
VALIDATE_ARG_NUM(1); VALIDATE_ARG_NUM(1);

Some files were not shown because too many files have changed in this diff Show More