summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/project_settings.cpp3
-rw-r--r--doc/base/classes.xml85
-rw-r--r--editor/editor_about.cpp1
-rw-r--r--modules/gdscript/gd_parser.cpp2
-rw-r--r--modules/gdscript/gd_tokenizer.cpp2
-rw-r--r--modules/nativescript/nativescript.cpp10
-rw-r--r--modules/nativescript/nativescript.h2
-rw-r--r--platform/android/detect.py2
-rw-r--r--platform/windows/detect.py11
-rw-r--r--scene/gui/label.cpp7
-rw-r--r--scene/resources/font.cpp2
-rw-r--r--thirdparty/zstd/common/zstd_internal.h12
-rw-r--r--thirdparty/zstd/decompress/zstd_decompress.c9
13 files changed, 117 insertions, 31 deletions
diff --git a/core/project_settings.cpp b/core/project_settings.cpp
index 1a0a50a10f..0426af3fa0 100644
--- a/core/project_settings.cpp
+++ b/core/project_settings.cpp
@@ -602,7 +602,8 @@ Error ProjectSettings::_save_settings_text(const String &p_file, const Map<Strin
file->store_string("config_version=" + itos(FORMAT_VERSION) + "\n");
if (p_custom_features != String())
- file->store_string("_custom_featores=\"" + p_custom_features + "\"\n");
+ file->store_string("custom_features=\"" + p_custom_features + "\"\n");
+ file->store_string("\n");
for (Map<String, List<String> >::Element *E = props.front(); E; E = E->next()) {
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index ba5f0bba94..e345238fc4 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -14114,6 +14114,8 @@
<argument index="1" name="event" type="InputEvent">
</argument>
<description>
+ Implement this function if you are interested in 3D view screen input events. It will be called only if currently selected node is handled by your plugin.
+ If you would like to always gets those input events then additionally use [method set_input_forwarding_always_enabled].
</description>
</method>
<method name="get_base_control">
@@ -14137,6 +14139,13 @@
Get the general settings for the editor (the same window that appears in the Settings menu).
</description>
</method>
+ <method name="get_edited_scene_root">
+ <return type="Node">
+ </return>
+ <description>
+ Returns root node of currently edited scene.
+ </description>
+ </method>
<method name="get_editor_viewport">
<return type="Control">
</return>
@@ -14151,6 +14160,13 @@
Get the name of the editor plugin. For main scren plugins this is what will appear in the selector (which by default is 2D, 3D, Script).
</description>
</method>
+ <method name="get_open_scenes">
+ <return type="Array">
+ </return>
+ <description>
+ Will return an Array of Strings which represent file paths to currently open scenes.
+ </description>
+ </method>
<method name="get_resource_filesystem">
<return type="EditorFileSystem">
</return>
@@ -14165,6 +14181,13 @@
Get tool for generating resource previews.
</description>
</method>
+ <method name="get_script_editor">
+ <return type="ScriptEditor">
+ </return>
+ <description>
+ Will return ScriptEditor object which contains informations about state of the scripts which are currently open by the editor.
+ </description>
+ </method>
<method name="get_selection">
<return type="EditorSelection">
</return>
@@ -14289,6 +14312,7 @@
</method>
<method name="set_input_event_forwarding_always_enabled">
<description>
+ Use this method if you always want to receive inputs from 3D view screen inside [method forward_spatial_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene.
</description>
</method>
<method name="set_state" qualifiers="virtual">
@@ -14345,6 +14369,29 @@
<constant name="DOCK_SLOT_MAX" value="8">
</constant>
</constants>
+ <signals>
+ <signal name="main_screen_changed">
+ <argument index="0" name="screen_name" type="String">
+ </argument>
+ <description>
+ Emitted when user change main screen view (2D, 3D, Script, AssetLib). Works also with screens which are defined by plugins.
+ </description>
+ </signal>
+ <signal name="scene_changed">
+ <argument index="0" name="scene_root" type="Node">
+ </argument>
+ <description>
+ Emitted when user change scene. The argument is a root node of freshly opened scene.
+ </description>
+ </signal>
+ <signal name="scene_closed">
+ <argument index="0" name="filepath" type="String">
+ </argument>
+ <description>
+ Emitted when user close scene. The argument is file path to a closed scene.
+ </description>
+ </signal>
+ </signals>
</class>
<class name="EditorResourcePreview" inherits="Node" category="Core">
<brief_description>
@@ -39989,6 +40036,44 @@
<constants>
</constants>
</class>
+<class name="ScriptEditor" inherits="PanelContainer" category="Core">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <methods>
+ <method name="get_current_script">
+ <return type="Script">
+ </return>
+ <description>
+ Returns a [Script] that is currently active in editor.
+ </description>
+ </method>
+ <method name="get_open_scripts">
+ <return type="Array">
+ </return>
+ <description>
+ Returns an array with all [Script] objects which are currently open in editor.
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="editor_script_changed">
+ <argument index="0" name="script" type="Script">
+ </argument>
+ <description>
+ Emitted when user changed active script. Argument is a freshly activated [Script].
+ </description>
+ </signal>
+ <signal name="script_close">
+ <argument index="0" name="script" type="Script">
+ </argument>
+ <description>
+ Emitted when editor is about to close the active script. Argument is a [Script] that is going to be closed.
+ </description>
+ </signal>
+ </signals>
+</class>
<class name="SegmentShape2D" inherits="Shape2D" category="Core">
<brief_description>
Segment Shape for 2D Collision Detection.
diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp
index 2328a42a07..fd90c766fd 100644
--- a/editor/editor_about.cpp
+++ b/editor/editor_about.cpp
@@ -137,7 +137,6 @@ EditorAbout::EditorAbout() {
tc->add_child(license_thirdparty);
Label *tpl_label = memnew(Label);
- tpl_label->set_custom_minimum_size(Size2(0, 64 * EDSCALE));
tpl_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
tpl_label->set_autowrap(true);
tpl_label->set_text(TTR("Godot Engine relies on a number of thirdparty free and open source libraries, all compatible with the terms of its MIT license. The following is an exhaustive list of all such thirdparty components with their respective copyright statements and license terms."));
diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp
index 6e873c9197..ba0413a5a9 100644
--- a/modules/gdscript/gd_parser.cpp
+++ b/modules/gdscript/gd_parser.cpp
@@ -3283,7 +3283,7 @@ void GDParser::_parse_class(ClassNode *p_class) {
break;
}
- if (tokenizer->is_token_literal(0, true)) {
+ if (!tokenizer->is_token_literal(0, true)) {
_set_error("Expected identifier in signal argument.");
return;
}
diff --git a/modules/gdscript/gd_tokenizer.cpp b/modules/gdscript/gd_tokenizer.cpp
index 1306addb17..5803046185 100644
--- a/modules/gdscript/gd_tokenizer.cpp
+++ b/modules/gdscript/gd_tokenizer.cpp
@@ -250,7 +250,7 @@ bool GDTokenizer::is_token_literal(int p_offset, bool variable_safe) const {
case TK_BUILT_IN_FUNC:
case TK_OP_IN:
- case TK_OP_NOT:
+ //case TK_OP_NOT:
//case TK_OP_OR:
//case TK_OP_AND:
diff --git a/modules/nativescript/nativescript.cpp b/modules/nativescript/nativescript.cpp
index 493f21d75e..541fe951e4 100644
--- a/modules/nativescript/nativescript.cpp
+++ b/modules/nativescript/nativescript.cpp
@@ -958,7 +958,8 @@ void NativeReloadNode::_notification(int p_what) {
switch (p_what) {
case MainLoop::NOTIFICATION_WM_FOCUS_OUT: {
- print_line("unload");
+ if (unloaded)
+ break;
NSL->_unload_stuff();
for (Map<String, Ref<GDNative> >::Element *L = NSL->library_gdnatives.front(); L; L = L->next()) {
@@ -967,11 +968,14 @@ void NativeReloadNode::_notification(int p_what) {
NSL->library_classes.erase(L->key());
}
+ unloaded = true;
+
} break;
case MainLoop::NOTIFICATION_WM_FOCUS_IN: {
- print_line("load");
+ if (!unloaded)
+ break;
Set<StringName> libs_to_remove;
@@ -1010,6 +1014,8 @@ void NativeReloadNode::_notification(int p_what) {
}
}
+ unloaded = false;
+
for (Set<StringName>::Element *R = libs_to_remove.front(); R; R = R->next()) {
NSL->library_gdnatives.erase(R->get());
}
diff --git a/modules/nativescript/nativescript.h b/modules/nativescript/nativescript.h
index 5702ba2e8d..bc7a6e3ed6 100644
--- a/modules/nativescript/nativescript.h
+++ b/modules/nativescript/nativescript.h
@@ -259,6 +259,8 @@ inline NativeScriptDesc *NativeScript::get_script_desc() const {
class NativeReloadNode : public Node {
GDCLASS(NativeReloadNode, Node)
+ bool unloaded = false;
+
public:
static void _bind_methods();
void _notification(int p_what);
diff --git a/platform/android/detect.py b/platform/android/detect.py
index 55b7052393..fae1df3f27 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -178,7 +178,7 @@ def configure(env):
env.Append(CPPFLAGS=["-isystem", sysroot + "/usr/include"])
env.Append(CPPFLAGS=string.split('-fpic -ffunction-sections -funwind-tables -fstack-protector-strong -fvisibility=hidden -fno-strict-aliasing'))
- env.Append(CPPFLAGS=string.split('-DANDROID -DNO_STATVFS -DGLES2_ENABLED'))
+ env.Append(CPPFLAGS=string.split('-DNO_STATVFS -DGLES2_ENABLED'))
env['neon_enabled'] = False
if env['android_arch'] == 'x86':
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index a2bc5a11ab..4d93b3f244 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -48,7 +48,7 @@ def can_build():
if (os.getenv("MINGW64_PREFIX")):
mingw64 = os.getenv("MINGW64_PREFIX")
- test = "gcc --version &>/dev/null"
+ test = "gcc --version > /dev/null 2>&1"
if (os.system(mingw + test) == 0 or os.system(mingw64 + test) == 0 or os.system(mingw32 + test) == 0):
return True
@@ -65,7 +65,7 @@ def get_opts():
mingw32 = "i686-w64-mingw32-"
mingw64 = "x86_64-w64-mingw32-"
- if os.system(mingw32 + "gcc --version &>/dev/null") != 0:
+ if os.system(mingw32 + "gcc --version > /dev/null 2>&1") != 0:
mingw32 = mingw
if (os.getenv("MINGW32_PREFIX")):
@@ -252,13 +252,6 @@ def configure(env):
env.Append(LINKFLAGS=['-static'])
mingw_prefix = env["mingw_prefix_64"]
- nulstr = ""
-
- if (os.name == "posix"):
- nulstr = ">/dev/null"
- else:
- nulstr = ">nul"
-
env["CC"] = mingw_prefix + "gcc"
env['AS'] = mingw_prefix + "as"
env['CXX'] = mingw_prefix + "g++"
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 589ba9e538..874156821e 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -36,7 +36,6 @@ void Label::set_autowrap(bool p_autowrap) {
autowrap = p_autowrap;
word_cache_dirty = true;
- minimum_size_changed();
update();
}
bool Label::has_autowrap() const {
@@ -48,7 +47,6 @@ void Label::set_uppercase(bool p_uppercase) {
uppercase = p_uppercase;
word_cache_dirty = true;
- minimum_size_changed();
update();
}
bool Label::is_uppercase() const {
@@ -71,7 +69,6 @@ void Label::_notification(int p_what) {
xl_text = new_text;
regenerate_word_cache();
- minimum_size_changed();
update();
}
@@ -496,6 +493,7 @@ void Label::regenerate_word_cache() {
minsize.height = (font->get_height() * line_count) + (line_spacing * (line_count - 1));
}
+ minimum_size_changed();
word_cache_dirty = false;
}
@@ -533,9 +531,6 @@ void Label::set_text(const String &p_string) {
if (percent_visible < 1)
visible_chars = get_total_character_count() * percent_visible;
update();
- if (!autowrap) {
- minimum_size_changed();
- }
}
void Label::set_clip_text(bool p_clip) {
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp
index 3668dda604..a6a70d775f 100644
--- a/scene/resources/font.cpp
+++ b/scene/resources/font.cpp
@@ -506,7 +506,7 @@ float BitmapFont::draw_char(RID p_canvas_item, const Point2 &p_pos, CharType p_c
cpos.y += c->v_align;
ERR_FAIL_COND_V(c->texture_idx < -1 || c->texture_idx >= textures.size(), 0);
if (c->texture_idx != -1)
- VisualServer::get_singleton()->canvas_item_add_texture_rect_region(p_canvas_item, Rect2(cpos, c->rect.size), textures[c->texture_idx]->get_rid(), c->rect, p_modulate);
+ VisualServer::get_singleton()->canvas_item_add_texture_rect_region(p_canvas_item, Rect2(cpos, c->rect.size), textures[c->texture_idx]->get_rid(), c->rect, p_modulate, false, RID(), false);
return get_char_size(p_char, p_next).width;
}
diff --git a/thirdparty/zstd/common/zstd_internal.h b/thirdparty/zstd/common/zstd_internal.h
index f2c4e6249f..49a4796476 100644
--- a/thirdparty/zstd/common/zstd_internal.h
+++ b/thirdparty/zstd/common/zstd_internal.h
@@ -331,4 +331,16 @@ size_t ZSTD_compressStream_generic(ZSTD_CStream* zcs,
ZSTD_parameters ZSTD_getParamsFromCDict(const ZSTD_CDict* cdict);
+typedef struct {
+ blockType_e blockType;
+ U32 lastBlock;
+ U32 origSize;
+} blockProperties_t;
+
+/*! ZSTD_getcBlockSize() :
+ * Provides the size of compressed block from block header `src` */
+ size_t ZSTD_getcBlockSize(const void* src, size_t srcSize,
+ blockProperties_t* bpPtr);
+
+
#endif /* ZSTD_CCOMMON_H_MODULE */
diff --git a/thirdparty/zstd/decompress/zstd_decompress.c b/thirdparty/zstd/decompress/zstd_decompress.c
index 003d703a5e..465bcc20b5 100644
--- a/thirdparty/zstd/decompress/zstd_decompress.c
+++ b/thirdparty/zstd/decompress/zstd_decompress.c
@@ -53,7 +53,7 @@
# include "zstd_legacy.h"
#endif
-#if defined(_MSC_VER) && !defined(_M_IA64) /* _mm_prefetch() is not defined for ia64 */
+#if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_I86)) /* _mm_prefetch() is not defined outside of x86/x64 */
# include <mmintrin.h> /* https://msdn.microsoft.com/fr-fr/library/84szxsww(v=vs.90).aspx */
# define ZSTD_PREFETCH(ptr) _mm_prefetch((const char*)ptr, _MM_HINT_T0)
#elif defined(__GNUC__)
@@ -466,13 +466,6 @@ static size_t ZSTD_decodeFrameHeader(ZSTD_DCtx* dctx, const void* src, size_t he
}
-typedef struct
-{
- blockType_e blockType;
- U32 lastBlock;
- U32 origSize;
-} blockProperties_t;
-
/*! ZSTD_getcBlockSize() :
* Provides the size of compressed block from block header `src` */
size_t ZSTD_getcBlockSize(const void* src, size_t srcSize,