summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml58
-rw-r--r--AUTHORS.md2
-rw-r--r--DONORS.md51
-rw-r--r--compat.py4
-rw-r--r--core/bind/core_bind.cpp1
-rw-r--r--core/command_queue_mt.h46
-rw-r--r--core/error_macros.cpp7
-rw-r--r--core/error_macros.h41
-rw-r--r--core/global_constants.cpp150
-rw-r--r--core/io/SCsub1
-rw-r--r--core/io/compression.cpp20
-rw-r--r--core/io/compression.h2
-rw-r--r--core/io/http_client.cpp12
-rw-r--r--core/io/http_client.h2
-rw-r--r--core/map.h1
-rw-r--r--core/math/a_star.cpp56
-rw-r--r--core/math/a_star.h6
-rw-r--r--core/math/math_funcs.h17
-rw-r--r--core/os/input_event.h4
-rw-r--r--core/os/keyboard.cpp22
-rw-r--r--core/os/main_loop.cpp1
-rw-r--r--core/os/os.h1
-rw-r--r--core/project_settings.cpp6
-rw-r--r--core/script_language.cpp1
-rw-r--r--core/script_language.h3
-rw-r--r--core/set.h1
-rw-r--r--core/translation.cpp149
-rw-r--r--core/translation.h7
-rw-r--r--core/typedefs.h4
-rw-r--r--core/ustring.cpp22
-rw-r--r--core/ustring.h4
-rw-r--r--core/variant_call.cpp599
-rw-r--r--doc/classes/@Global Scope.xml286
-rw-r--r--doc/classes/ARVRAnchor.xml1
-rw-r--r--doc/classes/ARVRController.xml2
-rw-r--r--doc/classes/ARVROrigin.xml2
-rw-r--r--doc/classes/ARVRPositionalTracker.xml4
-rw-r--r--doc/classes/ARVRServer.xml7
-rw-r--r--doc/classes/AStar.xml25
-rw-r--r--doc/classes/Area.xml2
-rw-r--r--doc/classes/Area2D.xml2
-rw-r--r--doc/classes/ArrayMesh.xml2
-rw-r--r--doc/classes/AudioEffectBandLimitFilter.xml2
-rw-r--r--doc/classes/AudioEffectBandPassFilter.xml2
-rw-r--r--doc/classes/AudioEffectFilter.xml7
-rw-r--r--doc/classes/AudioEffectHighPassFilter.xml2
-rw-r--r--doc/classes/AudioEffectLowPassFilter.xml2
-rw-r--r--doc/classes/AudioEffectNotchFilter.xml2
-rw-r--r--doc/classes/BaseButton.xml11
-rw-r--r--doc/classes/BitmapFont.xml4
-rw-r--r--doc/classes/Camera2D.xml15
-rw-r--r--doc/classes/CanvasItem.xml6
-rw-r--r--doc/classes/CanvasLayer.xml2
-rw-r--r--doc/classes/CapsuleShape2D.xml8
-rw-r--r--doc/classes/ConcavePolygonShape2D.xml2
-rw-r--r--doc/classes/ConeTwistJoint.xml4
-rw-r--r--doc/classes/Container.xml2
-rw-r--r--doc/classes/Control.xml10
-rw-r--r--doc/classes/ConvexPolygonShape2D.xml2
-rw-r--r--doc/classes/CubeMap.xml14
-rw-r--r--doc/classes/Curve2D.xml3
-rw-r--r--doc/classes/DampedSpringJoint2D.xml4
-rw-r--r--doc/classes/Dictionary.xml4
-rw-r--r--doc/classes/EditorImportPlugin.xml4
-rw-r--r--doc/classes/EditorPlugin.xml2
-rw-r--r--doc/classes/EditorScript.xml4
-rw-r--r--doc/classes/Engine.xml2
-rw-r--r--doc/classes/Environment.xml62
-rw-r--r--doc/classes/FuncRef.xml2
-rw-r--r--doc/classes/GIProbe.xml2
-rw-r--r--doc/classes/GrooveJoint2D.xml2
-rw-r--r--doc/classes/HTTPClient.xml24
-rw-r--r--doc/classes/Image.xml67
-rw-r--r--doc/classes/ImageTexture.xml18
-rw-r--r--doc/classes/InputEventAction.xml2
-rw-r--r--doc/classes/InputEventJoypadMotion.xml2
-rw-r--r--doc/classes/InputMap.xml4
-rw-r--r--doc/classes/JSONParseResult.xml2
-rw-r--r--doc/classes/Joint2D.xml4
-rw-r--r--doc/classes/KinematicBody.xml2
-rw-r--r--doc/classes/KinematicBody2D.xml2
-rw-r--r--doc/classes/Light.xml2
-rw-r--r--doc/classes/LineEdit.xml78
-rw-r--r--doc/classes/LinkButton.xml2
-rw-r--r--doc/classes/MainLoop.xml4
-rw-r--r--doc/classes/Mutex.xml6
-rw-r--r--doc/classes/NetworkedMultiplayerPeer.xml4
-rw-r--r--doc/classes/Node.xml26
-rw-r--r--doc/classes/Node2D.xml44
-rw-r--r--doc/classes/NodePath.xml4
-rw-r--r--doc/classes/OS.xml2
-rw-r--r--doc/classes/OccluderPolygon2D.xml8
-rw-r--r--doc/classes/OptionButton.xml2
-rw-r--r--doc/classes/PacketPeerUDP.xml6
-rw-r--r--doc/classes/ParallaxBackground.xml8
-rw-r--r--doc/classes/ParallaxLayer.xml6
-rw-r--r--doc/classes/Path2D.xml5
-rw-r--r--doc/classes/Performance.xml4
-rw-r--r--doc/classes/Physics2DDirectSpaceState.xml6
-rw-r--r--doc/classes/Physics2DServer.xml2
-rw-r--r--doc/classes/PhysicsDirectSpaceState.xml4
-rw-r--r--doc/classes/PhysicsServer.xml6
-rw-r--r--doc/classes/PoolByteArray.xml8
-rw-r--r--doc/classes/PoolColorArray.xml2
-rw-r--r--doc/classes/PoolIntArray.xml2
-rw-r--r--doc/classes/PoolVector2Array.xml4
-rw-r--r--doc/classes/PoolVector3Array.xml2
-rw-r--r--doc/classes/Quat.xml15
-rw-r--r--doc/classes/RayCast.xml18
-rw-r--r--doc/classes/RayCast2D.xml20
-rw-r--r--doc/classes/Rect2.xml26
-rw-r--r--doc/classes/Rect3.xml43
-rw-r--r--doc/classes/RemoteTransform.xml8
-rw-r--r--doc/classes/RemoteTransform2D.xml8
-rw-r--r--doc/classes/Resource.xml4
-rw-r--r--doc/classes/ResourceLoader.xml2
-rw-r--r--doc/classes/RichTextLabel.xml24
-rw-r--r--doc/classes/RigidBody.xml12
-rw-r--r--doc/classes/RigidBody2D.xml12
-rw-r--r--doc/classes/Script.xml6
-rw-r--r--doc/classes/Semaphore.xml4
-rw-r--r--doc/classes/Spatial.xml2
-rw-r--r--doc/classes/StreamPeer.xml6
-rw-r--r--doc/classes/StreamPeerSSL.xml6
-rw-r--r--doc/classes/StreamPeerTCP.xml8
-rw-r--r--doc/classes/String.xml143
-rw-r--r--doc/classes/SurfaceTool.xml4
-rw-r--r--doc/classes/TabContainer.xml44
-rw-r--r--doc/classes/Tabs.xml4
-rw-r--r--doc/classes/TextEdit.xml16
-rw-r--r--doc/classes/Texture.xml6
-rw-r--r--doc/classes/Thread.xml8
-rw-r--r--doc/classes/Transform2D.xml6
-rw-r--r--doc/classes/TranslationServer.xml8
-rw-r--r--doc/classes/TreeItem.xml2
-rw-r--r--doc/classes/Tween.xml4
-rw-r--r--doc/classes/Vector3.xml23
-rw-r--r--doc/classes/VisibilityEnabler.xml6
-rw-r--r--doc/classes/VisibilityEnabler2D.xml10
-rw-r--r--doc/classes/VisualServer.xml2
-rw-r--r--doc/classes/WorldEnvironment.xml2
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp32
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.h13
-rw-r--r--drivers/gles3/shader_compiler_gles3.cpp4
-rw-r--r--drivers/gles3/shaders/scene.glsl16
-rw-r--r--drivers/gles3/shaders/ssao.glsl24
-rw-r--r--drivers/gles3/shaders/ssao_blur.glsl20
-rw-r--r--drivers/unix/os_unix.cpp4
-rw-r--r--editor/code_editor.cpp1
-rw-r--r--editor/editor_file_dialog.cpp36
-rw-r--r--editor/editor_node.cpp10
-rw-r--r--editor/editor_settings.cpp4
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp396
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h31
-rw-r--r--editor/plugins/gi_probe_editor_plugin.cpp26
-rw-r--r--editor/plugins/gi_probe_editor_plugin.h5
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp8
-rw-r--r--editor/plugins/script_editor_plugin.cpp2
-rw-r--r--editor/plugins/shader_editor_plugin.cpp1
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp11
-rw-r--r--editor/plugins/spatial_editor_plugin.h2
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp19
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.h2
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp107
-rw-r--r--editor/plugins/texture_region_editor_plugin.h4
-rw-r--r--editor/plugins/theme_editor_plugin.cpp6
-rw-r--r--editor/plugins/tile_map_editor_plugin.cpp45
-rw-r--r--editor/plugins/tile_map_editor_plugin.h2
-rw-r--r--editor/project_manager.cpp76
-rw-r--r--editor/project_manager.h5
-rw-r--r--editor/project_settings_editor.cpp229
-rw-r--r--editor/project_settings_editor.h14
-rw-r--r--editor/property_editor.cpp27
-rw-r--r--editor/script_create_dialog.cpp35
-rw-r--r--editor/script_create_dialog.h1
-rw-r--r--editor/script_editor_debugger.cpp63
-rw-r--r--editor/script_editor_debugger.h2
-rw-r--r--editor/translations/ar.po208
-rw-r--r--editor/translations/bg.po78
-rw-r--r--editor/translations/bn.po95
-rw-r--r--editor/translations/ca.po83
-rw-r--r--editor/translations/cs.po82
-rw-r--r--editor/translations/da.po82
-rw-r--r--editor/translations/de.po110
-rw-r--r--editor/translations/de_CH.po79
-rw-r--r--editor/translations/editor.pot73
-rw-r--r--editor/translations/el.po180
-rw-r--r--editor/translations/es.po132
-rw-r--r--editor/translations/es_AR.po467
-rw-r--r--editor/translations/fa.po82
-rw-r--r--editor/translations/fi.po91
-rw-r--r--editor/translations/fr.po131
-rw-r--r--editor/translations/hu.po76
-rw-r--r--editor/translations/id.po82
-rw-r--r--editor/translations/it.po265
-rw-r--r--editor/translations/ja.po91
-rw-r--r--editor/translations/ko.po560
-rw-r--r--editor/translations/lt.po7371
-rw-r--r--editor/translations/nb.po77
-rw-r--r--editor/translations/nl.po505
-rw-r--r--editor/translations/pl.po103
-rw-r--r--editor/translations/pr.po77
-rw-r--r--editor/translations/pt_BR.po1034
-rw-r--r--editor/translations/pt_PT.po140
-rw-r--r--editor/translations/ru.po454
-rw-r--r--editor/translations/sk.po80
-rw-r--r--editor/translations/sl.po76
-rw-r--r--editor/translations/th.po377
-rw-r--r--editor/translations/tr.po95
-rw-r--r--editor/translations/ur_PK.po76
-rw-r--r--editor/translations/zh_CN.po106
-rw-r--r--editor/translations/zh_HK.po81
-rw-r--r--editor/translations/zh_TW.po81
-rw-r--r--main/performance.cpp38
-rw-r--r--main/performance.h8
-rw-r--r--methods.py10
-rw-r--r--modules/gdnative/include/pluginscript/godot_pluginscript.h1
-rw-r--r--modules/gdnative/nativescript/nativescript.cpp7
-rw-r--r--modules/gdnative/nativescript/nativescript.h3
-rw-r--r--modules/gdnative/pluginscript/pluginscript_language.cpp4
-rw-r--r--modules/gdnative/pluginscript/pluginscript_language.h1
-rw-r--r--modules/gdnative/pluginscript/pluginscript_script.cpp5
-rw-r--r--modules/gdnative/pluginscript/pluginscript_script.h2
-rw-r--r--modules/gdscript/gd_editor.cpp15
-rw-r--r--modules/gdscript/gd_parser.cpp3
-rw-r--r--modules/gdscript/gd_script.cpp5
-rw-r--r--modules/gdscript/gd_script.h2
-rw-r--r--modules/mono/SCsub141
-rw-r--r--modules/mono/config.py80
-rw-r--r--modules/mono/csharp_script.cpp38
-rw-r--r--modules/mono/csharp_script.h2
-rw-r--r--modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs66
-rw-r--r--modules/mono/editor/bindings_generator.cpp1184
-rw-r--r--modules/mono/editor/bindings_generator.h7
-rw-r--r--modules/mono/editor/godotsharp_builds.cpp91
-rw-r--r--modules/mono/editor/godotsharp_builds.h9
-rw-r--r--modules/mono/editor/godotsharp_editor.cpp65
-rw-r--r--modules/mono/editor/godotsharp_editor.h23
-rw-r--r--modules/mono/editor/mono_bottom_panel.cpp37
-rw-r--r--modules/mono/editor/mono_bottom_panel.h4
-rw-r--r--modules/mono/godotsharp_dirs.cpp9
-rw-r--r--modules/mono/mono_gd/gd_mono.cpp21
-rw-r--r--modules/mono/mono_gd/gd_mono_assembly.cpp9
-rw-r--r--modules/mono/mono_gd/gd_mono_field.cpp16
-rw-r--r--modules/mono/mono_gd/gd_mono_method.cpp41
-rw-r--r--modules/mono/mono_reg_utils.py94
-rw-r--r--modules/mono/utils/path_utils.cpp6
-rw-r--r--modules/opus/audio_stream_opus.cpp6
-rw-r--r--modules/opus/audio_stream_opus.h2
-rw-r--r--modules/regex/SCsub2
-rw-r--r--modules/visual_script/visual_script.cpp9
-rw-r--r--modules/visual_script/visual_script.h3
-rw-r--r--modules/vorbis/audio_stream_ogg_vorbis.cpp8
-rw-r--r--modules/vorbis/audio_stream_ogg_vorbis.h2
-rw-r--r--platform/android/os_android.cpp4
-rw-r--r--platform/iphone/os_iphone.cpp4
-rw-r--r--platform/javascript/audio_driver_javascript.cpp79
-rw-r--r--platform/javascript/audio_driver_javascript.h16
-rw-r--r--platform/javascript/detect.py7
-rw-r--r--platform/osx/os_osx.h3
-rw-r--r--platform/osx/os_osx.mm23
-rw-r--r--platform/uwp/SCsub1
-rw-r--r--platform/uwp/os_uwp.cpp4
-rw-r--r--platform/windows/detect.py5
-rw-r--r--platform/windows/os_windows.cpp4
-rw-r--r--platform/x11/detect.py4
-rw-r--r--platform/x11/os_x11.cpp32
-rw-r--r--platform/x11/os_x11.h2
-rw-r--r--scene/2d/navigation_polygon.cpp2
-rw-r--r--scene/2d/ray_cast_2d.cpp18
-rw-r--r--scene/2d/ray_cast_2d.h3
-rw-r--r--scene/3d/SCsub3
-rw-r--r--scene/3d/gi_probe.cpp21
-rw-r--r--scene/3d/gi_probe.h8
-rw-r--r--scene/3d/light.cpp6
-rw-r--r--scene/3d/ray_cast.cpp18
-rw-r--r--scene/3d/ray_cast.h3
-rw-r--r--scene/gui/file_dialog.cpp28
-rw-r--r--scene/gui/item_list.cpp3
-rw-r--r--scene/gui/line_edit.cpp111
-rw-r--r--scene/gui/line_edit.h14
-rw-r--r--scene/gui/nine_patch_rect.cpp (renamed from scene/gui/patch_9_rect.cpp)4
-rw-r--r--scene/gui/nine_patch_rect.h (renamed from scene/gui/patch_9_rect.h)8
-rw-r--r--scene/gui/tab_container.cpp7
-rw-r--r--scene/gui/text_edit.cpp24
-rw-r--r--scene/gui/text_edit.h4
-rw-r--r--scene/gui/tree.cpp2
-rw-r--r--scene/register_scene_types.cpp12
-rw-r--r--scene/resources/environment.cpp73
-rw-r--r--scene/resources/environment.h29
-rw-r--r--scene/resources/material.cpp2
-rw-r--r--scene/resources/texture.cpp1
-rw-r--r--scene/resources/video_stream.h2
-rw-r--r--servers/audio/audio_stream.cpp6
-rw-r--r--servers/audio/audio_stream.h6
-rw-r--r--servers/audio/effects/audio_effect_filter.cpp2
-rw-r--r--servers/server_wrap_mt_common.h9
-rw-r--r--servers/visual/rasterizer.h2
-rw-r--r--servers/visual/visual_server_raster.h6
-rw-r--r--servers/visual/visual_server_wrap_mt.h2
-rw-r--r--servers/visual_server.h16
-rw-r--r--thirdparty/README.md4
-rw-r--r--thirdparty/libpng/LICENSE4
-rw-r--r--thirdparty/libpng/png.c6
-rw-r--r--thirdparty/libpng/png.h26
-rw-r--r--thirdparty/libpng/pngconf.h2
-rw-r--r--thirdparty/libpng/pnglibconf.h4
-rw-r--r--thirdparty/zstd/SCsub6
-rw-r--r--thirdparty/zstd/common/bitstream.h58
-rw-r--r--thirdparty/zstd/common/compiler.h1
-rw-r--r--thirdparty/zstd/common/error_private.c6
-rw-r--r--thirdparty/zstd/common/error_private.h8
-rw-r--r--thirdparty/zstd/common/fse.h2
-rw-r--r--thirdparty/zstd/common/huf.h2
-rw-r--r--thirdparty/zstd/common/mem.h1
-rw-r--r--thirdparty/zstd/common/pool.c107
-rw-r--r--thirdparty/zstd/common/pool.h4
-rw-r--r--thirdparty/zstd/common/threading.c26
-rw-r--r--thirdparty/zstd/common/threading.h84
-rw-r--r--thirdparty/zstd/common/zstd_common.c4
-rw-r--r--thirdparty/zstd/common/zstd_errors.h4
-rw-r--r--thirdparty/zstd/common/zstd_internal.h116
-rw-r--r--thirdparty/zstd/compress/fse_compress.c4
-rw-r--r--thirdparty/zstd/compress/huf_compress.c7
-rw-r--r--thirdparty/zstd/compress/zstd_compress.c2650
-rw-r--r--thirdparty/zstd/compress/zstd_compress.h307
-rw-r--r--thirdparty/zstd/compress/zstd_double_fast.c308
-rw-r--r--thirdparty/zstd/compress/zstd_double_fast.h28
-rw-r--r--thirdparty/zstd/compress/zstd_fast.c242
-rw-r--r--thirdparty/zstd/compress/zstd_fast.h30
-rw-r--r--thirdparty/zstd/compress/zstd_lazy.c749
-rw-r--r--thirdparty/zstd/compress/zstd_lazy.h38
-rw-r--r--thirdparty/zstd/compress/zstd_ldm.c707
-rw-r--r--thirdparty/zstd/compress/zstd_ldm.h67
-rw-r--r--thirdparty/zstd/compress/zstd_opt.c957
-rw-r--r--thirdparty/zstd/compress/zstd_opt.h936
-rw-r--r--thirdparty/zstd/compress/zstdmt_compress.c343
-rw-r--r--thirdparty/zstd/compress/zstdmt_compress.h23
-rw-r--r--thirdparty/zstd/decompress/zstd_decompress.c569
-rw-r--r--thirdparty/zstd/zstd.h484
340 files changed, 21271 insertions, 8146 deletions
diff --git a/.travis.yml b/.travis.yml
index a2c3417412..409c870e79 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,45 +6,29 @@ sudo: false
cache: ccache
-compiler:
- - gcc
- - clang
-
-os:
- - linux
- - osx
-
-env:
- - GODOT_TARGET=iphone
- - GODOT_TARGET=osx
- - GODOT_TARGET=x11
- #- GODOT_TARGET=android
- #- GODOT_TARGET=windows
-
matrix:
include:
- env: STATIC_CHECKS=yes
- exclude:
- - os: linux
- env: GODOT_TARGET=iphone
- - os: linux
- env: GODOT_TARGET=osx
- - os: linux
- env: GODOT_TARGET=android
- - os: osx
- env: GODOT_TARGET=x11
- - os: osx
- env: GODOT_TARGET=windows
- - compiler: gcc
- env: GODOT_TARGET=iphone
- - compiler: gcc
- env: GODOT_TARGET=osx
- - compiler: clang
- env: GODOT_TARGET=android
- - compiler: clang
- env: GODOT_TARGET=windows
- - compiler: clang
- env: GODOT_TARGET=x11
+ os: linux
+ compiler: clang
+ - env: GODOT_TARGET=x11 TOOLS=yes
+ os: linux
+ compiler: gcc
+ - env: GODOT_TARGET=x11 TOOLS=no
+ os: linux
+ compiler: clang
+ #- env: GODOT_TARGET=windows TOOLS=yes
+ # os: linux
+ # compiler: gcc
+ - env: GODOT_TARGET=osx TOOLS=yes
+ os: osx
+ compiler: clang
+ #- env: GODOT_TARGET=android TOOLS=no
+ # os: osx
+ # compiler: clang
+ #- env: GODOT_TARGET=iphone TOOLS=no
+ # os: osx
+ # compiler: clang
addons:
apt:
@@ -92,5 +76,5 @@ script:
- if [ "$STATIC_CHECKS" = "yes" ]; then
sh ./misc/travis/clang-format.sh;
else
- scons -j 2 platform=$GODOT_TARGET progress=no verbose=yes CXX=$CXX;
+ scons -j2 CC=$CC CXX=$CXX platform=$GODOT_TARGET TOOLS=$TOOLS verbose=yes progress=no;
fi
diff --git a/AUTHORS.md b/AUTHORS.md
index bf833d1435..3fd8227fa7 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -47,9 +47,11 @@ name is available.
Geequlim
Gen (dbsGen)
George Marques (vnen)
+ Gerrit Großkopf (Grosskopf)
Gilles Roudiere (groud)
Guilherme Felipe (guilhermefelipecgs)
Hein-Pieter van Braam (hpvb)
+ Hiroshi Ogawa (hi-ogawa)
Hubert Jarosz (Marqin)
Hugo Locurcio (Calinou)
Ignacio Etcheverry (neikeq)
diff --git a/DONORS.md b/DONORS.md
index 57902fb2fc..784cf58255 100644
--- a/DONORS.md
+++ b/DONORS.md
@@ -20,28 +20,38 @@ None so far, but your company could be the first! :)
## Mini sponsors
- Arron Washington
- Chris Phyffer
+ Andreas
+ Andreas Hirschauer
Christian Uldall Pedersen
+ E Hewert
Hein-Pieter van Braam
Matthieu Huvé
+ Nathan Warden
Neal Gompa (Conan Kudo)
Olimpiu Metiu
Ruslan Mustakov
+ Slobodan Milnovic
## Gold donors
Alexander Otto
+ Asdf
+ Blair Allen
+ cheese65536
Jake Bo
Javier
- Nathan Warden
+ Manuele Finocchiaro
+ Officine Pixel S.n.c.
Ranoller
Rémi Verschelde
Stephan Lanfermann
Andreas Schüle
+ Austen McRae
Bernhard Liebl
+ Gerald E Butler
Jordan M Lucas
+ Kris Michael
BanjoNode2D
Chris Serino
@@ -53,16 +63,20 @@ None so far, but your company could be the first! :)
Henrique Alves
Laurence Bannister
Leo
+ mhilbrunner
Przemysław Gołąb (n-pigeon)
Robert Willes
Robin Arys
+ ScottMakesGames
summerblind
Testus Maximus
Thomas Bjarnelöf
+ Xavier Tan
Amanda Haldy
Andreas Haas
Bryanna M
+ Chris Brown
Cody Parker
D
Ezra Theunissen
@@ -70,25 +84,32 @@ None so far, but your company could be the first! :)
François Cantin
Hendrik Mans
Jeppe Zapp
- Johannes Wuensch
Justin Arnold
Justo Delgado Baudí
Leandro Voltolino
+ Lucien Boudy
Myles
- Robert Podgorski
- Scott Beacon
+ Noah
+ Trent McPheron
x1212
## Silver donors
+ 1D_Inc
+ Alessandro Senese
Alex Barsukov
+ Anthony Bongiovanni
Avencherus
Bastian Böhm
Ben Vercammen
Bryan Stevenson
+ Christian Baune
+ Christian Winter
Collin Shooltz
+ Dominik Wetzel
Fabian Becker
fengjiongmax
+ Fredy Romero Sam
Geequlim
Gerrit Großkopf
Guldoman
@@ -96,14 +117,16 @@ None so far, but your company could be the first! :)
HeartBeast
Heribert Hirth
Hunter Jones
- imekon
- Jacob McKenney
Jonathon
Josh 'Cheeseness' Bush
+ JuDelCo
Julian Murgia
Juraj Móza
+ KC Chan
Kevin Boyer
+ Kevin Kamper Meejach Petersen
Klavdij Voncina
+ Kobi Malul
Lisandro Lorea
magodev
Martin Novák
@@ -113,26 +136,36 @@ None so far, but your company could be the first! :)
Max R.R. Collada
Michael Gringauz
Mikael Olsson
+ MoM
Moritz Laass
nee
+ Neil Blakey-Milner
+ Nik Lee
+ Niko Leopold
nvgrod
Pablo Seibelt
Pan Ip
+ Patrick Nafarrete
Paul Mason
Paweł Kowal
+ Pete Goodwin
Pietro Vertechi
rayos
Richman Stewart
Roger Smith
+ Ryan Estes
Sam Van Campenhout
Sam Vila
Sasori Olkof
+ Scott D. Yelich
Sootstone
Tavo Tell
+ TheHappieCat
+ Theo Cranmore
Tom Larrow
- Trent McPheron
Troy Bonneau
UltyX
+ Wout Standaert
Xananax & karroffel
## Bronze donors
diff --git a/compat.py b/compat.py
index e1bc0ed673..32c685f5b8 100644
--- a/compat.py
+++ b/compat.py
@@ -12,6 +12,8 @@ if sys.version_info < (3,):
return cStringIO.StringIO()
def encode_utf8(x):
return x
+ def decode_utf8(x):
+ return x
def iteritems(d):
return d.iteritems()
def escape_string(s):
@@ -38,6 +40,8 @@ else:
import codecs
def encode_utf8(x):
return codecs.utf_8_encode(x)[0]
+ def decode_utf8(x):
+ return codecs.utf_8_decode(x)[0]
def iteritems(d):
return iter(d.items())
def charcode_to_c_escapes(c):
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index b47e611a51..12b892d873 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -413,6 +413,7 @@ String _OS::get_latin_keyboard_variant() const {
case OS::LATIN_KEYBOARD_QZERTY: return "QZERTY";
case OS::LATIN_KEYBOARD_DVORAK: return "DVORAK";
case OS::LATIN_KEYBOARD_NEO: return "NEO";
+ case OS::LATIN_KEYBOARD_COLEMAK: return "COLEMAK";
default: return "ERROR";
}
}
diff --git a/core/command_queue_mt.h b/core/command_queue_mt.h
index f99e16da15..e37d593f9f 100644
--- a/core/command_queue_mt.h
+++ b/core/command_queue_mt.h
@@ -227,6 +227,27 @@ class CommandQueueMT {
virtual void call() { (instance->*method)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); }
};
+ template <class T, class M, class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8, class P9, class P10, class P11, class P12>
+ struct Command12 : public CommandBase {
+
+ T *instance;
+ M method;
+ typename GetSimpleTypeT<P1>::type_t p1;
+ typename GetSimpleTypeT<P2>::type_t p2;
+ typename GetSimpleTypeT<P3>::type_t p3;
+ typename GetSimpleTypeT<P4>::type_t p4;
+ typename GetSimpleTypeT<P5>::type_t p5;
+ typename GetSimpleTypeT<P6>::type_t p6;
+ typename GetSimpleTypeT<P7>::type_t p7;
+ typename GetSimpleTypeT<P8>::type_t p8;
+ typename GetSimpleTypeT<P9>::type_t p9;
+ typename GetSimpleTypeT<P10>::type_t p10;
+ typename GetSimpleTypeT<P11>::type_t p11;
+ typename GetSimpleTypeT<P12>::type_t p12;
+
+ virtual void call() { (instance->*method)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); }
+ };
+
/* comands that return */
template <class T, class M, class R>
@@ -906,6 +927,31 @@ public:
if (sync) sync->post();
}
+ template <class T, class M, class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8, class P9, class P10, class P11, class P12>
+ void push(T *p_instance, M p_method, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12) {
+
+ Command12<T, M, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12> *cmd = allocate_and_lock<Command12<T, M, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12> >();
+
+ cmd->instance = p_instance;
+ cmd->method = p_method;
+ cmd->p1 = p1;
+ cmd->p2 = p2;
+ cmd->p3 = p3;
+ cmd->p4 = p4;
+ cmd->p5 = p5;
+ cmd->p6 = p6;
+ cmd->p7 = p7;
+ cmd->p8 = p8;
+ cmd->p9 = p9;
+ cmd->p10 = p10;
+ cmd->p11 = p11;
+ cmd->p12 = p12;
+
+ unlock();
+
+ if (sync) sync->post();
+ }
+
/*** PUSH AND RET COMMANDS ***/
template <class T, class M, class R>
diff --git a/core/error_macros.cpp b/core/error_macros.cpp
index 170a22e8dd..7d85aa9001 100644
--- a/core/error_macros.cpp
+++ b/core/error_macros.cpp
@@ -97,3 +97,10 @@ void _err_print_error(const char *p_function, const char *p_file, int p_line, co
_err_error_exists = false;
}
}
+
+void _err_print_index_error(const char *p_function, const char *p_file, int p_line, int64_t p_index, int64_t p_size, const char *p_index_str, const char *p_size_str, bool fatal) {
+
+ String fstr(fatal ? "FATAL: " : "");
+ String err(fstr + "Index" + p_index_str + "=" + itos(p_index) + " out of size (" + p_size_str + "=" + itos(p_size) + ")");
+ _err_print_error(p_function, p_file, p_line, err.utf8().get_data());
+}
diff --git a/core/error_macros.h b/core/error_macros.h
index 1fa7f2c134..8d2f588706 100644
--- a/core/error_macros.h
+++ b/core/error_macros.h
@@ -76,6 +76,7 @@ void add_error_handler(ErrorHandlerList *p_handler);
void remove_error_handler(ErrorHandlerList *p_handler);
void _err_print_error(const char *p_function, const char *p_file, int p_line, const char *p_error, ErrorHandlerType p_type = ERR_HANDLER_ERROR);
+void _err_print_index_error(const char *p_function, const char *p_file, int p_line, int64_t p_index, int64_t p_size, const char *p_index_str, const char *p_size_str, bool fatal = false);
#ifndef _STR
#define _STR(m_x) #m_x
@@ -129,13 +130,13 @@ extern bool _err_error_exists;
// (*): See https://stackoverflow.com/questions/257418/do-while-0-what-is-it-good-for
-#define ERR_FAIL_INDEX(m_index, m_size) \
- do { \
- if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \
- _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Index " _STR(m_index) " out of size (" _STR(m_size) ")."); \
- return; \
- } else \
- _err_error_exists = false; \
+#define ERR_FAIL_INDEX(m_index, m_size) \
+ do { \
+ if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \
+ _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size)); \
+ return; \
+ } else \
+ _err_error_exists = false; \
} while (0); // (*)
/** An index has failed if m_index<0 or m_index >=m_size, the function exists.
@@ -143,24 +144,24 @@ extern bool _err_error_exists;
* appropriate error condition from error_macros.h
*/
-#define ERR_FAIL_INDEX_V(m_index, m_size, m_retval) \
- do { \
- if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \
- _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Index " _STR(m_index) " out of size (" _STR(m_size) ")."); \
- return m_retval; \
- } else \
- _err_error_exists = false; \
+#define ERR_FAIL_INDEX_V(m_index, m_size, m_retval) \
+ do { \
+ if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \
+ _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size)); \
+ return m_retval; \
+ } else \
+ _err_error_exists = false; \
} while (0); // (*)
/** Use this one if there is no sensible fallback, that is, the error is unrecoverable.
* We'll return a null reference and try to keep running.
*/
-#define CRASH_BAD_INDEX(m_index, m_size) \
- do { \
- if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \
- _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "FATAL: Index " _STR(m_index) " out of size (" _STR(m_size) ")."); \
- GENERATE_TRAP \
- } \
+#define CRASH_BAD_INDEX(m_index, m_size) \
+ do { \
+ if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \
+ _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), true); \
+ GENERATE_TRAP \
+ } \
} while (0); // (*)
/** An error condition happened (m_cond tested true) (WARNING this is the opposite as assert().
diff --git a/core/global_constants.cpp b/core/global_constants.cpp
index 6f58af2ccf..8bddeae69a 100644
--- a/core/global_constants.cpp
+++ b/core/global_constants.cpp
@@ -86,6 +86,8 @@ static Vector<_GlobalConstant> _global_constants;
VARIANT_ENUM_CAST(KeyList);
VARIANT_ENUM_CAST(KeyModifierMask);
+VARIANT_ENUM_CAST(ButtonList);
+VARIANT_ENUM_CAST(JoystickList);
void register_global_constants() {
@@ -367,82 +369,82 @@ void register_global_constants() {
BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_GROUP_SWITCH);
// mouse
- BIND_GLOBAL_CONSTANT(BUTTON_LEFT);
- BIND_GLOBAL_CONSTANT(BUTTON_RIGHT);
- BIND_GLOBAL_CONSTANT(BUTTON_MIDDLE);
- BIND_GLOBAL_CONSTANT(BUTTON_WHEEL_UP);
- BIND_GLOBAL_CONSTANT(BUTTON_WHEEL_DOWN);
- BIND_GLOBAL_CONSTANT(BUTTON_WHEEL_LEFT);
- BIND_GLOBAL_CONSTANT(BUTTON_WHEEL_RIGHT);
- BIND_GLOBAL_CONSTANT(BUTTON_MASK_LEFT);
- BIND_GLOBAL_CONSTANT(BUTTON_MASK_RIGHT);
- BIND_GLOBAL_CONSTANT(BUTTON_MASK_MIDDLE);
+ BIND_GLOBAL_ENUM_CONSTANT(BUTTON_LEFT);
+ BIND_GLOBAL_ENUM_CONSTANT(BUTTON_RIGHT);
+ BIND_GLOBAL_ENUM_CONSTANT(BUTTON_MIDDLE);
+ 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);
//joypads
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_0);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_1);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_2);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_3);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_4);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_5);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_6);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_7);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_8);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_9);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_10);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_11);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_12);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_13);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_14);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_15);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_MAX);
-
- BIND_GLOBAL_CONSTANT(JOY_SONY_CIRCLE);
- BIND_GLOBAL_CONSTANT(JOY_SONY_X);
- BIND_GLOBAL_CONSTANT(JOY_SONY_SQUARE);
- BIND_GLOBAL_CONSTANT(JOY_SONY_TRIANGLE);
-
- BIND_GLOBAL_CONSTANT(JOY_XBOX_B);
- BIND_GLOBAL_CONSTANT(JOY_XBOX_A);
- BIND_GLOBAL_CONSTANT(JOY_XBOX_X);
- BIND_GLOBAL_CONSTANT(JOY_XBOX_Y);
-
- BIND_GLOBAL_CONSTANT(JOY_DS_A);
- BIND_GLOBAL_CONSTANT(JOY_DS_B);
- BIND_GLOBAL_CONSTANT(JOY_DS_X);
- BIND_GLOBAL_CONSTANT(JOY_DS_Y);
-
- BIND_GLOBAL_CONSTANT(JOY_SELECT);
- BIND_GLOBAL_CONSTANT(JOY_START);
- BIND_GLOBAL_CONSTANT(JOY_DPAD_UP);
- BIND_GLOBAL_CONSTANT(JOY_DPAD_DOWN);
- BIND_GLOBAL_CONSTANT(JOY_DPAD_LEFT);
- BIND_GLOBAL_CONSTANT(JOY_DPAD_RIGHT);
- BIND_GLOBAL_CONSTANT(JOY_L);
- BIND_GLOBAL_CONSTANT(JOY_L2);
- BIND_GLOBAL_CONSTANT(JOY_L3);
- BIND_GLOBAL_CONSTANT(JOY_R);
- BIND_GLOBAL_CONSTANT(JOY_R2);
- BIND_GLOBAL_CONSTANT(JOY_R3);
-
- BIND_GLOBAL_CONSTANT(JOY_AXIS_0);
- BIND_GLOBAL_CONSTANT(JOY_AXIS_1);
- BIND_GLOBAL_CONSTANT(JOY_AXIS_2);
- BIND_GLOBAL_CONSTANT(JOY_AXIS_3);
- BIND_GLOBAL_CONSTANT(JOY_AXIS_4);
- BIND_GLOBAL_CONSTANT(JOY_AXIS_5);
- BIND_GLOBAL_CONSTANT(JOY_AXIS_6);
- BIND_GLOBAL_CONSTANT(JOY_AXIS_7);
- BIND_GLOBAL_CONSTANT(JOY_AXIS_MAX);
-
- BIND_GLOBAL_CONSTANT(JOY_ANALOG_LX);
- BIND_GLOBAL_CONSTANT(JOY_ANALOG_LY);
-
- BIND_GLOBAL_CONSTANT(JOY_ANALOG_RX);
- BIND_GLOBAL_CONSTANT(JOY_ANALOG_RY);
-
- BIND_GLOBAL_CONSTANT(JOY_ANALOG_L2);
- BIND_GLOBAL_CONSTANT(JOY_ANALOG_R2);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_0);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_1);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_2);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_3);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_4);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_5);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_6);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_7);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_8);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_9);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_10);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_11);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_12);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_13);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_14);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_15);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_MAX);
+
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_CIRCLE);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_X);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_SQUARE);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_TRIANGLE);
+
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_B);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_A);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_X);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_Y);
+
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_DS_A);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_DS_B);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_DS_X);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_DS_Y);
+
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_SELECT);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_START);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_UP);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_DOWN);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_LEFT);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_RIGHT);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_L);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_L2);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_L3);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_R);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_R2);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_R3);
+
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_0);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_1);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_2);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_3);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_4);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_5);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_6);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_7);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_MAX);
+
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_LX);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_LY);
+
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_RX);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_RY);
+
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_L2);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_R2);
// error list
diff --git a/core/io/SCsub b/core/io/SCsub
index 4efc902717..79b56cb716 100644
--- a/core/io/SCsub
+++ b/core/io/SCsub
@@ -5,3 +5,4 @@ Import('env')
env.add_source_files(env.core_sources, "*.cpp")
Export('env')
+
diff --git a/core/io/compression.cpp b/core/io/compression.cpp
index fbe97e54c7..51d48901cf 100644
--- a/core/io/compression.cpp
+++ b/core/io/compression.cpp
@@ -78,9 +78,16 @@ int Compression::compress(uint8_t *p_dst, const uint8_t *p_src, int p_src_size,
} break;
case MODE_ZSTD: {
-
+ ZSTD_CCtx *cctx = ZSTD_createCCtx();
+ ZSTD_CCtx_setParameter(cctx, ZSTD_p_compressionLevel, zstd_level);
+ if (zstd_long_distance_matching) {
+ ZSTD_CCtx_setParameter(cctx, ZSTD_p_enableLongDistanceMatching, 1);
+ ZSTD_CCtx_setParameter(cctx, ZSTD_p_windowLog, zstd_window_log_size);
+ }
int max_dst_size = get_max_compressed_buffer_size(p_src_size, MODE_ZSTD);
- return ZSTD_compress(p_dst, max_dst_size, p_src, p_src_size, zstd_level);
+ int ret = ZSTD_compressCCtx(cctx, p_dst, max_dst_size, p_src, p_src_size, zstd_level);
+ ZSTD_freeCCtx(cctx);
+ return ret;
} break;
}
@@ -165,8 +172,11 @@ int Compression::decompress(uint8_t *p_dst, int p_dst_max_size, const uint8_t *p
return total;
} break;
case MODE_ZSTD: {
-
- return ZSTD_decompress(p_dst, p_dst_max_size, p_src, p_src_size);
+ ZSTD_DCtx *dctx = ZSTD_createDCtx();
+ if (zstd_long_distance_matching) ZSTD_DCtx_setMaxWindowSize(dctx, 1 << zstd_window_log_size);
+ int ret = ZSTD_decompressDCtx(dctx, p_dst, p_dst_max_size, p_src, p_src_size);
+ ZSTD_freeDCtx(dctx);
+ return ret;
} break;
}
@@ -176,3 +186,5 @@ int Compression::decompress(uint8_t *p_dst, int p_dst_max_size, const uint8_t *p
int Compression::zlib_level = Z_DEFAULT_COMPRESSION;
int Compression::gzip_level = Z_DEFAULT_COMPRESSION;
int Compression::zstd_level = 3;
+bool Compression::zstd_long_distance_matching = false;
+int Compression::zstd_window_log_size = 27;
diff --git a/core/io/compression.h b/core/io/compression.h
index 22d8109d4f..5a9aedec31 100644
--- a/core/io/compression.h
+++ b/core/io/compression.h
@@ -38,6 +38,8 @@ public:
static int zlib_level;
static int gzip_level;
static int zstd_level;
+ static bool zstd_long_distance_matching;
+ static int zstd_window_log_size;
enum Mode {
MODE_FASTLZ,
diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp
index b8c0a2b616..46d52384e5 100644
--- a/core/io/http_client.cpp
+++ b/core/io/http_client.cpp
@@ -189,16 +189,6 @@ Error HTTPClient::request(Method p_method, const String &p_url, const Vector<Str
return OK;
}
-Error HTTPClient::send_body_text(const String &p_body) {
-
- return OK;
-}
-
-Error HTTPClient::send_body_data(const PoolByteArray &p_body) {
-
- return OK;
-}
-
bool HTTPClient::has_response() const {
return response_headers.size() != 0;
@@ -629,8 +619,6 @@ void HTTPClient::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_connection"), &HTTPClient::get_connection);
ClassDB::bind_method(D_METHOD("request_raw", "method", "url", "headers", "body"), &HTTPClient::request_raw);
ClassDB::bind_method(D_METHOD("request", "method", "url", "headers", "body"), &HTTPClient::request, DEFVAL(String()));
- ClassDB::bind_method(D_METHOD("send_body_text", "body"), &HTTPClient::send_body_text);
- ClassDB::bind_method(D_METHOD("send_body_data", "body"), &HTTPClient::send_body_data);
ClassDB::bind_method(D_METHOD("close"), &HTTPClient::close);
ClassDB::bind_method(D_METHOD("has_response"), &HTTPClient::has_response);
diff --git a/core/io/http_client.h b/core/io/http_client.h
index 023370ae81..f8a3349e6e 100644
--- a/core/io/http_client.h
+++ b/core/io/http_client.h
@@ -169,8 +169,6 @@ public:
Error request_raw(Method p_method, const String &p_url, const Vector<String> &p_headers, const PoolVector<uint8_t> &p_body);
Error request(Method p_method, const String &p_url, const Vector<String> &p_headers, const String &p_body = String());
- Error send_body_text(const String &p_body);
- Error send_body_data(const PoolByteArray &p_body);
void close();
diff --git a/core/map.h b/core/map.h
index f01062ebed..fb24a5868c 100644
--- a/core/map.h
+++ b/core/map.h
@@ -438,7 +438,6 @@ private:
Element *rp = ((p_node->left == _data._nil) || (p_node->right == _data._nil)) ? p_node : p_node->_next;
Element *node = (rp->left == _data._nil) ? rp->right : rp->left;
- node->parent = rp->parent;
Element *sibling;
if (rp == rp->parent->left) {
diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp
index 4f80fb2491..f43af49754 100644
--- a/core/math/a_star.cpp
+++ b/core/math/a_star.cpp
@@ -42,8 +42,10 @@ int AStar::get_available_point_id() const {
}
void AStar::add_point(int p_id, const Vector3 &p_pos, real_t p_weight_scale) {
+
ERR_FAIL_COND(p_id < 0);
ERR_FAIL_COND(p_weight_scale < 1);
+
if (!points.has(p_id)) {
Point *pt = memnew(Point);
pt->id = p_id;
@@ -64,12 +66,29 @@ Vector3 AStar::get_point_position(int p_id) const {
return points[p_id]->pos;
}
+
+void AStar::set_point_position(int p_id, const Vector3 &p_pos) {
+
+ ERR_FAIL_COND(!points.has(p_id));
+
+ points[p_id]->pos = p_pos;
+}
+
real_t AStar::get_point_weight_scale(int p_id) const {
ERR_FAIL_COND_V(!points.has(p_id), 0);
return points[p_id]->weight_scale;
}
+
+void AStar::set_point_weight_scale(int p_id, real_t p_weight_scale) {
+
+ ERR_FAIL_COND(!points.has(p_id));
+ ERR_FAIL_COND(p_weight_scale < 1);
+
+ points[p_id]->weight_scale = p_weight_scale;
+}
+
void AStar::remove_point(int p_id) {
ERR_FAIL_COND(!points.has(p_id));
@@ -130,6 +149,7 @@ bool AStar::has_point(int p_id) const {
}
Array AStar::get_points() {
+
Array point_list;
for (const Map<int, Point *>::Element *E = points.front(); E; E = E->next()) {
@@ -171,6 +191,7 @@ int AStar::get_closest_point(const Vector3 &p_point) const {
return closest_id;
}
+
Vector3 AStar::get_closest_position_in_segment(const Vector3 &p_point) const {
real_t closest_dist = 1e20;
@@ -222,15 +243,15 @@ bool AStar::_solve(Point *begin_point, Point *end_point) {
while (!found_route) {
if (open_list.first() == NULL) {
- //could not find path sadly
+ // No path found
break;
}
- //check open list
+ // Check open list
SelfList<Point> *least_cost_point = NULL;
real_t least_cost = 1e30;
- //this could be faster (cache previous results)
+ // TODO: Cache previous results
for (SelfList<Point> *E = open_list.first(); E; E = E->next()) {
Point *p = E->self();
@@ -246,7 +267,7 @@ bool AStar::_solve(Point *begin_point, Point *end_point) {
}
Point *p = least_cost_point->self();
- //open the neighbours for search
+ // Open the neighbours for search
int es = p->neighbours.size();
for (int i = 0; i < es; i++) {
@@ -256,7 +277,7 @@ bool AStar::_solve(Point *begin_point, Point *end_point) {
real_t distance = _compute_cost(p->id, e->id) * e->weight_scale + p->distance;
if (e->last_pass == pass) {
- //oh this was visited already, can we win the cost?
+ // Already visited, is this cheaper?
if (e->distance > distance) {
@@ -264,15 +285,15 @@ bool AStar::_solve(Point *begin_point, Point *end_point) {
e->distance = distance;
}
} else {
- //add to open neighbours
+ // Add to open neighbours
e->prev_point = p;
e->distance = distance;
- e->last_pass = pass; //mark as used
+ e->last_pass = pass; // Mark as used
open_list.add(&e->list);
if (e == end_point) {
- //oh my reached end! stop algorithm
+ // End reached; stop algorithm
found_route = true;
break;
}
@@ -285,7 +306,7 @@ bool AStar::_solve(Point *begin_point, Point *end_point) {
open_list.remove(least_cost_point);
}
- //clear the openf list
+ // Clear the openf list
while (open_list.first()) {
open_list.remove(open_list.first());
}
@@ -294,6 +315,7 @@ bool AStar::_solve(Point *begin_point, Point *end_point) {
}
float AStar::_estimate_cost(int p_from_id, int p_to_id) {
+
if (get_script_instance() && get_script_instance()->has_method(SceneStringNames::get_singleton()->_estimate_cost))
return get_script_instance()->call(SceneStringNames::get_singleton()->_estimate_cost, p_from_id, p_to_id);
@@ -301,6 +323,7 @@ float AStar::_estimate_cost(int p_from_id, int p_to_id) {
}
float AStar::_compute_cost(int p_from_id, int p_to_id) {
+
if (get_script_instance() && get_script_instance()->has_method(SceneStringNames::get_singleton()->_compute_cost))
return get_script_instance()->call(SceneStringNames::get_singleton()->_compute_cost, p_from_id, p_to_id);
@@ -331,9 +354,9 @@ PoolVector<Vector3> AStar::get_point_path(int p_from_id, int p_to_id) {
if (!found_route)
return PoolVector<Vector3>();
- //midpoints
+ // Midpoints
Point *p = end_point;
- int pc = 1; //begin point
+ int pc = 1; // Begin point
while (p != begin_point) {
pc++;
p = p->prev_point;
@@ -352,7 +375,7 @@ PoolVector<Vector3> AStar::get_point_path(int p_from_id, int p_to_id) {
p = p->prev_point;
}
- w[0] = p->pos; //assign first
+ w[0] = p->pos; // Assign first
}
return path;
@@ -382,9 +405,9 @@ PoolVector<int> AStar::get_id_path(int p_from_id, int p_to_id) {
if (!found_route)
return PoolVector<int>();
- //midpoints
+ // Midpoints
Point *p = end_point;
- int pc = 1; //begin point
+ int pc = 1; // Begin point
while (p != begin_point) {
pc++;
p = p->prev_point;
@@ -403,7 +426,7 @@ PoolVector<int> AStar::get_id_path(int p_from_id, int p_to_id) {
p = p->prev_point;
}
- w[0] = p->id; //assign first
+ w[0] = p->id; // Assign first
}
return path;
@@ -414,7 +437,9 @@ void AStar::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_available_point_id"), &AStar::get_available_point_id);
ClassDB::bind_method(D_METHOD("add_point", "id", "position", "weight_scale"), &AStar::add_point, DEFVAL(1.0));
ClassDB::bind_method(D_METHOD("get_point_position", "id"), &AStar::get_point_position);
+ ClassDB::bind_method(D_METHOD("set_point_position", "id", "position"), &AStar::set_point_position);
ClassDB::bind_method(D_METHOD("get_point_weight_scale", "id"), &AStar::get_point_weight_scale);
+ ClassDB::bind_method(D_METHOD("set_point_weight_scale", "id", "weight_scale"), &AStar::set_point_weight_scale);
ClassDB::bind_method(D_METHOD("remove_point", "id"), &AStar::remove_point);
ClassDB::bind_method(D_METHOD("has_point", "id"), &AStar::has_point);
ClassDB::bind_method(D_METHOD("get_points"), &AStar::get_points);
@@ -443,4 +468,5 @@ AStar::AStar() {
AStar::~AStar() {
pass = 1;
+ clear();
}
diff --git a/core/math/a_star.h b/core/math/a_star.h
index 2c1e2e2cf7..23773e82e2 100644
--- a/core/math/a_star.h
+++ b/core/math/a_star.h
@@ -33,6 +33,8 @@
#include "reference.h"
#include "self_list.h"
/**
+ A* pathfinding algorithm
+
@author Juan Linietsky <reduzio@gmail.com>
*/
@@ -53,7 +55,7 @@ class AStar : public Reference {
Vector<Point *> neighbours;
- //used for pathfinding
+ // Used for pathfinding
Point *prev_point;
real_t distance;
@@ -102,7 +104,9 @@ public:
void add_point(int p_id, const Vector3 &p_pos, real_t p_weight_scale = 1);
Vector3 get_point_position(int p_id) const;
+ void set_point_position(int p_id, const Vector3 &p_pos);
real_t get_point_weight_scale(int p_id) const;
+ void set_point_weight_scale(int p_id, real_t p_weight_scale);
void remove_point(int p_id);
bool has_point(int p_id) const;
Array get_points();
diff --git a/core/math/math_funcs.h b/core/math/math_funcs.h
index d63da322a5..65b2ffb0df 100644
--- a/core/math/math_funcs.h
+++ b/core/math/math_funcs.h
@@ -387,6 +387,23 @@ public:
return hf;
}
+
+ static _ALWAYS_INLINE_ float snap_scalar(float p_offset, float p_step, float p_target) {
+ return p_step != 0 ? Math::stepify(p_target - p_offset, p_step) + p_offset : p_target;
+ }
+
+ static _ALWAYS_INLINE_ float snap_scalar_seperation(float p_offset, float p_step, float p_target, float p_separation) {
+ if (p_step != 0) {
+ float a = Math::stepify(p_target - p_offset, p_step + p_separation) + p_offset;
+ float b = a;
+ if (p_target >= 0)
+ b -= p_separation;
+ else
+ b += p_step;
+ return (Math::abs(p_target - a) < Math::abs(p_target - b)) ? a : b;
+ }
+ return p_target;
+ }
};
#endif // MATH_FUNCS_H
diff --git a/core/os/input_event.h b/core/os/input_event.h
index 5dc0f91d5f..f2c8cc802d 100644
--- a/core/os/input_event.h
+++ b/core/os/input_event.h
@@ -44,7 +44,7 @@
* The events are pretty obvious.
*/
-enum {
+enum ButtonList {
BUTTON_LEFT = 1,
BUTTON_RIGHT = 2,
BUTTON_MIDDLE = 3,
@@ -58,7 +58,7 @@ enum {
};
-enum {
+enum JoystickList {
JOY_BUTTON_0 = 0,
JOY_BUTTON_1 = 1,
diff --git a/core/os/keyboard.cpp b/core/os/keyboard.cpp
index 30e7d5e791..edf4f3e2f9 100644
--- a/core/os/keyboard.cpp
+++ b/core/os/keyboard.cpp
@@ -505,6 +505,27 @@ static const _KeyCodeReplace _keycode_replace_neo[] = {
{ 0, 0 }
};
+static const _KeyCodeReplace _keycode_replace_colemak[] = {
+ { KEY_E, KEY_F },
+ { KEY_R, KEY_P },
+ { KEY_T, KEY_G },
+ { KEY_Y, KEY_J },
+ { KEY_U, KEY_L },
+ { KEY_I, KEY_U },
+ { KEY_O, KEY_Y },
+ { KEY_P, KEY_SEMICOLON },
+ { KEY_S, KEY_R },
+ { KEY_D, KEY_S },
+ { KEY_F, KEY_T },
+ { KEY_G, KEY_D },
+ { KEY_J, KEY_N },
+ { KEY_K, KEY_E },
+ { KEY_L, KEY_I },
+ { KEY_SEMICOLON, KEY_O },
+ { KEY_N, KEY_K },
+ { 0, 0 }
+};
+
int keycode_get_count() {
const _KeyCodeText *kct = &_keycodes[0];
@@ -537,6 +558,7 @@ int latin_keyboard_keycode_convert(int p_keycode) {
case OS::LATIN_KEYBOARD_QZERTY: kcr = _keycode_replace_qzerty; break;
case OS::LATIN_KEYBOARD_DVORAK: kcr = _keycode_replace_dvorak; break;
case OS::LATIN_KEYBOARD_NEO: kcr = _keycode_replace_neo; break;
+ case OS::LATIN_KEYBOARD_COLEMAK: kcr = _keycode_replace_colemak; break;
default: return p_keycode;
}
diff --git a/core/os/main_loop.cpp b/core/os/main_loop.cpp
index b146d370f1..8b4449586b 100644
--- a/core/os/main_loop.cpp
+++ b/core/os/main_loop.cpp
@@ -52,6 +52,7 @@ void MainLoop::_bind_methods() {
BIND_CONSTANT(NOTIFICATION_WM_FOCUS_IN);
BIND_CONSTANT(NOTIFICATION_WM_FOCUS_OUT);
BIND_CONSTANT(NOTIFICATION_WM_QUIT_REQUEST);
+ BIND_CONSTANT(NOTIFICATION_WM_GO_BACK_REQUEST);
BIND_CONSTANT(NOTIFICATION_WM_UNFOCUS_REQUEST);
BIND_CONSTANT(NOTIFICATION_OS_MEMORY_WARNING);
BIND_CONSTANT(NOTIFICATION_TRANSLATION_CHANGED);
diff --git a/core/os/os.h b/core/os/os.h
index 48effe99da..f5e479ac0b 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -409,6 +409,7 @@ public:
LATIN_KEYBOARD_QZERTY,
LATIN_KEYBOARD_DVORAK,
LATIN_KEYBOARD_NEO,
+ LATIN_KEYBOARD_COLEMAK,
};
virtual LatinKeyboardVariant get_latin_keyboard_variant() const;
diff --git a/core/project_settings.cpp b/core/project_settings.cpp
index c4d1b199a0..2e4fc26784 100644
--- a/core/project_settings.cpp
+++ b/core/project_settings.cpp
@@ -1036,10 +1036,16 @@ ProjectSettings::ProjectSettings() {
GLOBAL_DEF("debug/settings/profiler/max_functions", 16384);
//assigning here, because using GLOBAL_GET on every block for compressing can be slow
+ Compression::zstd_long_distance_matching = GLOBAL_DEF("compression/formats/zstd/long_distance_matching", false);
+ custom_prop_info["compression/formats/zstd/long_distance_matching"] = PropertyInfo(Variant::BOOL, "compression/formats/zstd/long_distance_matching");
Compression::zstd_level = GLOBAL_DEF("compression/formats/zstd/compression_level", 3);
custom_prop_info["compression/formats/zstd/compression_level"] = PropertyInfo(Variant::INT, "compression/formats/zstd/compression_level", PROPERTY_HINT_RANGE, "1,22,1");
+ Compression::zstd_window_log_size = GLOBAL_DEF("compression/formats/zstd/window_log_size", 27);
+ custom_prop_info["compression/formats/zstd/window_log_size"] = PropertyInfo(Variant::INT, "compression/formats/zstd/window_log_size", PROPERTY_HINT_RANGE, "10,30,1");
+
Compression::zlib_level = GLOBAL_DEF("compression/formats/zlib/compression_level", Z_DEFAULT_COMPRESSION);
custom_prop_info["compression/formats/zlib/compression_level"] = PropertyInfo(Variant::INT, "compression/formats/zlib/compression_level", PROPERTY_HINT_RANGE, "-1,9,1");
+
Compression::gzip_level = GLOBAL_DEF("compression/formats/gzip/compression_level", Z_DEFAULT_COMPRESSION);
custom_prop_info["compression/formats/gzip/compression_level"] = PropertyInfo(Variant::INT, "compression/formats/gzip/compression_level", PROPERTY_HINT_RANGE, "-1,9,1");
diff --git a/core/script_language.cpp b/core/script_language.cpp
index 5ead91f26e..384e41e4bd 100644
--- a/core/script_language.cpp
+++ b/core/script_language.cpp
@@ -58,7 +58,6 @@ void Script::_bind_methods() {
ClassDB::bind_method(D_METHOD("has_script_signal", "signal_name"), &Script::has_script_signal);
ClassDB::bind_method(D_METHOD("is_tool"), &Script::is_tool);
- ClassDB::bind_method(D_METHOD("get_node_type"), &Script::get_node_type);
}
void ScriptServer::set_scripting_enabled(bool p_enabled) {
diff --git a/core/script_language.h b/core/script_language.h
index 25767a2f7a..5da72d0492 100644
--- a/core/script_language.h
+++ b/core/script_language.h
@@ -107,8 +107,6 @@ public:
virtual bool is_tool() const = 0;
- virtual String get_node_type() const = 0;
-
virtual ScriptLanguage *get_language() const = 0;
virtual bool has_script_signal(const StringName &p_signal) const = 0;
@@ -202,6 +200,7 @@ public:
virtual bool validate(const String &p_script, int &r_line_error, int &r_col_error, String &r_test_error, const String &p_path = "", List<String> *r_functions = NULL) const = 0;
virtual Script *create_script() const = 0;
virtual bool has_named_classes() const = 0;
+ virtual bool supports_builtin_mode() const = 0;
virtual bool can_inherit_from_file() { return false; }
virtual int find_function(const String &p_function, const String &p_code) const = 0;
virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const = 0;
diff --git a/core/set.h b/core/set.h
index 0f48e07520..331979d4e3 100644
--- a/core/set.h
+++ b/core/set.h
@@ -424,7 +424,6 @@ private:
Element *rp = ((p_node->left == _data._nil) || (p_node->right == _data._nil)) ? p_node : p_node->_next;
Element *node = (rp->left == _data._nil) ? rp->right : rp->left;
- node->parent = rp->parent;
Element *sibling;
if (rp == rp->parent->left) {
diff --git a/core/translation.cpp b/core/translation.cpp
index 27e3b202d0..058db956e5 100644
--- a/core/translation.cpp
+++ b/core/translation.cpp
@@ -753,65 +753,17 @@ static const char *locale_names[] = {
0
};
-bool TranslationServer::is_locale_valid(const String &p_locale) {
-
- const char **ptr = locale_list;
-
- while (*ptr) {
-
- if (*ptr == p_locale)
- return true;
- ptr++;
- }
-
- return false;
-}
-
-Vector<String> TranslationServer::get_all_locales() {
-
- Vector<String> locales;
-
- const char **ptr = locale_list;
-
- while (*ptr) {
- locales.push_back(*ptr);
- ptr++;
- }
-
- return locales;
-}
-
-Vector<String> TranslationServer::get_all_locale_names() {
-
- Vector<String> locales;
-
- const char **ptr = locale_names;
-
- while (*ptr) {
- locales.push_back(*ptr);
- ptr++;
- }
-
- return locales;
-}
+static const char *locale_renames[][2] = {
+ { "no", "nb" },
+ { NULL, NULL }
+};
static String get_trimmed_locale(const String &p_locale) {
return p_locale.substr(0, 2);
}
-static bool is_valid_locale(const String &p_locale) {
-
- const char **ptr = locale_list;
-
- while (*ptr) {
- if (p_locale == *ptr)
- return true;
- ptr++;
- }
-
- return false;
-}
+///////////////////////////////////////////////
PoolVector<String> Translation::_get_messages() const {
@@ -857,14 +809,13 @@ void Translation::_set_messages(const PoolVector<String> &p_messages) {
void Translation::set_locale(const String &p_locale) {
- // replaces '-' with '_' for macOS Sierra-style locales
- String univ_locale = p_locale.replace("-", "_");
+ String univ_locale = TranslationServer::standardize_locale(p_locale);
- if (!is_valid_locale(univ_locale)) {
+ if (!TranslationServer::is_locale_valid(univ_locale)) {
String trimmed_locale = get_trimmed_locale(univ_locale);
- ERR_EXPLAIN("Invalid Locale: " + trimmed_locale);
- ERR_FAIL_COND(!is_valid_locale(trimmed_locale));
+ ERR_EXPLAIN("Invalid locale: " + trimmed_locale);
+ ERR_FAIL_COND(!TranslationServer::is_locale_valid(trimmed_locale));
locale = trimmed_locale;
} else {
@@ -929,16 +880,47 @@ Translation::Translation()
///////////////////////////////////////////////
-void TranslationServer::set_locale(const String &p_locale) {
+bool TranslationServer::is_locale_valid(const String &p_locale) {
+
+ const char **ptr = locale_list;
+
+ while (*ptr) {
+
+ if (*ptr == p_locale)
+ return true;
+ ptr++;
+ }
- // replaces '-' with '_' for macOS Sierra-style locales
+ return false;
+}
+
+String TranslationServer::standardize_locale(const String &p_locale) {
+
+ // Replaces '-' with '_' for macOS Sierra-style locales
String univ_locale = p_locale.replace("-", "_");
- if (!is_valid_locale(univ_locale)) {
+ // Handles known non-ISO locale names used e.g. on Windows
+ int idx = 0;
+ while (locale_renames[idx][0] != NULL) {
+ if (locale_renames[idx][0] == univ_locale) {
+ univ_locale = locale_renames[idx][1];
+ break;
+ }
+ idx++;
+ }
+
+ return univ_locale;
+}
+
+void TranslationServer::set_locale(const String &p_locale) {
+
+ String univ_locale = standardize_locale(p_locale);
+
+ if (!is_locale_valid(univ_locale)) {
String trimmed_locale = get_trimmed_locale(univ_locale);
- ERR_EXPLAIN("Invalid Locale: " + trimmed_locale);
- ERR_FAIL_COND(!is_valid_locale(trimmed_locale));
+ ERR_EXPLAIN("Invalid locale: " + trimmed_locale);
+ ERR_FAIL_COND(!is_locale_valid(trimmed_locale));
locale = trimmed_locale;
} else {
@@ -957,6 +939,40 @@ String TranslationServer::get_locale() const {
return locale;
}
+String TranslationServer::get_locale_name(const String &p_locale) const {
+
+ if (!locale_name_map.has(p_locale)) return String();
+ return locale_name_map[p_locale];
+}
+
+Vector<String> TranslationServer::get_all_locales() {
+
+ Vector<String> locales;
+
+ const char **ptr = locale_list;
+
+ while (*ptr) {
+ locales.push_back(*ptr);
+ ptr++;
+ }
+
+ return locales;
+}
+
+Vector<String> TranslationServer::get_all_locale_names() {
+
+ Vector<String> locales;
+
+ const char **ptr = locale_names;
+
+ while (*ptr) {
+ locales.push_back(*ptr);
+ ptr++;
+ }
+
+ return locales;
+}
+
void TranslationServer::add_translation(const Ref<Translation> &p_translation) {
translations.insert(p_translation);
@@ -1122,6 +1138,8 @@ void TranslationServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_locale", "locale"), &TranslationServer::set_locale);
ClassDB::bind_method(D_METHOD("get_locale"), &TranslationServer::get_locale);
+ ClassDB::bind_method(D_METHOD("get_locale_name", "locale"), &TranslationServer::get_locale_name);
+
ClassDB::bind_method(D_METHOD("translate", "message"), &TranslationServer::translate);
ClassDB::bind_method(D_METHOD("add_translation", "translation"), &TranslationServer::add_translation);
@@ -1147,4 +1165,9 @@ TranslationServer::TranslationServer()
: locale("en"),
enabled(true) {
singleton = this;
+
+ for (int i = 0; locale_list[i]; ++i) {
+
+ locale_name_map.insert(locale_list[i], locale_names[i]);
+ }
}
diff --git a/core/translation.h b/core/translation.h
index cf59583ad6..0cdab3b0bc 100644
--- a/core/translation.h
+++ b/core/translation.h
@@ -73,6 +73,8 @@ class TranslationServer : public Object {
Set<Ref<Translation> > translations;
Ref<Translation> tool_translation;
+ Map<String, String> locale_name_map;
+
bool enabled;
static TranslationServer *singleton;
@@ -83,14 +85,14 @@ class TranslationServer : public Object {
public:
_FORCE_INLINE_ static TranslationServer *get_singleton() { return singleton; }
- //yes, portuguese is supported!
-
void set_enabled(bool p_enabled) { enabled = p_enabled; }
_FORCE_INLINE_ bool is_enabled() const { return enabled; }
void set_locale(const String &p_locale);
String get_locale() const;
+ String get_locale_name(const String &p_locale) const;
+
void add_translation(const Ref<Translation> &p_translation);
void remove_translation(const Ref<Translation> &p_translation);
@@ -99,6 +101,7 @@ public:
static Vector<String> get_all_locales();
static Vector<String> get_all_locale_names();
static bool is_locale_valid(const String &p_locale);
+ static String standardize_locale(const String &p_locale);
void set_tool_translation(const Ref<Translation> &p_translation);
StringName tool_translate(const StringName &p_message) const;
diff --git a/core/typedefs.h b/core/typedefs.h
index bf5c8b0f75..c509edf9fe 100644
--- a/core/typedefs.h
+++ b/core/typedefs.h
@@ -98,11 +98,11 @@ T *_nullptr() {
#undef OK
#endif
+#include "int_types.h"
+
#include "error_list.h"
#include "error_macros.h"
-#include "int_types.h"
-
/** Generic ABS function, for math uses please use Math::abs */
#ifndef ABS
diff --git a/core/ustring.cpp b/core/ustring.cpp
index b85996e3d1..80881f1adb 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -2476,6 +2476,11 @@ bool String::begins_with(const char *p_string) const {
return *p_string == 0;
}
+bool String::is_enclosed_in(const String &p_string) const {
+
+ return begins_with(p_string) && ends_with(p_string);
+}
+
bool String::is_subsequence_of(const String &p_string) const {
return _base_is_subsequence_of(p_string, false);
@@ -2486,6 +2491,11 @@ bool String::is_subsequence_ofi(const String &p_string) const {
return _base_is_subsequence_of(p_string, true);
}
+bool String::is_quoted() const {
+
+ return is_enclosed_in("\"") || is_enclosed_in("'");
+}
+
bool String::_base_is_subsequence_of(const String &p_string, bool case_insensitive) const {
int len = length();
@@ -3906,6 +3916,18 @@ String String::sprintf(const Array &values, bool *error) const {
return formatted;
}
+String String::quote(String quotechar) const {
+ return quotechar + *this + quotechar;
+}
+
+String String::unquote() const {
+ if (!is_quoted()) {
+ return *this;
+ }
+
+ return substr(1, length() - 2);
+}
+
#include "translation.h"
#ifdef TOOLS_ENABLED
diff --git a/core/ustring.h b/core/ustring.h
index ab4e325f2c..aa4a5c910d 100644
--- a/core/ustring.h
+++ b/core/ustring.h
@@ -118,8 +118,10 @@ public:
bool begins_with(const String &p_string) const;
bool begins_with(const char *p_string) const;
bool ends_with(const String &p_string) const;
+ bool is_enclosed_in(const String &p_string) const;
bool is_subsequence_of(const String &p_string) const;
bool is_subsequence_ofi(const String &p_string) const;
+ bool is_quoted() const;
Vector<String> bigrams() const;
float similarity(const String &p_string) const;
String format(const Variant &values, String placeholder = "{_}") const;
@@ -132,6 +134,8 @@ public:
String lpad(int min_length, const String &character = " ") const;
String rpad(int min_length, const String &character = " ") const;
String sprintf(const Array &values, bool *error) const;
+ String quote(String quotechar = "\"") const;
+ String unquote() const;
static String num(double p_num, int p_decimals = -1);
static String num_scientific(double p_num);
static String num_real(double p_num);
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index d141621fbb..cdf1ea46a3 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -54,9 +54,8 @@ struct _VariantCall {
Variant::Type return_type;
bool _const;
-#ifdef DEBUG_ENABLED
bool returns;
-#endif
+
VariantFunc func;
_FORCE_INLINE_ bool verify_arguments(const Variant **p_args, Variant::CallError &r_error) {
@@ -146,7 +145,7 @@ struct _VariantCall {
#endif
}
- static void addfunc(bool p_const, Variant::Type p_type, Variant::Type p_return, const StringName &p_name, VariantFunc p_func, const Vector<Variant> &p_defaultarg, const Arg &p_argtype1 = Arg(), const Arg &p_argtype2 = Arg(), const Arg &p_argtype3 = Arg(), const Arg &p_argtype4 = Arg(), const Arg &p_argtype5 = Arg()) {
+ static void addfunc(bool p_const, Variant::Type p_type, Variant::Type p_return, bool p_has_return, const StringName &p_name, VariantFunc p_func, const Vector<Variant> &p_defaultarg, const Arg &p_argtype1 = Arg(), const Arg &p_argtype2 = Arg(), const Arg &p_argtype3 = Arg(), const Arg &p_argtype4 = Arg(), const Arg &p_argtype5 = Arg()) {
FuncData funcdata;
funcdata.func = p_func;
@@ -154,7 +153,7 @@ struct _VariantCall {
funcdata._const = p_const;
#ifdef DEBUG_ENABLED
funcdata.return_type = p_return;
- funcdata.returns = p_return != Variant::NIL;
+ funcdata.returns = p_has_return;
#endif
if (p_argtype1.name) {
@@ -1051,7 +1050,6 @@ Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, i
return String();
// math types
-
case VECTOR2:
return Vector2(); // 5
case RECT2: return Rect2();
@@ -1234,7 +1232,7 @@ Variant::Type Variant::get_method_return_type(Variant::Type p_type, const String
return Variant::NIL;
if (r_has_return)
- *r_has_return = E->get().return_type;
+ *r_has_return = E->get().returns;
return E->get().return_type;
}
@@ -1376,215 +1374,237 @@ void register_variant_methods() {
_VariantCall::construct_funcs = memnew_arr(_VariantCall::ConstructFunc, Variant::VARIANT_MAX);
_VariantCall::constant_data = memnew_arr(_VariantCall::ConstantData, Variant::VARIANT_MAX);
+#define ADDFUNC0R(m_vtype, m_ret, m_class, m_method, m_defarg) \
+ _VariantCall::addfunc(true, Variant::m_vtype, Variant::m_ret, true, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg);
+#define ADDFUNC1R(m_vtype, m_ret, m_class, m_method, m_arg1, m_argname1, m_defarg) \
+ _VariantCall::addfunc(true, Variant::m_vtype, Variant::m_ret, true, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)));
+#define ADDFUNC2R(m_vtype, m_ret, m_class, m_method, m_arg1, m_argname1, m_arg2, m_argname2, m_defarg) \
+ _VariantCall::addfunc(true, Variant::m_vtype, Variant::m_ret, true, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)), _VariantCall::Arg(Variant::m_arg2, _scs_create(m_argname2)));
+#define ADDFUNC3R(m_vtype, m_ret, m_class, m_method, m_arg1, m_argname1, m_arg2, m_argname2, m_arg3, m_argname3, m_defarg) \
+ _VariantCall::addfunc(true, Variant::m_vtype, Variant::m_ret, true, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)), _VariantCall::Arg(Variant::m_arg2, _scs_create(m_argname2)), _VariantCall::Arg(Variant::m_arg3, _scs_create(m_argname3)));
+#define ADDFUNC4R(m_vtype, m_ret, m_class, m_method, m_arg1, m_argname1, m_arg2, m_argname2, m_arg3, m_argname3, m_arg4, m_argname4, m_defarg) \
+ _VariantCall::addfunc(true, Variant::m_vtype, Variant::m_ret, true, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)), _VariantCall::Arg(Variant::m_arg2, _scs_create(m_argname2)), _VariantCall::Arg(Variant::m_arg3, _scs_create(m_argname3)), _VariantCall::Arg(Variant::m_arg4, _scs_create(m_argname4)));
+
+#define ADDFUNC0RNC(m_vtype, m_ret, m_class, m_method, m_defarg) \
+ _VariantCall::addfunc(false, Variant::m_vtype, Variant::m_ret, true, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg);
+#define ADDFUNC1RNC(m_vtype, m_ret, m_class, m_method, m_arg1, m_argname1, m_defarg) \
+ _VariantCall::addfunc(false, Variant::m_vtype, Variant::m_ret, true, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)));
+#define ADDFUNC2RNC(m_vtype, m_ret, m_class, m_method, m_arg1, m_argname1, m_arg2, m_argname2, m_defarg) \
+ _VariantCall::addfunc(false, Variant::m_vtype, Variant::m_ret, true, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)), _VariantCall::Arg(Variant::m_arg2, _scs_create(m_argname2)));
+#define ADDFUNC3RNC(m_vtype, m_ret, m_class, m_method, m_arg1, m_argname1, m_arg2, m_argname2, m_arg3, m_argname3, m_defarg) \
+ _VariantCall::addfunc(false, Variant::m_vtype, Variant::m_ret, true, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)), _VariantCall::Arg(Variant::m_arg2, _scs_create(m_argname2)), _VariantCall::Arg(Variant::m_arg3, _scs_create(m_argname3)));
+#define ADDFUNC4RNC(m_vtype, m_ret, m_class, m_method, m_arg1, m_argname1, m_arg2, m_argname2, m_arg3, m_argname3, m_arg4, m_argname4, m_defarg) \
+ _VariantCall::addfunc(false, Variant::m_vtype, Variant::m_ret, true, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)), _VariantCall::Arg(Variant::m_arg2, _scs_create(m_argname2)), _VariantCall::Arg(Variant::m_arg3, _scs_create(m_argname3)), _VariantCall::Arg(Variant::m_arg4, _scs_create(m_argname4)));
+
#define ADDFUNC0(m_vtype, m_ret, m_class, m_method, m_defarg) \
- _VariantCall::addfunc(true, Variant::m_vtype, Variant::m_ret, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg);
+ _VariantCall::addfunc(true, Variant::m_vtype, Variant::m_ret, false, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg);
#define ADDFUNC1(m_vtype, m_ret, m_class, m_method, m_arg1, m_argname1, m_defarg) \
- _VariantCall::addfunc(true, Variant::m_vtype, Variant::m_ret, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)));
+ _VariantCall::addfunc(true, Variant::m_vtype, Variant::m_ret, false, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)));
#define ADDFUNC2(m_vtype, m_ret, m_class, m_method, m_arg1, m_argname1, m_arg2, m_argname2, m_defarg) \
- _VariantCall::addfunc(true, Variant::m_vtype, Variant::m_ret, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)), _VariantCall::Arg(Variant::m_arg2, _scs_create(m_argname2)));
+ _VariantCall::addfunc(true, Variant::m_vtype, Variant::m_ret, false, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)), _VariantCall::Arg(Variant::m_arg2, _scs_create(m_argname2)));
#define ADDFUNC3(m_vtype, m_ret, m_class, m_method, m_arg1, m_argname1, m_arg2, m_argname2, m_arg3, m_argname3, m_defarg) \
- _VariantCall::addfunc(true, Variant::m_vtype, Variant::m_ret, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)), _VariantCall::Arg(Variant::m_arg2, _scs_create(m_argname2)), _VariantCall::Arg(Variant::m_arg3, _scs_create(m_argname3)));
+ _VariantCall::addfunc(true, Variant::m_vtype, Variant::m_ret, false, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)), _VariantCall::Arg(Variant::m_arg2, _scs_create(m_argname2)), _VariantCall::Arg(Variant::m_arg3, _scs_create(m_argname3)));
#define ADDFUNC4(m_vtype, m_ret, m_class, m_method, m_arg1, m_argname1, m_arg2, m_argname2, m_arg3, m_argname3, m_arg4, m_argname4, m_defarg) \
- _VariantCall::addfunc(true, Variant::m_vtype, Variant::m_ret, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)), _VariantCall::Arg(Variant::m_arg2, _scs_create(m_argname2)), _VariantCall::Arg(Variant::m_arg3, _scs_create(m_argname3)), _VariantCall::Arg(Variant::m_arg4, _scs_create(m_argname4)));
+ _VariantCall::addfunc(true, Variant::m_vtype, Variant::m_ret, false, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)), _VariantCall::Arg(Variant::m_arg2, _scs_create(m_argname2)), _VariantCall::Arg(Variant::m_arg3, _scs_create(m_argname3)), _VariantCall::Arg(Variant::m_arg4, _scs_create(m_argname4)));
#define ADDFUNC0NC(m_vtype, m_ret, m_class, m_method, m_defarg) \
- _VariantCall::addfunc(false, Variant::m_vtype, Variant::m_ret, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg);
+ _VariantCall::addfunc(false, Variant::m_vtype, Variant::m_ret, false, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg);
#define ADDFUNC1NC(m_vtype, m_ret, m_class, m_method, m_arg1, m_argname1, m_defarg) \
- _VariantCall::addfunc(false, Variant::m_vtype, Variant::m_ret, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)));
+ _VariantCall::addfunc(false, Variant::m_vtype, Variant::m_ret, false, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)));
#define ADDFUNC2NC(m_vtype, m_ret, m_class, m_method, m_arg1, m_argname1, m_arg2, m_argname2, m_defarg) \
- _VariantCall::addfunc(false, Variant::m_vtype, Variant::m_ret, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)), _VariantCall::Arg(Variant::m_arg2, _scs_create(m_argname2)));
+ _VariantCall::addfunc(false, Variant::m_vtype, Variant::m_ret, false, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)), _VariantCall::Arg(Variant::m_arg2, _scs_create(m_argname2)));
#define ADDFUNC3NC(m_vtype, m_ret, m_class, m_method, m_arg1, m_argname1, m_arg2, m_argname2, m_arg3, m_argname3, m_defarg) \
- _VariantCall::addfunc(false, Variant::m_vtype, Variant::m_ret, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)), _VariantCall::Arg(Variant::m_arg2, _scs_create(m_argname2)), _VariantCall::Arg(Variant::m_arg3, _scs_create(m_argname3)));
+ _VariantCall::addfunc(false, Variant::m_vtype, Variant::m_ret, false, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)), _VariantCall::Arg(Variant::m_arg2, _scs_create(m_argname2)), _VariantCall::Arg(Variant::m_arg3, _scs_create(m_argname3)));
#define ADDFUNC4NC(m_vtype, m_ret, m_class, m_method, m_arg1, m_argname1, m_arg2, m_argname2, m_arg3, m_argname3, m_arg4, m_argname4, m_defarg) \
- _VariantCall::addfunc(false, Variant::m_vtype, Variant::m_ret, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)), _VariantCall::Arg(Variant::m_arg2, _scs_create(m_argname2)), _VariantCall::Arg(Variant::m_arg3, _scs_create(m_argname3)), _VariantCall::Arg(Variant::m_arg4, _scs_create(m_argname4)));
+ _VariantCall::addfunc(false, Variant::m_vtype, Variant::m_ret, false, _scs_create(#m_method), VCALL(m_class, m_method), m_defarg, _VariantCall::Arg(Variant::m_arg1, _scs_create(m_argname1)), _VariantCall::Arg(Variant::m_arg2, _scs_create(m_argname2)), _VariantCall::Arg(Variant::m_arg3, _scs_create(m_argname3)), _VariantCall::Arg(Variant::m_arg4, _scs_create(m_argname4)));
/* STRING */
- ADDFUNC1(STRING, INT, String, casecmp_to, STRING, "to", varray());
- ADDFUNC1(STRING, INT, String, nocasecmp_to, STRING, "to", varray());
- ADDFUNC0(STRING, INT, String, length, varray());
- ADDFUNC2(STRING, STRING, String, substr, INT, "from", INT, "len", varray());
-
- ADDFUNC2(STRING, INT, String, find, STRING, "what", INT, "from", varray(0));
-
- ADDFUNC1(STRING, INT, String, find_last, STRING, "what", varray());
- ADDFUNC2(STRING, INT, String, findn, STRING, "what", INT, "from", varray(0));
- ADDFUNC2(STRING, INT, String, rfind, STRING, "what", INT, "from", varray(-1));
- ADDFUNC2(STRING, INT, String, rfindn, STRING, "what", INT, "from", varray(-1));
- ADDFUNC1(STRING, BOOL, String, match, STRING, "expr", varray());
- ADDFUNC1(STRING, BOOL, String, matchn, STRING, "expr", varray());
- ADDFUNC1(STRING, BOOL, String, begins_with, STRING, "text", varray());
- ADDFUNC1(STRING, BOOL, String, ends_with, STRING, "text", varray());
- ADDFUNC1(STRING, BOOL, String, is_subsequence_of, STRING, "text", varray());
- ADDFUNC1(STRING, BOOL, String, is_subsequence_ofi, STRING, "text", varray());
- ADDFUNC0(STRING, POOL_STRING_ARRAY, String, bigrams, varray());
- ADDFUNC1(STRING, REAL, String, similarity, STRING, "text", varray());
-
- ADDFUNC2(STRING, STRING, String, format, NIL, "values", STRING, "placeholder", varray("{_}"));
- ADDFUNC2(STRING, STRING, String, replace, STRING, "what", STRING, "forwhat", varray());
- ADDFUNC2(STRING, STRING, String, replacen, STRING, "what", STRING, "forwhat", varray());
- ADDFUNC2(STRING, STRING, String, insert, INT, "position", STRING, "what", varray());
- ADDFUNC0(STRING, STRING, String, capitalize, varray());
- ADDFUNC2(STRING, POOL_STRING_ARRAY, String, split, STRING, "divisor", BOOL, "allow_empty", varray(true));
- ADDFUNC2(STRING, POOL_REAL_ARRAY, String, split_floats, STRING, "divisor", BOOL, "allow_empty", varray(true));
-
- ADDFUNC0(STRING, STRING, String, to_upper, varray());
- ADDFUNC0(STRING, STRING, String, to_lower, varray());
-
- ADDFUNC1(STRING, STRING, String, left, INT, "position", varray());
- ADDFUNC1(STRING, STRING, String, right, INT, "position", varray());
- ADDFUNC2(STRING, STRING, String, strip_edges, BOOL, "left", BOOL, "right", varray(true, true));
- ADDFUNC0(STRING, STRING, String, get_extension, varray());
- ADDFUNC0(STRING, STRING, String, get_basename, varray());
- ADDFUNC1(STRING, STRING, String, plus_file, STRING, "file", varray());
- ADDFUNC1(STRING, INT, String, ord_at, INT, "at", varray());
+ ADDFUNC1R(STRING, INT, String, casecmp_to, STRING, "to", varray());
+ ADDFUNC1R(STRING, INT, String, nocasecmp_to, STRING, "to", varray());
+ ADDFUNC0R(STRING, INT, String, length, varray());
+ ADDFUNC2R(STRING, STRING, String, substr, INT, "from", INT, "len", varray());
+
+ ADDFUNC2R(STRING, INT, String, find, STRING, "what", INT, "from", varray(0));
+
+ ADDFUNC1R(STRING, INT, String, find_last, STRING, "what", varray());
+ ADDFUNC2R(STRING, INT, String, findn, STRING, "what", INT, "from", varray(0));
+ ADDFUNC2R(STRING, INT, String, rfind, STRING, "what", INT, "from", varray(-1));
+ ADDFUNC2R(STRING, INT, String, rfindn, STRING, "what", INT, "from", varray(-1));
+ ADDFUNC1R(STRING, BOOL, String, match, STRING, "expr", varray());
+ ADDFUNC1R(STRING, BOOL, String, matchn, STRING, "expr", varray());
+ ADDFUNC1R(STRING, BOOL, String, begins_with, STRING, "text", varray());
+ ADDFUNC1R(STRING, BOOL, String, ends_with, STRING, "text", varray());
+ ADDFUNC1R(STRING, BOOL, String, is_subsequence_of, STRING, "text", varray());
+ ADDFUNC1R(STRING, BOOL, String, is_subsequence_ofi, STRING, "text", varray());
+ ADDFUNC0R(STRING, POOL_STRING_ARRAY, String, bigrams, varray());
+ ADDFUNC1R(STRING, REAL, String, similarity, STRING, "text", varray());
+
+ ADDFUNC2R(STRING, STRING, String, format, NIL, "values", STRING, "placeholder", varray("{_}"));
+ ADDFUNC2R(STRING, STRING, String, replace, STRING, "what", STRING, "forwhat", varray());
+ ADDFUNC2R(STRING, STRING, String, replacen, STRING, "what", STRING, "forwhat", varray());
+ ADDFUNC2R(STRING, STRING, String, insert, INT, "position", STRING, "what", varray());
+ ADDFUNC0R(STRING, STRING, String, capitalize, varray());
+ ADDFUNC2R(STRING, POOL_STRING_ARRAY, String, split, STRING, "divisor", BOOL, "allow_empty", varray(true));
+ ADDFUNC2R(STRING, POOL_REAL_ARRAY, String, split_floats, STRING, "divisor", BOOL, "allow_empty", varray(true));
+
+ ADDFUNC0R(STRING, STRING, String, to_upper, varray());
+ ADDFUNC0R(STRING, STRING, String, to_lower, varray());
+
+ ADDFUNC1R(STRING, STRING, String, left, INT, "position", varray());
+ ADDFUNC1R(STRING, STRING, String, right, INT, "position", varray());
+ ADDFUNC2R(STRING, STRING, String, strip_edges, BOOL, "left", BOOL, "right", varray(true, true));
+ ADDFUNC0R(STRING, STRING, String, get_extension, varray());
+ ADDFUNC0R(STRING, STRING, String, get_basename, varray());
+ ADDFUNC1R(STRING, STRING, String, plus_file, STRING, "file", varray());
+ ADDFUNC1R(STRING, INT, String, ord_at, INT, "at", varray());
ADDFUNC2(STRING, NIL, String, erase, INT, "position", INT, "chars", varray());
- ADDFUNC0(STRING, INT, String, hash, varray());
- ADDFUNC0(STRING, STRING, String, md5_text, varray());
- ADDFUNC0(STRING, STRING, String, sha256_text, varray());
- ADDFUNC0(STRING, POOL_BYTE_ARRAY, String, md5_buffer, varray());
- ADDFUNC0(STRING, POOL_BYTE_ARRAY, String, sha256_buffer, varray());
- ADDFUNC0(STRING, BOOL, String, empty, varray());
- ADDFUNC0(STRING, BOOL, String, is_abs_path, varray());
- ADDFUNC0(STRING, BOOL, String, is_rel_path, varray());
- ADDFUNC0(STRING, STRING, String, get_base_dir, varray());
- ADDFUNC0(STRING, STRING, String, get_file, varray());
- ADDFUNC0(STRING, STRING, String, xml_escape, varray());
- ADDFUNC0(STRING, STRING, String, xml_unescape, varray());
- ADDFUNC0(STRING, STRING, String, c_escape, varray());
- ADDFUNC0(STRING, STRING, String, c_unescape, varray());
- ADDFUNC0(STRING, STRING, String, json_escape, varray());
- ADDFUNC0(STRING, STRING, String, percent_encode, varray());
- ADDFUNC0(STRING, STRING, String, percent_decode, varray());
- ADDFUNC0(STRING, BOOL, String, is_valid_identifier, varray());
- ADDFUNC0(STRING, BOOL, String, is_valid_integer, varray());
- ADDFUNC0(STRING, BOOL, String, is_valid_float, varray());
- ADDFUNC0(STRING, BOOL, String, is_valid_html_color, varray());
- ADDFUNC0(STRING, BOOL, String, is_valid_ip_address, varray());
- ADDFUNC0(STRING, INT, String, to_int, varray());
- ADDFUNC0(STRING, REAL, String, to_float, varray());
- ADDFUNC0(STRING, INT, String, hex_to_int, varray());
- ADDFUNC1(STRING, STRING, String, pad_decimals, INT, "digits", varray());
- ADDFUNC1(STRING, STRING, String, pad_zeros, INT, "digits", varray());
-
- ADDFUNC0(STRING, POOL_BYTE_ARRAY, String, to_ascii, varray());
- ADDFUNC0(STRING, POOL_BYTE_ARRAY, String, to_utf8, varray());
-
- ADDFUNC0(VECTOR2, VECTOR2, Vector2, normalized, varray());
- ADDFUNC0(VECTOR2, REAL, Vector2, length, varray());
- ADDFUNC0(VECTOR2, REAL, Vector2, angle, varray());
- ADDFUNC0(VECTOR2, REAL, Vector2, length_squared, varray());
- ADDFUNC0(VECTOR2, BOOL, Vector2, is_normalized, varray());
- ADDFUNC1(VECTOR2, REAL, Vector2, distance_to, VECTOR2, "to", varray());
- ADDFUNC1(VECTOR2, REAL, Vector2, distance_squared_to, VECTOR2, "to", varray());
- ADDFUNC1(VECTOR2, REAL, Vector2, angle_to, VECTOR2, "to", varray());
- ADDFUNC1(VECTOR2, REAL, Vector2, angle_to_point, VECTOR2, "to", varray());
- ADDFUNC2(VECTOR2, VECTOR2, Vector2, linear_interpolate, VECTOR2, "b", REAL, "t", varray());
- ADDFUNC4(VECTOR2, VECTOR2, Vector2, cubic_interpolate, VECTOR2, "b", VECTOR2, "pre_a", VECTOR2, "post_b", REAL, "t", varray());
- ADDFUNC1(VECTOR2, VECTOR2, Vector2, rotated, REAL, "phi", varray());
- ADDFUNC0(VECTOR2, VECTOR2, Vector2, tangent, varray());
- ADDFUNC0(VECTOR2, VECTOR2, Vector2, floor, varray());
- ADDFUNC1(VECTOR2, VECTOR2, Vector2, snapped, VECTOR2, "by", varray());
- ADDFUNC0(VECTOR2, REAL, Vector2, aspect, varray());
- ADDFUNC1(VECTOR2, REAL, Vector2, dot, VECTOR2, "with", varray());
- ADDFUNC1(VECTOR2, VECTOR2, Vector2, slide, VECTOR2, "n", varray());
- ADDFUNC1(VECTOR2, VECTOR2, Vector2, bounce, VECTOR2, "n", varray());
- ADDFUNC1(VECTOR2, VECTOR2, Vector2, reflect, VECTOR2, "n", varray());
- //ADDFUNC1(VECTOR2,REAL,Vector2,cross,VECTOR2,"with",varray());
- ADDFUNC0(VECTOR2, VECTOR2, Vector2, abs, varray());
- ADDFUNC1(VECTOR2, VECTOR2, Vector2, clamped, REAL, "length", varray());
-
- ADDFUNC0(RECT2, REAL, Rect2, get_area, varray());
- ADDFUNC1(RECT2, BOOL, Rect2, intersects, RECT2, "b", varray());
- ADDFUNC1(RECT2, BOOL, Rect2, encloses, RECT2, "b", varray());
- ADDFUNC0(RECT2, BOOL, Rect2, has_no_area, varray());
- ADDFUNC1(RECT2, RECT2, Rect2, clip, RECT2, "b", varray());
- ADDFUNC1(RECT2, RECT2, Rect2, merge, RECT2, "b", varray());
- ADDFUNC1(RECT2, BOOL, Rect2, has_point, VECTOR2, "point", varray());
- ADDFUNC1(RECT2, RECT2, Rect2, grow, REAL, "by", varray());
- ADDFUNC2(RECT2, RECT2, Rect2, grow_margin, INT, "margin", REAL, "by", varray());
- ADDFUNC4(RECT2, RECT2, Rect2, grow_individual, REAL, "left", REAL, "top", REAL, "right", REAL, " bottom", varray());
- ADDFUNC1(RECT2, RECT2, Rect2, expand, VECTOR2, "to", varray());
-
- ADDFUNC0(VECTOR3, INT, Vector3, min_axis, varray());
- ADDFUNC0(VECTOR3, INT, Vector3, max_axis, varray());
- ADDFUNC0(VECTOR3, REAL, Vector3, length, varray());
- ADDFUNC0(VECTOR3, REAL, Vector3, length_squared, varray());
- ADDFUNC0(VECTOR3, BOOL, Vector3, is_normalized, varray());
- ADDFUNC0(VECTOR3, VECTOR3, Vector3, normalized, varray());
- ADDFUNC0(VECTOR3, VECTOR3, Vector3, inverse, varray());
- ADDFUNC1(VECTOR3, VECTOR3, Vector3, snapped, REAL, "by", varray());
- ADDFUNC2(VECTOR3, VECTOR3, Vector3, rotated, VECTOR3, "axis", REAL, "phi", varray());
- ADDFUNC2(VECTOR3, VECTOR3, Vector3, linear_interpolate, VECTOR3, "b", REAL, "t", varray());
- ADDFUNC4(VECTOR3, VECTOR3, Vector3, cubic_interpolate, VECTOR3, "b", VECTOR3, "pre_a", VECTOR3, "post_b", REAL, "t", varray());
- ADDFUNC1(VECTOR3, REAL, Vector3, dot, VECTOR3, "b", varray());
- ADDFUNC1(VECTOR3, VECTOR3, Vector3, cross, VECTOR3, "b", varray());
- ADDFUNC1(VECTOR3, BASIS, Vector3, outer, VECTOR3, "b", varray());
- ADDFUNC0(VECTOR3, BASIS, Vector3, to_diagonal_matrix, varray());
- ADDFUNC0(VECTOR3, VECTOR3, Vector3, abs, varray());
- ADDFUNC0(VECTOR3, VECTOR3, Vector3, floor, varray());
- ADDFUNC0(VECTOR3, VECTOR3, Vector3, ceil, varray());
- ADDFUNC1(VECTOR3, REAL, Vector3, distance_to, VECTOR3, "b", varray());
- ADDFUNC1(VECTOR3, REAL, Vector3, distance_squared_to, VECTOR3, "b", varray());
- ADDFUNC1(VECTOR3, REAL, Vector3, angle_to, VECTOR3, "to", varray());
- ADDFUNC1(VECTOR3, VECTOR3, Vector3, slide, VECTOR3, "n", varray());
- ADDFUNC1(VECTOR3, VECTOR3, Vector3, bounce, VECTOR3, "n", varray());
- ADDFUNC1(VECTOR3, VECTOR3, Vector3, reflect, VECTOR3, "n", varray());
-
- ADDFUNC0(PLANE, PLANE, Plane, normalized, varray());
- ADDFUNC0(PLANE, VECTOR3, Plane, center, varray());
- ADDFUNC0(PLANE, VECTOR3, Plane, get_any_point, varray());
- ADDFUNC1(PLANE, BOOL, Plane, is_point_over, VECTOR3, "point", varray());
- ADDFUNC1(PLANE, REAL, Plane, distance_to, VECTOR3, "point", varray());
- ADDFUNC2(PLANE, BOOL, Plane, has_point, VECTOR3, "point", REAL, "epsilon", varray(CMP_EPSILON));
- ADDFUNC1(PLANE, VECTOR3, Plane, project, VECTOR3, "point", varray());
- ADDFUNC2(PLANE, VECTOR3, Plane, intersect_3, PLANE, "b", PLANE, "c", varray());
- ADDFUNC2(PLANE, VECTOR3, Plane, intersects_ray, VECTOR3, "from", VECTOR3, "dir", varray());
- ADDFUNC2(PLANE, VECTOR3, Plane, intersects_segment, VECTOR3, "begin", VECTOR3, "end", varray());
-
- ADDFUNC0(QUAT, REAL, Quat, length, varray());
- ADDFUNC0(QUAT, REAL, Quat, length_squared, varray());
- ADDFUNC0(QUAT, QUAT, Quat, normalized, varray());
- ADDFUNC0(QUAT, BOOL, Quat, is_normalized, varray());
- ADDFUNC0(QUAT, QUAT, Quat, inverse, varray());
- ADDFUNC1(QUAT, REAL, Quat, dot, QUAT, "b", varray());
- ADDFUNC1(QUAT, VECTOR3, Quat, xform, VECTOR3, "v", varray());
- ADDFUNC2(QUAT, QUAT, Quat, slerp, QUAT, "b", REAL, "t", varray());
- ADDFUNC2(QUAT, QUAT, Quat, slerpni, QUAT, "b", REAL, "t", varray());
- ADDFUNC4(QUAT, QUAT, Quat, cubic_slerp, QUAT, "b", QUAT, "pre_a", QUAT, "post_b", REAL, "t", varray());
-
- ADDFUNC0(COLOR, INT, Color, to_rgba32, varray());
- ADDFUNC0(COLOR, INT, Color, to_argb32, varray());
- ADDFUNC0(COLOR, REAL, Color, gray, varray());
- ADDFUNC0(COLOR, COLOR, Color, inverted, varray());
- ADDFUNC0(COLOR, COLOR, Color, contrasted, varray());
- ADDFUNC2(COLOR, COLOR, Color, linear_interpolate, COLOR, "b", REAL, "t", varray());
- ADDFUNC1(COLOR, COLOR, Color, blend, COLOR, "over", varray());
- ADDFUNC1(COLOR, STRING, Color, to_html, BOOL, "with_alpha", varray(true));
-
- ADDFUNC0(_RID, INT, RID, get_id, varray());
-
- ADDFUNC0(NODE_PATH, BOOL, NodePath, is_absolute, varray());
- ADDFUNC0(NODE_PATH, INT, NodePath, get_name_count, varray());
- ADDFUNC1(NODE_PATH, STRING, NodePath, get_name, INT, "idx", varray());
- ADDFUNC0(NODE_PATH, INT, NodePath, get_subname_count, varray());
- ADDFUNC1(NODE_PATH, STRING, NodePath, get_subname, INT, "idx", varray());
- ADDFUNC0(NODE_PATH, STRING, NodePath, get_property, varray());
- ADDFUNC0(NODE_PATH, BOOL, NodePath, is_empty, varray());
-
- ADDFUNC0(DICTIONARY, INT, Dictionary, size, varray());
- ADDFUNC0(DICTIONARY, BOOL, Dictionary, empty, varray());
+ ADDFUNC0R(STRING, INT, String, hash, varray());
+ ADDFUNC0R(STRING, STRING, String, md5_text, varray());
+ ADDFUNC0R(STRING, STRING, String, sha256_text, varray());
+ ADDFUNC0R(STRING, POOL_BYTE_ARRAY, String, md5_buffer, varray());
+ ADDFUNC0R(STRING, POOL_BYTE_ARRAY, String, sha256_buffer, varray());
+ ADDFUNC0R(STRING, BOOL, String, empty, varray());
+ ADDFUNC0R(STRING, BOOL, String, is_abs_path, varray());
+ ADDFUNC0R(STRING, BOOL, String, is_rel_path, varray());
+ ADDFUNC0R(STRING, STRING, String, get_base_dir, varray());
+ ADDFUNC0R(STRING, STRING, String, get_file, varray());
+ ADDFUNC0R(STRING, STRING, String, xml_escape, varray());
+ ADDFUNC0R(STRING, STRING, String, xml_unescape, varray());
+ ADDFUNC0R(STRING, STRING, String, c_escape, varray());
+ ADDFUNC0R(STRING, STRING, String, c_unescape, varray());
+ ADDFUNC0R(STRING, STRING, String, json_escape, varray());
+ ADDFUNC0R(STRING, STRING, String, percent_encode, varray());
+ ADDFUNC0R(STRING, STRING, String, percent_decode, varray());
+ ADDFUNC0R(STRING, BOOL, String, is_valid_identifier, varray());
+ ADDFUNC0R(STRING, BOOL, String, is_valid_integer, varray());
+ ADDFUNC0R(STRING, BOOL, String, is_valid_float, varray());
+ ADDFUNC0R(STRING, BOOL, String, is_valid_html_color, varray());
+ ADDFUNC0R(STRING, BOOL, String, is_valid_ip_address, varray());
+ ADDFUNC0R(STRING, INT, String, to_int, varray());
+ ADDFUNC0R(STRING, REAL, String, to_float, varray());
+ ADDFUNC0R(STRING, INT, String, hex_to_int, varray());
+ ADDFUNC1R(STRING, STRING, String, pad_decimals, INT, "digits", varray());
+ ADDFUNC1R(STRING, STRING, String, pad_zeros, INT, "digits", varray());
+
+ ADDFUNC0R(STRING, POOL_BYTE_ARRAY, String, to_ascii, varray());
+ ADDFUNC0R(STRING, POOL_BYTE_ARRAY, String, to_utf8, varray());
+
+ ADDFUNC0R(VECTOR2, VECTOR2, Vector2, normalized, varray());
+ ADDFUNC0R(VECTOR2, REAL, Vector2, length, varray());
+ ADDFUNC0R(VECTOR2, REAL, Vector2, angle, varray());
+ ADDFUNC0R(VECTOR2, REAL, Vector2, length_squared, varray());
+ ADDFUNC0R(VECTOR2, BOOL, Vector2, is_normalized, varray());
+ ADDFUNC1R(VECTOR2, REAL, Vector2, distance_to, VECTOR2, "to", varray());
+ ADDFUNC1R(VECTOR2, REAL, Vector2, distance_squared_to, VECTOR2, "to", varray());
+ ADDFUNC1R(VECTOR2, REAL, Vector2, angle_to, VECTOR2, "to", varray());
+ ADDFUNC1R(VECTOR2, REAL, Vector2, angle_to_point, VECTOR2, "to", varray());
+ ADDFUNC2R(VECTOR2, VECTOR2, Vector2, linear_interpolate, VECTOR2, "b", REAL, "t", varray());
+ ADDFUNC4R(VECTOR2, VECTOR2, Vector2, cubic_interpolate, VECTOR2, "b", VECTOR2, "pre_a", VECTOR2, "post_b", REAL, "t", varray());
+ ADDFUNC1R(VECTOR2, VECTOR2, Vector2, rotated, REAL, "phi", varray());
+ ADDFUNC0R(VECTOR2, VECTOR2, Vector2, tangent, varray());
+ ADDFUNC0R(VECTOR2, VECTOR2, Vector2, floor, varray());
+ ADDFUNC1R(VECTOR2, VECTOR2, Vector2, snapped, VECTOR2, "by", varray());
+ ADDFUNC0R(VECTOR2, REAL, Vector2, aspect, varray());
+ ADDFUNC1R(VECTOR2, REAL, Vector2, dot, VECTOR2, "with", varray());
+ ADDFUNC1R(VECTOR2, VECTOR2, Vector2, slide, VECTOR2, "n", varray());
+ ADDFUNC1R(VECTOR2, VECTOR2, Vector2, bounce, VECTOR2, "n", varray());
+ ADDFUNC1R(VECTOR2, VECTOR2, Vector2, reflect, VECTOR2, "n", varray());
+ //ADDFUNC1R(VECTOR2,REAL,Vector2,cross,VECTOR2,"with",varray());
+ ADDFUNC0R(VECTOR2, VECTOR2, Vector2, abs, varray());
+ ADDFUNC1R(VECTOR2, VECTOR2, Vector2, clamped, REAL, "length", varray());
+
+ ADDFUNC0R(RECT2, REAL, Rect2, get_area, varray());
+ ADDFUNC1R(RECT2, BOOL, Rect2, intersects, RECT2, "b", varray());
+ ADDFUNC1R(RECT2, BOOL, Rect2, encloses, RECT2, "b", varray());
+ ADDFUNC0R(RECT2, BOOL, Rect2, has_no_area, varray());
+ ADDFUNC1R(RECT2, RECT2, Rect2, clip, RECT2, "b", varray());
+ ADDFUNC1R(RECT2, RECT2, Rect2, merge, RECT2, "b", varray());
+ ADDFUNC1R(RECT2, BOOL, Rect2, has_point, VECTOR2, "point", varray());
+ ADDFUNC1R(RECT2, RECT2, Rect2, grow, REAL, "by", varray());
+ ADDFUNC2R(RECT2, RECT2, Rect2, grow_margin, INT, "margin", REAL, "by", varray());
+ ADDFUNC4R(RECT2, RECT2, Rect2, grow_individual, REAL, "left", REAL, "top", REAL, "right", REAL, " bottom", varray());
+ ADDFUNC1R(RECT2, RECT2, Rect2, expand, VECTOR2, "to", varray());
+
+ ADDFUNC0R(VECTOR3, INT, Vector3, min_axis, varray());
+ ADDFUNC0R(VECTOR3, INT, Vector3, max_axis, varray());
+ ADDFUNC0R(VECTOR3, REAL, Vector3, length, varray());
+ ADDFUNC0R(VECTOR3, REAL, Vector3, length_squared, varray());
+ ADDFUNC0R(VECTOR3, BOOL, Vector3, is_normalized, varray());
+ ADDFUNC0R(VECTOR3, VECTOR3, Vector3, normalized, varray());
+ ADDFUNC0R(VECTOR3, VECTOR3, Vector3, inverse, varray());
+ ADDFUNC1R(VECTOR3, VECTOR3, Vector3, snapped, REAL, "by", varray());
+ ADDFUNC2R(VECTOR3, VECTOR3, Vector3, rotated, VECTOR3, "axis", REAL, "phi", varray());
+ ADDFUNC2R(VECTOR3, VECTOR3, Vector3, linear_interpolate, VECTOR3, "b", REAL, "t", varray());
+ ADDFUNC4R(VECTOR3, VECTOR3, Vector3, cubic_interpolate, VECTOR3, "b", VECTOR3, "pre_a", VECTOR3, "post_b", REAL, "t", varray());
+ ADDFUNC1R(VECTOR3, REAL, Vector3, dot, VECTOR3, "b", varray());
+ ADDFUNC1R(VECTOR3, VECTOR3, Vector3, cross, VECTOR3, "b", varray());
+ ADDFUNC1R(VECTOR3, BASIS, Vector3, outer, VECTOR3, "b", varray());
+ ADDFUNC0R(VECTOR3, BASIS, Vector3, to_diagonal_matrix, varray());
+ ADDFUNC0R(VECTOR3, VECTOR3, Vector3, abs, varray());
+ ADDFUNC0R(VECTOR3, VECTOR3, Vector3, floor, varray());
+ ADDFUNC0R(VECTOR3, VECTOR3, Vector3, ceil, varray());
+ ADDFUNC1R(VECTOR3, REAL, Vector3, distance_to, VECTOR3, "b", varray());
+ ADDFUNC1R(VECTOR3, REAL, Vector3, distance_squared_to, VECTOR3, "b", varray());
+ ADDFUNC1R(VECTOR3, REAL, Vector3, angle_to, VECTOR3, "to", varray());
+ ADDFUNC1R(VECTOR3, VECTOR3, Vector3, slide, VECTOR3, "n", varray());
+ ADDFUNC1R(VECTOR3, VECTOR3, Vector3, bounce, VECTOR3, "n", varray());
+ ADDFUNC1R(VECTOR3, VECTOR3, Vector3, reflect, VECTOR3, "n", varray());
+
+ ADDFUNC0R(PLANE, PLANE, Plane, normalized, varray());
+ ADDFUNC0R(PLANE, VECTOR3, Plane, center, varray());
+ ADDFUNC0R(PLANE, VECTOR3, Plane, get_any_point, varray());
+ ADDFUNC1R(PLANE, BOOL, Plane, is_point_over, VECTOR3, "point", varray());
+ ADDFUNC1R(PLANE, REAL, Plane, distance_to, VECTOR3, "point", varray());
+ ADDFUNC2R(PLANE, BOOL, Plane, has_point, VECTOR3, "point", REAL, "epsilon", varray(CMP_EPSILON));
+ ADDFUNC1R(PLANE, VECTOR3, Plane, project, VECTOR3, "point", varray());
+ ADDFUNC2R(PLANE, VECTOR3, Plane, intersect_3, PLANE, "b", PLANE, "c", varray());
+ ADDFUNC2R(PLANE, VECTOR3, Plane, intersects_ray, VECTOR3, "from", VECTOR3, "dir", varray());
+ ADDFUNC2R(PLANE, VECTOR3, Plane, intersects_segment, VECTOR3, "begin", VECTOR3, "end", varray());
+
+ ADDFUNC0R(QUAT, REAL, Quat, length, varray());
+ ADDFUNC0R(QUAT, REAL, Quat, length_squared, varray());
+ ADDFUNC0R(QUAT, QUAT, Quat, normalized, varray());
+ ADDFUNC0R(QUAT, BOOL, Quat, is_normalized, varray());
+ ADDFUNC0R(QUAT, QUAT, Quat, inverse, varray());
+ ADDFUNC1R(QUAT, REAL, Quat, dot, QUAT, "b", varray());
+ ADDFUNC1R(QUAT, VECTOR3, Quat, xform, VECTOR3, "v", varray());
+ ADDFUNC2R(QUAT, QUAT, Quat, slerp, QUAT, "b", REAL, "t", varray());
+ ADDFUNC2R(QUAT, QUAT, Quat, slerpni, QUAT, "b", REAL, "t", varray());
+ ADDFUNC4R(QUAT, QUAT, Quat, cubic_slerp, QUAT, "b", QUAT, "pre_a", QUAT, "post_b", REAL, "t", varray());
+
+ ADDFUNC0R(COLOR, INT, Color, to_rgba32, varray());
+ ADDFUNC0R(COLOR, INT, Color, to_argb32, varray());
+ ADDFUNC0R(COLOR, REAL, Color, gray, varray());
+ ADDFUNC0R(COLOR, COLOR, Color, inverted, varray());
+ ADDFUNC0R(COLOR, COLOR, Color, contrasted, varray());
+ ADDFUNC2R(COLOR, COLOR, Color, linear_interpolate, COLOR, "b", REAL, "t", varray());
+ ADDFUNC1R(COLOR, COLOR, Color, blend, COLOR, "over", varray());
+ ADDFUNC1R(COLOR, STRING, Color, to_html, BOOL, "with_alpha", varray(true));
+
+ ADDFUNC0R(_RID, INT, RID, get_id, varray());
+
+ ADDFUNC0R(NODE_PATH, BOOL, NodePath, is_absolute, varray());
+ ADDFUNC0R(NODE_PATH, INT, NodePath, get_name_count, varray());
+ ADDFUNC1R(NODE_PATH, STRING, NodePath, get_name, INT, "idx", varray());
+ ADDFUNC0R(NODE_PATH, INT, NodePath, get_subname_count, varray());
+ ADDFUNC1R(NODE_PATH, STRING, NodePath, get_subname, INT, "idx", varray());
+ ADDFUNC0R(NODE_PATH, STRING, NodePath, get_property, varray());
+ ADDFUNC0R(NODE_PATH, BOOL, NodePath, is_empty, varray());
+
+ ADDFUNC0R(DICTIONARY, INT, Dictionary, size, varray());
+ ADDFUNC0R(DICTIONARY, BOOL, Dictionary, empty, varray());
ADDFUNC0NC(DICTIONARY, NIL, Dictionary, clear, varray());
- ADDFUNC1(DICTIONARY, BOOL, Dictionary, has, NIL, "key", varray());
- ADDFUNC1(DICTIONARY, BOOL, Dictionary, has_all, ARRAY, "keys", varray());
+ ADDFUNC1R(DICTIONARY, BOOL, Dictionary, has, NIL, "key", varray());
+ ADDFUNC1R(DICTIONARY, BOOL, Dictionary, has_all, ARRAY, "keys", varray());
ADDFUNC1(DICTIONARY, NIL, Dictionary, erase, NIL, "key", varray());
- ADDFUNC0(DICTIONARY, INT, Dictionary, hash, varray());
- ADDFUNC0(DICTIONARY, ARRAY, Dictionary, keys, varray());
- ADDFUNC0(DICTIONARY, ARRAY, Dictionary, values, varray());
+ ADDFUNC0R(DICTIONARY, INT, Dictionary, hash, varray());
+ ADDFUNC0R(DICTIONARY, ARRAY, Dictionary, keys, varray());
+ ADDFUNC0R(DICTIONARY, ARRAY, Dictionary, values, varray());
- ADDFUNC0(ARRAY, INT, Array, size, varray());
- ADDFUNC0(ARRAY, BOOL, Array, empty, varray());
+ ADDFUNC0R(ARRAY, INT, Array, size, varray());
+ ADDFUNC0R(ARRAY, BOOL, Array, empty, varray());
ADDFUNC0NC(ARRAY, NIL, Array, clear, varray());
- ADDFUNC0(ARRAY, INT, Array, hash, varray());
+ ADDFUNC0R(ARRAY, INT, Array, hash, varray());
ADDFUNC1NC(ARRAY, NIL, Array, push_back, NIL, "value", varray());
ADDFUNC1NC(ARRAY, NIL, Array, push_front, NIL, "value", varray());
ADDFUNC1NC(ARRAY, NIL, Array, append, NIL, "value", varray());
@@ -1592,165 +1612,160 @@ void register_variant_methods() {
ADDFUNC2NC(ARRAY, NIL, Array, insert, INT, "position", NIL, "value", varray());
ADDFUNC1NC(ARRAY, NIL, Array, remove, INT, "position", varray());
ADDFUNC1NC(ARRAY, NIL, Array, erase, NIL, "value", varray());
- ADDFUNC0(ARRAY, NIL, Array, front, varray());
- ADDFUNC0(ARRAY, NIL, Array, back, varray());
- ADDFUNC2(ARRAY, INT, Array, find, NIL, "what", INT, "from", varray(0));
- ADDFUNC2(ARRAY, INT, Array, rfind, NIL, "what", INT, "from", varray(-1));
- ADDFUNC1(ARRAY, INT, Array, find_last, NIL, "value", varray());
- ADDFUNC1(ARRAY, INT, Array, count, NIL, "value", varray());
- ADDFUNC1(ARRAY, BOOL, Array, has, NIL, "value", varray());
- ADDFUNC0NC(ARRAY, NIL, Array, pop_back, varray());
- ADDFUNC0NC(ARRAY, NIL, Array, pop_front, varray());
+ ADDFUNC0R(ARRAY, NIL, Array, front, varray());
+ ADDFUNC0R(ARRAY, NIL, Array, back, varray());
+ ADDFUNC2R(ARRAY, INT, Array, find, NIL, "what", INT, "from", varray(0));
+ ADDFUNC2R(ARRAY, INT, Array, rfind, NIL, "what", INT, "from", varray(-1));
+ ADDFUNC1R(ARRAY, INT, Array, find_last, NIL, "value", varray());
+ ADDFUNC1R(ARRAY, INT, Array, count, NIL, "value", varray());
+ ADDFUNC1R(ARRAY, BOOL, Array, has, NIL, "value", varray());
+ ADDFUNC0RNC(ARRAY, NIL, Array, pop_back, varray());
+ ADDFUNC0RNC(ARRAY, NIL, Array, pop_front, varray());
ADDFUNC0NC(ARRAY, NIL, Array, sort, varray());
ADDFUNC2NC(ARRAY, NIL, Array, sort_custom, OBJECT, "obj", STRING, "func", varray());
ADDFUNC0NC(ARRAY, NIL, Array, invert, varray());
- ADDFUNC0NC(ARRAY, ARRAY, Array, duplicate, varray());
+ ADDFUNC0RNC(ARRAY, ARRAY, Array, duplicate, varray());
- ADDFUNC0(POOL_BYTE_ARRAY, INT, PoolByteArray, size, varray());
+ ADDFUNC0R(POOL_BYTE_ARRAY, INT, PoolByteArray, size, varray());
ADDFUNC2(POOL_BYTE_ARRAY, NIL, PoolByteArray, set, INT, "idx", INT, "byte", varray());
ADDFUNC1(POOL_BYTE_ARRAY, NIL, PoolByteArray, push_back, INT, "byte", varray());
ADDFUNC1(POOL_BYTE_ARRAY, NIL, PoolByteArray, append, INT, "byte", varray());
ADDFUNC1(POOL_BYTE_ARRAY, NIL, PoolByteArray, append_array, POOL_BYTE_ARRAY, "array", varray());
ADDFUNC1(POOL_BYTE_ARRAY, NIL, PoolByteArray, remove, INT, "idx", varray());
- ADDFUNC2(POOL_BYTE_ARRAY, INT, PoolByteArray, insert, INT, "idx", INT, "byte", varray());
+ ADDFUNC2R(POOL_BYTE_ARRAY, INT, PoolByteArray, insert, INT, "idx", INT, "byte", varray());
ADDFUNC1(POOL_BYTE_ARRAY, NIL, PoolByteArray, resize, INT, "idx", varray());
ADDFUNC0(POOL_BYTE_ARRAY, NIL, PoolByteArray, invert, varray());
- ADDFUNC2(POOL_BYTE_ARRAY, POOL_BYTE_ARRAY, PoolByteArray, subarray, INT, "from", INT, "to", varray());
+ ADDFUNC2R(POOL_BYTE_ARRAY, POOL_BYTE_ARRAY, PoolByteArray, subarray, INT, "from", INT, "to", varray());
- ADDFUNC0(POOL_BYTE_ARRAY, STRING, PoolByteArray, get_string_from_ascii, varray());
- ADDFUNC0(POOL_BYTE_ARRAY, STRING, PoolByteArray, get_string_from_utf8, varray());
- ADDFUNC1(POOL_BYTE_ARRAY, POOL_BYTE_ARRAY, PoolByteArray, compress, INT, "compression_mode", varray(0));
- ADDFUNC2(POOL_BYTE_ARRAY, POOL_BYTE_ARRAY, PoolByteArray, decompress, INT, "buffer_size", INT, "compression_mode", varray(0));
+ ADDFUNC0R(POOL_BYTE_ARRAY, STRING, PoolByteArray, get_string_from_ascii, varray());
+ ADDFUNC0R(POOL_BYTE_ARRAY, STRING, PoolByteArray, get_string_from_utf8, varray());
+ ADDFUNC1R(POOL_BYTE_ARRAY, POOL_BYTE_ARRAY, PoolByteArray, compress, INT, "compression_mode", varray(0));
+ ADDFUNC2R(POOL_BYTE_ARRAY, POOL_BYTE_ARRAY, PoolByteArray, decompress, INT, "buffer_size", INT, "compression_mode", varray(0));
- ADDFUNC0(POOL_INT_ARRAY, INT, PoolIntArray, size, varray());
+ ADDFUNC0R(POOL_INT_ARRAY, INT, PoolIntArray, size, varray());
ADDFUNC2(POOL_INT_ARRAY, NIL, PoolIntArray, set, INT, "idx", INT, "integer", varray());
ADDFUNC1(POOL_INT_ARRAY, NIL, PoolIntArray, push_back, INT, "integer", varray());
ADDFUNC1(POOL_INT_ARRAY, NIL, PoolIntArray, append, INT, "integer", varray());
ADDFUNC1(POOL_INT_ARRAY, NIL, PoolIntArray, append_array, POOL_INT_ARRAY, "array", varray());
ADDFUNC1(POOL_INT_ARRAY, NIL, PoolIntArray, remove, INT, "idx", varray());
- ADDFUNC2(POOL_INT_ARRAY, INT, PoolIntArray, insert, INT, "idx", INT, "integer", varray());
+ ADDFUNC2R(POOL_INT_ARRAY, INT, PoolIntArray, insert, INT, "idx", INT, "integer", varray());
ADDFUNC1(POOL_INT_ARRAY, NIL, PoolIntArray, resize, INT, "idx", varray());
ADDFUNC0(POOL_INT_ARRAY, NIL, PoolIntArray, invert, varray());
- ADDFUNC0(POOL_REAL_ARRAY, INT, PoolRealArray, size, varray());
+ ADDFUNC0R(POOL_REAL_ARRAY, INT, PoolRealArray, size, varray());
ADDFUNC2(POOL_REAL_ARRAY, NIL, PoolRealArray, set, INT, "idx", REAL, "value", varray());
ADDFUNC1(POOL_REAL_ARRAY, NIL, PoolRealArray, push_back, REAL, "value", varray());
ADDFUNC1(POOL_REAL_ARRAY, NIL, PoolRealArray, append, REAL, "value", varray());
ADDFUNC1(POOL_REAL_ARRAY, NIL, PoolRealArray, append_array, POOL_REAL_ARRAY, "array", varray());
ADDFUNC1(POOL_REAL_ARRAY, NIL, PoolRealArray, remove, INT, "idx", varray());
- ADDFUNC2(POOL_REAL_ARRAY, INT, PoolRealArray, insert, INT, "idx", REAL, "value", varray());
+ ADDFUNC2R(POOL_REAL_ARRAY, INT, PoolRealArray, insert, INT, "idx", REAL, "value", varray());
ADDFUNC1(POOL_REAL_ARRAY, NIL, PoolRealArray, resize, INT, "idx", varray());
ADDFUNC0(POOL_REAL_ARRAY, NIL, PoolRealArray, invert, varray());
- ADDFUNC0(POOL_STRING_ARRAY, INT, PoolStringArray, size, varray());
+ ADDFUNC0R(POOL_STRING_ARRAY, INT, PoolStringArray, size, varray());
ADDFUNC2(POOL_STRING_ARRAY, NIL, PoolStringArray, set, INT, "idx", STRING, "string", varray());
ADDFUNC1(POOL_STRING_ARRAY, NIL, PoolStringArray, push_back, STRING, "string", varray());
ADDFUNC1(POOL_STRING_ARRAY, NIL, PoolStringArray, append, STRING, "string", varray());
ADDFUNC1(POOL_STRING_ARRAY, NIL, PoolStringArray, append_array, POOL_STRING_ARRAY, "array", varray());
ADDFUNC1(POOL_STRING_ARRAY, NIL, PoolStringArray, remove, INT, "idx", varray());
- ADDFUNC2(POOL_STRING_ARRAY, INT, PoolStringArray, insert, INT, "idx", STRING, "string", varray());
+ ADDFUNC2R(POOL_STRING_ARRAY, INT, PoolStringArray, insert, INT, "idx", STRING, "string", varray());
ADDFUNC1(POOL_STRING_ARRAY, NIL, PoolStringArray, resize, INT, "idx", varray());
ADDFUNC0(POOL_STRING_ARRAY, NIL, PoolStringArray, invert, varray());
ADDFUNC1(POOL_STRING_ARRAY, STRING, PoolStringArray, join, STRING, "delimiter", varray());
- ADDFUNC0(POOL_VECTOR2_ARRAY, INT, PoolVector2Array, size, varray());
+ ADDFUNC0R(POOL_VECTOR2_ARRAY, INT, PoolVector2Array, size, varray());
ADDFUNC2(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, set, INT, "idx", VECTOR2, "vector2", varray());
ADDFUNC1(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, push_back, VECTOR2, "vector2", varray());
ADDFUNC1(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, append, VECTOR2, "vector2", varray());
ADDFUNC1(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, append_array, POOL_VECTOR2_ARRAY, "array", varray());
ADDFUNC1(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, remove, INT, "idx", varray());
- ADDFUNC2(POOL_VECTOR2_ARRAY, INT, PoolVector2Array, insert, INT, "idx", VECTOR2, "vector2", varray());
+ ADDFUNC2R(POOL_VECTOR2_ARRAY, INT, PoolVector2Array, insert, INT, "idx", VECTOR2, "vector2", varray());
ADDFUNC1(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, resize, INT, "idx", varray());
ADDFUNC0(POOL_VECTOR2_ARRAY, NIL, PoolVector2Array, invert, varray());
- ADDFUNC0(POOL_VECTOR3_ARRAY, INT, PoolVector3Array, size, varray());
+ ADDFUNC0R(POOL_VECTOR3_ARRAY, INT, PoolVector3Array, size, varray());
ADDFUNC2(POOL_VECTOR3_ARRAY, NIL, PoolVector3Array, set, INT, "idx", VECTOR3, "vector3", varray());
ADDFUNC1(POOL_VECTOR3_ARRAY, NIL, PoolVector3Array, push_back, VECTOR3, "vector3", varray());
ADDFUNC1(POOL_VECTOR3_ARRAY, NIL, PoolVector3Array, append, VECTOR3, "vector3", varray());
ADDFUNC1(POOL_VECTOR3_ARRAY, NIL, PoolVector3Array, append_array, POOL_VECTOR3_ARRAY, "array", varray());
ADDFUNC1(POOL_VECTOR3_ARRAY, NIL, PoolVector3Array, remove, INT, "idx", varray());
- ADDFUNC2(POOL_VECTOR3_ARRAY, INT, PoolVector3Array, insert, INT, "idx", VECTOR3, "vector3", varray());
+ ADDFUNC2R(POOL_VECTOR3_ARRAY, INT, PoolVector3Array, insert, INT, "idx", VECTOR3, "vector3", varray());
ADDFUNC1(POOL_VECTOR3_ARRAY, NIL, PoolVector3Array, resize, INT, "idx", varray());
ADDFUNC0(POOL_VECTOR3_ARRAY, NIL, PoolVector3Array, invert, varray());
- ADDFUNC0(POOL_COLOR_ARRAY, INT, PoolColorArray, size, varray());
+ ADDFUNC0R(POOL_COLOR_ARRAY, INT, PoolColorArray, size, varray());
ADDFUNC2(POOL_COLOR_ARRAY, NIL, PoolColorArray, set, INT, "idx", COLOR, "color", varray());
ADDFUNC1(POOL_COLOR_ARRAY, NIL, PoolColorArray, push_back, COLOR, "color", varray());
ADDFUNC1(POOL_COLOR_ARRAY, NIL, PoolColorArray, append, COLOR, "color", varray());
ADDFUNC1(POOL_COLOR_ARRAY, NIL, PoolColorArray, append_array, POOL_COLOR_ARRAY, "array", varray());
ADDFUNC1(POOL_COLOR_ARRAY, NIL, PoolColorArray, remove, INT, "idx", varray());
- ADDFUNC2(POOL_COLOR_ARRAY, INT, PoolColorArray, insert, INT, "idx", COLOR, "color", varray());
+ ADDFUNC2R(POOL_COLOR_ARRAY, INT, PoolColorArray, insert, INT, "idx", COLOR, "color", varray());
ADDFUNC1(POOL_COLOR_ARRAY, NIL, PoolColorArray, resize, INT, "idx", varray());
ADDFUNC0(POOL_COLOR_ARRAY, NIL, PoolColorArray, invert, varray());
//pointerbased
- ADDFUNC0(RECT3, REAL, Rect3, get_area, varray());
- ADDFUNC0(RECT3, BOOL, Rect3, has_no_area, varray());
- ADDFUNC0(RECT3, BOOL, Rect3, has_no_surface, varray());
- ADDFUNC1(RECT3, BOOL, Rect3, intersects, RECT3, "with", varray());
- ADDFUNC1(RECT3, BOOL, Rect3, encloses, RECT3, "with", varray());
- ADDFUNC1(RECT3, RECT3, Rect3, merge, RECT3, "with", varray());
- ADDFUNC1(RECT3, RECT3, Rect3, intersection, RECT3, "with", varray());
- ADDFUNC1(RECT3, BOOL, Rect3, intersects_plane, PLANE, "plane", varray());
- ADDFUNC2(RECT3, BOOL, Rect3, intersects_segment, VECTOR3, "from", VECTOR3, "to", varray());
- ADDFUNC1(RECT3, BOOL, Rect3, has_point, VECTOR3, "point", varray());
- ADDFUNC1(RECT3, VECTOR3, Rect3, get_support, VECTOR3, "dir", varray());
- ADDFUNC0(RECT3, VECTOR3, Rect3, get_longest_axis, varray());
- ADDFUNC0(RECT3, INT, Rect3, get_longest_axis_index, varray());
- ADDFUNC0(RECT3, REAL, Rect3, get_longest_axis_size, varray());
- ADDFUNC0(RECT3, VECTOR3, Rect3, get_shortest_axis, varray());
- ADDFUNC0(RECT3, INT, Rect3, get_shortest_axis_index, varray());
- ADDFUNC0(RECT3, REAL, Rect3, get_shortest_axis_size, varray());
- ADDFUNC1(RECT3, RECT3, Rect3, expand, VECTOR3, "to_point", varray());
- ADDFUNC1(RECT3, RECT3, Rect3, grow, REAL, "by", varray());
- ADDFUNC1(RECT3, VECTOR3, Rect3, get_endpoint, INT, "idx", varray());
-
- ADDFUNC0(TRANSFORM2D, TRANSFORM2D, Transform2D, inverse, varray());
- ADDFUNC0(TRANSFORM2D, TRANSFORM2D, Transform2D, affine_inverse, varray());
- ADDFUNC0(TRANSFORM2D, REAL, Transform2D, get_rotation, varray());
- ADDFUNC0(TRANSFORM2D, VECTOR2, Transform2D, get_origin, varray());
- ADDFUNC0(TRANSFORM2D, VECTOR2, Transform2D, get_scale, varray());
- ADDFUNC0(TRANSFORM2D, TRANSFORM2D, Transform2D, orthonormalized, varray());
- ADDFUNC1(TRANSFORM2D, TRANSFORM2D, Transform2D, rotated, REAL, "phi", varray());
- ADDFUNC1(TRANSFORM2D, TRANSFORM2D, Transform2D, scaled, VECTOR2, "scale", varray());
- ADDFUNC1(TRANSFORM2D, TRANSFORM2D, Transform2D, translated, VECTOR2, "offset", varray());
- ADDFUNC1(TRANSFORM2D, TRANSFORM2D, Transform2D, xform, NIL, "v", varray());
- ADDFUNC1(TRANSFORM2D, TRANSFORM2D, Transform2D, xform_inv, NIL, "v", varray());
- ADDFUNC1(TRANSFORM2D, TRANSFORM2D, Transform2D, basis_xform, NIL, "v", varray());
- ADDFUNC1(TRANSFORM2D, TRANSFORM2D, Transform2D, basis_xform_inv, NIL, "v", varray());
- ADDFUNC2(TRANSFORM2D, TRANSFORM2D, Transform2D, interpolate_with, TRANSFORM2D, "transform", REAL, "weight", varray());
-
- ADDFUNC0(BASIS, BASIS, Basis, inverse, varray());
- ADDFUNC0(BASIS, BASIS, Basis, transposed, varray());
- ADDFUNC0(BASIS, BASIS, Basis, orthonormalized, varray());
- ADDFUNC0(BASIS, REAL, Basis, determinant, varray());
- ADDFUNC2(BASIS, BASIS, Basis, rotated, VECTOR3, "axis", REAL, "phi", varray());
- ADDFUNC1(BASIS, BASIS, Basis, scaled, VECTOR3, "scale", varray());
- ADDFUNC0(BASIS, VECTOR3, Basis, get_scale, varray());
- ADDFUNC0(BASIS, VECTOR3, Basis, get_euler, varray());
- ADDFUNC1(BASIS, REAL, Basis, tdotx, VECTOR3, "with", varray());
- ADDFUNC1(BASIS, REAL, Basis, tdoty, VECTOR3, "with", varray());
- ADDFUNC1(BASIS, REAL, Basis, tdotz, VECTOR3, "with", varray());
- ADDFUNC1(BASIS, VECTOR3, Basis, xform, VECTOR3, "v", varray());
- ADDFUNC1(BASIS, VECTOR3, Basis, xform_inv, VECTOR3, "v", varray());
- ADDFUNC0(BASIS, INT, Basis, get_orthogonal_index, varray());
-
- ADDFUNC0(TRANSFORM, TRANSFORM, Transform, inverse, varray());
- ADDFUNC0(TRANSFORM, TRANSFORM, Transform, affine_inverse, varray());
- ADDFUNC0(TRANSFORM, TRANSFORM, Transform, orthonormalized, varray());
- ADDFUNC2(TRANSFORM, TRANSFORM, Transform, rotated, VECTOR3, "axis", REAL, "phi", varray());
- ADDFUNC1(TRANSFORM, TRANSFORM, Transform, scaled, VECTOR3, "scale", varray());
- ADDFUNC1(TRANSFORM, TRANSFORM, Transform, translated, VECTOR3, "ofs", varray());
- ADDFUNC2(TRANSFORM, TRANSFORM, Transform, looking_at, VECTOR3, "target", VECTOR3, "up", varray());
- ADDFUNC2(TRANSFORM, TRANSFORM, Transform, interpolate_with, TRANSFORM, "transform", REAL, "weight", varray());
- ADDFUNC1(TRANSFORM, NIL, Transform, xform, NIL, "v", varray());
- ADDFUNC1(TRANSFORM, NIL, Transform, xform_inv, NIL, "v", varray());
-
-#ifdef DEBUG_ENABLED
- _VariantCall::type_funcs[Variant::TRANSFORM].functions["xform"].returns = true;
- _VariantCall::type_funcs[Variant::TRANSFORM].functions["xform_inv"].returns = true;
-#endif
+ ADDFUNC0R(RECT3, REAL, Rect3, get_area, varray());
+ ADDFUNC0R(RECT3, BOOL, Rect3, has_no_area, varray());
+ ADDFUNC0R(RECT3, BOOL, Rect3, has_no_surface, varray());
+ ADDFUNC1R(RECT3, BOOL, Rect3, intersects, RECT3, "with", varray());
+ ADDFUNC1R(RECT3, BOOL, Rect3, encloses, RECT3, "with", varray());
+ ADDFUNC1R(RECT3, RECT3, Rect3, merge, RECT3, "with", varray());
+ ADDFUNC1R(RECT3, RECT3, Rect3, intersection, RECT3, "with", varray());
+ ADDFUNC1R(RECT3, BOOL, Rect3, intersects_plane, PLANE, "plane", varray());
+ ADDFUNC2R(RECT3, BOOL, Rect3, intersects_segment, VECTOR3, "from", VECTOR3, "to", varray());
+ ADDFUNC1R(RECT3, BOOL, Rect3, has_point, VECTOR3, "point", varray());
+ ADDFUNC1R(RECT3, VECTOR3, Rect3, get_support, VECTOR3, "dir", varray());
+ ADDFUNC0R(RECT3, VECTOR3, Rect3, get_longest_axis, varray());
+ ADDFUNC0R(RECT3, INT, Rect3, get_longest_axis_index, varray());
+ ADDFUNC0R(RECT3, REAL, Rect3, get_longest_axis_size, varray());
+ ADDFUNC0R(RECT3, VECTOR3, Rect3, get_shortest_axis, varray());
+ ADDFUNC0R(RECT3, INT, Rect3, get_shortest_axis_index, varray());
+ ADDFUNC0R(RECT3, REAL, Rect3, get_shortest_axis_size, varray());
+ ADDFUNC1R(RECT3, RECT3, Rect3, expand, VECTOR3, "to_point", varray());
+ ADDFUNC1R(RECT3, RECT3, Rect3, grow, REAL, "by", varray());
+ ADDFUNC1R(RECT3, VECTOR3, Rect3, get_endpoint, INT, "idx", varray());
+
+ ADDFUNC0R(TRANSFORM2D, TRANSFORM2D, Transform2D, inverse, varray());
+ ADDFUNC0R(TRANSFORM2D, TRANSFORM2D, Transform2D, affine_inverse, varray());
+ ADDFUNC0R(TRANSFORM2D, REAL, Transform2D, get_rotation, varray());
+ ADDFUNC0R(TRANSFORM2D, VECTOR2, Transform2D, get_origin, varray());
+ ADDFUNC0R(TRANSFORM2D, VECTOR2, Transform2D, get_scale, varray());
+ ADDFUNC0R(TRANSFORM2D, TRANSFORM2D, Transform2D, orthonormalized, varray());
+ ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, rotated, REAL, "phi", varray());
+ ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, scaled, VECTOR2, "scale", varray());
+ ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, translated, VECTOR2, "offset", varray());
+ ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, xform, NIL, "v", varray());
+ ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, xform_inv, NIL, "v", varray());
+ ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, basis_xform, NIL, "v", varray());
+ ADDFUNC1R(TRANSFORM2D, TRANSFORM2D, Transform2D, basis_xform_inv, NIL, "v", varray());
+ ADDFUNC2R(TRANSFORM2D, TRANSFORM2D, Transform2D, interpolate_with, TRANSFORM2D, "transform", REAL, "weight", varray());
+
+ ADDFUNC0R(BASIS, BASIS, Basis, inverse, varray());
+ ADDFUNC0R(BASIS, BASIS, Basis, transposed, varray());
+ ADDFUNC0R(BASIS, BASIS, Basis, orthonormalized, varray());
+ ADDFUNC0R(BASIS, REAL, Basis, determinant, varray());
+ ADDFUNC2R(BASIS, BASIS, Basis, rotated, VECTOR3, "axis", REAL, "phi", varray());
+ ADDFUNC1R(BASIS, BASIS, Basis, scaled, VECTOR3, "scale", varray());
+ ADDFUNC0R(BASIS, VECTOR3, Basis, get_scale, varray());
+ ADDFUNC0R(BASIS, VECTOR3, Basis, get_euler, varray());
+ ADDFUNC1R(BASIS, REAL, Basis, tdotx, VECTOR3, "with", varray());
+ ADDFUNC1R(BASIS, REAL, Basis, tdoty, VECTOR3, "with", varray());
+ ADDFUNC1R(BASIS, REAL, Basis, tdotz, VECTOR3, "with", varray());
+ ADDFUNC1R(BASIS, VECTOR3, Basis, xform, VECTOR3, "v", varray());
+ ADDFUNC1R(BASIS, VECTOR3, Basis, xform_inv, VECTOR3, "v", varray());
+ ADDFUNC0R(BASIS, INT, Basis, get_orthogonal_index, varray());
+
+ ADDFUNC0R(TRANSFORM, TRANSFORM, Transform, inverse, varray());
+ ADDFUNC0R(TRANSFORM, TRANSFORM, Transform, affine_inverse, varray());
+ ADDFUNC0R(TRANSFORM, TRANSFORM, Transform, orthonormalized, varray());
+ ADDFUNC2R(TRANSFORM, TRANSFORM, Transform, rotated, VECTOR3, "axis", REAL, "phi", varray());
+ ADDFUNC1R(TRANSFORM, TRANSFORM, Transform, scaled, VECTOR3, "scale", varray());
+ ADDFUNC1R(TRANSFORM, TRANSFORM, Transform, translated, VECTOR3, "ofs", varray());
+ ADDFUNC2R(TRANSFORM, TRANSFORM, Transform, looking_at, VECTOR3, "target", VECTOR3, "up", varray());
+ ADDFUNC2R(TRANSFORM, TRANSFORM, Transform, interpolate_with, TRANSFORM, "transform", REAL, "weight", varray());
+ ADDFUNC1R(TRANSFORM, NIL, Transform, xform, NIL, "v", varray());
+ ADDFUNC1R(TRANSFORM, NIL, Transform, xform_inv, NIL, "v", varray());
/* REGISTER CONSTRUCTORS */
diff --git a/doc/classes/@Global Scope.xml b/doc/classes/@Global Scope.xml
index 0d509e6e51..20f323bb4f 100644
--- a/doc/classes/@Global Scope.xml
+++ b/doc/classes/@Global Scope.xml
@@ -30,6 +30,7 @@
[Geometry] singleton
</member>
<member name="GodotSharp" type="GodotSharp" setter="" getter="">
+ [GodotSharp] singleton
</member>
<member name="IP" type="IP" setter="" getter="">
[IP] singleton
@@ -41,6 +42,7 @@
[InputMap] singleton
</member>
<member name="JSON" type="JSON" setter="" getter="">
+ [JSON] singleton
</member>
<member name="Marshalls" type="Reference" setter="" getter="">
[Marshalls] singleton
@@ -144,8 +146,10 @@
Printscreen Key
</constant>
<constant name="KEY_SYSREQ" value="16777227">
+ System Request Key
</constant>
<constant name="KEY_CLEAR" value="16777228">
+ Clear Key
</constant>
<constant name="KEY_HOME" value="16777229">
Home Key
@@ -178,6 +182,7 @@
Control Key
</constant>
<constant name="KEY_META" value="16777239">
+ Meta Key
</constant>
<constant name="KEY_ALT" value="16777240">
Alt Key
@@ -285,24 +290,28 @@
Number 9 on Numpad
</constant>
<constant name="KEY_SUPER_L" value="16777260">
- Super Left key (windows key)
+ Left Super Key (Windows Key)
</constant>
<constant name="KEY_SUPER_R" value="16777261">
- Super Left key (windows key)
+ Right Super Key (Windows Key)
</constant>
<constant name="KEY_MENU" value="16777262">
Context menu key
</constant>
<constant name="KEY_HYPER_L" value="16777263">
+ Left Hyper Key
</constant>
<constant name="KEY_HYPER_R" value="16777264">
+ Right Hyper Key
</constant>
<constant name="KEY_HELP" value="16777265">
Help key
</constant>
<constant name="KEY_DIRECTION_L" value="16777266">
+ Left Direction Key
</constant>
<constant name="KEY_DIRECTION_R" value="16777267">
+ Right Direction Key
</constant>
<constant name="KEY_BACK" value="16777280">
Back key
@@ -326,14 +335,19 @@
Volume up key
</constant>
<constant name="KEY_BASSBOOST" value="16777287">
+ Bass Boost Key
</constant>
<constant name="KEY_BASSUP" value="16777288">
+ Bass Up Key
</constant>
<constant name="KEY_BASSDOWN" value="16777289">
+ Bass Down Key
</constant>
<constant name="KEY_TREBLEUP" value="16777290">
+ Treble Up Key
</constant>
<constant name="KEY_TREBLEDOWN" value="16777291">
+ Treble Down Key
</constant>
<constant name="KEY_MEDIAPLAY" value="16777292">
Media play key
@@ -360,46 +374,67 @@
Search key
</constant>
<constant name="KEY_STANDBY" value="16777300">
+ Standby Key
</constant>
<constant name="KEY_OPENURL" value="16777301">
+ Open URL / Launch Browser Key
</constant>
<constant name="KEY_LAUNCHMAIL" value="16777302">
+ Launch Mail Key
</constant>
<constant name="KEY_LAUNCHMEDIA" value="16777303">
+ Launch Media Key
</constant>
<constant name="KEY_LAUNCH0" value="16777304">
+ Launch Shortcut 0 Key
</constant>
<constant name="KEY_LAUNCH1" value="16777305">
+ Launch Shortcut 1 Key
</constant>
<constant name="KEY_LAUNCH2" value="16777306">
+ Launch Shortcut 2 Key
</constant>
<constant name="KEY_LAUNCH3" value="16777307">
+ Launch Shortcut 3 Key
</constant>
<constant name="KEY_LAUNCH4" value="16777308">
+ Launch Shortcut 4 Key
</constant>
<constant name="KEY_LAUNCH5" value="16777309">
+ Launch Shortcut 5 Key
</constant>
<constant name="KEY_LAUNCH6" value="16777310">
+ Launch Shortcut 6 Key
</constant>
<constant name="KEY_LAUNCH7" value="16777311">
+ Launch Shortcut 7 Key
</constant>
<constant name="KEY_LAUNCH8" value="16777312">
+ Launch Shortcut 8 Key
</constant>
<constant name="KEY_LAUNCH9" value="16777313">
+ Launch Shortcut 9 Key
</constant>
<constant name="KEY_LAUNCHA" value="16777314">
+ Launch Shortcut A Key
</constant>
<constant name="KEY_LAUNCHB" value="16777315">
+ Launch Shortcut B Key
</constant>
<constant name="KEY_LAUNCHC" value="16777316">
+ Launch Shortcut C Key
</constant>
<constant name="KEY_LAUNCHD" value="16777317">
+ Launch Shortcut D Key
</constant>
<constant name="KEY_LAUNCHE" value="16777318">
+ Launch Shortcut E Key
</constant>
<constant name="KEY_LAUNCHF" value="16777319">
+ Launch Shortcut F Key
</constant>
<constant name="KEY_UNKNOWN" value="33554431">
+ Unknown Key
</constant>
<constant name="KEY_SPACE" value="32">
Space Key
@@ -594,6 +629,7 @@
_ key
</constant>
<constant name="KEY_QUOTELEFT" value="96">
+ Left Quote Key
</constant>
<constant name="KEY_BRACELEFT" value="123">
{ key
@@ -619,6 +655,7 @@
<constant name="KEY_CURRENCY" value="164">
</constant>
<constant name="KEY_YEN" value="165">
+ Yen Key
</constant>
<constant name="KEY_BROKENBAR" value="166">
¦ key
@@ -647,6 +684,7 @@
® key
</constant>
<constant name="KEY_MACRON" value="175">
+ Macron Key
</constant>
<constant name="KEY_DEGREE" value="176">
° key
@@ -667,6 +705,7 @@
µ key
</constant>
<constant name="KEY_PARAGRAPH" value="182">
+ Paragraph Key
</constant>
<constant name="KEY_PERIODCENTERED" value="183">
· key
@@ -675,377 +714,475 @@
¬ key
</constant>
<constant name="KEY_ONESUPERIOR" value="185">
+ ¹ key
</constant>
<constant name="KEY_MASCULINE" value="186">
+ ♂ key
</constant>
<constant name="KEY_GUILLEMOTRIGHT" value="187">
+ » key
</constant>
<constant name="KEY_ONEQUARTER" value="188">
+ ¼ key
</constant>
<constant name="KEY_ONEHALF" value="189">
½ key
</constant>
<constant name="KEY_THREEQUARTERS" value="190">
+ ¾ key
</constant>
<constant name="KEY_QUESTIONDOWN" value="191">
+ ¿ key
</constant>
<constant name="KEY_AGRAVE" value="192">
+ à key
</constant>
<constant name="KEY_AACUTE" value="193">
+ á key
</constant>
<constant name="KEY_ACIRCUMFLEX" value="194">
+ â key
</constant>
<constant name="KEY_ATILDE" value="195">
+ ã key
</constant>
<constant name="KEY_ADIAERESIS" value="196">
+ ä key
</constant>
<constant name="KEY_ARING" value="197">
+ å key
</constant>
<constant name="KEY_AE" value="198">
+ æ key
</constant>
<constant name="KEY_CCEDILLA" value="199">
+ ç key
</constant>
<constant name="KEY_EGRAVE" value="200">
+ è key
</constant>
<constant name="KEY_EACUTE" value="201">
+ é key
</constant>
<constant name="KEY_ECIRCUMFLEX" value="202">
+ ê key
</constant>
<constant name="KEY_EDIAERESIS" value="203">
+ ë key
</constant>
<constant name="KEY_IGRAVE" value="204">
+ ì key
</constant>
<constant name="KEY_IACUTE" value="205">
+ í key
</constant>
<constant name="KEY_ICIRCUMFLEX" value="206">
+ î key
</constant>
<constant name="KEY_IDIAERESIS" value="207">
+ ë key
</constant>
<constant name="KEY_ETH" value="208">
+ ð key
</constant>
<constant name="KEY_NTILDE" value="209">
+ ñ key
</constant>
<constant name="KEY_OGRAVE" value="210">
+ ò key
</constant>
<constant name="KEY_OACUTE" value="211">
+ ó key
</constant>
<constant name="KEY_OCIRCUMFLEX" value="212">
+ ô key
</constant>
<constant name="KEY_OTILDE" value="213">
+ õ key
</constant>
<constant name="KEY_ODIAERESIS" value="214">
+ ö key
</constant>
<constant name="KEY_MULTIPLY" value="215">
+ × key
</constant>
<constant name="KEY_OOBLIQUE" value="216">
+ ø key
</constant>
<constant name="KEY_UGRAVE" value="217">
+ ù key
</constant>
<constant name="KEY_UACUTE" value="218">
+ ú key
</constant>
<constant name="KEY_UCIRCUMFLEX" value="219">
+ û key
</constant>
<constant name="KEY_UDIAERESIS" value="220">
+ ü key
</constant>
<constant name="KEY_YACUTE" value="221">
+ ý key
</constant>
<constant name="KEY_THORN" value="222">
+ þ key
</constant>
<constant name="KEY_SSHARP" value="223">
+ ß key
</constant>
<constant name="KEY_DIVISION" value="247">
+ ÷ key
</constant>
<constant name="KEY_YDIAERESIS" value="255">
+ ÿ key
</constant>
<constant name="KEY_CODE_MASK" value="33554431">
+ Key Code Mask
</constant>
<constant name="KEY_MODIFIER_MASK" value="-16777216">
+ Modifier Key Mask
</constant>
<constant name="KEY_MASK_SHIFT" value="33554432">
+ Shift Key Mask
</constant>
<constant name="KEY_MASK_ALT" value="67108864">
+ Alt Key Mask
</constant>
<constant name="KEY_MASK_META" value="134217728">
+ Meta Key Mask
</constant>
<constant name="KEY_MASK_CTRL" value="268435456">
+ CTRL Key Mask
</constant>
<constant name="KEY_MASK_CMD" value="268435456">
+ CMD Key Mask
</constant>
<constant name="KEY_MASK_KPAD" value="536870912">
+ Keypad Key Mask
</constant>
<constant name="KEY_MASK_GROUP_SWITCH" value="1073741824">
+ Group Switch Key Mask
</constant>
- <constant name="BUTTON_LEFT" value="1" enum="">
+ <constant name="BUTTON_LEFT" value="1">
Left Mouse Button
</constant>
- <constant name="BUTTON_RIGHT" value="2" enum="">
+ <constant name="BUTTON_RIGHT" value="2">
Right Mouse Button
</constant>
- <constant name="BUTTON_MIDDLE" value="3" enum="">
+ <constant name="BUTTON_MIDDLE" value="3">
Middle Mouse Button
</constant>
- <constant name="BUTTON_WHEEL_UP" value="4" enum="">
+ <constant name="BUTTON_WHEEL_UP" value="4">
Mouse wheel up
</constant>
- <constant name="BUTTON_WHEEL_DOWN" value="5" enum="">
+ <constant name="BUTTON_WHEEL_DOWN" value="5">
Mouse wheel down
</constant>
- <constant name="BUTTON_WHEEL_LEFT" value="6" enum="">
+ <constant name="BUTTON_WHEEL_LEFT" value="6">
Mouse wheel left button
</constant>
- <constant name="BUTTON_WHEEL_RIGHT" value="7" enum="">
+ <constant name="BUTTON_WHEEL_RIGHT" value="7">
Mouse wheel right button
</constant>
- <constant name="BUTTON_MASK_LEFT" value="1" enum="">
+ <constant name="BUTTON_MASK_LEFT" value="1">
+ Left Mouse Button Mask
</constant>
- <constant name="BUTTON_MASK_RIGHT" value="2" enum="">
+ <constant name="BUTTON_MASK_RIGHT" value="2">
+ Right Mouse Button Mask
</constant>
- <constant name="BUTTON_MASK_MIDDLE" value="4" enum="">
+ <constant name="BUTTON_MASK_MIDDLE" value="4">
+ Middle Mouse Button Mask
</constant>
- <constant name="JOY_BUTTON_0" value="0" enum="">
+ <constant name="JOY_BUTTON_0" value="0">
Joypad Button 0
</constant>
- <constant name="JOY_BUTTON_1" value="1" enum="">
+ <constant name="JOY_BUTTON_1" value="1">
Joypad Button 1
</constant>
- <constant name="JOY_BUTTON_2" value="2" enum="">
+ <constant name="JOY_BUTTON_2" value="2">
Joypad Button 2
</constant>
- <constant name="JOY_BUTTON_3" value="3" enum="">
+ <constant name="JOY_BUTTON_3" value="3">
Joypad Button 3
</constant>
- <constant name="JOY_BUTTON_4" value="4" enum="">
+ <constant name="JOY_BUTTON_4" value="4">
Joypad Button 4
</constant>
- <constant name="JOY_BUTTON_5" value="5" enum="">
+ <constant name="JOY_BUTTON_5" value="5">
Joypad Button 5
</constant>
- <constant name="JOY_BUTTON_6" value="6" enum="">
+ <constant name="JOY_BUTTON_6" value="6">
Joypad Button 6
</constant>
- <constant name="JOY_BUTTON_7" value="7" enum="">
+ <constant name="JOY_BUTTON_7" value="7">
Joypad Button 7
</constant>
- <constant name="JOY_BUTTON_8" value="8" enum="">
+ <constant name="JOY_BUTTON_8" value="8">
Joypad Button 8
</constant>
- <constant name="JOY_BUTTON_9" value="9" enum="">
+ <constant name="JOY_BUTTON_9" value="9">
Joypad Button 9
</constant>
- <constant name="JOY_BUTTON_10" value="10" enum="">
+ <constant name="JOY_BUTTON_10" value="10">
Joypad Button 10
</constant>
- <constant name="JOY_BUTTON_11" value="11" enum="">
+ <constant name="JOY_BUTTON_11" value="11">
Joypad Button 11
</constant>
- <constant name="JOY_BUTTON_12" value="12" enum="">
+ <constant name="JOY_BUTTON_12" value="12">
Joypad Button 12
</constant>
- <constant name="JOY_BUTTON_13" value="13" enum="">
+ <constant name="JOY_BUTTON_13" value="13">
Joypad Button 13
</constant>
- <constant name="JOY_BUTTON_14" value="14" enum="">
+ <constant name="JOY_BUTTON_14" value="14">
Joypad Button 14
</constant>
- <constant name="JOY_BUTTON_15" value="15" enum="">
+ <constant name="JOY_BUTTON_15" value="15">
Joypad Button 15
</constant>
- <constant name="JOY_BUTTON_MAX" value="16" enum="">
+ <constant name="JOY_BUTTON_MAX" value="16">
Joypad Button 16
</constant>
- <constant name="JOY_SONY_CIRCLE" value="1" enum="">
+ <constant name="JOY_SONY_CIRCLE" value="1">
DUALSHOCK circle button
</constant>
- <constant name="JOY_SONY_X" value="0" enum="">
+ <constant name="JOY_SONY_X" value="0">
DUALSHOCK X button
</constant>
- <constant name="JOY_SONY_SQUARE" value="2" enum="">
+ <constant name="JOY_SONY_SQUARE" value="2">
DUALSHOCK square button
</constant>
- <constant name="JOY_SONY_TRIANGLE" value="3" enum="">
+ <constant name="JOY_SONY_TRIANGLE" value="3">
DUALSHOCK triangle button
</constant>
- <constant name="JOY_XBOX_B" value="1" enum="">
+ <constant name="JOY_XBOX_B" value="1">
XBOX controller B button
</constant>
- <constant name="JOY_XBOX_A" value="0" enum="">
+ <constant name="JOY_XBOX_A" value="0">
XBOX controller A button
</constant>
- <constant name="JOY_XBOX_X" value="2" enum="">
+ <constant name="JOY_XBOX_X" value="2">
XBOX controller X button
</constant>
- <constant name="JOY_XBOX_Y" value="3" enum="">
+ <constant name="JOY_XBOX_Y" value="3">
XBOX controller Y button
</constant>
- <constant name="JOY_DS_A" value="1" enum="">
+ <constant name="JOY_DS_A" value="1">
+ DualShock controller A button
</constant>
- <constant name="JOY_DS_B" value="0" enum="">
+ <constant name="JOY_DS_B" value="0">
+ DualShock controller B button
</constant>
- <constant name="JOY_DS_X" value="3" enum="">
+ <constant name="JOY_DS_X" value="3">
+ DualShock controller X button
</constant>
- <constant name="JOY_DS_Y" value="2" enum="">
+ <constant name="JOY_DS_Y" value="2">
+ DualShock controller Y button
</constant>
- <constant name="JOY_SELECT" value="10" enum="">
+ <constant name="JOY_SELECT" value="10">
Joypad Button Select
</constant>
- <constant name="JOY_START" value="11" enum="">
+ <constant name="JOY_START" value="11">
Joypad Button Start
</constant>
- <constant name="JOY_DPAD_UP" value="12" enum="">
+ <constant name="JOY_DPAD_UP" value="12">
Joypad DPad Up
</constant>
- <constant name="JOY_DPAD_DOWN" value="13" enum="">
+ <constant name="JOY_DPAD_DOWN" value="13">
Joypad DPad Down
</constant>
- <constant name="JOY_DPAD_LEFT" value="14" enum="">
+ <constant name="JOY_DPAD_LEFT" value="14">
Joypad DPad Left
</constant>
- <constant name="JOY_DPAD_RIGHT" value="15" enum="">
+ <constant name="JOY_DPAD_RIGHT" value="15">
Joypad DPad Right
</constant>
- <constant name="JOY_L" value="4" enum="">
+ <constant name="JOY_L" value="4">
Joypad Left Shoulder Button
</constant>
- <constant name="JOY_L2" value="6" enum="">
+ <constant name="JOY_L2" value="6">
Joypad Left Trigger
</constant>
- <constant name="JOY_L3" value="8" enum="">
+ <constant name="JOY_L3" value="8">
Joypad Left Stick Click
</constant>
- <constant name="JOY_R" value="5" enum="">
+ <constant name="JOY_R" value="5">
Joypad Right Shoulder Button
</constant>
- <constant name="JOY_R2" value="7" enum="">
+ <constant name="JOY_R2" value="7">
Joypad Right Trigger
</constant>
- <constant name="JOY_R3" value="9" enum="">
+ <constant name="JOY_R3" value="9">
Joypad Right Stick Click
</constant>
- <constant name="JOY_AXIS_0" value="0" enum="">
+ <constant name="JOY_AXIS_0" value="0">
Joypad Left Stick Horizontal Axis
</constant>
- <constant name="JOY_AXIS_1" value="1" enum="">
+ <constant name="JOY_AXIS_1" value="1">
Joypad Left Stick Vertical Axis
</constant>
- <constant name="JOY_AXIS_2" value="2" enum="">
+ <constant name="JOY_AXIS_2" value="2">
Joypad Right Stick Horizontal Axis
</constant>
- <constant name="JOY_AXIS_3" value="3" enum="">
+ <constant name="JOY_AXIS_3" value="3">
Joypad Right Stick Vertical Axis
</constant>
- <constant name="JOY_AXIS_4" value="4" enum="">
+ <constant name="JOY_AXIS_4" value="4">
</constant>
- <constant name="JOY_AXIS_5" value="5" enum="">
+ <constant name="JOY_AXIS_5" value="5">
</constant>
- <constant name="JOY_AXIS_6" value="6" enum="">
+ <constant name="JOY_AXIS_6" value="6">
Joypad Left Trigger Analog Axis
</constant>
- <constant name="JOY_AXIS_7" value="7" enum="">
+ <constant name="JOY_AXIS_7" value="7">
Joypad Right Trigger Analog Axis
</constant>
- <constant name="JOY_AXIS_MAX" value="8" enum="">
+ <constant name="JOY_AXIS_MAX" value="8">
</constant>
- <constant name="JOY_ANALOG_LX" value="0" enum="">
+ <constant name="JOY_ANALOG_LX" value="0">
Joypad Left Stick Horizontal Axis
</constant>
- <constant name="JOY_ANALOG_LY" value="1" enum="">
+ <constant name="JOY_ANALOG_LY" value="1">
Joypad Left Stick Vertical Axis
</constant>
- <constant name="JOY_ANALOG_RX" value="2" enum="">
+ <constant name="JOY_ANALOG_RX" value="2">
Joypad Right Stick Horizontal Axis
</constant>
- <constant name="JOY_ANALOG_RY" value="3" enum="">
+ <constant name="JOY_ANALOG_RY" value="3">
Joypad Right Stick Vertical Axis
</constant>
- <constant name="JOY_ANALOG_L2" value="6" enum="">
+ <constant name="JOY_ANALOG_L2" value="6">
+ Joypad Left Analog Trigger
</constant>
- <constant name="JOY_ANALOG_R2" value="7" enum="">
+ <constant name="JOY_ANALOG_R2" value="7">
+ Joypad Right Analog Trigger
</constant>
<constant name="OK" value="0">
- Functions that return Error return OK when everything went ok. Most functions don't return error anyway and/or just print errors to stdout.
+ Functions that return Error return OK when no error occured. Most functions don't return errors and/or just print errors to STDOUT.
</constant>
<constant name="FAILED" value="1">
- Generic fail return error.
+ Generic error.
</constant>
<constant name="ERR_UNAVAILABLE" value="2">
+ Unavailable error
</constant>
<constant name="ERR_UNCONFIGURED" value="3">
+ Unconfigured error
</constant>
<constant name="ERR_UNAUTHORIZED" value="4">
+ Unauthorized error
</constant>
<constant name="ERR_PARAMETER_RANGE_ERROR" value="5">
+ Parameter range error
</constant>
<constant name="ERR_OUT_OF_MEMORY" value="6">
+ Out of memory (OOM) error
</constant>
<constant name="ERR_FILE_NOT_FOUND" value="7">
+ File: Not found error
</constant>
<constant name="ERR_FILE_BAD_DRIVE" value="8">
+ File: Bad drive error
</constant>
<constant name="ERR_FILE_BAD_PATH" value="9">
+ File: Bad path error
</constant>
<constant name="ERR_FILE_NO_PERMISSION" value="10">
+ File: No permission error
</constant>
<constant name="ERR_FILE_ALREADY_IN_USE" value="11">
+ File: Already in use error
</constant>
<constant name="ERR_FILE_CANT_OPEN" value="12">
+ File: Can't open error
</constant>
<constant name="ERR_FILE_CANT_WRITE" value="13">
+ File: Can't write error
</constant>
<constant name="ERR_FILE_CANT_READ" value="14">
+ File: Can't read error
</constant>
<constant name="ERR_FILE_UNRECOGNIZED" value="15">
+ File: Unrecognized error
</constant>
<constant name="ERR_FILE_CORRUPT" value="16">
+ File: Corrupt error
</constant>
<constant name="ERR_FILE_MISSING_DEPENDENCIES" value="17">
+ File: Missing dependencies error
</constant>
<constant name="ERR_FILE_EOF" value="18">
+ File: End of file (EOF) error
</constant>
<constant name="ERR_CANT_OPEN" value="19">
+ Can't open error
</constant>
<constant name="ERR_CANT_CREATE" value="20">
+ Can't create error
</constant>
<constant name="ERR_PARSE_ERROR" value="43">
+ Parse error
</constant>
<constant name="ERR_QUERY_FAILED" value="21">
+ Query failed error
</constant>
<constant name="ERR_ALREADY_IN_USE" value="22">
+ Already in use error
</constant>
<constant name="ERR_LOCKED" value="23">
+ Locked error
</constant>
<constant name="ERR_TIMEOUT" value="24">
+ Timeout error
</constant>
<constant name="ERR_CANT_ACQUIRE_RESOURCE" value="28">
+ Can't acquire resource error
</constant>
<constant name="ERR_INVALID_DATA" value="30">
+ Invalid data error
</constant>
<constant name="ERR_INVALID_PARAMETER" value="31">
+ Invalid parameter error
</constant>
<constant name="ERR_ALREADY_EXISTS" value="32">
+ Already exists error
</constant>
<constant name="ERR_DOES_NOT_EXIST" value="33">
+ Does not exist error
</constant>
<constant name="ERR_DATABASE_CANT_READ" value="34">
+ Database: Read error
</constant>
<constant name="ERR_DATABASE_CANT_WRITE" value="35">
+ Database: Write error
</constant>
<constant name="ERR_COMPILATION_FAILED" value="36">
+ Compilation failed error
</constant>
<constant name="ERR_METHOD_NOT_FOUND" value="37">
+ Method not found error
</constant>
<constant name="ERR_LINK_FAILED" value="38">
+ Linking failed error
</constant>
<constant name="ERR_SCRIPT_FAILED" value="39">
+ Script failed error
</constant>
<constant name="ERR_CYCLIC_LINK" value="40">
+ Cycling link (import cycle) error
</constant>
<constant name="ERR_BUSY" value="44">
+ Busy error
</constant>
<constant name="ERR_HELP" value="46">
+ Help error
</constant>
<constant name="ERR_BUG" value="47">
+ Bug error
</constant>
<constant name="ERR_WTF" value="49">
+ WTF error (something probably went really wrong)
</constant>
<constant name="PROPERTY_HINT_NONE" value="0">
No hint for edited property.
@@ -1094,8 +1231,10 @@
<constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="19">
</constant>
<constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSY" value="20">
+ Hints that the image is compressed using lossy compression.
</constant>
<constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="21">
+ Hints that the image is compressed using lossless compression.
</constant>
<constant name="PROPERTY_USAGE_STORAGE" value="1">
Property will be used as storage (default).
@@ -1135,20 +1274,26 @@
<constant name="PROPERTY_USAGE_NOEDITOR" value="5">
</constant>
<constant name="METHOD_FLAG_NORMAL" value="1">
+ Flag for normal method
</constant>
<constant name="METHOD_FLAG_EDITOR" value="2">
+ Flag for editor method
</constant>
<constant name="METHOD_FLAG_NOSCRIPT" value="4">
</constant>
<constant name="METHOD_FLAG_CONST" value="8">
+ Flag for constant method
</constant>
<constant name="METHOD_FLAG_REVERSE" value="16">
</constant>
<constant name="METHOD_FLAG_VIRTUAL" value="32">
+ Flag for virtual method
</constant>
<constant name="METHOD_FLAG_FROM_SCRIPT" value="64">
+ Flag for method from script
</constant>
<constant name="METHOD_FLAGS_DEFAULT" value="1">
+ Default method flags
</constant>
<constant name="TYPE_NIL" value="0">
Variable is of type nil (only applied for null).
@@ -1232,6 +1377,7 @@
Variable is of type [PoolColorArray].
</constant>
<constant name="TYPE_MAX" value="27">
+ Marker for end of type constants.
</constant>
</constants>
</class>
diff --git a/doc/classes/ARVRAnchor.xml b/doc/classes/ARVRAnchor.xml
index 6e11034073..ecd882cdb0 100644
--- a/doc/classes/ARVRAnchor.xml
+++ b/doc/classes/ARVRAnchor.xml
@@ -60,6 +60,7 @@
</methods>
<members>
<member name="anchor_id" type="int" setter="set_anchor_id" getter="get_anchor_id">
+ The anchor's id. You can set this before the anchor itself exists. The first anchor gets an id of [code]1[/code], the second an id of [code]2[/code], etc. When anchors get removed, the engine can then assign the corresponding id to new anchors. The most common situation where anchors 'disappear' is when the AR server identifies that two anchors represent different parts of the same plane and merges them.
</member>
</members>
<constants>
diff --git a/doc/classes/ARVRController.xml b/doc/classes/ARVRController.xml
index 557f915c1d..af1deda2f0 100644
--- a/doc/classes/ARVRController.xml
+++ b/doc/classes/ARVRController.xml
@@ -31,6 +31,7 @@
<return type="int" enum="ARVRPositionalTracker.TrackerHand">
</return>
<description>
+ Returns the hand holding this controller, if known. See TRACKER_* constants in [ARVRPositionalTracker].
</description>
</method>
<method name="get_is_active" qualifiers="const">
@@ -77,6 +78,7 @@
</methods>
<members>
<member name="controller_id" type="int" setter="set_controller_id" getter="get_controller_id">
+ The controller's id. The first controller that the [ARVRServer] detects will have id 1, the second id 2, the third id 3, etc. When a controller is turned off, it's slot is freed. This ensures controllers will keep the same id even when controllers with lower ids are turned off.
</member>
</members>
<signals>
diff --git a/doc/classes/ARVROrigin.xml b/doc/classes/ARVROrigin.xml
index 28864bb3ae..226a69dea4 100644
--- a/doc/classes/ARVROrigin.xml
+++ b/doc/classes/ARVROrigin.xml
@@ -35,6 +35,8 @@
</methods>
<members>
<member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale">
+ Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 meter in the real world.
+ Note that this method is a passthrough to the [ARVRServer] itself.
</member>
</members>
<constants>
diff --git a/doc/classes/ARVRPositionalTracker.xml b/doc/classes/ARVRPositionalTracker.xml
index 1379677344..686ac1db77 100644
--- a/doc/classes/ARVRPositionalTracker.xml
+++ b/doc/classes/ARVRPositionalTracker.xml
@@ -17,6 +17,7 @@
<return type="int" enum="ARVRPositionalTracker.TrackerHand">
</return>
<description>
+ Returns the hand holding this tracker, if known. See TRACKER_* constants.
</description>
</method>
<method name="get_joy_id" qualifiers="const">
@@ -80,10 +81,13 @@
</methods>
<constants>
<constant name="TRACKER_HAND_UNKNOWN" value="0">
+ The hand this tracker is held in is unknown or not applicable.
</constant>
<constant name="TRACKER_LEFT_HAND" value="1">
+ This tracker is the left hand controller.
</constant>
<constant name="TRACKER_RIGHT_HAND" value="2">
+ This tracker is the right hand controller.
</constant>
</constants>
</class>
diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml
index 5e1055d568..bb7ac2c052 100644
--- a/doc/classes/ARVRServer.xml
+++ b/doc/classes/ARVRServer.xml
@@ -121,6 +121,7 @@
</methods>
<members>
<member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale">
+ Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 meter in the real world.
</member>
</members>
<signals>
@@ -171,12 +172,12 @@
<constant name="TRACKER_ANCHOR" value="4">
Our tracker tracks the location and size of an AR anchor.
</constant>
- <constant name="TRACKER_UNKNOWN" value="128">
- Used internally if we haven't set the tracker type yet.
- </constant>
<constant name="TRACKER_ANY_KNOWN" value="127">
Used internally to filter trackers of any known type.
</constant>
+ <constant name="TRACKER_UNKNOWN" value="128">
+ Used internally if we haven't set the tracker type yet.
+ </constant>
<constant name="TRACKER_ANY" value="255">
Used internally to select all trackers.
</constant>
diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml
index 9b15afbbd4..baeeddcd1a 100644
--- a/doc/classes/AStar.xml
+++ b/doc/classes/AStar.xml
@@ -50,6 +50,7 @@
as.add_point(1, Vector3(1,0,0), 4) # Adds the point (1,0,0) with weight_scale=4 and id=1
[/codeblock]
+ If there already exists a point for the given id, its position and weight scale are updated to the given values.
</description>
</method>
<method name="are_points_connected" qualifiers="const">
@@ -107,7 +108,7 @@
<return type="int">
</return>
<description>
- Returns an id with no point associated to it.
+ Returns the next available point id with no point associated to it.
</description>
</method>
<method name="get_closest_point" qualifiers="const">
@@ -220,6 +221,28 @@
Removes the point associated with the given id from the points pool.
</description>
</method>
+ <method name="set_point_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="position" type="Vector3">
+ </argument>
+ <description>
+ Sets the position for the point with the given id.
+ </description>
+ </method>
+ <method name="set_point_weight_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="weight_scale" type="float">
+ </argument>
+ <description>
+ Sets the [code]weight_scale[/code] for the point with the given id.
+ </description>
+ </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml
index bbab7a5547..febced0a8e 100644
--- a/doc/classes/Area.xml
+++ b/doc/classes/Area.xml
@@ -88,7 +88,7 @@
<return type="Array">
</return>
<description>
- Returns a list of intersecting [Area]s.
+ Returns a list of intersecting [code]Area[/code]s.
</description>
</method>
<method name="get_overlapping_bodies" qualifiers="const">
diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml
index 883f952a2a..6bc6e36dfc 100644
--- a/doc/classes/Area2D.xml
+++ b/doc/classes/Area2D.xml
@@ -88,7 +88,7 @@
<return type="Array">
</return>
<description>
- Returns a list of intersecting [Area2D]s.
+ Returns a list of intersecting [code]Area2D[/code]s.
</description>
</method>
<method name="get_overlapping_bodies" qualifiers="const">
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index 36f8494c44..c9996c1a0f 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -75,7 +75,7 @@
<return type="int">
</return>
<description>
- Return the amount of surfaces that the [ArrayMesh] holds.
+ Return the amount of surfaces that the [code]ArrayMesh[/code] holds.
</description>
</method>
<method name="regen_normalmaps">
diff --git a/doc/classes/AudioEffectBandLimitFilter.xml b/doc/classes/AudioEffectBandLimitFilter.xml
index 96f95fbffd..d4b251fc8e 100644
--- a/doc/classes/AudioEffectBandLimitFilter.xml
+++ b/doc/classes/AudioEffectBandLimitFilter.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectBandLimitFilter" inherits="AudioEffectFilter" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Adds a band limit filter to the Audio Bus.
</brief_description>
<description>
+ Limits the frequencies in a range around the [member cutoff_hz] and allows frequencies outside of this range to pass.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/AudioEffectBandPassFilter.xml b/doc/classes/AudioEffectBandPassFilter.xml
index 4437961cc6..b5c6ae3c20 100644
--- a/doc/classes/AudioEffectBandPassFilter.xml
+++ b/doc/classes/AudioEffectBandPassFilter.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectBandPassFilter" inherits="AudioEffectFilter" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Adds a band pass filter to the Audio Bus.
</brief_description>
<description>
+ Attenuates the frequencies inside of a range around the [member cutoff_hz] and cuts frequencies outside of this band.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/AudioEffectFilter.xml b/doc/classes/AudioEffectFilter.xml
index 17aa01d60a..82d572b81b 100644
--- a/doc/classes/AudioEffectFilter.xml
+++ b/doc/classes/AudioEffectFilter.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectFilter" inherits="AudioEffect" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Adds a filter to the Audio Bus.
</brief_description>
<description>
+ Allows frequencies other than the [member cutoff_hz] to pass.
</description>
<tutorials>
</tutorials>
@@ -68,12 +70,15 @@
</methods>
<members>
<member name="cutoff_hz" type="float" setter="set_cutoff" getter="get_cutoff">
+ Threshold frequency for the filter.
</member>
- <member name="dB" type="int" setter="set_db" getter="get_db" enum="AudioEffectFilter.FilterDB">
+ <member name="db" type="int" setter="set_db" getter="get_db" enum="AudioEffectFilter.FilterDB">
</member>
<member name="gain" type="float" setter="set_gain" getter="get_gain">
+ Gain amount of the frequencies after the filter.
</member>
<member name="resonance" type="float" setter="set_resonance" getter="get_resonance">
+ Amount of boost in the overtones near the cutoff frequency.
</member>
</members>
<constants>
diff --git a/doc/classes/AudioEffectHighPassFilter.xml b/doc/classes/AudioEffectHighPassFilter.xml
index 641f7cfee2..c5e24af510 100644
--- a/doc/classes/AudioEffectHighPassFilter.xml
+++ b/doc/classes/AudioEffectHighPassFilter.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectHighPassFilter" inherits="AudioEffectFilter" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Adds a high pass filter to the Audio Bus.
</brief_description>
<description>
+ Cuts frequencies lower than the [member cutoff_hz] and allows higher frequencies to pass.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/AudioEffectLowPassFilter.xml b/doc/classes/AudioEffectLowPassFilter.xml
index fcaf32d761..f102dda03e 100644
--- a/doc/classes/AudioEffectLowPassFilter.xml
+++ b/doc/classes/AudioEffectLowPassFilter.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectLowPassFilter" inherits="AudioEffectFilter" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Adds a low pass filter to the Audio Bus.
</brief_description>
<description>
+ Cuts frequencies higher than the [member cutoff_hz] and allows lower frequencies to pass.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/AudioEffectNotchFilter.xml b/doc/classes/AudioEffectNotchFilter.xml
index f90577fa5a..8ec9a4bc7c 100644
--- a/doc/classes/AudioEffectNotchFilter.xml
+++ b/doc/classes/AudioEffectNotchFilter.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectNotchFilter" inherits="AudioEffectFilter" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Adds a notch filter to the Audio Bus.
</brief_description>
<description>
+ Attenuates frequencies in a narrow band around the [member cutoff_hz] and cuts frequencies outside of this range.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml
index 2ad46579b2..1b6583a834 100644
--- a/doc/classes/BaseButton.xml
+++ b/doc/classes/BaseButton.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BaseButton" inherits="Control" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Provides a base class for different kinds of buttons.
+ Base class for different kinds of buttons.
</brief_description>
<description>
- BaseButton is the abstract base class for buttons, so it shouldn't be used directly (It doesn't display anything). Other types of buttons inherit from it.
+ BaseButton is the abstract base class for buttons, so it shouldn't be used directly (it doesn't display anything). Other types of buttons inherit from it.
</description>
<tutorials>
</tutorials>
@@ -152,18 +152,25 @@
</methods>
<members>
<member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="BaseButton.ActionMode">
+ Determines when the button is considered clicked, one of the ACTION_MODE_* constants.
</member>
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled">
+ If [code]true[/code] the button is in disabled state and can't be clicked or toggled.
</member>
<member name="enabled_focus_mode" type="int" setter="set_enabled_focus_mode" getter="get_enabled_focus_mode" enum="Control.FocusMode">
+ Focus access mode to use when switching between enabled/disabled (see [method Control.set_focus_mode] and [member disabled]).
</member>
<member name="group" type="ButtonGroup" setter="set_button_group" getter="get_button_group">
+ [ButtonGroup] associated to the button.
</member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed">
+ If [code]true[/code] the button's state is pressed. Means the button is pressed down or toggled (if toggle_mode is active).
</member>
<member name="shortcut" type="ShortCut" setter="set_shortcut" getter="get_shortcut">
+ [Shortcut] associated to the button.
</member>
<member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode">
+ If [code]true[/code] the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked.
</member>
</members>
<signals>
diff --git a/doc/classes/BitmapFont.xml b/doc/classes/BitmapFont.xml
index 48e5798008..43ce40562f 100644
--- a/doc/classes/BitmapFont.xml
+++ b/doc/classes/BitmapFont.xml
@@ -38,7 +38,7 @@
<argument index="2" name="kerning" type="int">
</argument>
<description>
- Adds a kerning pair to the [BitmapFont] as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character.
+ Adds a kerning pair to the [code]BitmapFont[/code] as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character.
</description>
</method>
<method name="add_texture">
@@ -47,7 +47,7 @@
<argument index="0" name="texture" type="Texture">
</argument>
<description>
- Adds a texture to the [BitmapFont].
+ Adds a texture to the [code]BitmapFont[/code].
</description>
</method>
<method name="clear">
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml
index c627112af5..352e270e77 100644
--- a/doc/classes/Camera2D.xml
+++ b/doc/classes/Camera2D.xml
@@ -327,12 +327,13 @@
The Camera2D's anchor point. See [code]ANCHOR_MODE_*[/code] constants.
</member>
<member name="current" type="bool" setter="_set_current" getter="is_current">
- If [code]true[/code] this camera is the active camera for the current scene. Only one camera can be current, so setting a different camera [code]current[/code] will disable this one.
+ If [code]true[/code] the camera is the active camera for the current scene. Only one camera can be current, so setting a different camera [code]current[/code] will disable this one.
</member>
<member name="drag_margin_bottom" type="float" setter="set_drag_margin" getter="get_drag_margin">
Bottom margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen.
</member>
<member name="drag_margin_h_enabled" type="bool" setter="set_h_drag_enabled" getter="is_h_drag_enabled">
+ If [code]true[/code] the camera only moves when reaching the horizontal drag margins. If [code]false[/code] the camera moves horizontally regardless of margins. Default value: [code]true[/code].
</member>
<member name="drag_margin_left" type="float" setter="set_drag_margin" getter="get_drag_margin">
Left margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen.
@@ -344,12 +345,16 @@
Top margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen.
</member>
<member name="drag_margin_v_enabled" type="bool" setter="set_v_drag_enabled" getter="is_v_drag_enabled">
+ If [code]true[/code] the camera only moves when reaching the vertical drag margins. If [code]false[/code] the camera moves vertically regardless of margins. Default value: [code]true[/code].
</member>
<member name="editor_draw_drag_margin" type="bool" setter="set_margin_drawing_enabled" getter="is_margin_drawing_enabled">
+ If [code]true[/code] draws the camera's drag margin rectangle in the editor. Default value: [code]false[/code]
</member>
<member name="editor_draw_limits" type="bool" setter="set_limit_drawing_enabled" getter="is_limit_drawing_enabled">
+ If [code]true[/code] draws the camera's limits rectangle in the editor. Default value: [code]true[/code]
</member>
<member name="editor_draw_screen" type="bool" setter="set_screen_drawing_enabled" getter="is_screen_drawing_enabled">
+ If [code]true[/code] draws the camera's screen rectangle in the editor. Default value: [code]false[/code]
</member>
<member name="limit_bottom" type="int" setter="set_limit" getter="get_limit">
Bottom scroll limit in pixels. The camera stops moving when reaching this value.
@@ -361,6 +366,7 @@
Right scroll limit in pixels. The camera stops moving when reaching this value.
</member>
<member name="limit_smoothed" type="bool" setter="set_limit_smoothing_enabled" getter="is_limit_smoothing_enabled">
+ If [code]true[/code] the camera smoothly stops when reaches its limits. Default value: [code]false[/code]
</member>
<member name="limit_top" type="int" setter="set_limit" getter="get_limit">
Top scroll limit in pixels. The camera stops moving when reaching this value.
@@ -369,19 +375,22 @@
The camera's offset, useful for looking around or camera shake animations.
</member>
<member name="rotating" type="bool" setter="set_rotating" getter="is_rotating">
+ If [code]true[/code] the camera rotates with the target. Default value: [code]false[/code]
</member>
<member name="smoothing_enabled" type="bool" setter="set_enable_follow_smoothing" getter="is_follow_smoothing_enabled">
+ If [code]true[/code] the camera smoothly moves towards the target at [member smoothing_speed]. Default value: [code]false[/code]
</member>
<member name="smoothing_speed" type="float" setter="set_follow_smoothing" getter="get_follow_smoothing">
+ Speed in pixels per second of the camera's smoothing effect when [member smoothing_enabled] is [code]true[/code]
</member>
<member name="zoom" type="Vector2" setter="set_zoom" getter="get_zoom">
The camera's zoom relative to the viewport. Values larger than [code]Vector2(1, 1)[/code] zoom out and smaller values zoom in. For an example, use [code]Vector2(0.5, 0.5)[/code] for a 2x zoom in, and [code]Vector2(4, 4)[/code] for a 4x zoom out.
</member>
</members>
<constants>
- <constant name="ANCHOR_MODE_DRAG_CENTER" value="1">
- </constant>
<constant name="ANCHOR_MODE_FIXED_TOP_LEFT" value="0">
</constant>
+ <constant name="ANCHOR_MODE_DRAG_CENTER" value="1">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 4a9890ea18..3682cc6d8f 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -652,6 +652,9 @@
<constant name="BLEND_MODE_PREMULT_ALPHA" value="4">
Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value.
</constant>
+ <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="29" enum="">
+ Canvas item transform has changed. Only received if requested.
+ </constant>
<constant name="NOTIFICATION_DRAW" value="30" enum="">
CanvasItem is requested to draw.
</constant>
@@ -664,8 +667,5 @@
<constant name="NOTIFICATION_EXIT_CANVAS" value="33" enum="">
Canvas item has exited the canvas.
</constant>
- <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="29" enum="">
- Canvas item transform has changed. Only received if requested.
- </constant>
</constants>
</class>
diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml
index 3ee1f10536..c3f2e43892 100644
--- a/doc/classes/CanvasLayer.xml
+++ b/doc/classes/CanvasLayer.xml
@@ -4,7 +4,7 @@
Canvas drawing layer.
</brief_description>
<description>
- Canvas drawing layer. [CanvasItem] nodes that are direct or indirect children of a [CanvasLayer] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [CanvasLayer] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below).
+ Canvas drawing layer. [CanvasItem] nodes that are direct or indirect children of a [code]CanvasLayer[/code] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [code]CanvasLayer[/code] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below).
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/CapsuleShape2D.xml b/doc/classes/CapsuleShape2D.xml
index df833e0582..4fb5579436 100644
--- a/doc/classes/CapsuleShape2D.xml
+++ b/doc/classes/CapsuleShape2D.xml
@@ -15,14 +15,14 @@
<return type="float">
</return>
<description>
- Return the height of the [CapsuleShape2D].
+ Return the height of the [code]CapsuleShape2D[/code].
</description>
</method>
<method name="get_radius" qualifiers="const">
<return type="float">
</return>
<description>
- Return the radius of the [CapsuleShape2D].
+ Return the radius of the [code]CapsuleShape2D[/code].
</description>
</method>
<method name="set_height">
@@ -31,7 +31,7 @@
<argument index="0" name="height" type="float">
</argument>
<description>
- Set the height of the [CapsuleShape2D].
+ Set the height of the [code]CapsuleShape2D[/code].
</description>
</method>
<method name="set_radius">
@@ -40,7 +40,7 @@
<argument index="0" name="radius" type="float">
</argument>
<description>
- Set the radius of the [CapsuleShape2D].
+ Set the radius of the [code]CapsuleShape2D[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/ConcavePolygonShape2D.xml b/doc/classes/ConcavePolygonShape2D.xml
index 018d64b643..be884fd08d 100644
--- a/doc/classes/ConcavePolygonShape2D.xml
+++ b/doc/classes/ConcavePolygonShape2D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Concave polygon 2D shape resource for physics. It is made out of segments and is very optimal for complex polygonal concave collisions. It is really not advised to use for [RigidBody2D] nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions.
- The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection.
+ The main difference between a [ConvexPolygonShape2D] and a [code]ConcavePolygonShape2D[/code] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/ConeTwistJoint.xml b/doc/classes/ConeTwistJoint.xml
index 78655c496d..baf28c5a74 100644
--- a/doc/classes/ConeTwistJoint.xml
+++ b/doc/classes/ConeTwistJoint.xml
@@ -46,7 +46,7 @@
<member name="swing_span" type="float" setter="_set_swing_span" getter="_get_swing_span">
Swing is rotation from side to side, around the axis perpendicular to the twist axis.
The swing span defines, how much rotation will not get corrected allong the swing axis.
- Could be defined as looseness in the [ConeTwistJoint].
+ Could be defined as looseness in the [code]ConeTwistJoint[/code].
If below 0.05, this behaviour is locked. Default value: [code]PI/4[/code].
</member>
<member name="twist_span" type="float" setter="_set_twist_span" getter="_get_twist_span">
@@ -58,7 +58,7 @@
<constant name="PARAM_SWING_SPAN" value="0">
Swing is rotation from side to side, around the axis perpendicular to the twist axis.
The swing span defines, how much rotation will not get corrected allong the swing axis.
- Could be defined as looseness in the [ConeTwistJoint].
+ Could be defined as looseness in the [code]ConeTwistJoint[/code].
If below 0.05, this behaviour is locked. Default value: [code]PI/4[/code].
</constant>
<constant name="PARAM_TWIST_SPAN" value="1">
diff --git a/doc/classes/Container.xml b/doc/classes/Container.xml
index 844c17a1d9..f8555def37 100644
--- a/doc/classes/Container.xml
+++ b/doc/classes/Container.xml
@@ -4,7 +4,7 @@
Base node for containers.
</brief_description>
<description>
- Base node for containers. A [Container] contains other controls and automatically arranges them in a certain way.
+ Base node for containers. A [code]Container[/code] contains other controls and automatically arranges them in a certain way.
A Control can inherit this to create custom container classes.
</description>
<tutorials>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 77bbfa186b..e3d29c2e93 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -1113,18 +1113,18 @@
</constant>
<constant name="PRESET_MODE_MINSIZE" value="0">
</constant>
- <constant name="PRESET_MODE_KEEP_HEIGHT" value="2">
- </constant>
<constant name="PRESET_MODE_KEEP_WIDTH" value="1">
</constant>
- <constant name="PRESET_MODE_KEEP_SIZE" value="3">
+ <constant name="PRESET_MODE_KEEP_HEIGHT" value="2">
</constant>
- <constant name="SIZE_EXPAND" value="2">
- Tells the parent [Container] to let this node take all the available space on the axis you flag. If multiple neighboring nodes are set to expand, they'll share the space based on their stretch ratio. See [member size_flags_stretch_ratio]. Use with [member size_flags_horizontal] and [member size_flags_vertical].
+ <constant name="PRESET_MODE_KEEP_SIZE" value="3">
</constant>
<constant name="SIZE_FILL" value="1">
Tells the parent [Container] to expand the bounds of this node to fill all the available space without pushing any other node. Use with [member size_flags_horizontal] and [member size_flags_vertical].
</constant>
+ <constant name="SIZE_EXPAND" value="2">
+ Tells the parent [Container] to let this node take all the available space on the axis you flag. If multiple neighboring nodes are set to expand, they'll share the space based on their stretch ratio. See [member size_flags_stretch_ratio]. Use with [member size_flags_horizontal] and [member size_flags_vertical].
+ </constant>
<constant name="SIZE_EXPAND_FILL" value="3">
Sets the node's size flags to both fill and expand. See the 2 constants above for more information.
</constant>
diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml
index 0cb4f4045b..cf1fdccc26 100644
--- a/doc/classes/ConvexPolygonShape2D.xml
+++ b/doc/classes/ConvexPolygonShape2D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Convex Polygon Shape for 2D physics. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check).
- The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection.
+ The main difference between a [code]ConvexPolygonShape2D[/code] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/CubeMap.xml b/doc/classes/CubeMap.xml
index ac2ff3fc57..b173bba3c6 100644
--- a/doc/classes/CubeMap.xml
+++ b/doc/classes/CubeMap.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CubeMap" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ A CubeMap is a 6 sided 3D texture.
</brief_description>
<description>
+ A CubeMap is a 6 sided 3D texture typically used for faking reflections. It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods.
</description>
<tutorials>
</tutorials>
@@ -19,6 +21,7 @@
<return type="int">
</return>
<description>
+ Returns the CubeMap's height.
</description>
</method>
<method name="get_lossy_storage_quality" qualifiers="const">
@@ -33,6 +36,7 @@
<argument index="0" name="side" type="int" enum="CubeMap.Side">
</argument>
<description>
+ Returns an [Image] for a side of the CubeMap using one of the [code]SIDE_*[/code] constants or an integer 0-5.
</description>
</method>
<method name="get_storage" qualifiers="const">
@@ -45,6 +49,7 @@
<return type="int">
</return>
<description>
+ Returns the CubeMap's width.
</description>
</method>
<method name="set_flags">
@@ -71,6 +76,7 @@
<argument index="1" name="image" type="Image">
</argument>
<description>
+ Sets an [Image] for a side of the CubeMap using one of the [code]SIDE_*[/code] constants or an integer 0-5.
</description>
</method>
<method name="set_storage">
@@ -82,6 +88,14 @@
</description>
</method>
</methods>
+ <members>
+ <member name="lossy_storage_quality" type="float" setter="set_lossy_storage_quality" getter="get_lossy_storage_quality">
+ The lossy storage quality of the CubeMap if the storage mode is set to STORAGE_COMPRESS_LOSSY.
+ </member>
+ <member name="storage_mode" type="int" setter="set_storage" getter="get_storage" enum="CubeMap.Storage">
+ The CubeMap's storage mode. See [code]STORAGE_*[/code] constants.
+ </member>
+ </members>
<constants>
<constant name="STORAGE_RAW" value="0">
</constant>
diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml
index 4362887be3..99ec2b7d94 100644
--- a/doc/classes/Curve2D.xml
+++ b/doc/classes/Curve2D.xml
@@ -32,6 +32,7 @@
<return type="void">
</return>
<description>
+ Removes all points from the curve.
</description>
</method>
<method name="get_bake_interval" qualifiers="const">
@@ -191,8 +192,10 @@
</methods>
<members>
<member name="_data" type="Dictionary" setter="_set_data" getter="_get_data">
+ The points describing the curve. Value is a [Dictionary] with the keys [code]in[/code], [code]out[/code], and [code]pos[/code]. The key pos is the position of a vertex of the curve, the key in is the vector from that position to the control point before this vertex, the key out is the vector from that position to the controlpoint after this vertex.
</member>
<member name="bake_interval" type="float" setter="set_bake_interval" getter="get_bake_interval">
+ The distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [method get_baked_points] or [method get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care.
</member>
</members>
<constants>
diff --git a/doc/classes/DampedSpringJoint2D.xml b/doc/classes/DampedSpringJoint2D.xml
index 18554820fa..36c5564513 100644
--- a/doc/classes/DampedSpringJoint2D.xml
+++ b/doc/classes/DampedSpringJoint2D.xml
@@ -78,12 +78,16 @@
</methods>
<members>
<member name="damping" type="float" setter="set_damping" getter="get_damping">
+ The spring joint's damping ratio. A value between [code]0[/code] and [code]1[/code]. When the two bodies move into different directions the system tries to align them to the spring axis again. A high [code]damping[/code] value forces the attached bodies to align faster. Default value: [code]1[/code]
</member>
<member name="length" type="float" setter="set_length" getter="get_length">
+ The spring joint's maximum length. The two attached bodies cannot stretch it past this value. Default value: [code]50[/code]
</member>
<member name="rest_length" type="float" setter="set_rest_length" getter="get_rest_length">
+ When the bodies attached to the spring joint move they stretch or squash it. The joint always tries to resize towards this length. Default value: [code]0[/code]
</member>
<member name="stiffness" type="float" setter="set_stiffness" getter="get_stiffness">
+ The higher the value, the less the bodies attached to the joint will deform it. The joint applies an opposing force to the bodies, the product of the stiffness multiplied by the size difference from its resting length. Default value: [code]20[/code]
</member>
</members>
<constants>
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index 447c0d7ed3..4b37061af2 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -59,7 +59,7 @@
<return type="Array">
</return>
<description>
- Return the list of keys in the [Dictionary].
+ Return the list of keys in the [code]Dictionary[/code].
</description>
</method>
<method name="size">
@@ -73,7 +73,7 @@
<return type="Array">
</return>
<description>
- Return the list of values in the [Dictionary].
+ Return the list of values in the [code]Dictionary[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index da8f0f235b..c276a8f661 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -39,8 +39,8 @@
return [{"name": "my_option", "default_value": false}]
func load(src, dst, opts, r_platform_variants, r_gen_files):
- var f = File.new()
- if f.open(src, File.READ) != OK:
+ var file = File.new()
+ if file.open(src, File.READ) != OK:
return FAILED
var mesh = Mesh.new()
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index 2831555d41..de79c3c85c 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -366,6 +366,8 @@
</constant>
<constant name="CONTAINER_CANVAS_EDITOR_SIDE" value="5">
</constant>
+ <constant name="CONTAINER_CANVAS_EDITOR_BOTTOM" value="6">
+ </constant>
<constant name="CONTAINER_PROPERTY_EDITOR_BOTTOM" value="7">
</constant>
<constant name="DOCK_SLOT_LEFT_UL" value="0">
diff --git a/doc/classes/EditorScript.xml b/doc/classes/EditorScript.xml
index 8856e3362a..245dbc078d 100644
--- a/doc/classes/EditorScript.xml
+++ b/doc/classes/EditorScript.xml
@@ -11,9 +11,9 @@
extends EditorScript
func _run():
- print("Hello from the Godot Editor!")
+ print("Hello from the Godot Editor!")
[/codeblock]
- Note that the script is run in the Editor context, which means the output is visible in the console window started with the Editor (STDOUT) instead of the usual Godot *Output* dock.
+ Note that the script is run in the Editor context, which means the output is visible in the console window started with the Editor (STDOUT) instead of the usual Godot [i]Output[/i] dock.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index 5bb0810296..083688b416 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -4,7 +4,7 @@
Access to basic engine properties.
</brief_description>
<description>
- The [Engine] class allows you to query and modify the game's run-time parameters, such as frames per second, time scale, and others.
+ The [code]Engine[/code] class allows you to query and modify the game's run-time parameters, such as frames per second, time scale, and others.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index 2918200633..4d40d5af9a 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -238,6 +238,12 @@
<description>
</description>
</method>
+ <method name="get_ssao_blur" qualifiers="const">
+ <return type="int" enum="Environment.SSAOBlur">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_ssao_color" qualifiers="const">
<return type="Color">
</return>
@@ -250,6 +256,12 @@
<description>
</description>
</method>
+ <method name="get_ssao_edge_sharpness" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_ssao_intensity" qualifiers="const">
<return type="float">
</return>
@@ -262,6 +274,12 @@
<description>
</description>
</method>
+ <method name="get_ssao_quality" qualifiers="const">
+ <return type="int" enum="Environment.SSAOQuality">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_ssao_radius" qualifiers="const">
<return type="float">
</return>
@@ -408,12 +426,6 @@
<description>
</description>
</method>
- <method name="is_ssao_blur_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
<method name="is_ssao_enabled" qualifiers="const">
<return type="bool">
</return>
@@ -813,7 +825,7 @@
<method name="set_ssao_blur">
<return type="void">
</return>
- <argument index="0" name="enabled" type="bool">
+ <argument index="0" name="mode" type="int" enum="Environment.SSAOBlur">
</argument>
<description>
</description>
@@ -834,6 +846,14 @@
<description>
</description>
</method>
+ <method name="set_ssao_edge_sharpness">
+ <return type="void">
+ </return>
+ <argument index="0" name="edge_sharpness" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_ssao_enabled">
<return type="void">
</return>
@@ -858,6 +878,14 @@
<description>
</description>
</method>
+ <method name="set_ssao_quality">
+ <return type="void">
+ </return>
+ <argument index="0" name="quality" type="int" enum="Environment.SSAOQuality">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_ssao_radius">
<return type="void">
</return>
@@ -1172,10 +1200,12 @@
</member>
<member name="ssao_bias" type="float" setter="set_ssao_bias" getter="get_ssao_bias">
</member>
- <member name="ssao_blur" type="bool" setter="set_ssao_blur" getter="is_ssao_blur_enabled">
+ <member name="ssao_blur" type="int" setter="set_ssao_blur" getter="is_ssao_blur_enabled" enum="Environment.SSAOBlur">
</member>
<member name="ssao_color" type="Color" setter="set_ssao_color" getter="get_ssao_color">
</member>
+ <member name="ssao_edge_sharpness" type="float" setter="set_ssao_edge_sharpness" getter="get_ssao_edge_sharpness">
+ </member>
<member name="ssao_enabled" type="bool" setter="set_ssao_enabled" getter="is_ssao_enabled">
</member>
<member name="ssao_intensity" type="float" setter="set_ssao_intensity" getter="get_ssao_intensity">
@@ -1184,6 +1214,8 @@
</member>
<member name="ssao_light_affect" type="float" setter="set_ssao_direct_light_affect" getter="get_ssao_direct_light_affect">
</member>
+ <member name="ssao_quality" type="int" setter="set_ssao_quality" getter="get_ssao_quality" enum="Environment.SSAOQuality">
+ </member>
<member name="ssao_radius" type="float" setter="set_ssao_radius" getter="get_ssao_radius">
</member>
<member name="ssao_radius2" type="float" setter="set_ssao_radius2" getter="get_ssao_radius2">
@@ -1253,5 +1285,19 @@
<constant name="DOF_BLUR_QUALITY_HIGH" value="2">
High depth-of-field blur quality.
</constant>
+ <constant name="SSAO_BLUR_DISABLED" value="0">
+ </constant>
+ <constant name="SSAO_BLUR_1x1" value="1">
+ </constant>
+ <constant name="SSAO_BLUR_2x2" value="2">
+ </constant>
+ <constant name="SSAO_BLUR_3x3" value="3">
+ </constant>
+ <constant name="SSAO_QUALITY_LOW" value="0">
+ </constant>
+ <constant name="SSAO_QUALITY_MEDIUM" value="1">
+ </constant>
+ <constant name="SSAO_QUALITY_HIGH" value="2">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/FuncRef.xml b/doc/classes/FuncRef.xml
index 1277cef77d..987d750ced 100644
--- a/doc/classes/FuncRef.xml
+++ b/doc/classes/FuncRef.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
In GDScript, functions are not [i]first-class objects[/i]. This means it is impossible to store them directly as variables, return them from another function, or pass them as arguments.
- However, by creating a [FuncRef] using the [method @GDScript.funcref] function, a reference to a function in a given object can be created, passed around and called.
+ However, by creating a [code]FuncRef[/code] using the [method @GDScript.funcref] function, a reference to a function in a given object can be created, passed around and called.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml
index 9df0b80b35..3f3d24aaaa 100644
--- a/doc/classes/GIProbe.xml
+++ b/doc/classes/GIProbe.xml
@@ -195,6 +195,8 @@
</constant>
<constant name="SUBDIV_256" value="2">
</constant>
+ <constant name="SUBDIV_512" value="3">
+ </constant>
<constant name="SUBDIV_MAX" value="4">
</constant>
</constants>
diff --git a/doc/classes/GrooveJoint2D.xml b/doc/classes/GrooveJoint2D.xml
index 3db2d9aee9..412a4504c3 100644
--- a/doc/classes/GrooveJoint2D.xml
+++ b/doc/classes/GrooveJoint2D.xml
@@ -46,8 +46,10 @@
</methods>
<members>
<member name="initial_offset" type="float" setter="set_initial_offset" getter="get_initial_offset">
+ The body B's initial anchor position defined by the joint's origin and a local offset [member initial_offset] along the joint's y axis (along the groove). Default value: [code]25[/code]
</member>
<member name="length" type="float" setter="set_length" getter="get_length">
+ The groove's length. The groove is from the joint's origin towards [member length] along the joint's local y axis. Default value: [code]50[/code]
</member>
</members>
<constants>
diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml
index cf48ec84f6..f148545848 100644
--- a/doc/classes/HTTPClient.xml
+++ b/doc/classes/HTTPClient.xml
@@ -16,7 +16,7 @@
<return type="void">
</return>
<description>
- Cloces the current connection, allows for reusal of [HTTPClient].
+ Cloces the current connection, allows for reusal of [code]HTTPClient[/code].
</description>
</method>
<method name="connect_to_host">
@@ -84,7 +84,7 @@
<return type="bool">
</return>
<description>
- Return whether this [HTTPClient] has a response available.
+ Return whether this [code]HTTPClient[/code] has a response available.
</description>
</method>
<method name="is_blocking_mode_enabled" qualifiers="const">
@@ -98,7 +98,7 @@
<return type="bool">
</return>
<description>
- Return whether this [HTTPClient] has a response that is chunked.
+ Return whether this [code]HTTPClient[/code] has a response that is chunked.
</description>
</method>
<method name="poll">
@@ -169,24 +169,6 @@
Sends body raw, as a byte array, does not encode it in any way.
</description>
</method>
- <method name="send_body_data">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="body" type="PoolByteArray">
- </argument>
- <description>
- Stub function
- </description>
- </method>
- <method name="send_body_text">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="body" type="String">
- </argument>
- <description>
- Stub function
- </description>
- </method>
<method name="set_blocking_mode">
<return type="void">
</return>
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index f4ea9d00ce..905a844094 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -4,7 +4,7 @@
Image datatype.
</brief_description>
<description>
- Native image datatype. Contains image data, which can be converted to a texture, and several functions to interact with it.
+ Native image datatype. Contains image data, which can be converted to a [Texture], and several functions to interact with it. The maximum width and height for an [code]Image[/code] is 16384 pixels.
</description>
<tutorials>
</tutorials>
@@ -21,7 +21,7 @@
<argument index="2" name="dst" type="Vector2">
</argument>
<description>
- Alpha-blends a "src_rect" [Rect2] from "src" [Image] to this [Image] on coordinates "dest".
+ Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image at coordinates [code]dest[/code].
</description>
</method>
<method name="blend_rect_mask">
@@ -36,7 +36,7 @@
<argument index="3" name="dst" type="Vector2">
</argument>
<description>
- Alpha-blends a "src_rect" [Rect2] from "src" [Image] to this [Image] using a "mask" [Image] on coordinates "dest". Alpha channels are required for both "src" and "mask", dest pixels and src pixels will blend if the corresponding mask pixel's alpha value is not 0. "src" [Image] and "mask" [Image] *must* have the same size (width and height) but they can have different formats
+ Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha channels are required for both [code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and [code]src[/code] pixels will blend if the corresponding mask pixel's alpha value is not 0. [code]src[/code] image and [code]mask[/code] image [b]must[/b] have the same size (width and height) but they can have different formats.
</description>
</method>
<method name="blit_rect">
@@ -49,7 +49,7 @@
<argument index="2" name="dst" type="Vector2">
</argument>
<description>
- Copy a "src_rect" [Rect2] from "src" [Image] to this [Image] on coordinates "dest".
+ Copies [code]src_rect[/code] from [code]src[/code] image to this image at coordinates [code]dst[/code].
</description>
</method>
<method name="blit_rect_mask">
@@ -64,13 +64,14 @@
<argument index="3" name="dst" type="Vector2">
</argument>
<description>
- Blits a "src_rect" [Rect2] from "src" [Image] to this [Image] using a "mask" [Image] on coordinates "dest". Alpha channel is required for "mask", will copy src pixel onto dest if the corresponding mask pixel's alpha value is not 0. "src" [Image] and "mask" [Image] *must* have the same size (width and height) but they can have different formats
+ Blits [code]src_rect[/code] area from [code]src[/code] image to this image at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's alpha value is not 0. [code]src[/code] image and [code]mask[/code] image [b]must[/b] have the same size (width and height) but they can have different formats.
</description>
</method>
<method name="clear_mipmaps">
<return type="void">
</return>
<description>
+ Removes the image's mipmaps.
</description>
</method>
<method name="compress">
@@ -83,6 +84,7 @@
<argument index="2" name="lossy_quality" type="float">
</argument>
<description>
+ Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. See [code]COMPRESS_*[/code] constants.
</description>
</method>
<method name="convert">
@@ -91,6 +93,7 @@
<argument index="0" name="format" type="int" enum="Image.Format">
</argument>
<description>
+ Converts the image's format. See [code]FORMAT_*[/code] constants.
</description>
</method>
<method name="copy_from">
@@ -99,6 +102,7 @@
<argument index="0" name="src" type="Image">
</argument>
<description>
+ Copies [code]src[/code] image to this image.
</description>
</method>
<method name="create">
@@ -113,7 +117,7 @@
<argument index="3" name="format" type="int" enum="Image.Format">
</argument>
<description>
- Create an empty image of a specific size and format.
+ Creates an empty image of given size and format. See [code]FORMAT_*[/code] constants. If [code]use_mipmaps[/code] is true then generate mipmaps for this image. See the [code]generate_mipmaps[/code] method.
</description>
</method>
<method name="create_from_data">
@@ -130,6 +134,7 @@
<argument index="4" name="data" type="PoolByteArray">
</argument>
<description>
+ Creates a new image of given size and format. See [code]FORMAT_*[/code] constants. Fills the image with the given raw data. If [code]use_mipmaps[/code] is true then generate mipmaps for this image. See the [code]generate_mipmaps[/code] method.
</description>
</method>
<method name="crop">
@@ -140,24 +145,28 @@
<argument index="1" name="height" type="int">
</argument>
<description>
+ Crops the image to the given [code]width[/code] and [code]height[/code]. If the specified size is larger than the current size, the extra area is filled with black pixels.
</description>
</method>
<method name="decompress">
<return type="int" enum="Error">
</return>
<description>
+ Decompresses the image if it is compressed. Returns an error if decompress function is not available.
</description>
</method>
<method name="detect_alpha" qualifiers="const">
<return type="int" enum="Image.AlphaMode">
</return>
<description>
+ Returns ALPHA_BLEND if the image has data for alpha values. Returns ALPHA_BIT if all the alpha values are below a certain threshold or the maximum value. Returns ALPHA_NONE if no data for alpha values is found.
</description>
</method>
<method name="expand_x2_hq2x">
<return type="void">
</return>
<description>
+ Stretches the image and enlarges it by a factor of 2. No interpolation is done.
</description>
</method>
<method name="fill">
@@ -166,52 +175,56 @@
<argument index="0" name="color" type="Color">
</argument>
<description>
- Fills an [Image] with a specified [Color]
+ Fills the image with a given [Color].
</description>
</method>
<method name="fix_alpha_edges">
<return type="void">
</return>
<description>
+ Blends low-alpha pixels with nearby pixels.
</description>
</method>
<method name="flip_x">
<return type="void">
</return>
<description>
+ Flips the image horizontally.
</description>
</method>
<method name="flip_y">
<return type="void">
</return>
<description>
+ Flips the image vertically.
</description>
</method>
<method name="generate_mipmaps">
<return type="int" enum="Error">
</return>
<description>
+ Generates mipmaps for the image. Mipmaps are pre-calculated and lower resolution copies of the image. Mipmaps are automatically used if the image needs to be scaled down when rendered. This improves image quality and the performance of the rendering. Returns an error if the image is compressed, in a custom format or if the image's width/height is 0.
</description>
</method>
<method name="get_data" qualifiers="const">
<return type="PoolByteArray">
</return>
<description>
- Return the raw data of the [Image].
+ Returns the image's raw data.
</description>
</method>
<method name="get_format" qualifiers="const">
<return type="int" enum="Image.Format">
</return>
<description>
- Return the format of the [Image], one of [Image].FORMAT_*.
+ Returns the image's raw data.
</description>
</method>
<method name="get_height" qualifiers="const">
<return type="int">
</return>
<description>
- Return the height of the [Image].
+ Returns the image's height.
</description>
</method>
<method name="get_mipmap_offset" qualifiers="const">
@@ -220,6 +233,7 @@
<argument index="0" name="mipmap" type="int">
</argument>
<description>
+ Returns the offset where the image's mipmap with index [code]mipmap[/code] is stored in the [code]data[/code] dictionary.
</description>
</method>
<method name="get_pixel" qualifiers="const">
@@ -230,6 +244,7 @@
<argument index="1" name="y" type="int">
</argument>
<description>
+ Returns the color of the pixel at [code](x, y)[/code] if the image is locked. If the image is unlocked it always returns a [Color] with the value [code](0, 0, 0, 1.0)[/code].
</description>
</method>
<method name="get_rect" qualifiers="const">
@@ -238,51 +253,56 @@
<argument index="0" name="rect" type="Rect2">
</argument>
<description>
- Return a new [Image] that is a copy of "area" in this [Image].
+ Returns a new image that is a copy of the image's area specified with [code]rect[/code].
</description>
</method>
<method name="get_size" qualifiers="const">
<return type="Vector2">
</return>
<description>
+ Returns the image's size (width and height).
</description>
</method>
<method name="get_used_rect" qualifiers="const">
<return type="Rect2">
</return>
<description>
- Return the area of this [Image] that is used/visibly colored/opaque.
+ Returns a [Rect2] enclosing the visible portion of the image.
</description>
</method>
<method name="get_width" qualifiers="const">
<return type="int">
</return>
<description>
- Return the width of the [Image].
+ Returns the image's width.
</description>
</method>
<method name="has_mipmaps" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if the image has generated mipmaps.
</description>
</method>
<method name="is_compressed" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if the image is compressed.
</description>
</method>
<method name="is_empty" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if the image has no data.
</description>
</method>
<method name="is_invisible" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if all the image's pixels have an alpha value of 0. Returns [code]false[/code] if any pixel has an alpha value higher than 0.
</description>
</method>
<method name="load">
@@ -291,25 +311,28 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Load an [Image].
+ Loads an image from file [code]path[/code].
</description>
</method>
<method name="lock">
<return type="void">
</return>
<description>
+ Locks the data and prevents changes.
</description>
</method>
<method name="normalmap_to_xy">
<return type="void">
</return>
<description>
+ Converts the image's data to represent coordinates on a 3D plane. This is used when the image represents a normalmap. A normalmap can add lots of detail to a 3D surface without increasing the polygon count.
</description>
</method>
<method name="premultiply_alpha">
<return type="void">
</return>
<description>
+ Multiplies color values with alpha values. Resulting color values for a pixel are [code](color * alpha)/256[/code].
</description>
</method>
<method name="resize">
@@ -322,6 +345,7 @@
<argument index="2" name="interpolation" type="int" enum="Image.Interpolation" default="1">
</argument>
<description>
+ Resizes the image to the given [code]width[/code] and [code]height[/code]. New pixels are calculated using [code]interpolation[/code]. See [code]interpolation[/code] constants.
</description>
</method>
<method name="resize_to_po2">
@@ -330,6 +354,7 @@
<argument index="0" name="square" type="bool" default="false">
</argument>
<description>
+ Resizes the image to the nearest power of 2 for the width and height. If [code]square[/code] is [code]true[/code] then set width and height to be the same.
</description>
</method>
<method name="save_png" qualifiers="const">
@@ -338,7 +363,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Save this [Image] as a png.
+ Saves the image as a PNG file to [code]path[/code].
</description>
</method>
<method name="set_pixel">
@@ -351,29 +376,41 @@
<argument index="2" name="color" type="Color">
</argument>
<description>
+ Sets the [Color] of the pixel at [code](x, y)[/code] if the image is unlocked. Example:
+ [code]
+ var img = Image.new()
+ img.lock()
+ img.set_pixel(x, y, color) # Does not have an effect
+ img.unlock()
+ img.set_pixel(x, y, color) # Works
+ [/code].
</description>
</method>
<method name="shrink_x2">
<return type="void">
</return>
<description>
+ Shrinks the image by a factor of 2.
</description>
</method>
<method name="srgb_to_linear">
<return type="void">
</return>
<description>
+ Converts the raw data from the sRGB colorspace to a linear scale.
</description>
</method>
<method name="unlock">
<return type="void">
</return>
<description>
+ Unlocks the data for writing access.
</description>
</method>
</methods>
<members>
<member name="data" type="Dictionary" setter="_set_data" getter="_get_data">
+ Holds all of the image's color data in a given format. See [code]FORMAT_*[/code] constants.
</member>
</members>
<constants>
diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml
index fdaee798db..b392252399 100644
--- a/doc/classes/ImageTexture.xml
+++ b/doc/classes/ImageTexture.xml
@@ -23,7 +23,7 @@
<argument index="3" name="flags" type="int" default="7">
</argument>
<description>
- Create a new [ImageTexture] with "width" and "height".
+ Create a new [code]ImageTexture[/code] with "width" and "height".
"format" one of [Image].FORMAT_*.
"flags" one or more of [Texture].FLAG_*.
</description>
@@ -36,28 +36,28 @@
<argument index="1" name="flags" type="int" default="7">
</argument>
<description>
- Create a new [ImageTexture] from an [Image] with "flags" from [Texture].FLAG_*.
+ Create a new [code]ImageTexture[/code] from an [Image] with "flags" from [Texture].FLAG_*.
</description>
</method>
<method name="get_format" qualifiers="const">
<return type="int" enum="Image.Format">
</return>
<description>
- Return the format of the [ImageTexture], one of [Image].FORMAT_*.
+ Return the format of the [code]ImageTexture[/code], one of [Image].FORMAT_*.
</description>
</method>
<method name="get_lossy_storage_quality" qualifiers="const">
<return type="float">
</return>
<description>
- Return the storage quality for [ImageTexture].STORAGE_COMPRESS_LOSSY.
+ Return the storage quality for [code]ImageTexture[/code].STORAGE_COMPRESS_LOSSY.
</description>
</method>
<method name="get_storage" qualifiers="const">
<return type="int" enum="ImageTexture.Storage">
</return>
<description>
- Return the storage type. One of [ImageTexture].STORAGE_*.
+ Return the storage type. One of [code]ImageTexture[/code].STORAGE_*.
</description>
</method>
<method name="load">
@@ -66,7 +66,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Load an [ImageTexture].
+ Load an [code]ImageTexture[/code].
</description>
</method>
<method name="set_data">
@@ -75,7 +75,7 @@
<argument index="0" name="image" type="Image">
</argument>
<description>
- Set the [Image] of this [ImageTexture].
+ Set the [Image] of this [code]ImageTexture[/code].
</description>
</method>
<method name="set_lossy_storage_quality">
@@ -84,7 +84,7 @@
<argument index="0" name="quality" type="float">
</argument>
<description>
- Set the storage quality in case of [ImageTexture].STORAGE_COMPRESS_LOSSY.
+ Set the storage quality in case of [code]ImageTexture[/code].STORAGE_COMPRESS_LOSSY.
</description>
</method>
<method name="set_size_override">
@@ -102,7 +102,7 @@
<argument index="0" name="mode" type="int" enum="ImageTexture.Storage">
</argument>
<description>
- Set the storage type. One of [ImageTexture].STORAGE_*.
+ Set the storage type. One of [code]ImageTexture[/code].STORAGE_*.
</description>
</method>
</methods>
diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml
index a2f4c9b9d3..d97f1d4a2e 100644
--- a/doc/classes/InputEventAction.xml
+++ b/doc/classes/InputEventAction.xml
@@ -4,7 +4,7 @@
Input event type for actions.
</brief_description>
<description>
- Contains a generic action which can be targeted from several type of inputs. Actions can be created from the project settings menu [code]Project > Project Settings > Input Map[/Code]. See [method Node._input].
+ Contains a generic action which can be targeted from several type of inputs. Actions can be created from the project settings menu [code]Project &gt; Project Settings &gt; Input Map[/Code]. See [method Node._input].
</description>
<tutorials>
http://docs.godotengine.org/en/stable/learning/features/inputs/inputevent.html#actions
diff --git a/doc/classes/InputEventJoypadMotion.xml b/doc/classes/InputEventJoypadMotion.xml
index 9e7edfb822..a7c585a55d 100644
--- a/doc/classes/InputEventJoypadMotion.xml
+++ b/doc/classes/InputEventJoypadMotion.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="InputEventJoypadMotion" inherits="InputEvent" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Input event type for gamepad joysticks and other motions. For buttons see [InputEventJoypadMotion].
+ Input event type for gamepad joysticks and other motions. For buttons see [code]InputEventJoypadMotion[/code].
</brief_description>
<description>
Stores information about joystick motions. One [code]InputEventJoypadMotion[/code] represents one axis at a time.
diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml
index 333edf02b5..99b77dab36 100644
--- a/doc/classes/InputMap.xml
+++ b/doc/classes/InputMap.xml
@@ -4,7 +4,7 @@
Singleton that manages [InputEventAction].
</brief_description>
<description>
- Manages all [InputEventAction] which can be created/modified from the project settings menu [code]Project > Project Settings > Input Map[/Code] or in code with [method add_action] and [method action_add_event]. See [method Node._input].
+ Manages all [InputEventAction] which can be created/modified from the project settings menu [code]Project &gt; Project Settings &gt; Input Map[/Code] or in code with [method add_action] and [method action_add_event]. See [method Node._input].
</description>
<tutorials>
http://docs.godotengine.org/en/stable/learning/features/inputs/inputevent.html#inputmap
@@ -51,7 +51,7 @@
<argument index="0" name="action" type="String">
</argument>
<description>
- Adds an (empty) action to the [InputMap]. An [InputEvent] can then be added to this action with [method action_add_event].
+ Adds an (empty) action to the [code]InputMap[/code]. An [InputEvent] can then be added to this action with [method action_add_event].
</description>
</method>
<method name="erase_action">
diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml
index db9a681896..2d163c4a80 100644
--- a/doc/classes/JSONParseResult.xml
+++ b/doc/classes/JSONParseResult.xml
@@ -4,7 +4,7 @@
Data class wrapper for decoded JSON.
</brief_description>
<description>
- Returned by [method JSON.parse], [JSONParseResult] contains decoded JSON or error information if JSON source not successfully parsed. You can check if JSON source was successfully parsed with [code]if json_result.error == 0[/code].
+ Returned by [method JSON.parse], [code]JSONParseResult[/code] contains decoded JSON or error information if JSON source not successfully parsed. You can check if JSON source was successfully parsed with [code]if json_result.error == 0[/code].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Joint2D.xml b/doc/classes/Joint2D.xml
index e6c2f6d157..b9caa7ef4b 100644
--- a/doc/classes/Joint2D.xml
+++ b/doc/classes/Joint2D.xml
@@ -74,12 +74,16 @@
</methods>
<members>
<member name="bias" type="float" setter="set_bias" getter="get_bias">
+ When [member node_a] and [member node_b] move in different directions the [code]bias[/code] controls how fast the joint pulls them back to their original position. The lower the [code]bias[/code] the more the two bodies can pull on the joint. Default value: [code]0[/code]
</member>
<member name="disable_collision" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision">
+ If [code]true[/code] [member node_a] and [member node_b] can collide. Default value: [code]false[/code].
</member>
<member name="node_a" type="NodePath" setter="set_node_a" getter="get_node_a">
+ The first body attached to the joint. Must derive from [PhysicsBody2D].
</member>
<member name="node_b" type="NodePath" setter="set_node_b" getter="get_node_b">
+ The second body attached to the joint. Must derive from [PhysicsBody2D].
</member>
</members>
<constants>
diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml
index 86354548cd..f80c00ed6d 100644
--- a/doc/classes/KinematicBody.xml
+++ b/doc/classes/KinematicBody.xml
@@ -86,7 +86,7 @@
<argument index="4" name="floor_max_angle" type="float" default="0.785398">
</argument>
<description>
- Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody] or [RigidBody], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
+ Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [code]KinematicBody[/code] or [RigidBody], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
[code]linear_velocity[/code] is a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it with [code]delta[/code] — this is done by the method.
[code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games.
If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes.
diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml
index badc098494..798fc4153c 100644
--- a/doc/classes/KinematicBody2D.xml
+++ b/doc/classes/KinematicBody2D.xml
@@ -86,7 +86,7 @@
<argument index="4" name="floor_max_angle" type="float" default="0.785398">
</argument>
<description>
- Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
+ Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [code]KinematicBody2D[/code] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
[code]linear_velocity[/code] is a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it with [code]delta[/code] — this is done by the method.
[code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games.
If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes.
diff --git a/doc/classes/Light.xml b/doc/classes/Light.xml
index 11eee135cb..fd3ecc7365 100644
--- a/doc/classes/Light.xml
+++ b/doc/classes/Light.xml
@@ -179,6 +179,8 @@
</constant>
<constant name="PARAM_SHADOW_BIAS" value="12">
</constant>
+ <constant name="PARAM_SHADOW_BIAS_SPLIT_SCALE" value="13">
+ </constant>
<constant name="PARAM_MAX" value="14">
</constant>
</constants>
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index e6c26e3248..850f724714 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -17,14 +17,14 @@
<argument index="0" name="text" type="String">
</argument>
<description>
- Append text at cursor, scrolling the [LineEdit] when needed.
+ Adds [code]text[/code] after the cursor. If the resulting value is longer than [member max_length], nothing happens.
</description>
</method>
<method name="clear">
<return type="void">
</return>
<description>
- Clear the [LineEdit] text.
+ Erases the [LineEdit] text.
</description>
</method>
<method name="cursor_get_blink_enabled" qualifiers="const">
@@ -63,14 +63,14 @@
<return type="int" enum="LineEdit.Align">
</return>
<description>
- Return the align mode of the [LineEdit].
+ Return the align mode of the [code]LineEdit[/code].
</description>
</method>
<method name="get_cursor_position" qualifiers="const">
<return type="int">
</return>
<description>
- Return the cursor position inside the [LineEdit].
+ Returns the cursor position inside the [code]LineEdit[/code].
</description>
</method>
<method name="get_expand_to_text_length" qualifiers="const">
@@ -83,14 +83,14 @@
<return type="int">
</return>
<description>
- Return the maximum amount of characters the [LineEdit] can edit. If 0 is returned, no limit exists.
+ Return the maximum amount of characters the [code]LineEdit[/code] can edit. If 0 is returned, no limit exists.
</description>
</method>
<method name="get_menu" qualifiers="const">
<return type="PopupMenu">
</return>
<description>
- Return the [PopupMenu] of this [LineEdit].
+ Returns the [PopupMenu] of this [code]LineEdit[/code]. By default, this menu is displayed when right-clicking on the [LineEdit].
</description>
</method>
<method name="get_placeholder" qualifiers="const">
@@ -111,21 +111,21 @@
<return type="String">
</return>
<description>
- Return the text in the [LineEdit].
+ Return the text in the [code]LineEdit[/code].
</description>
</method>
<method name="is_editable" qualifiers="const">
<return type="bool">
</return>
<description>
- Return the [i]editable[/i] status of the [LineEdit] (see [method set_editable]).
+ Return the [i]editable[/i] status of the [code]LineEdit[/code] (see [method set_editable]).
</description>
</method>
<method name="is_secret" qualifiers="const">
<return type="bool">
</return>
<description>
- Return the [i]secret[/i] status of the [LineEdit] (see [method set_secret]).
+ Return the [i]secret[/i] status of the [code]LineEdit[/code] (see [method set_secret]).
</description>
</method>
<method name="menu_option">
@@ -134,7 +134,7 @@
<argument index="0" name="option" type="int">
</argument>
<description>
- Execute a given action as defined in the MENU_* enum.
+ Executes a given action as defined in the MENU_* enum.
</description>
</method>
<method name="select">
@@ -145,11 +145,12 @@
<argument index="1" name="to" type="int" default="-1">
</argument>
<description>
- Select the text inside [LineEdit] by the given character positions. [code]from[/code] is default to the beginning. [code]to[/code] is default to the end.
+ Selects characters inside [LineEdit] between [code]from[/code] and [code]to[/code]. By default [code]from[/code] is at the beginning and [code]to[/code] at the end.
[codeblock]
- select() # select all
- select(5) # select from the fifth character to the end.
- select(2, 5) # select from the second to the fifth character.
+ text = "Welcome"
+ select() # Welcome
+ select(4) # ome
+ select(2, 5) # lco
[/codeblock]
</description>
</method>
@@ -157,7 +158,7 @@
<return type="void">
</return>
<description>
- Select the whole string.
+ Selects the whole [String].
</description>
</method>
<method name="set_align">
@@ -166,7 +167,7 @@
<argument index="0" name="align" type="int" enum="LineEdit.Align">
</argument>
<description>
- Set text alignment of the [LineEdit].
+ Set text alignment of the [code]LineEdit[/code].
</description>
</method>
<method name="set_cursor_position">
@@ -175,7 +176,7 @@
<argument index="0" name="position" type="int">
</argument>
<description>
- Set the cursor position inside the [LineEdit], causing it to scroll if needed.
+ Sets the cursor position inside the [code]LineEdit[/code]. The text may scroll if needed.
</description>
</method>
<method name="set_editable">
@@ -184,7 +185,7 @@
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set the [i]editable[/i] status of the [LineEdit]. When disabled, existing text can't be modified and new text can't be added.
+ Set the [i]editable[/i] status of the [code]LineEdit[/code]. When disabled, existing text can't be modified and new text can't be added.
</description>
</method>
<method name="set_expand_to_text_length">
@@ -201,7 +202,7 @@
<argument index="0" name="chars" type="int">
</argument>
<description>
- Set the maximum amount of characters the [LineEdit] can edit, and cropping existing text in case it exceeds that limit. Setting 0 removes the limit.
+ Set the maximum amount of characters the [code]LineEdit[/code] can edit, and cropping existing text in case it exceeds that limit. Setting 0 removes the limit.
</description>
</method>
<method name="set_placeholder">
@@ -228,7 +229,7 @@
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set the [i]secret[/i] status of the [LineEdit]. When enabled, every character is displayed as "*".
+ Set the [i]secret[/i] status of the [code]LineEdit[/code]. When enabled, every character is displayed as "*".
</description>
</method>
<method name="set_text">
@@ -237,32 +238,43 @@
<argument index="0" name="text" type="String">
</argument>
<description>
- Set the text in the [LineEdit], clearing the existing one and the selection.
+ Set the text in the [code]LineEdit[/code], clearing the existing one and the selection.
</description>
</method>
</methods>
<members>
<member name="align" type="int" setter="set_align" getter="get_align" enum="LineEdit.Align">
+ Text alignment as defined in the ALIGN_* enum.
</member>
<member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled">
+ If [code]true[/code] the caret (visual cursor) blinks.
</member>
<member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed">
+ Duration (in seconds) of a caret's blinking cycle.
</member>
<member name="editable" type="bool" setter="set_editable" getter="is_editable">
+ If [code]false[/code] existing text cannot be modified and new text cannot be added.
</member>
<member name="expand_to_len" type="bool" setter="set_expand_to_text_length" getter="get_expand_to_text_length">
+ If [code]true[/code] the [LineEdit] width will increase to stay longer than the [member text]. It will [b]not[/b] compress if the [member text] is shortened.
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode">
+ Defines how the [LineEdit] can grab focus (Keyboard and mouse, only keyboard, or none). See [code]enum FocusMode[/code] in [Control] for details.
</member>
<member name="max_length" type="int" setter="set_max_length" getter="get_max_length">
+ Maximum amount of characters that can be entered inside the [LineEdit]. If [code]0[/code], there is no limit.
</member>
<member name="placeholder_alpha" type="float" setter="set_placeholder_alpha" getter="get_placeholder_alpha">
+ Opacity of the [member placeholder_text]. From [code]0[/code] to [code]1[/code].
</member>
<member name="placeholder_text" type="String" setter="set_placeholder" getter="get_placeholder">
+ Text shown when the [LineEdit] is empty. It is [b]not[/b] the [LineEdit]'s default value (see [member text]).
</member>
<member name="secret" type="bool" setter="set_secret" getter="is_secret">
+ If [code]true[/code] every character is shown as "*".
</member>
<member name="text" type="String" setter="set_text" getter="get_text">
+ String value of the [LineEdit].
</member>
</members>
<signals>
@@ -270,47 +282,47 @@
<argument index="0" name="text" type="String">
</argument>
<description>
- When the text changes, this signal is emitted.
+ Emitted when the text changes.
</description>
</signal>
<signal name="text_entered">
<argument index="0" name="text" type="String">
</argument>
<description>
- This signal is emitted when the user presses KEY_ENTER on the [LineEdit]. This signal is often used as an alternate confirmation mechanism in dialogs.
+ Emitted when the user presses KEY_ENTER on the [code]LineEdit[/code].
</description>
</signal>
</signals>
<constants>
<constant name="ALIGN_LEFT" value="0">
- Align left.
+ Aligns the text on the left hand side of the [LineEdit].
</constant>
<constant name="ALIGN_CENTER" value="1">
- Align center.
+ Centers the text in the middle of the [LineEdit].
</constant>
<constant name="ALIGN_RIGHT" value="2">
- Align right.
+ Aligns the text on the right hand side of the [LineEdit].
</constant>
<constant name="ALIGN_FILL" value="3">
- Align fill.
+ Stretches whitespaces to fit the [LineEdit]'s width.
</constant>
<constant name="MENU_CUT" value="0">
- Cut (Copy and clear).
+ Cuts (Copies and clears) the selected text.
</constant>
<constant name="MENU_COPY" value="1">
- Copy the selected text.
+ Copies the selected text.
</constant>
<constant name="MENU_PASTE" value="2">
- Paste the clipboard text over the selected text.
+ Pastes the clipboard text over the selected text (or at the cursor's position).
</constant>
<constant name="MENU_CLEAR" value="3">
- Clear the text.
+ Erases the whole [Linedit] text.
</constant>
<constant name="MENU_SELECT_ALL" value="4">
- Select all text.
+ Selects the whole [Linedit] text.
</constant>
<constant name="MENU_UNDO" value="5">
- Undo an action.
+ Undoes the previous action.
</constant>
<constant name="MENU_MAX" value="6">
</constant>
diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml
index d9598daf16..5e7f467684 100644
--- a/doc/classes/LinkButton.xml
+++ b/doc/classes/LinkButton.xml
@@ -40,7 +40,7 @@
<argument index="0" name="underline_mode" type="int" enum="LinkButton.UnderlineMode">
</argument>
<description>
- Sets the underline mode for this button, the argument must be one of the [LinkButton] constants (see constants section).
+ Sets the underline mode for this button, the argument must be one of the [code]LinkButton[/code] constants (see constants section).
</description>
</method>
</methods>
diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml
index e6f9e40dfe..f8343467af 100644
--- a/doc/classes/MainLoop.xml
+++ b/doc/classes/MainLoop.xml
@@ -4,7 +4,7 @@
Main loop is the abstract main loop base class.
</brief_description>
<description>
- Main loop is the abstract main loop base class. All other main loop classes are derived from it. Upon application start, a [MainLoop] has to be provided to OS, else the application will exit. This happens automatically (and a [SceneTree] is created), unless a main [Script] is supplied, which may or not create and return a [MainLoop].
+ Main loop is the abstract main loop base class. All other main loop classes are derived from it. Upon application start, a [code]MainLoop[/code] has to be provided to OS, else the application will exit. This happens automatically (and a [SceneTree] is created), unless a main [Script] is supplied, which may or not create and return a [code]MainLoop[/code].
</description>
<tutorials>
</tutorials>
@@ -124,6 +124,8 @@
</constant>
<constant name="NOTIFICATION_WM_QUIT_REQUEST" value="6" enum="">
</constant>
+ <constant name="NOTIFICATION_WM_GO_BACK_REQUEST" value="7" enum="">
+ </constant>
<constant name="NOTIFICATION_WM_UNFOCUS_REQUEST" value="8" enum="">
</constant>
<constant name="NOTIFICATION_OS_MEMORY_WARNING" value="9" enum="">
diff --git a/doc/classes/Mutex.xml b/doc/classes/Mutex.xml
index ef3aeb9e07..3d0c8eb1df 100644
--- a/doc/classes/Mutex.xml
+++ b/doc/classes/Mutex.xml
@@ -15,21 +15,21 @@
<return type="void">
</return>
<description>
- Lock this [Mutex], blocks until it is unlocked by the current owner.
+ Lock this [code]Mutex[/code], blocks until it is unlocked by the current owner.
</description>
</method>
<method name="try_lock">
<return type="int" enum="Error">
</return>
<description>
- Try locking this [Mutex], does not block. Returns [OK] on success else [ERR_BUSY].
+ Try locking this [code]Mutex[/code], does not block. Returns [OK] on success else [ERR_BUSY].
</description>
</method>
<method name="unlock">
<return type="void">
</return>
<description>
- Unlock this [Mutex], leaving it to others threads.
+ Unlock this [code]Mutex[/code], leaving it to others threads.
</description>
</method>
</methods>
diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/NetworkedMultiplayerPeer.xml
index c1d8c5ad91..3ac3895df2 100644
--- a/doc/classes/NetworkedMultiplayerPeer.xml
+++ b/doc/classes/NetworkedMultiplayerPeer.xml
@@ -31,7 +31,7 @@
<return type="bool">
</return>
<description>
- Return whether this [NetworkedMultiplayerPeer] is refusing new connections.
+ Return whether this [code]NetworkedMultiplayerPeer[/code] is refusing new connections.
</description>
</method>
<method name="poll">
@@ -46,7 +46,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
- If [code]endable[/code] is true, this [NetworkedMultiplayerPeer] will refuse new connections.
+ If [code]endable[/code] is true, this [code]NetworkedMultiplayerPeer[/code] will refuse new connections.
</description>
</method>
<method name="set_target_peer">
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index a484556e69..7ec4bbb8b5 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -13,7 +13,7 @@
Nodes can also process input events. When set, the [method _input] function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the [method _unhandled_input] function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI [Control] nodes), ensuring that the node only receives the events that were meant for it.
To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with [method set_owner]. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though.
Finally, when a node is freed with [method free] or [method queue_free], it will also free all its children.
- [b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]) it is possible to use the built-in RPC (remote procedure call) system to easily communicate over the network. By calling [method rpc] with a method name, it will be called locally, and in all connected peers (peers = clients and the server that accepts connections), with behaviour varying depending on the network mode ([method set_network_mode]) on the receiving peer. To identify which [Node] receives the RPC call Godot will use its [NodePath] (make sure node names are the same on all peers).
+ [b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]) it is possible to use the built-in RPC (remote procedure call) system to easily communicate over the network. By calling [method rpc] with a method name, it will be called locally, and in all connected peers (peers = clients and the server that accepts connections), with behaviour varying depending on the network mode ([method set_network_mode]) on the receiving peer. To identify which [code]Node[/code] receives the RPC call Godot will use its [NodePath] (make sure node names are the same on all peers).
</description>
<tutorials>
</tutorials>
@@ -100,7 +100,7 @@
<argument index="1" name="legible_unique_name" type="bool" default="false">
</argument>
<description>
- Add a child [Node]. Nodes can have as many children as they want, but every child must have a unique name. Children nodes are automatically deleted when the parent node is deleted, so deleting a whole scene is performed by deleting its topmost node.
+ Add a child [code]Node[/code]. Nodes can have as many children as they want, but every child must have a unique name. Children nodes are automatically deleted when the parent node is deleted, so deleting a whole scene is performed by deleting its topmost node.
The optional boolean argument enforces creating child nodes with human-readable names, based on the name of the node being instanced instead of its type only.
</description>
</method>
@@ -124,7 +124,7 @@
<argument index="1" name="persistent" type="bool" default="false">
</argument>
<description>
- Add a node to a group. Groups are helpers to name and organize a subset of nodes, like for example "enemies" or "collectables". A [Node] can be in any number of groups. Nodes can be assigned a group at any time, but will not be added to it until they are inside the scene tree (see [method is_inside_tree]).
+ Add a node to a group. Groups are helpers to name and organize a subset of nodes, like for example "enemies" or "collectables". A [code]Node[/code] can be in any number of groups. Nodes can be assigned a group at any time, but will not be added to it until they are inside the scene tree (see [method is_inside_tree]).
</description>
</method>
<method name="can_process" qualifiers="const">
@@ -140,7 +140,7 @@
<argument index="0" name="flags" type="int" default="15">
</argument>
<description>
- Duplicate the node, returning a new [Node].
+ Duplicate the node, returning a new [code]Node[/code].
You can fine-tune the behavior using the [code]flags[/code], which are based on the DUPLICATE_* constants.
</description>
</method>
@@ -177,7 +177,7 @@
<return type="Array">
</return>
<description>
- Return an array of references ([Node]) to the child nodes.
+ Return an array of references ([code]Node[/code]) to the child nodes.
</description>
</method>
<method name="get_filename" qualifiers="const">
@@ -261,7 +261,7 @@
<return type="Node">
</return>
<description>
- Return the parent node of the current node, or an empty [Node] if the node lacks a parent.
+ Return the parent node of the current node, or an empty [code]Node[/code] if the node lacks a parent.
</description>
</method>
<method name="get_path" qualifiers="const">
@@ -470,7 +470,7 @@
<argument index="2" name="parent_first" type="bool" default="false">
</argument>
<description>
- Calls the method (if present) with the arguments given in "args" on this Node and recursively on all children. If the parent_first argument is true then the method will be called on the current [Node] first, then on all children. If it is false then the children will get called first.
+ Calls the method (if present) with the arguments given in "args" on this Node and recursively on all children. If the parent_first argument is true then the method will be called on the current [code]Node[/code] first, then on all children. If it is false then the children will get called first.
</description>
</method>
<method name="propagate_notification">
@@ -509,7 +509,7 @@
<argument index="0" name="node" type="Node">
</argument>
<description>
- Remove a child [Node]. Node is NOT deleted and will have to be deleted manually.
+ Remove a child [code]Node[/code]. Node is NOT deleted and will have to be deleted manually.
</description>
</method>
<method name="remove_from_group">
@@ -672,7 +672,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
- Set the name of the [Node]. Name must be unique within parent, and setting an already existing name will cause for the node to be automatically renamed.
+ Set the name of the [code]Node[/code]. Name must be unique within parent, and setting an already existing name will cause for the node to be automatically renamed.
</description>
</method>
<method name="set_network_master">
@@ -806,6 +806,10 @@
</constant>
<constant name="NOTIFICATION_READY" value="13" enum="">
</constant>
+ <constant name="NOTIFICATION_PAUSED" value="14" enum="">
+ </constant>
+ <constant name="NOTIFICATION_UNPAUSED" value="15" enum="">
+ </constant>
<constant name="NOTIFICATION_PHYSICS_PROCESS" value="16" enum="">
Notification received every frame when the physics process flag is set (see [method set_physics_process]).
</constant>
@@ -818,10 +822,6 @@
<constant name="NOTIFICATION_UNPARENTED" value="19" enum="">
Notification received when a node is unparented (parent removed it from the list of children).
</constant>
- <constant name="NOTIFICATION_PAUSED" value="14" enum="">
- </constant>
- <constant name="NOTIFICATION_UNPAUSED" value="15" enum="">
- </constant>
<constant name="NOTIFICATION_INSTANCED" value="20" enum="">
</constant>
<constant name="NOTIFICATION_DRAG_BEGIN" value="21" enum="">
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index 084bee92df..669a0fb9ff 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -26,7 +26,7 @@
<argument index="0" name="pivot" type="Vector2">
</argument>
<description>
- Set the pivot position of the 2D node to 'pivot' value. Only some Node2Ds implement this method.
+ Sets the node's pivot position.
</description>
</method>
<method name="get_angle_to" qualifiers="const">
@@ -143,7 +143,7 @@
<argument index="1" name="scaled" type="bool" default="false">
</argument>
<description>
- Apply a local translation on the node's X axis based on the process's 'delta'. If 'scaled' is false, normalizes the movement.
+ Applies a local translation on the node's X axis based on the [method Node._process]'s [code]delta[/code]. If [code]scaled[/code] is false, normalizes the movement.
</description>
</method>
<method name="move_local_y">
@@ -154,7 +154,7 @@
<argument index="1" name="scaled" type="bool" default="false">
</argument>
<description>
- Apply a local translation on the node's Y axis based on the process's 'delta'. If 'scaled' is false, normalizes the movement.
+ Applies a local translation on the node's Y axis based on the [method Node._process]'s [code]delta[/code]. If [code]scaled[/code] is false, normalizes the movement.
</description>
</method>
<method name="rotate">
@@ -163,7 +163,7 @@
<argument index="0" name="radians" type="float">
</argument>
<description>
- Apply a rotation to the node, in radians, starting from its current rotation.
+ Applies a rotation to the node, in radians, starting from its current rotation.
</description>
</method>
<method name="set_global_position">
@@ -172,7 +172,7 @@
<argument index="0" name="position" type="Vector2">
</argument>
<description>
- Set the node's global position.
+ Sets the node's global position.
</description>
</method>
<method name="set_global_rotation">
@@ -181,7 +181,7 @@
<argument index="0" name="radians" type="float">
</argument>
<description>
- Set the node's global rotation in radians.
+ Sets the node's global rotation in radians.
</description>
</method>
<method name="set_global_rotation_in_degrees">
@@ -190,7 +190,7 @@
<argument index="0" name="degrees" type="float">
</argument>
<description>
- Set the node's global rotation in degrees.
+ Sets the node's global rotation in degrees.
</description>
</method>
<method name="set_global_scale">
@@ -199,7 +199,7 @@
<argument index="0" name="scale" type="Vector2">
</argument>
<description>
- Set the node's global scale.
+ Sets the node's global scale.
</description>
</method>
<method name="set_global_transform">
@@ -208,7 +208,7 @@
<argument index="0" name="xform" type="Transform2D">
</argument>
<description>
- Set the node's global [Transform2D].
+ Sets the node's global [Transform2D].
</description>
</method>
<method name="set_position">
@@ -217,7 +217,7 @@
<argument index="0" name="position" type="Vector2">
</argument>
<description>
- Set the node's position.
+ Sets the node's position.
</description>
</method>
<method name="set_rotation">
@@ -226,7 +226,7 @@
<argument index="0" name="radians" type="float">
</argument>
<description>
- Set the node's rotation in radians.
+ Sets the node's rotation in radians.
</description>
</method>
<method name="set_rotation_in_degrees">
@@ -235,7 +235,7 @@
<argument index="0" name="degrees" type="float">
</argument>
<description>
- Set the node's rotation in degrees.
+ Sets the node's rotation in degrees.
</description>
</method>
<method name="set_scale">
@@ -244,7 +244,7 @@
<argument index="0" name="scale" type="Vector2">
</argument>
<description>
- Set the node's scale.
+ Sets the node's scale.
</description>
</method>
<method name="set_transform">
@@ -253,7 +253,7 @@
<argument index="0" name="xform" type="Transform2D">
</argument>
<description>
- Set the node's local [Transform2D].
+ Sets the node's local [Transform2D].
</description>
</method>
<method name="set_z">
@@ -262,7 +262,7 @@
<argument index="0" name="z" type="int">
</argument>
<description>
- Set the node's Z-index.
+ Sets the node's Z-index.
</description>
</method>
<method name="set_z_as_relative">
@@ -271,7 +271,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Make the node's Z-index relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5.
+ Makes the node's Z-index relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5.
</description>
</method>
<method name="to_global" qualifiers="const">
@@ -280,6 +280,7 @@
<argument index="0" name="local_point" type="Vector2">
</argument>
<description>
+ Converts a local point's coordinates to global coordinates.
</description>
</method>
<method name="to_local" qualifiers="const">
@@ -288,6 +289,7 @@
<argument index="0" name="global_point" type="Vector2">
</argument>
<description>
+ Converts a global point's coordinates to local coordinates.
</description>
</method>
<method name="translate">
@@ -296,7 +298,7 @@
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
- Translate the node locally by the 'offset' vector, starting from its current local position.
+ Translates the node by the given [code]offset[/code] in local coordinates.
</description>
</method>
</methods>
@@ -320,13 +322,13 @@
Position, relative to the node's parent.
</member>
<member name="rotation" type="float" setter="set_rotation" getter="get_rotation">
- Rotation in radians.
+ Rotation in radians, relative to the node's parent.
</member>
<member name="rotation_deg" type="float" setter="set_rotation_in_degrees" getter="get_rotation_in_degrees">
- Rotation in degrees.
+ Rotation in degrees, relative to the node's parent.
</member>
<member name="scale" type="Vector2" setter="set_scale" getter="get_scale">
- Rotation in degrees.
+ The node's scale. Unscaled value: [code](1, 1)[/code]
</member>
<member name="transform" type="Transform2D" setter="set_transform" getter="get_transform">
Local [Transform2D].
@@ -335,7 +337,7 @@
Z-index. Controls the order in which the nodes render. A node with a higher Z-index will display in front of others.
</member>
<member name="z_as_relative" type="bool" setter="set_z_as_relative" getter="is_z_relative">
- Make the node's Z-index relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5.
+ If [code]true[/code] the node's Z-index is relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5.
</member>
</members>
<constants>
diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml
index 9aa9572b80..ba2145482f 100644
--- a/doc/classes/NodePath.xml
+++ b/doc/classes/NodePath.xml
@@ -5,8 +5,8 @@
</brief_description>
<description>
A pre-parsed relative or absolute path in a scene tree, for use with [method Node.get_node] and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For instance, [code]"Path2D/PathFollow2D/Sprite:texture:size"[/code] would refer to the size property of the texture resource on the node named "Sprite" which is a child of the other named nodes in the path. Note that if you want to get a resource, you must end the path with a colon, otherwise the last element will be used as a property name.
- You will usually just pass a string to [method Node.get_node] and it will be automatically converted, but you may occasionally want to parse a path ahead of time with [NodePath] or the literal syntax [code]@"path"[/code]. Exporting a [NodePath] variable will give you a node selection widget in the properties panel of the editor, which can often be useful.
- A [NodePath] is made up of a list of node names, a list of "subnode" (resource) names, and the name of a property in the final node or resource.
+ You will usually just pass a string to [method Node.get_node] and it will be automatically converted, but you may occasionally want to parse a path ahead of time with [code]NodePath[/code] or the literal syntax [code]@"path"[/code]. Exporting a [code]NodePath[/code] variable will give you a node selection widget in the properties panel of the editor, which can often be useful.
+ A [code]NodePath[/code] is made up of a list of node names, a list of "subnode" (resource) names, and the name of a property in the final node or resource.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 73b424eb12..2629e6740d 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -196,7 +196,7 @@
</return>
<description>
Returns the current latin keyboard variant as a String.
- Possible return values are: "QWERTY", "AZERTY", "QZERTY", "DVORAK", "NEO" or "ERROR"
+ Possible return values are: "QWERTY", "AZERTY", "QZERTY", "DVORAK", "NEO", "COLEMAK" or "ERROR".
</description>
</method>
<method name="get_locale" qualifiers="const">
diff --git a/doc/classes/OccluderPolygon2D.xml b/doc/classes/OccluderPolygon2D.xml
index 99c1536ddf..7bc1f74762 100644
--- a/doc/classes/OccluderPolygon2D.xml
+++ b/doc/classes/OccluderPolygon2D.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="OccluderPolygon2D" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Defines a 2D polygon for LightOccluder2D.
</brief_description>
<description>
+ Editor facility that helps you draw a 2D polygon used as resource for [LightOccluder2D].
</description>
<tutorials>
</tutorials>
@@ -54,18 +56,24 @@
</methods>
<members>
<member name="closed" type="bool" setter="set_closed" getter="is_closed">
+ If [code]true[/code] closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline's direction. Default value [code]true[/code].
</member>
<member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="OccluderPolygon2D.CullMode">
+ Set the direction of the occlusion culling when not [code]CULL_DISABLED[/code]. Default value [code]DISABLED[/code].
</member>
<member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
+ A [Vector2] array with the index for polygon's vertices positions.
</member>
</members>
<constants>
<constant name="CULL_DISABLED" value="0">
+ Culling mode for the occlusion. Disabled means no culling. See [member cull_mode].
</constant>
<constant name="CULL_CLOCKWISE" value="1">
+ Culling mode for the occlusion. Sets the culling to be in clockwise direction. See [member cull_mode].
</constant>
<constant name="CULL_COUNTER_CLOCKWISE" value="2">
+ Culling mode for the occlusion. Sets the culling to be in counter clockwise direction. See [member cull_mode].
</constant>
</constants>
</class>
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index abb0dc4f2d..08ea23f05a 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -46,7 +46,7 @@
<return type="void">
</return>
<description>
- Clear all the items in the [OptionButton].
+ Clear all the items in the [code]OptionButton[/code].
</description>
</method>
<method name="get_item_count" qualifiers="const">
diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml
index 0453c16537..1d2241b580 100644
--- a/doc/classes/PacketPeerUDP.xml
+++ b/doc/classes/PacketPeerUDP.xml
@@ -15,7 +15,7 @@
<return type="void">
</return>
<description>
- Close the UDP socket the [PacketPeerUDP] is currently listening on.
+ Close the UDP socket the [code]PacketPeerUDP[/code] is currently listening on.
</description>
</method>
<method name="get_packet_ip" qualifiers="const">
@@ -36,7 +36,7 @@
<return type="bool">
</return>
<description>
- Return whether this [PacketPeerUDP] is listening.
+ Return whether this [code]PacketPeerUDP[/code] is listening.
</description>
</method>
<method name="listen">
@@ -49,7 +49,7 @@
<argument index="2" name="recv_buf_size" type="int" default="65536">
</argument>
<description>
- Make this [PacketPeerUDP] listen on the "port" binding to "bind_address" with a buffer size "recv_buf_size".
+ Make this [code]PacketPeerUDP[/code] listen on the "port" binding to "bind_address" with a buffer size "recv_buf_size".
If "bind_address" is set as "*" (default), the peer will listen on all available addresses (both IPv4 and IPv6).
If "bind_address" is set as "0.0.0.0" (for IPv4) or "::" (for IPv6), the peer will listen on all available addresses matching that IP type.
If "bind_address" is set to any valid address (e.g. "192.168.1.101", "::1", etc), the peer will only listen on the interface with that addresses (or fail if no interface with the given address exists).
diff --git a/doc/classes/ParallaxBackground.xml b/doc/classes/ParallaxBackground.xml
index a7d616129a..21b6150900 100644
--- a/doc/classes/ParallaxBackground.xml
+++ b/doc/classes/ParallaxBackground.xml
@@ -4,7 +4,7 @@
A node used to create a parallax scrolling background.
</brief_description>
<description>
- A ParallaxBackground will use one or more [ParallaxLayer] nodes to create a parallax scrolling background. Each [ParallaxLayer] can be set to move at different speeds relative to the camera movement, this can be used to create an illusion of depth in a 2D game.
+ A ParallaxBackground uses one or more [ParallaxLayer] child nodes to create a parallax effect. Each [ParallaxLayer] can move at a different speed using [member ParallaxLayer.motion_offset]. This creates an illusion of depth in a 2D game. If not used with a [Camera2D], you must manually calculate the [member scroll_offset].
</description>
<tutorials>
</tutorials>
@@ -108,16 +108,22 @@
</methods>
<members>
<member name="scroll_base_offset" type="Vector2" setter="set_scroll_base_offset" getter="get_scroll_base_offset">
+ Base position offset of all [ParallaxLayer] children.
</member>
<member name="scroll_base_scale" type="Vector2" setter="set_scroll_base_scale" getter="get_scroll_base_scale">
+ Base motion scale of all [ParallaxLayer] children.
</member>
<member name="scroll_ignore_camera_zoom" type="bool" setter="set_ignore_camera_zoom" getter="is_ignore_camera_zoom">
+ If [code]true[/code] elements in [ParallaxLayer] child aren't affected by the zoom level of the camera.
</member>
<member name="scroll_limit_begin" type="Vector2" setter="set_limit_begin" getter="get_limit_begin">
+ Top left limits for scrolling to begin. If the camera is outside of this limit the background will stop scrolling. Must be lower than [member scroll_limit_end] to work.
</member>
<member name="scroll_limit_end" type="Vector2" setter="set_limit_end" getter="get_limit_end">
+ Right bottom limits for scrolling to end. If the camera is outside of this limit the background will stop scrolling. Must be higher than [member scroll_limit_begin] to work.
</member>
<member name="scroll_offset" type="Vector2" setter="set_scroll_offset" getter="get_scroll_offset">
+ The ParallaxBackground's scroll value. Calculated automatically when using a [Camera2D], but can be used to manually manage scrolling when no camera is present.
</member>
</members>
<constants>
diff --git a/doc/classes/ParallaxLayer.xml b/doc/classes/ParallaxLayer.xml
index 6cf5549c8f..f1e6f9e046 100644
--- a/doc/classes/ParallaxLayer.xml
+++ b/doc/classes/ParallaxLayer.xml
@@ -4,7 +4,8 @@
A parallax scrolling layer to be used with [ParallaxBackground].
</brief_description>
<description>
- A ParallaxLayer must be the child of a [ParallaxBackground] node. All child nodes will be affected by the parallax scrolling of this layer.
+ A ParallaxLayer must be the child of a [ParallaxBackground] node. Each ParallaxLayer can be set to move at different speeds relative to the camera movement or the [member ParallaxBackground.scroll_offset] value.
+ This node's children will be affected by its scroll offset.
</description>
<tutorials>
</tutorials>
@@ -60,10 +61,13 @@
</methods>
<members>
<member name="motion_mirroring" type="Vector2" setter="set_mirroring" getter="get_mirroring">
+ The ParallaxLayer's [Texture] mirroring. Useful for creating an infinite scrolling background. If an axis is set to [code]0[/code] the [Texture] will not be mirrored. Default value: [code](0, 0)[/code].
</member>
<member name="motion_offset" type="Vector2" setter="set_motion_offset" getter="get_motion_offset">
+ The ParallaxLayer's offset relative to the parent ParallaxBackground's [member ParallaxBackground.scroll_offset].
</member>
<member name="motion_scale" type="Vector2" setter="set_motion_scale" getter="get_motion_scale">
+ Multiplies the ParallaxLayer's motion. If an axis is set to [code]0[/code] it will not scroll.
</member>
</members>
<constants>
diff --git a/doc/classes/Path2D.xml b/doc/classes/Path2D.xml
index 839e617375..722e0c1240 100644
--- a/doc/classes/Path2D.xml
+++ b/doc/classes/Path2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Path2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Container for a [Curve2D].
+ Contains a [Curve2D] path for [PathFollow2D] nodes to follow.
</brief_description>
<description>
- This class is a container/Node-ification of a [Curve2D], so it can have [Node2D] properties and [Node] info.
+ Can have [PathFollow2D] child-nodes moving along the [Curve2D]. See [PathFollow2D] for more information on this usage.
</description>
<tutorials>
</tutorials>
@@ -30,6 +30,7 @@
</methods>
<members>
<member name="curve" type="Curve2D" setter="set_curve" getter="get_curve">
+ A [Curve2D] describing the path.
</member>
</members>
<constants>
diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml
index 2dc3aa239b..82ee3531f1 100644
--- a/doc/classes/Performance.xml
+++ b/doc/classes/Performance.xml
@@ -77,8 +77,6 @@
<constant name="RENDER_DRAW_CALLS_IN_FRAME" value="16">
Draw calls per frame. 3D only.
</constant>
- <constant name="RENDER_USAGE_VIDEO_MEM_TOTAL" value="20">
- </constant>
<constant name="RENDER_VIDEO_MEM_USED" value="17">
Video memory used. Includes both texture and vertex memory.
</constant>
@@ -88,6 +86,8 @@
<constant name="RENDER_VERTEX_MEM_USED" value="19">
Vertex memory used.
</constant>
+ <constant name="RENDER_USAGE_VIDEO_MEM_TOTAL" value="20">
+ </constant>
<constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="21">
Number of active [RigidBody2D] nodes in the game.
</constant>
diff --git a/doc/classes/Physics2DDirectSpaceState.xml b/doc/classes/Physics2DDirectSpaceState.xml
index 5427ed1573..b15d4dfd54 100644
--- a/doc/classes/Physics2DDirectSpaceState.xml
+++ b/doc/classes/Physics2DDirectSpaceState.xml
@@ -130,11 +130,11 @@
<constant name="TYPE_MASK_CHARACTER_BODY" value="8">
Check for collisions with rigid bodies in character mode.
</constant>
- <constant name="TYPE_MASK_AREA" value="16">
- Check for collisions with areas.
- </constant>
<constant name="TYPE_MASK_COLLISION" value="15">
Check for collisions with any kind of bodies (but not areas).
</constant>
+ <constant name="TYPE_MASK_AREA" value="16">
+ Check for collisions with areas.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml
index edc46a53d0..6e3381c200 100644
--- a/doc/classes/Physics2DServer.xml
+++ b/doc/classes/Physics2DServer.xml
@@ -978,6 +978,8 @@
<constant name="SHAPE_LINE" value="0">
This is the constant for creating line shapes. A line shape is an infinite line with an origin point, and a normal. Thus, it can be used for front/behind checks.
</constant>
+ <constant name="SHAPE_RAY" value="1">
+ </constant>
<constant name="SHAPE_SEGMENT" value="2">
This is the constant for creating segment shapes. A segment shape is a line from a point A to a point B. It can be checked for intersections.
</constant>
diff --git a/doc/classes/PhysicsDirectSpaceState.xml b/doc/classes/PhysicsDirectSpaceState.xml
index 1e4354fa7e..01307b92c7 100644
--- a/doc/classes/PhysicsDirectSpaceState.xml
+++ b/doc/classes/PhysicsDirectSpaceState.xml
@@ -73,9 +73,9 @@
</constant>
<constant name="TYPE_MASK_CHARACTER_BODY" value="8">
</constant>
- <constant name="TYPE_MASK_AREA" value="16">
- </constant>
<constant name="TYPE_MASK_COLLISION" value="15">
</constant>
+ <constant name="TYPE_MASK_AREA" value="16">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml
index 71cdd6f6df..b0f42b83a3 100644
--- a/doc/classes/PhysicsServer.xml
+++ b/doc/classes/PhysicsServer.xml
@@ -1437,12 +1437,12 @@
<constant name="BODY_PARAM_GRAVITY_SCALE" value="3">
Constant to set/get a body's gravity multiplier.
</constant>
- <constant name="BODY_PARAM_ANGULAR_DAMP" value="5">
- Constant to set/get a body's angular dampening factor.
- </constant>
<constant name="BODY_PARAM_LINEAR_DAMP" value="4">
Constant to set/get a body's linear dampening factor.
</constant>
+ <constant name="BODY_PARAM_ANGULAR_DAMP" value="5">
+ Constant to set/get a body's angular dampening factor.
+ </constant>
<constant name="BODY_PARAM_MAX" value="6">
This is the last ID for body parameters. Any attempt to set this property is ignored. Any attempt to get it returns 0.
</constant>
diff --git a/doc/classes/PoolByteArray.xml b/doc/classes/PoolByteArray.xml
index 2640b5118f..9ef5390c5e 100644
--- a/doc/classes/PoolByteArray.xml
+++ b/doc/classes/PoolByteArray.xml
@@ -31,7 +31,7 @@
<argument index="0" name="array" type="PoolByteArray">
</argument>
<description>
- Append a [PoolByteArray] at the end of this array.
+ Append a [code]PoolByteArray[/code] at the end of this array.
</description>
</method>
<method name="compress">
@@ -40,7 +40,7 @@
<argument index="0" name="compression_mode" type="int" default="0">
</argument>
<description>
- Returns a new [PoolByteArray] with the data compressed. Set the compression mode using one of [File]'s COMPRESS_* constants.
+ Returns a new [code]PoolByteArray[/code] with the data compressed. Set the compression mode using one of [File]'s COMPRESS_* constants.
</description>
</method>
<method name="decompress">
@@ -51,7 +51,7 @@
<argument index="1" name="compression_mode" type="int" default="0">
</argument>
<description>
- Returns a new [PoolByteArray] with the data decompressed. Set buffer_size to the size of the uncompressed data. Set the compression mode using one of [File]'s COMPRESS_* constants.
+ Returns a new [code]PoolByteArray[/code] with the data decompressed. Set buffer_size to the size of the uncompressed data. Set the compression mode using one of [File]'s COMPRESS_* constants.
</description>
</method>
<method name="get_string_from_ascii">
@@ -129,7 +129,7 @@
<argument index="1" name="to" type="int">
</argument>
<description>
- Returns the slice of the [PoolByteArray] between indices (inclusive) as a new [PoolByteArray]. Any negative index is considered to be from the end of the array.
+ Returns the slice of the [code]PoolByteArray[/code] between indices (inclusive) as a new [code]PoolByteArray[/code]. Any negative index is considered to be from the end of the array.
</description>
</method>
</methods>
diff --git a/doc/classes/PoolColorArray.xml b/doc/classes/PoolColorArray.xml
index 644256e765..70503a67b9 100644
--- a/doc/classes/PoolColorArray.xml
+++ b/doc/classes/PoolColorArray.xml
@@ -31,7 +31,7 @@
<argument index="0" name="array" type="PoolColorArray">
</argument>
<description>
- Append a [PoolColorArray] at the end of this array.
+ Append a [code]PoolColorArray[/code] at the end of this array.
</description>
</method>
<method name="insert">
diff --git a/doc/classes/PoolIntArray.xml b/doc/classes/PoolIntArray.xml
index 17772b6e2a..5caa8add1e 100644
--- a/doc/classes/PoolIntArray.xml
+++ b/doc/classes/PoolIntArray.xml
@@ -31,7 +31,7 @@
<argument index="0" name="array" type="PoolIntArray">
</argument>
<description>
- Append an [PoolIntArray] at the end of this array.
+ Append an [code]PoolIntArray[/code] at the end of this array.
</description>
</method>
<method name="insert">
diff --git a/doc/classes/PoolVector2Array.xml b/doc/classes/PoolVector2Array.xml
index e5df38483a..fbfdb11825 100644
--- a/doc/classes/PoolVector2Array.xml
+++ b/doc/classes/PoolVector2Array.xml
@@ -17,7 +17,7 @@
<argument index="0" name="from" type="Array">
</argument>
<description>
- Construct a new [PoolVector2Array]. Optionally, you can pass in an Array that will be converted.
+ Construct a new [code]PoolVector2Array[/code]. Optionally, you can pass in an Array that will be converted.
</description>
</method>
<method name="append">
@@ -31,7 +31,7 @@
<argument index="0" name="array" type="PoolVector2Array">
</argument>
<description>
- Append an [PoolVector2Array] at the end of this array.
+ Append an [code]PoolVector2Array[/code] at the end of this array.
</description>
</method>
<method name="insert">
diff --git a/doc/classes/PoolVector3Array.xml b/doc/classes/PoolVector3Array.xml
index 13a8290531..e5e2924273 100644
--- a/doc/classes/PoolVector3Array.xml
+++ b/doc/classes/PoolVector3Array.xml
@@ -31,7 +31,7 @@
<argument index="0" name="array" type="PoolVector3Array">
</argument>
<description>
- Append an [PoolVector3Array] at the end of this array.
+ Append an [code]PoolVector3Array[/code] at the end of this array.
</description>
</method>
<method name="insert">
diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml
index f07e143aa0..056d7d10fa 100644
--- a/doc/classes/Quat.xml
+++ b/doc/classes/Quat.xml
@@ -4,7 +4,10 @@
Quaternion.
</brief_description>
<description>
- Quaternion is a 4 dimensional vector that is used to represent a rotation. It mainly exists to perform SLERP (spherical-linear interpolation) between two rotations. Multiplying quaternions also cheaply reproduces rotation sequences. However quaternions need to be often renormalized, or else they suffer from precision issues.
+ A 4-dimensional vector representing a rotation.
+ The vector represents a 4 dimensional complex number where multiplication of the basis elements is not commutative (multiplying i with j gives a different result than multiplying j with i).
+ Multiplying quaternions reproduces rotation sequences. However quaternions need to be often renormalized, or else they suffer from precision issues.
+ It can be used to perform SLERP (spherical-linear interpolation) between two rotations.
</description>
<tutorials>
</tutorials>
@@ -23,6 +26,7 @@
<argument index="3" name="w" type="float">
</argument>
<description>
+ Returns a quaternion defined by these values.
</description>
</method>
<method name="Quat">
@@ -57,6 +61,7 @@
<argument index="3" name="t" type="float">
</argument>
<description>
+ Performs a cubic spherical-linear interpolation with another quaternion.
</description>
</method>
<method name="dot">
@@ -111,7 +116,7 @@
<argument index="1" name="t" type="float">
</argument>
<description>
- Perform a spherical-linear interpolation with another quaternion.
+ Performs a spherical-linear interpolation with another quaternion.
</description>
</method>
<method name="slerpni">
@@ -122,6 +127,7 @@
<argument index="1" name="t" type="float">
</argument>
<description>
+ Performs a spherical-linear interpolation with another quaterion without checking if the rotation path is not bigger than 90°.
</description>
</method>
<method name="xform">
@@ -130,17 +136,22 @@
<argument index="0" name="v" type="Vector3">
</argument>
<description>
+ Transforms the vector [code]v[/code] by this quaternion.
</description>
</method>
</methods>
<members>
<member name="w" type="float" setter="" getter="">
+ W component of the quaternion. Default value: [code]1[/code]
</member>
<member name="x" type="float" setter="" getter="">
+ X component of the quaternion. Default value: [code]0[/code]
</member>
<member name="y" type="float" setter="" getter="">
+ Y component of the quaternion. Default value: [code]0[/code]
</member>
<member name="z" type="float" setter="" getter="">
+ Z component of the quaternion. Default value: [code]0[/code]
</member>
</members>
<constants>
diff --git a/doc/classes/RayCast.xml b/doc/classes/RayCast.xml
index fc96a183eb..3f999f7fe2 100644
--- a/doc/classes/RayCast.xml
+++ b/doc/classes/RayCast.xml
@@ -85,6 +85,14 @@
Returns the collision mask for this ray.
</description>
</method>
+ <method name="get_collision_mask_bit" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="get_collision_normal" qualifiers="const">
<return type="Vector3">
</return>
@@ -156,6 +164,16 @@
Set the mask to filter objects. Only objects in at least one collision layer enabled in the mask will be detected.
</description>
</method>
+ <method name="set_collision_mask_bit">
+ <return type="void">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <argument index="1" name="value" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_enabled">
<return type="void">
</return>
diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml
index b6c657783d..45a83f7ded 100644
--- a/doc/classes/RayCast2D.xml
+++ b/doc/classes/RayCast2D.xml
@@ -84,6 +84,14 @@
Returns the collision mask for this ray.
</description>
</method>
+ <method name="get_collision_mask_bit" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="get_collision_normal" qualifiers="const">
<return type="Vector2">
</return>
@@ -156,12 +164,22 @@
<method name="set_collision_mask">
<return type="void">
</return>
- <argument index="0" name="layer" type="int">
+ <argument index="0" name="mask" type="int">
</argument>
<description>
Set the mask to filter objects. Only objects in at least one collision layer enabled in the mask will be detected.
</description>
</method>
+ <method name="set_collision_mask_bit">
+ <return type="void">
+ </return>
+ <argument index="0" name="bit" type="int">
+ </argument>
+ <argument index="1" name="value" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_enabled">
<return type="void">
</return>
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index 80f7830a16..5af8c82a7b 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -4,7 +4,7 @@
2D Axis-aligned bounding box.
</brief_description>
<description>
- Rect2 provides an 2D Axis-Aligned Bounding Box. It consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
+ Rect2 consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
</description>
<tutorials>
</tutorials>
@@ -19,7 +19,7 @@
<argument index="1" name="size" type="Vector2">
</argument>
<description>
- Construct a [Rect2] by position and size.
+ Constructs a [code]Rect2[/code] by position and size.
</description>
</method>
<method name="Rect2">
@@ -34,7 +34,7 @@
<argument index="3" name="height" type="float">
</argument>
<description>
- Construct a [Rect2] by x, y, width and height.
+ Constructs a [code]Rect2[/code] by x, y, width, and height.
</description>
</method>
<method name="clip">
@@ -43,7 +43,7 @@
<argument index="0" name="b" type="Rect2">
</argument>
<description>
- Returns the intersection of this [Rect2] and b.
+ Returns the intersection of this [code]Rect2[/code] and b.
</description>
</method>
<method name="encloses">
@@ -52,7 +52,7 @@
<argument index="0" name="b" type="Rect2">
</argument>
<description>
- Returns true if this [Rect2] completely encloses another one.
+ Returns [code]true[/code] if this [code]Rect2[/code] completely encloses another one.
</description>
</method>
<method name="expand">
@@ -61,14 +61,14 @@
<argument index="0" name="to" type="Vector2">
</argument>
<description>
- Return this [Rect2] expanded to include a given point.
+ Returns this [code]Rect2[/code] expanded to include a given point.
</description>
</method>
<method name="get_area">
<return type="float">
</return>
<description>
- Get the area of the [Rect2].
+ Returns the area of the [code]Rect2[/code].
</description>
</method>
<method name="grow">
@@ -77,7 +77,7 @@
<argument index="0" name="by" type="float">
</argument>
<description>
- Return a copy of the [Rect2] grown a given amount of units towards all the sides.
+ Returns a copy of the [code]Rect2[/code] grown a given amount of units towards all the sides.
</description>
</method>
<method name="grow_individual">
@@ -92,6 +92,7 @@
<argument index="3" name=" bottom" type="float">
</argument>
<description>
+ Returns a copy of the [code]Rect2[/code] grown a given amount of units towards each direction individually.
</description>
</method>
<method name="grow_margin">
@@ -102,13 +103,14 @@
<argument index="1" name="by" type="float">
</argument>
<description>
+ Returns a copy of the [code]Rect2[/code] grown a given amount of units towards the [Margin] direction.
</description>
</method>
<method name="has_no_area">
<return type="bool">
</return>
<description>
- Return true if the [Rect2] is flat or empty.
+ Returns [code]true[/code] if the [code]Rect2[/code] is flat or empty.
</description>
</method>
<method name="has_point">
@@ -117,7 +119,7 @@
<argument index="0" name="point" type="Vector2">
</argument>
<description>
- Return true if the [Rect2] contains a point.
+ Returns [code]true[/code] if the [code]Rect2[/code] contains a point.
</description>
</method>
<method name="intersects">
@@ -126,7 +128,7 @@
<argument index="0" name="b" type="Rect2">
</argument>
<description>
- Return true if the [Rect2] overlaps with another.
+ Returns [code]true[/code] if the [code]Rect2[/code] overlaps with another.
</description>
</method>
<method name="merge">
@@ -135,7 +137,7 @@
<argument index="0" name="b" type="Rect2">
</argument>
<description>
- Combine this [Rect2] with another, a larger one is returned that contains both.
+ Returns a larger Rect2 that contains this Rect2 and [code]with[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/Rect3.xml b/doc/classes/Rect3.xml
index f41665db34..a56dac57c7 100644
--- a/doc/classes/Rect3.xml
+++ b/doc/classes/Rect3.xml
@@ -4,7 +4,7 @@
Axis-Aligned Bounding Box.
</brief_description>
<description>
- Rect3 provides an 3D Axis-Aligned Bounding Box. It consists of a position, a size, and several utility functions. It is typically used for simple (fast) overlap tests.
+ Rect3 consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
</description>
<tutorials>
</tutorials>
@@ -28,7 +28,7 @@
<argument index="0" name="with" type="Rect3">
</argument>
<description>
- Return true if this [Rect3] completely encloses another one.
+ Returns [code]true[/code] if this [code]Rect3[/code] completely encloses another one.
</description>
</method>
<method name="expand">
@@ -37,14 +37,14 @@
<argument index="0" name="to_point" type="Vector3">
</argument>
<description>
- Return this [Rect3] expanded to include a given point.
+ Returns this [code]Rect3[/code] expanded to include a given point.
</description>
</method>
<method name="get_area">
<return type="float">
</return>
<description>
- Get the area of the [Rect3].
+ Gets the area of the [code]Rect3[/code].
</description>
</method>
<method name="get_endpoint">
@@ -53,49 +53,49 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Get the position of the 8 endpoints of the [Rect3] in space.
+ Gets the position of the 8 endpoints of the [code]Rect3[/code] in space.
</description>
</method>
<method name="get_longest_axis">
<return type="Vector3">
</return>
<description>
- Return the normalized longest axis of the [Rect3].
+ Returns the normalized longest axis of the [code]Rect3[/code].
</description>
</method>
<method name="get_longest_axis_index">
<return type="int">
</return>
<description>
- Return the index of the longest axis of the [Rect3] (according to [Vector3]::AXIS* enum).
+ Returns the index of the longest axis of the [code]Rect3[/code] (according to [Vector3]::AXIS* enum).
</description>
</method>
<method name="get_longest_axis_size">
<return type="float">
</return>
<description>
- Return the scalar length of the longest axis of the [Rect3].
+ Returns the scalar length of the longest axis of the [code]Rect3[/code].
</description>
</method>
<method name="get_shortest_axis">
<return type="Vector3">
</return>
<description>
- Return the normalized shortest axis of the [Rect3].
+ Returns the normalized shortest axis of the [code]Rect3[/code].
</description>
</method>
<method name="get_shortest_axis_index">
<return type="int">
</return>
<description>
- Return the index of the shortest axis of the [Rect3] (according to [Vector3]::AXIS* enum).
+ Returns the index of the shortest axis of the [code]Rect3[/code] (according to [Vector3]::AXIS* enum).
</description>
</method>
<method name="get_shortest_axis_size">
<return type="float">
</return>
<description>
- Return the scalar length of the shortest axis of the [Rect3].
+ Returns the scalar length of the shortest axis of the [code]Rect3[/code].
</description>
</method>
<method name="get_support">
@@ -104,7 +104,7 @@
<argument index="0" name="dir" type="Vector3">
</argument>
<description>
- Return the support point in a given direction. This is useful for collision detection algorithms.
+ Returns the support point in a given direction. This is useful for collision detection algorithms.
</description>
</method>
<method name="grow">
@@ -113,21 +113,21 @@
<argument index="0" name="by" type="float">
</argument>
<description>
- Return a copy of the [Rect3] grown a given amount of units towards all the sides.
+ Returns a copy of the [code]Rect3[/code] grown a given amount of units towards all the sides.
</description>
</method>
<method name="has_no_area">
<return type="bool">
</return>
<description>
- Return true if the [Rect3] is flat or empty.
+ Returns [code]true[/code] if the [code]Rect3[/code] is flat or empty.
</description>
</method>
<method name="has_no_surface">
<return type="bool">
</return>
<description>
- Return true if the [Rect3] is empty.
+ Returns [code]true[/code] if the [code]Rect3[/code] is empty.
</description>
</method>
<method name="has_point">
@@ -136,7 +136,7 @@
<argument index="0" name="point" type="Vector3">
</argument>
<description>
- Return true if the [Rect3] contains a point.
+ Returns [code]true[/code] if the [code]Rect3[/code] contains a point.
</description>
</method>
<method name="intersection">
@@ -145,7 +145,7 @@
<argument index="0" name="with" type="Rect3">
</argument>
<description>
- Return the intersection between two [Rect3]. An empty Rect3 (size 0,0,0) is returned on failure.
+ Returns the intersection between two [code]Rect3[/code]. An empty Rect3 (size 0,0,0) is returned on failure.
</description>
</method>
<method name="intersects">
@@ -154,7 +154,7 @@
<argument index="0" name="with" type="Rect3">
</argument>
<description>
- Return true if the [Rect3] overlaps with another.
+ Returns [code]true[/code] if the [code]Rect3[/code] overlaps with another.
</description>
</method>
<method name="intersects_plane">
@@ -163,7 +163,7 @@
<argument index="0" name="plane" type="Plane">
</argument>
<description>
- Return true if the [Rect3] is at both sides of a plane.
+ Returns [code]true[/code] if the [code]Rect3[/code] is on both sides of a plane.
</description>
</method>
<method name="intersects_segment">
@@ -174,7 +174,7 @@
<argument index="1" name="to" type="Vector3">
</argument>
<description>
- Return true if the [Rect3] intersects the line segment between from and to
+ Returns [code]true[/code] if the [code]Rect3[/code] intersects the line segment between [code]from[/code] and [code]to[/code].
</description>
</method>
<method name="merge">
@@ -183,7 +183,7 @@
<argument index="0" name="with" type="Rect3">
</argument>
<description>
- Combine this [Rect3] with another, a larger one is returned that contains both.
+ Returns a larger Rect3 that contains this Rect3 and [code]with[/code].
</description>
</method>
</methods>
@@ -192,6 +192,7 @@
Ending corner.
</member>
<member name="position" type="Vector3" setter="" getter="">
+ Beginning corner.
</member>
<member name="size" type="Vector3" setter="" getter="">
Size from position to end.
diff --git a/doc/classes/RemoteTransform.xml b/doc/classes/RemoteTransform.xml
index ecc136055e..67679bc9df 100644
--- a/doc/classes/RemoteTransform.xml
+++ b/doc/classes/RemoteTransform.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="RemoteTransform" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ RemoteTransform mirrors the [Transform] of another [Spatial] derived Node in the scene.
</brief_description>
<description>
+ RemoteTransform mirrors the [Transform] of another [Spatial] derived Node (called the remote node) in the scene.
+ It can be set to track another Node's position, rotation and/or scale and update its own accordingly, using either global or local coordinates.
</description>
<tutorials>
</tutorials>
@@ -82,14 +85,19 @@
</methods>
<members>
<member name="remote_path" type="NodePath" setter="set_remote_node" getter="get_remote_node">
+ The remote node's [NodePath].
</member>
<member name="update_position" type="bool" setter="set_update_position" getter="get_update_position">
+ If [code]true[/code] the remote node's position is mirrored.
</member>
<member name="update_rotation" type="bool" setter="set_update_rotation" getter="get_update_rotation">
+ If [code]true[/code] the remote node's rotation is mirrored.
</member>
<member name="update_scale" type="bool" setter="set_update_scale" getter="get_update_scale">
+ If [code]true[/code] the remote node's scale is mirrored.
</member>
<member name="use_global_coordinates" type="bool" setter="set_use_global_coordinates" getter="get_use_global_coordinates">
+ If [code]true[/code] global coordinates are used. If [code]false[/code] local coordinates are used. Default value: [code]true[/code].
</member>
</members>
<constants>
diff --git a/doc/classes/RemoteTransform2D.xml b/doc/classes/RemoteTransform2D.xml
index 346b8de621..eac7427f9f 100644
--- a/doc/classes/RemoteTransform2D.xml
+++ b/doc/classes/RemoteTransform2D.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="RemoteTransform2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ RemoteTransform2D mirrors the [Transform2D] of another [CanvasItem] derived Node in the scene.
</brief_description>
<description>
+ RemoteTransform2D mirrors the [Transform2D] of another [CanvasItem] derived Node (called the remote node) in the scene.
+ It can be set to track another Node's position, rotation and/or and update its own accordingly, using either global or local coordinates.
</description>
<tutorials>
</tutorials>
@@ -82,14 +85,19 @@
</methods>
<members>
<member name="remote_path" type="NodePath" setter="set_remote_node" getter="get_remote_node">
+ The remote node's [NodePath].
</member>
<member name="update_position" type="bool" setter="set_update_position" getter="get_update_position">
+ If [code]true[/code] the remote node's position is mirrored.
</member>
<member name="update_rotation" type="bool" setter="set_update_rotation" getter="get_update_rotation">
+ If [code]true[/code] the remote node's rotation is mirrored.
</member>
<member name="update_scale" type="bool" setter="set_update_scale" getter="get_update_scale">
+ If [code]true[/code] the remote node's scale is mirrored.
</member>
<member name="use_global_coordinates" type="bool" setter="set_use_global_coordinates" getter="get_use_global_coordinates">
+ If [code]true[/code] global coordinates are used. If [code]false[/code] local coordinates are used. Default value: [code]true[/code].
</member>
</members>
<constants>
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index 57497f5d78..7767b26988 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -81,7 +81,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Set the path of the resource. This is useful mainly for editors when saving/loading, and shouldn't be changed by anything else. Fails if another [Resource] already has path "path".
+ Set the path of the resource. This is useful mainly for editors when saving/loading, and shouldn't be changed by anything else. Fails if another [code]Resource[/code] already has path "path".
</description>
</method>
<method name="setup_local_to_scene">
@@ -96,7 +96,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Set the path of the resource. Differs from set_path(), if another [Resource] exists with "path" it over-takes it, instead of failing.
+ Set the path of the resource. Differs from set_path(), if another [code]Resource[/code] exists with "path" it over-takes it, instead of failing.
</description>
</method>
</methods>
diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml
index 6558a388c8..9fb3c71a5b 100644
--- a/doc/classes/ResourceLoader.xml
+++ b/doc/classes/ResourceLoader.xml
@@ -4,7 +4,7 @@
Resource Loader.
</brief_description>
<description>
- Resource Loader. This is a static object accessible as [ResourceLoader]. GDScript has a simplified load() function, though.
+ Resource Loader. This is a static object accessible as [code]ResourceLoader[/code]. GDScript has a simplified load() function, though.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 0e15785d0d..cc644f34cb 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -39,24 +39,28 @@
<return type="void">
</return>
<description>
+ Clears the label's text.
</description>
</method>
<method name="get_bbcode" qualifiers="const">
<return type="String">
</return>
<description>
+ Returns label's BBCode.
</description>
</method>
<method name="get_line_count" qualifiers="const">
<return type="int">
</return>
<description>
+ Returns the number of lines in the text.
</description>
</method>
<method name="get_percent_visible" qualifiers="const">
<return type="float">
</return>
<description>
+ Returns the text's visibility as a floating point value between 0.0 and 1.0.
</description>
</method>
<method name="get_tab_size" qualifiers="const">
@@ -69,13 +73,14 @@
<return type="String">
</return>
<description>
- Returns the raw text, stripping out the formatting information.
+ Returns the label's text with the formatting removed.
</description>
</method>
<method name="get_total_character_count" qualifiers="const">
<return type="int">
</return>
<description>
+ Returns the total number of characters.
</description>
</method>
<method name="get_v_scroll">
@@ -94,6 +99,7 @@
<return type="int">
</return>
<description>
+ Returns the number of visible lines.
</description>
</method>
<method name="is_meta_underlined" qualifiers="const">
@@ -112,6 +118,7 @@
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if active scrolling is enabled.
</description>
</method>
<method name="is_scroll_following" qualifiers="const">
@@ -124,19 +131,21 @@
<return type="bool">
</return>
<description>
- Return true if selecting the text inside this richtext is allowed.
+ Returns [code]true[/code] if the label's text can be selected.
</description>
</method>
<method name="is_using_bbcode" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if the label has BBCode.
</description>
</method>
<method name="newline">
<return type="void">
</return>
<description>
+ Adds a newline to the end of the rich text.
</description>
</method>
<method name="parse_bbcode">
@@ -243,6 +252,7 @@
<argument index="0" name="text" type="String">
</argument>
<description>
+ Sets the BBCode text to the label.
</description>
</method>
<method name="set_meta_underline">
@@ -267,6 +277,7 @@
<argument index="0" name="percent_visible" type="float">
</argument>
<description>
+ Sets the text's visibility. Takes a floating point value between 0.0 and 1.0.
</description>
</method>
<method name="set_scroll_active">
@@ -291,7 +302,7 @@
<argument index="0" name="enabled" type="bool">
</argument>
<description>
- Set to true if selecting the text inside this richtext is allowed.
+ If [code]true[/code] text can be selected.
</description>
</method>
<method name="set_tab_size">
@@ -341,14 +352,19 @@
</methods>
<members>
<member name="bbcode_enabled" type="bool" setter="set_use_bbcode" getter="is_using_bbcode">
+ If [code]true[/code] the label uses BBCode formatting. Default value: [code]false[/code].
</member>
<member name="bbcode_text" type="String" setter="set_bbcode" getter="get_bbcode">
+ The label's text in BBCode format.
</member>
<member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color">
+ If [code]true[/code] the label uses the custom font color. Default value: [code]false[/code].
</member>
<member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible">
+ The text's visibility, as a [float] between 0.0 and 1.0.
</member>
<member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters">
+ The restricted number of characters to display in the label.
</member>
</members>
<signals>
@@ -394,6 +410,8 @@
</constant>
<constant name="ITEM_LIST" value="9">
</constant>
+ <constant name="ITEM_TABLE" value="10">
+ </constant>
<constant name="ITEM_META" value="11">
</constant>
</constants>
diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml
index 76a93248fb..f9488d2f7f 100644
--- a/doc/classes/RigidBody.xml
+++ b/doc/classes/RigidBody.xml
@@ -430,18 +430,18 @@
</signal>
</signals>
<constants>
- <constant name="MODE_STATIC" value="1">
- Static mode. The body behaves like a [StaticBody], and can only move by user code.
- </constant>
- <constant name="MODE_KINEMATIC" value="3">
- Kinematic body. The body behaves like a [KinematicBody], and can only move by user code.
- </constant>
<constant name="MODE_RIGID" value="0">
Rigid body. This is the "natural" state of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code.
</constant>
+ <constant name="MODE_STATIC" value="1">
+ Static mode. The body behaves like a [StaticBody], and can only move by user code.
+ </constant>
<constant name="MODE_CHARACTER" value="2">
Character body. This behaves like a rigid body, but can not rotate.
</constant>
+ <constant name="MODE_KINEMATIC" value="3">
+ Kinematic body. The body behaves like a [KinematicBody], and can only move by user code.
+ </constant>
<constant name="AXIS_LOCK_DISABLED" value="0">
</constant>
<constant name="AXIS_LOCK_X" value="1">
diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml
index 2bc3fd726b..e0ca6084e6 100644
--- a/doc/classes/RigidBody2D.xml
+++ b/doc/classes/RigidBody2D.xml
@@ -484,18 +484,18 @@
</signal>
</signals>
<constants>
- <constant name="MODE_STATIC" value="1">
- Static mode. The body behaves like a [StaticBody2D] and does not move.
- </constant>
- <constant name="MODE_KINEMATIC" value="3">
- Kinematic mode. The body behaves like a [KinematicBody2D], and must be moved by code.
- </constant>
<constant name="MODE_RIGID" value="0">
Rigid mode. The body behaves as a physical object. It collides with other bodies and responds to forces applied to it. This is the default mode.
</constant>
+ <constant name="MODE_STATIC" value="1">
+ Static mode. The body behaves like a [StaticBody2D] and does not move.
+ </constant>
<constant name="MODE_CHARACTER" value="2">
Character mode. Similar to [code]MODE_RIGID[/code], but the body can not rotate.
</constant>
+ <constant name="MODE_KINEMATIC" value="3">
+ Kinematic mode. The body behaves like a [KinematicBody2D], and must be moved by code.
+ </constant>
<constant name="CCD_MODE_DISABLED" value="0">
Continuous collision detection disabled. This is the fastest way to detect body collisions, but can miss small, fast-moving objects.
</constant>
diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml
index 307afba8a7..c13e009976 100644
--- a/doc/classes/Script.xml
+++ b/doc/classes/Script.xml
@@ -19,12 +19,6 @@
Returns true if the script can be instanced.
</description>
</method>
- <method name="get_node_type" qualifiers="const">
- <return type="String">
- </return>
- <description>
- </description>
- </method>
<method name="get_source_code" qualifiers="const">
<return type="String">
</return>
diff --git a/doc/classes/Semaphore.xml b/doc/classes/Semaphore.xml
index 0aeb6472af..c9c8ac0298 100644
--- a/doc/classes/Semaphore.xml
+++ b/doc/classes/Semaphore.xml
@@ -15,14 +15,14 @@
<return type="int" enum="Error">
</return>
<description>
- Lowers the [Semaphore], allowing one more thread in.
+ Lowers the [code]Semaphore[/code], allowing one more thread in.
</description>
</method>
<method name="wait">
<return type="int" enum="Error">
</return>
<description>
- Tries to wait for the [Semaphore], if its value is zero, blocks until non-zero.
+ Tries to wait for the [code]Semaphore[/code], if its value is zero, blocks until non-zero.
</description>
</method>
</methods>
diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml
index abb0bfa246..38e971b6bd 100644
--- a/doc/classes/Spatial.xml
+++ b/doc/classes/Spatial.xml
@@ -29,7 +29,7 @@
<return type="Spatial">
</return>
<description>
- Returns the parent [Spatial], or an empty [Object] if no parent exists or parent is not of type [Spatial].
+ Returns the parent [code]Spatial[/code], or an empty [Object] if no parent exists or parent is not of type [code]Spatial[/code].
</description>
</method>
<method name="get_rotation" qualifiers="const">
diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml
index 2fdd4b07d5..077de3dc3c 100644
--- a/doc/classes/StreamPeer.xml
+++ b/doc/classes/StreamPeer.xml
@@ -43,7 +43,7 @@
<return type="int">
</return>
<description>
- Return the amount of bytes this [StreamPeer] has available.
+ Return the amount of bytes this [code]StreamPeer[/code] has available.
</description>
</method>
<method name="get_data">
@@ -135,7 +135,7 @@
<return type="bool">
</return>
<description>
- Return whether this [StreamPeer] is using big-endian format.
+ Return whether this [code]StreamPeer[/code] is using big-endian format.
</description>
</method>
<method name="put_16">
@@ -270,7 +270,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Set this [StreamPeer] to use big-endian format. Default is false.
+ Set this [code]StreamPeer[/code] to use big-endian format. Default is false.
</description>
</method>
</methods>
diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml
index 7a2843ff47..5eb3f551f4 100644
--- a/doc/classes/StreamPeerSSL.xml
+++ b/doc/classes/StreamPeerSSL.xml
@@ -29,7 +29,7 @@
<argument index="2" name="for_hostname" type="String" default="&quot;&quot;">
</argument>
<description>
- Connect to a peer using an underlying [StreamPeer] "stream", when "validate_certs" is true, [StreamPeerSSL] will validate that the certificate presented by the peer matches the "for_hostname".
+ Connect to a peer using an underlying [StreamPeer] "stream", when "validate_certs" is true, [code]StreamPeerSSL[/code] will validate that the certificate presented by the peer matches the "for_hostname".
</description>
</method>
<method name="disconnect_from_stream">
@@ -49,10 +49,10 @@
</methods>
<constants>
<constant name="STATUS_DISCONNECTED" value="0">
- A status representing a [StreamPeerSSL] that is disconnected.
+ A status representing a [code]StreamPeerSSL[/code] that is disconnected.
</constant>
<constant name="STATUS_CONNECTED" value="1">
- A status representing a [StreamPeerSSL] that is connected to a host.
+ A status representing a [code]StreamPeerSSL[/code] that is connected to a host.
</constant>
<constant name="STATUS_ERROR_NO_CERTIFICATE" value="2">
An errot status that shows the peer did not present a SSL certificate and validation was requested.
diff --git a/doc/classes/StreamPeerTCP.xml b/doc/classes/StreamPeerTCP.xml
index 3b2af330b3..9b7cd91ea5 100644
--- a/doc/classes/StreamPeerTCP.xml
+++ b/doc/classes/StreamPeerTCP.xml
@@ -59,16 +59,16 @@
</methods>
<constants>
<constant name="STATUS_NONE" value="0">
- The initial status of the [StreamPeerTCP], also the status after a disconnect.
+ The initial status of the [code]StreamPeerTCP[/code], also the status after a disconnect.
</constant>
<constant name="STATUS_CONNECTING" value="1">
- A status representing a [StreamPeerTCP] that is connecting to a host.
+ A status representing a [code]StreamPeerTCP[/code] that is connecting to a host.
</constant>
<constant name="STATUS_CONNECTED" value="2">
- A status representing a [StreamPeerTCP] that is connected to a host.
+ A status representing a [code]StreamPeerTCP[/code] that is connected to a host.
</constant>
<constant name="STATUS_ERROR" value="3">
- A staus representing a [StreamPeerTCP] in error state.
+ A staus representing a [code]StreamPeerTCP[/code] in error state.
</constant>
</constants>
</class>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index c7c19997b9..546712f223 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -17,6 +17,7 @@
<argument index="0" name="from" type="bool">
</argument>
<description>
+ Constructs a new String from the given [bool].
</description>
</method>
<method name="String">
@@ -25,6 +26,7 @@
<argument index="0" name="from" type="int">
</argument>
<description>
+ Constructs a new String from the given [int].
</description>
</method>
<method name="String">
@@ -33,6 +35,7 @@
<argument index="0" name="from" type="float">
</argument>
<description>
+ Constructs a new String from the given [float].
</description>
</method>
<method name="String">
@@ -41,6 +44,7 @@
<argument index="0" name="from" type="Vector2">
</argument>
<description>
+ Constructs a new String from the given [Vector2].
</description>
</method>
<method name="String">
@@ -49,6 +53,7 @@
<argument index="0" name="from" type="Rect2">
</argument>
<description>
+ Constructs a new String from the given [Rect2].
</description>
</method>
<method name="String">
@@ -57,6 +62,7 @@
<argument index="0" name="from" type="Vector3">
</argument>
<description>
+ Constructs a new String from the given [Vector3].
</description>
</method>
<method name="String">
@@ -65,6 +71,7 @@
<argument index="0" name="from" type="Transform2D">
</argument>
<description>
+ Constructs a new String from the given [Transform2D].
</description>
</method>
<method name="String">
@@ -73,6 +80,7 @@
<argument index="0" name="from" type="Plane">
</argument>
<description>
+ Constructs a new String from the given [Plane].
</description>
</method>
<method name="String">
@@ -81,6 +89,7 @@
<argument index="0" name="from" type="Quat">
</argument>
<description>
+ Constructs a new String from the given [Quat].
</description>
</method>
<method name="String">
@@ -89,6 +98,7 @@
<argument index="0" name="from" type="Rect3">
</argument>
<description>
+ Constructs a new String from the given [Rect3].
</description>
</method>
<method name="String">
@@ -97,6 +107,7 @@
<argument index="0" name="from" type="Basis">
</argument>
<description>
+ Constructs a new String from the given [Basis].
</description>
</method>
<method name="String">
@@ -105,6 +116,7 @@
<argument index="0" name="from" type="Transform">
</argument>
<description>
+ Constructs a new String from the given [Transform].
</description>
</method>
<method name="String">
@@ -113,6 +125,7 @@
<argument index="0" name="from" type="Color">
</argument>
<description>
+ Constructs a new String from the given [Color].
</description>
</method>
<method name="String">
@@ -121,6 +134,7 @@
<argument index="0" name="from" type="NodePath">
</argument>
<description>
+ Constructs a new String from the given [NodePath].
</description>
</method>
<method name="String">
@@ -129,6 +143,7 @@
<argument index="0" name="from" type="RID">
</argument>
<description>
+ Constructs a new String from the given [RID].
</description>
</method>
<method name="String">
@@ -137,6 +152,7 @@
<argument index="0" name="from" type="Dictionary">
</argument>
<description>
+ Constructs a new String from the given [Dictionary].
</description>
</method>
<method name="String">
@@ -145,6 +161,7 @@
<argument index="0" name="from" type="Array">
</argument>
<description>
+ Constructs a new String from the given [Array].
</description>
</method>
<method name="String">
@@ -153,6 +170,7 @@
<argument index="0" name="from" type="PoolByteArray">
</argument>
<description>
+ Constructs a new String from the given [PoolByteArray].
</description>
</method>
<method name="String">
@@ -161,6 +179,7 @@
<argument index="0" name="from" type="PoolIntArray">
</argument>
<description>
+ Constructs a new String from the given [PoolIntArray].
</description>
</method>
<method name="String">
@@ -169,6 +188,7 @@
<argument index="0" name="from" type="PoolRealArray">
</argument>
<description>
+ Constructs a new String from the given [PoolRealArray].
</description>
</method>
<method name="String">
@@ -177,6 +197,7 @@
<argument index="0" name="from" type="PoolStringArray">
</argument>
<description>
+ Constructs a new String from the given [PoolStringArray].
</description>
</method>
<method name="String">
@@ -185,6 +206,7 @@
<argument index="0" name="from" type="PoolVector2Array">
</argument>
<description>
+ Constructs a new String from the given [PoolVector2Array].
</description>
</method>
<method name="String">
@@ -193,6 +215,7 @@
<argument index="0" name="from" type="PoolVector3Array">
</argument>
<description>
+ Constructs a new String from the given [PoolVector3Array].
</description>
</method>
<method name="String">
@@ -201,6 +224,7 @@
<argument index="0" name="from" type="PoolColorArray">
</argument>
<description>
+ Constructs a new String from the given [PoolColorArray].
</description>
</method>
<method name="begins_with">
@@ -209,35 +233,35 @@
<argument index="0" name="text" type="String">
</argument>
<description>
- Return true if the strings begins with the given string.
+ Returns [code]true[/code] if the string begins with the given string.
</description>
</method>
<method name="bigrams">
<return type="PoolStringArray">
</return>
<description>
- Return the bigrams (pairs of consecutive letters) of this string.
+ Returns the bigrams (pairs of consecutive letters) of this string.
</description>
</method>
<method name="c_escape">
<return type="String">
</return>
<description>
- Return a copy of the string with special characters escaped using the C language standard.
+ Returns a copy of the string with special characters escaped using the C language standard.
</description>
</method>
<method name="c_unescape">
<return type="String">
</return>
<description>
- Return a copy of the string with escaped characters replaced by their meanings according to the C language standard.
+ Returns a copy of the string with escaped characters replaced by their meanings according to the C language standard.
</description>
</method>
<method name="capitalize">
<return type="String">
</return>
<description>
- Change the case of some letters. Replace underscores with spaces, convert all letters to lowercase then capitalize first and every letter following the space character. For [code]capitalize camelCase mixed_with_underscores[/code] it will return [code]Capitalize Camelcase Mixed With Underscores[/code].
+ Changes the case of some letters. Replaces underscores with spaces, converts all letters to lowercase, then capitalizes first and every letter following the space character. For [code]capitalize camelCase mixed_with_underscores[/code] it will return [code]Capitalize Camelcase Mixed With Underscores[/code].
</description>
</method>
<method name="casecmp_to">
@@ -246,14 +270,14 @@
<argument index="0" name="to" type="String">
</argument>
<description>
- Perform a case-sensitive comparison to another string, return -1 if less, 0 if equal and +1 if greater.
+ Performs a case-sensitive comparison to another string. Returns [code]-1[/code] if less than, [code]+1[/code] if greater than, or [code]0[/code] if equal.
</description>
</method>
<method name="empty">
<return type="bool">
</return>
<description>
- Return true if the string is empty.
+ Returns [code]true[/code] if the string is empty.
</description>
</method>
<method name="ends_with">
@@ -262,7 +286,7 @@
<argument index="0" name="text" type="String">
</argument>
<description>
- Return true if the strings ends with the given string.
+ Returns [code]true[/code] if the string ends with the given string.
</description>
</method>
<method name="erase">
@@ -271,7 +295,7 @@
<argument index="1" name="chars" type="int">
</argument>
<description>
- Erase [code]chars[/code] characters from the string starting from [code]position[/code].
+ Erases [code]chars[/code] characters from the string starting from [code]position[/code].
</description>
</method>
<method name="find">
@@ -282,7 +306,7 @@
<argument index="1" name="from" type="int" default="0">
</argument>
<description>
- Find the first occurrence of a substring, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
+ Finds the first occurrence of a substring. Returns the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
</description>
</method>
<method name="find_last">
@@ -291,7 +315,7 @@
<argument index="0" name="what" type="String">
</argument>
<description>
- Find the last occurrence of a substring, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
+ Finds the last occurrence of a substring. Returns the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
</description>
</method>
<method name="findn">
@@ -302,7 +326,7 @@
<argument index="1" name="from" type="int" default="0">
</argument>
<description>
- Find the first occurrence of a substring but search as case-insensitive, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
+ Finds the first occurrence of a substring, ignoring case. Returns the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
</description>
</method>
<method name="format">
@@ -313,48 +337,49 @@
<argument index="1" name="placeholder" type="String" default="{_}">
</argument>
<description>
+ Formats the string by replacing all occurences of [code]placeholder[/code] with [code]values[/code].
</description>
</method>
<method name="get_base_dir">
<return type="String">
</return>
<description>
- If the string is a path to a file, return the base directory.
+ If the string is a valid file path, returns the base directory name.
</description>
</method>
<method name="get_basename">
<return type="String">
</return>
<description>
- If the string is a path to a file, return the path to the file without the extension.
+ If the string is a valid file path, returns the full file path without the extension.
</description>
</method>
<method name="get_extension">
<return type="String">
</return>
<description>
- If the string is a path to a file, return the extension.
+ If the string is a valid file path, returns the extension.
</description>
</method>
<method name="get_file">
<return type="String">
</return>
<description>
- If the string is a path to a file, return the file and ignore the base directory.
+ If the string is a valid file path, returns the filename.
</description>
</method>
<method name="hash">
<return type="int">
</return>
<description>
- Hash the string and return a 32 bits integer.
+ Hashes the string and returns a 32-bit integer.
</description>
</method>
<method name="hex_to_int">
<return type="int">
</return>
<description>
- Convert a string containing a hexadecimal number into an int.
+ Converts a string containing a hexadecimal number into an integer.
</description>
</method>
<method name="insert">
@@ -365,21 +390,21 @@
<argument index="1" name="what" type="String">
</argument>
<description>
- Insert a substring at a given position.
+ Inserts a substring at a given position.
</description>
</method>
<method name="is_abs_path">
<return type="bool">
</return>
<description>
- If the string is a path to a file or directory, return true if the path is absolute.
+ If the string is a path to a file or directory, returns [code]true[/code] if the path is absolute.
</description>
</method>
<method name="is_rel_path">
<return type="bool">
</return>
<description>
- If the string is a path to a file or directory, return true if the path is relative.
+ If the string is a path to a file or directory, returns [code]true[/code] if the path is relative.
</description>
</method>
<method name="is_subsequence_of">
@@ -388,7 +413,7 @@
<argument index="0" name="text" type="String">
</argument>
<description>
- Check whether this string is a subsequence of the given string.
+ Returns [code]true[/code] if this string is a subsequence of the given string.
</description>
</method>
<method name="is_subsequence_ofi">
@@ -397,49 +422,49 @@
<argument index="0" name="text" type="String">
</argument>
<description>
- Check whether this string is a subsequence of the given string, without considering case.
+ Returns [code]true[/code] if this string is a subsequence of the given string, without considering case.
</description>
</method>
<method name="is_valid_float">
<return type="bool">
</return>
<description>
- Check whether the string contains a valid float.
+ Returns [code]true[/code] if this string contains a valid float.
</description>
</method>
<method name="is_valid_html_color">
<return type="bool">
</return>
<description>
- Check whether the string contains a valid color in HTML notation.
+ Returns [code]true[/code] if this string contains a valid color in HTML notation.
</description>
</method>
<method name="is_valid_identifier">
<return type="bool">
</return>
<description>
- Check whether the string is a valid identifier. As is common in programming languages, a valid identifier may contain only letters, digits and underscores (_) and the first character may not be a digit.
+ Returns [code]true[/code] if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores (_) and the first character may not be a digit.
</description>
</method>
<method name="is_valid_integer">
<return type="bool">
</return>
<description>
- Check whether the string contains a valid integer.
+ Returns [code]true[/code] if this string contains a valid integer.
</description>
</method>
<method name="is_valid_ip_address">
<return type="bool">
</return>
<description>
- Check whether the string contains a valid IP address.
+ Returns [code]true[/code] if this string contains a valid IP address.
</description>
</method>
<method name="json_escape">
<return type="String">
</return>
<description>
- Return a copy of the string with special characters escaped using the JSON standard.
+ Returns a copy of the string with special characters escaped using the JSON standard.
</description>
</method>
<method name="left">
@@ -448,14 +473,14 @@
<argument index="0" name="position" type="int">
</argument>
<description>
- Return an amount of characters from the left of the string.
+ Returns a number of characters from the left of the string.
</description>
</method>
<method name="length">
<return type="int">
</return>
<description>
- Return the length of the string in characters.
+ Returns the string's amount of characters.
</description>
</method>
<method name="match">
@@ -464,7 +489,7 @@
<argument index="0" name="expr" type="String">
</argument>
<description>
- Do a simple expression match, where '*' matches zero or more arbitrary characters and '?' matches any single character except '.'.
+ Does a simple expression match, where '*' matches zero or more arbitrary characters and '?' matches any single character except '.'.
</description>
</method>
<method name="matchn">
@@ -473,21 +498,21 @@
<argument index="0" name="expr" type="String">
</argument>
<description>
- Do a simple case insensitive expression match, using ? and * wildcards (see [method match]).
+ Does a simple case insensitive expression match, using ? and * wildcards (see [method match]).
</description>
</method>
<method name="md5_buffer">
<return type="PoolByteArray">
</return>
<description>
- Return the MD5 hash of the string as an array of bytes.
+ Returns the MD5 hash of the string as an array of bytes.
</description>
</method>
<method name="md5_text">
<return type="String">
</return>
<description>
- Return the MD5 hash of the string as a string.
+ Returns the MD5 hash of the string as a string.
</description>
</method>
<method name="nocasecmp_to">
@@ -496,7 +521,7 @@
<argument index="0" name="to" type="String">
</argument>
<description>
- Perform a case-insensitive comparison to another string, return -1 if less, 0 if equal and +1 if greater.
+ Performs a case-insensitive comparison to another string. Returns [code]-1[/code] if less than, [code]+1[/code] if greater than, or [code]0[/code] if equal.
</description>
</method>
<method name="ord_at">
@@ -505,7 +530,7 @@
<argument index="0" name="at" type="int">
</argument>
<description>
- Return the character code at position [code]at[/code].
+ Returns the character code at position [code]at[/code].
</description>
</method>
<method name="pad_decimals">
@@ -514,7 +539,7 @@
<argument index="0" name="digits" type="int">
</argument>
<description>
- Format a number to have an exact number of [code]digits[/code] after the decimal point.
+ Formats a number to have an exact number of [code]digits[/code] after the decimal point.
</description>
</method>
<method name="pad_zeros">
@@ -523,7 +548,7 @@
<argument index="0" name="digits" type="int">
</argument>
<description>
- Format a number to have an exact number of [code]digits[/code] before the decimal point.
+ Formats a number to have an exact number of [code]digits[/code] before the decimal point.
</description>
</method>
<method name="percent_decode">
@@ -537,7 +562,7 @@
<return type="String">
</return>
<description>
- Percent-encode a string. This is meant to encode parameters in a URL when sending a HTTP GET request and bodies of form-urlencoded POST request.
+ Percent-encodes a string. Encodes parameters in a URL when sending a HTTP GET request (and bodies of form-urlencoded POST requests).
</description>
</method>
<method name="plus_file">
@@ -557,7 +582,7 @@
<argument index="1" name="forwhat" type="String">
</argument>
<description>
- Replace occurrences of a substring for different ones inside the string.
+ Replaces occurrences of a substring with the given one inside the string.
</description>
</method>
<method name="replacen">
@@ -568,7 +593,7 @@
<argument index="1" name="forwhat" type="String">
</argument>
<description>
- Replace occurrences of a substring for different ones inside the string, but search case-insensitive.
+ Replaces occurrences of a substring with the given one inside the string. Ignores case.
</description>
</method>
<method name="rfind">
@@ -579,7 +604,7 @@
<argument index="1" name="from" type="int" default="-1">
</argument>
<description>
- Perform a search for a substring, but start from the end of the string instead of the beginning.
+ Performs a search for a substring, but starts from the end of the string instead of the beginning.
</description>
</method>
<method name="rfindn">
@@ -590,7 +615,7 @@
<argument index="1" name="from" type="int" default="-1">
</argument>
<description>
- Perform a search for a substring, but start from the end of the string instead of the beginning. Also search case-insensitive.
+ Performs a search for a substring, but starts from the end of the string instead of the beginning. Ignores case.
</description>
</method>
<method name="right">
@@ -599,7 +624,7 @@
<argument index="0" name="position" type="int">
</argument>
<description>
- Return the right side of the string from a given position.
+ Returns the right side of the string from a given position.
</description>
</method>
<method name="sha256_buffer">
@@ -612,7 +637,7 @@
<return type="String">
</return>
<description>
- Return the SHA-256 hash of the string as a string.
+ Returns the SHA-256 hash of the string as a string.
</description>
</method>
<method name="similarity">
@@ -621,7 +646,7 @@
<argument index="0" name="text" type="String">
</argument>
<description>
- Return the similarity index of the text compared to this string. 1 means totally similar and 0 means totally dissimilar.
+ Returns the similarity index of the text compared to this string. 1 means totally similar and 0 means totally dissimilar.
</description>
</method>
<method name="split">
@@ -632,7 +657,7 @@
<argument index="1" name="allow_empty" type="bool" default="True">
</argument>
<description>
- Split the string by a divisor string, return an array of the substrings. Example "One,Two,Three" will return ["One","Two","Three"] if split by ",".
+ Splits the string by a divisor string and returns an array of the substrings. Example "One,Two,Three" will return ["One","Two","Three"] if split by ",".
</description>
</method>
<method name="split_floats">
@@ -643,7 +668,7 @@
<argument index="1" name="allow_empty" type="bool" default="True">
</argument>
<description>
- Split the string in floats by using a divisor string, return an array of the substrings. Example "1,2.5,3" will return [1,2.5,3] if split by ",".
+ Splits the string in floats by using a divisor string and returns an array of the substrings. Example "1,2.5,3" will return [1,2.5,3] if split by ",".
</description>
</method>
<method name="strip_edges">
@@ -654,7 +679,7 @@
<argument index="1" name="right" type="bool" default="True">
</argument>
<description>
- Return a copy of the string stripped of any non-printable character at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively.
+ Returns a copy of the string stripped of any non-printable character at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively.
</description>
</method>
<method name="substr">
@@ -665,63 +690,63 @@
<argument index="1" name="len" type="int">
</argument>
<description>
- Return part of the string from the position [code]from[/code], with length [code]len[/code].
+ Returns part of the string from the position [code]from[/code] with length [code]len[/code].
</description>
</method>
<method name="to_ascii">
<return type="PoolByteArray">
</return>
<description>
- Convert the String (which is a character array) to PoolByteArray (which is an array of bytes). The conversion is speeded up in comparison to to_utf8() with the assumption that all the characters the String contains are only ASCII characters.
+ Converts the String (which is a character array) to [PoolByteArray] (which is an array of bytes). The conversion is sped up in comparison to to_utf8() with the assumption that all the characters the String contains are only ASCII characters.
</description>
</method>
<method name="to_float">
<return type="float">
</return>
<description>
- Convert a string, containing a decimal number, into a [code]float[/code].
+ Converts a string containing a decimal number into a [code]float[/code].
</description>
</method>
<method name="to_int">
<return type="int">
</return>
<description>
- Convert a string, containing an integer number, into an [code]int[/code].
+ Converts a string containing an integer number into an [code]int[/code].
</description>
</method>
<method name="to_lower">
<return type="String">
</return>
<description>
- Return the string converted to lowercase.
+ Returns the string converted to lowercase.
</description>
</method>
<method name="to_upper">
<return type="String">
</return>
<description>
- Return the string converted to uppercase.
+ Returns the string converted to uppercase.
</description>
</method>
<method name="to_utf8">
<return type="PoolByteArray">
</return>
<description>
- Convert the String (which is an array of characters) to PoolByteArray (which is an array of bytes). The conversion is a bit slower than to_ascii(), but supports all UTF-8 characters. Therefore, you should prefer this function over to_ascii().
+ Converts the String (which is an array of characters) to [PoolByteArray] (which is an array of bytes). The conversion is a bit slower than to_ascii(), but supports all UTF-8 characters. Therefore, you should prefer this function over to_ascii().
</description>
</method>
<method name="xml_escape">
<return type="String">
</return>
<description>
- Return a copy of the string with special characters escaped using the XML standard.
+ Returns a copy of the string with special characters escaped using the XML standard.
</description>
</method>
<method name="xml_unescape">
<return type="String">
</return>
<description>
- Return a copy of the string with escaped characters replaced by their meanings according to the XML standard.
+ Returns a copy of the string with escaped characters replaced by their meanings according to the XML standard.
</description>
</method>
</methods>
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index 1e91ee402b..987a725977 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -4,7 +4,7 @@
Helper tool to create geometry.
</brief_description>
<description>
- The [SurfaceTool] is used to construct a [Mesh] by specifying vertex attributes individually. It can be used to construct a [Mesh] from script. All properties except index need to be added before a call to [method add_vertex]. For example adding vertex colors and UVs looks like
+ The [code]SurfaceTool[/code] is used to construct a [Mesh] by specifying vertex attributes individually. It can be used to construct a [Mesh] from script. All properties except index need to be added before a call to [method add_vertex]. For example adding vertex colors and UVs looks like
[codeblock]
var st = SurfaceTool.new()
st.begin(Mesh.PRIMITIVE_TRIANGLES)
@@ -12,7 +12,7 @@
st.add_uv(Vector2(0, 0))
st.add_vertex(Vector3(0, 0, 0))
[/codeblock]
- The [SurfaceTool] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calls to [method add_uv] or [method add_color] then the last values would be used.
+ The [code]SurfaceTool[/code] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calls to [method add_uv] or [method add_color] then the last values would be used.
It is very important that vertex attributes are passed [b]before[/b] the call to [method add_vertex], failure to do this will result in an error when committing the vertex information to a mesh.
</description>
<tutorials>
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index ad02064862..a7dd86a459 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -4,8 +4,10 @@
Tabbed Container.
</brief_description>
<description>
- Tabbed Container. Contains several children controls, but shows only one at the same time. Clicking on the top tabs allows to change the currently visible one.
- Children controls of this one automatically.
+ Sets the active tab's [code]visible[/code] property to the value [code]true[/code]. Sets all other children's to [code]false[/code].
+ Ignores non-[Control] children.
+ Individual tabs are always visible unless you use [method set_tab_disabled] and [method set_tab_title] to hide it.
+ To hide only a tab's content, nest the content inside a child [Control], so it receives the [code]TabContainer[/code]'s visibility setting instead.
</description>
<tutorials>
</tutorials>
@@ -23,33 +25,35 @@
<return type="int">
</return>
<description>
- Returns the current tab index that is being shown.
+ Returns the currently visible tab's index.
</description>
</method>
<method name="get_current_tab_control" qualifiers="const">
<return type="Control">
</return>
<description>
+ Returns the child [Control] node located at the active tab index.
</description>
</method>
<method name="get_popup" qualifiers="const">
<return type="Popup">
</return>
<description>
+ Returns the [Popup] node instance if one has been set already with [method set_popup].
</description>
</method>
<method name="get_previous_tab" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the previous tab index that was being shown.
+ Returns the previously active tab index.
</description>
</method>
<method name="get_tab_align" qualifiers="const">
<return type="int" enum="TabContainer.TabAlign">
</return>
<description>
- Returns the tab alignment.See the ALIGN_* constants.
+ Returns the tab alignment. See the [code]ALIGN_*[/code] constants.
</description>
</method>
<method name="get_tab_control" qualifiers="const">
@@ -58,14 +62,14 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the current tab control that is being shown.
+ Returns the currently visible tab's [Control] node.
</description>
</method>
<method name="get_tab_count" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the amount of tabs.
+ Returns the number of tabs.
</description>
</method>
<method name="get_tab_disabled" qualifiers="const">
@@ -92,7 +96,7 @@
<argument index="0" name="tab_idx" type="int">
</argument>
<description>
- Returns the title for the tab at index [code]tab_idx[/code]. Tab titles are by default the children node name, but this can be overridden.
+ Returns the title of the tab at index [code]tab_idx[/code]. Tab titles default to the name of the indexed child node, but this can be overridden with [method set_tab_title].
</description>
</method>
<method name="set_current_tab">
@@ -101,7 +105,7 @@
<argument index="0" name="tab_idx" type="int">
</argument>
<description>
- Bring a tab (and the Control it represents) to the front, and hide the rest.
+ Sets to [code]false[/code] the [code]visible[/code] property for all [Control] children except for the tab at [code]tab_idx[/code].
</description>
</method>
<method name="set_popup">
@@ -110,6 +114,7 @@
<argument index="0" name="popup" type="Node">
</argument>
<description>
+ If set on a [Popup] node instance, a popup menu icon appears in the top-right corner of the [code]TabContainer[/code]. Clicking it will expand the [Popup] node.
</description>
</method>
<method name="set_tab_align">
@@ -118,7 +123,7 @@
<argument index="0" name="align" type="int" enum="TabContainer.TabAlign">
</argument>
<description>
- Set tab alignment, from the ALIGN_* enum. Moves tabs to the left, right or center.
+ Sets tab alignment, from the [code]ALIGN_*[/code] constants. Moves tabs to the left, right, or center.
</description>
</method>
<method name="set_tab_disabled">
@@ -129,7 +134,7 @@
<argument index="1" name="disabled" type="bool">
</argument>
<description>
- Set tab at index [code]tab_idx[/code] disabled.
+ If [code]disabled[/code] is false, hides the tab at index [code]tab_idx[/code]. Note that its title text will remain, unless also removed with [method set_tab_title].
</description>
</method>
<method name="set_tab_icon">
@@ -140,7 +145,7 @@
<argument index="1" name="icon" type="Texture">
</argument>
<description>
- Set an icon for a tab at index [code]tab_idx[/code].
+ Sets an icon for the tab at index [code]tab_idx[/code].
</description>
</method>
<method name="set_tab_title">
@@ -151,7 +156,7 @@
<argument index="1" name="title" type="String">
</argument>
<description>
- Set a title for the tab at index [code]tab_idx[/code]. Tab titles are by default the children node name, but this can be overridden.
+ Sets a title for the tab at index [code]tab_idx[/code]. Tab titles default to the name of the indexed child node, but this can be overridden with [method set_tab_title].
</description>
</method>
<method name="set_tabs_visible">
@@ -160,38 +165,39 @@
<argument index="0" name="visible" type="bool">
</argument>
<description>
- If [code]true[/code] all the tabs will be visible.
+ If [code]true[/code] tabs are visible. If [code]false[/code] tabs' content and titles are hidden. Default value: [code]true[/code].
</description>
</method>
</methods>
<members>
<member name="current_tab" type="int" setter="set_current_tab" getter="get_current_tab">
- The current tab.
+ The current tab index. When set, this index's [Control] node's [code]visible[/code] property is set to [code]true[/code] and all others are set to [code]false[/code].
</member>
<member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" enum="TabContainer.TabAlign">
- The alignment of all the tabs of the tab container. See the [code]ALIGN_*[/code] constants.
+ The alignment of all tabs in the tab container. See the [code]ALIGN_*[/code] constants for details.
</member>
<member name="tabs_visible" type="bool" setter="set_tabs_visible" getter="are_tabs_visible">
- If [code]true[/code] all tabs that are children of the TabContainer will be visible.
+ If [code]true[/code] tabs are visible. If [code]false[/code] tabs' content and titles are hidden. Default value: [code]true[/code].
</member>
</members>
<signals>
<signal name="pre_popup_pressed">
<description>
+ Emitted when the [code]TabContainer[/code]'s [Popup] button is clicked. See [method set_popup] for details.
</description>
</signal>
<signal name="tab_changed">
<argument index="0" name="tab" type="int">
</argument>
<description>
- Emitted only when the current tab changes.
+ Emitted when switching to another tab.
</description>
</signal>
<signal name="tab_selected">
<argument index="0" name="tab" type="int">
</argument>
<description>
- Emitted when a tab is being selected, even if it is the same tab.
+ Emitted when a tab is selected, even if it is the current tab.
</description>
</signal>
</signals>
diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml
index 78821a244c..d3893ab9a7 100644
--- a/doc/classes/Tabs.xml
+++ b/doc/classes/Tabs.xml
@@ -213,12 +213,12 @@
</constant>
<constant name="ALIGN_MAX" value="3">
</constant>
+ <constant name="CLOSE_BUTTON_SHOW_NEVER" value="0">
+ </constant>
<constant name="CLOSE_BUTTON_SHOW_ACTIVE_ONLY" value="1">
</constant>
<constant name="CLOSE_BUTTON_SHOW_ALWAYS" value="2">
</constant>
- <constant name="CLOSE_BUTTON_SHOW_NEVER" value="0">
- </constant>
<constant name="CLOSE_BUTTON_MAX" value="3">
</constant>
</constants>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index 9a500af347..43e5158515 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -239,6 +239,12 @@
Returns true if highlight all occurrences is enabled.
</description>
</method>
+ <method name="is_highlight_current_line_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="is_overriding_selected_font_color" qualifiers="const">
<return type="bool">
</return>
@@ -340,6 +346,14 @@
Set to enable highlighting all occurrences of the current selection.
</description>
</method>
+ <method name="set_highlight_current_line">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_max_chars">
<return type="void">
</return>
@@ -435,6 +449,8 @@
</member>
<member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled">
</member>
+ <member name="highlight_current_line" type="bool" setter="set_highlight_current_line" getter="is_highlight_current_line_enabled">
+ </member>
<member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color">
</member>
<member name="show_line_numbers" type="bool" setter="set_show_line_numbers" getter="is_show_line_numbers_enabled">
diff --git a/doc/classes/Texture.xml b/doc/classes/Texture.xml
index cbf72eb991..93cba29d09 100644
--- a/doc/classes/Texture.xml
+++ b/doc/classes/Texture.xml
@@ -125,9 +125,6 @@
<constant name="FLAG_FILTER" value="4">
Turn on magnifying filter, to enable smooth zooming in of the texture.
</constant>
- <constant name="FLAG_VIDEO_SURFACE" value="4096">
- Texture is a video surface.
- </constant>
<constant name="FLAGS_DEFAULT" value="7">
Default flags. Generate mipmaps, repeat, and filter are enabled.
</constant>
@@ -137,5 +134,8 @@
</constant>
<constant name="FLAG_MIRRORED_REPEAT" value="32">
</constant>
+ <constant name="FLAG_VIDEO_SURFACE" value="4096">
+ Texture is a video surface.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml
index b2467bca7f..e2326ffe98 100644
--- a/doc/classes/Thread.xml
+++ b/doc/classes/Thread.xml
@@ -15,14 +15,14 @@
<return type="String">
</return>
<description>
- Returns the current [Thread]s id, uniquely identifying it among all threads.
+ Returns the current [code]Thread[/code]s id, uniquely identifying it among all threads.
</description>
</method>
<method name="is_active" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns true if this [Thread] is currently active. An active [Thread] cannot start work on a new method but can be joined with [method wait_to_finish].
+ Returns true if this [code]Thread[/code] is currently active. An active [code]Thread[/code] cannot start work on a new method but can be joined with [method wait_to_finish].
</description>
</method>
<method name="start">
@@ -37,7 +37,7 @@
<argument index="3" name="priority" type="int" default="1">
</argument>
<description>
- Starts a new [Thread] that runs "method" on object "instance" with "userdata" passed as an argument. The "priority" of the [Thread] can be changed by passing a PRIORITY_* enum.
+ Starts a new [code]Thread[/code] that runs "method" on object "instance" with "userdata" passed as an argument. The "priority" of the [code]Thread[/code] can be changed by passing a PRIORITY_* enum.
Returns OK on success, or ERR_CANT_CREATE on failure.
</description>
</method>
@@ -45,7 +45,7 @@
<return type="Variant">
</return>
<description>
- Joins the [Thread] and waits for it to finish. Returns what the method called returned.
+ Joins the [code]Thread[/code] and waits for it to finish. Returns what the method called returned.
</description>
</method>
</methods>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index 76b9b0e845..a9d71d7093 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -17,7 +17,7 @@
<argument index="0" name="from" type="Transform">
</argument>
<description>
- Constructs the [Transform2D] from a 3D [Transform].
+ Constructs the [code]Transform2D[/code] from a 3D [Transform].
</description>
</method>
<method name="Transform2D">
@@ -30,7 +30,7 @@
<argument index="2" name="origin" type="Vector2">
</argument>
<description>
- Constructs the [Transform2D] from 3 [Vector2] consisting of rows x, y and origin.
+ Constructs the [code]Transform2D[/code] from 3 [Vector2] consisting of rows x, y and origin.
</description>
</method>
<method name="Transform2D">
@@ -41,7 +41,7 @@
<argument index="1" name="position" type="Vector2">
</argument>
<description>
- Constructs the [Transform2D] from rotation angle in radians and position [Vector2].
+ Constructs the [code]Transform2D[/code] from rotation angle in radians and position [Vector2].
</description>
</method>
<method name="affine_inverse">
diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml
index 974b0e283f..1657541c19 100644
--- a/doc/classes/TranslationServer.xml
+++ b/doc/classes/TranslationServer.xml
@@ -30,6 +30,14 @@
<description>
</description>
</method>
+ <method name="get_locale_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="locale" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="remove_translation">
<return type="void">
</return>
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index 47292ec200..f0eb23b636 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -4,7 +4,7 @@
Control for a single item inside a [Tree].
</brief_description>
<description>
- Control for a single item inside a [Tree]. May have child [TreeItem]s and be styled as well as contain buttons.
+ Control for a single item inside a [Tree]. May have child [code]TreeItem[/code]s and be styled as well as contain buttons.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml
index 23229aec4a..b11498083b 100644
--- a/doc/classes/Tween.xml
+++ b/doc/classes/Tween.xml
@@ -423,10 +423,10 @@
</signals>
<constants>
<constant name="TWEEN_PROCESS_PHYSICS" value="0">
- The [Tween] should use [code]_physics_process[/code] for timekeeping when this is enabled.
+ The [code]Tween[/code] should use [code]_physics_process[/code] for timekeeping when this is enabled.
</constant>
<constant name="TWEEN_PROCESS_IDLE" value="1">
- The [Tween] should use [code]_process[/code] for timekeeping when this is enabled (default).
+ The [code]Tween[/code] should use [code]_process[/code] for timekeeping when this is enabled (default).
</constant>
<constant name="TRANS_LINEAR" value="0">
Means that the animation is interpolated linearly.
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index fdbdabafd3..a05bc5db9a 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -37,6 +37,7 @@
<argument index="0" name="to" type="Vector3">
</argument>
<description>
+ Returns the vector's minimum angle to the vector [code]to[/code].
</description>
</method>
<method name="bounce">
@@ -61,7 +62,7 @@
<argument index="0" name="b" type="Vector3">
</argument>
<description>
- Return the cross product with b.
+ Returns the cross product with [code]b[/code].
</description>
</method>
<method name="cubic_interpolate">
@@ -76,7 +77,7 @@
<argument index="3" name="t" type="float">
</argument>
<description>
- Perform a cubic interpolation between vectors pre_a, a, b, post_b (a is current), by the given amount (t).
+ Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount (t).
</description>
</method>
<method name="distance_squared_to">
@@ -85,7 +86,7 @@
<argument index="0" name="b" type="Vector3">
</argument>
<description>
- Return the squared distance (distance minus the last square root) to b. Prefer this function over distance_to if you need to sort vectors or need the squared distance for some formula.
+ Returns the squared distance to [code]b[/code]. Prefer this function over distance_to if you need to sort vectors or need the squared distance for some formula.
</description>
</method>
<method name="distance_to">
@@ -94,7 +95,7 @@
<argument index="0" name="b" type="Vector3">
</argument>
<description>
- Return the distance to b.
+ Returns the distance to b.
</description>
</method>
<method name="dot">
@@ -103,7 +104,7 @@
<argument index="0" name="b" type="Vector3">
</argument>
<description>
- Return the dot product with b.
+ Returns the dot product with b.
</description>
</method>
<method name="floor">
@@ -131,14 +132,14 @@
<return type="float">
</return>
<description>
- Return the length of the vector.
+ Returns the length of the vector.
</description>
</method>
<method name="length_squared">
<return type="float">
</return>
<description>
- Return the length of the vector, squared. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula.
+ Returns the length of the vector, squared. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula.
</description>
</method>
<method name="linear_interpolate">
@@ -170,7 +171,7 @@
<return type="Vector3">
</return>
<description>
- Return a copy of the normalized vector to unit length. This is the same as v / v.length().
+ Returns a copy of the normalized vector to unit length. This is the same as v / v.length().
</description>
</method>
<method name="outer">
@@ -179,7 +180,7 @@
<argument index="0" name="b" type="Vector3">
</argument>
<description>
- Return the outer product with b.
+ Returns the outer product with b.
</description>
</method>
<method name="reflect">
@@ -217,14 +218,14 @@
<argument index="0" name="by" type="float">
</argument>
<description>
- Return a copy of the vector, snapped to the lowest neared multiple.
+ Returns a copy of the vector, snapped to the lowest neared multiple.
</description>
</method>
<method name="to_diagonal_matrix">
<return type="Basis">
</return>
<description>
- Return a diagonal matrix with the vector as main diagonal.
+ Returns a diagonal matrix with the vector as main diagonal.
</description>
</method>
</methods>
diff --git a/doc/classes/VisibilityEnabler.xml b/doc/classes/VisibilityEnabler.xml
index ebe646679a..881ba91fad 100644
--- a/doc/classes/VisibilityEnabler.xml
+++ b/doc/classes/VisibilityEnabler.xml
@@ -39,12 +39,12 @@
</member>
</members>
<constants>
- <constant name="ENABLER_FREEZE_BODIES" value="1">
- This enabler will freeze [RigidBody] nodes.
- </constant>
<constant name="ENABLER_PAUSE_ANIMATIONS" value="0">
This enabler will pause [AnimationPlayer] nodes.
</constant>
+ <constant name="ENABLER_FREEZE_BODIES" value="1">
+ This enabler will freeze [RigidBody] nodes.
+ </constant>
<constant name="ENABLER_MAX" value="2">
</constant>
</constants>
diff --git a/doc/classes/VisibilityEnabler2D.xml b/doc/classes/VisibilityEnabler2D.xml
index 0359f4694d..b881de4f91 100644
--- a/doc/classes/VisibilityEnabler2D.xml
+++ b/doc/classes/VisibilityEnabler2D.xml
@@ -47,23 +47,23 @@
</member>
</members>
<constants>
- <constant name="ENABLER_FREEZE_BODIES" value="1">
- This enabler will freeze [RigidBody2D] nodes.
- </constant>
<constant name="ENABLER_PAUSE_ANIMATIONS" value="0">
This enabler will pause [AnimationPlayer] nodes.
</constant>
+ <constant name="ENABLER_FREEZE_BODIES" value="1">
+ This enabler will freeze [RigidBody2D] nodes.
+ </constant>
<constant name="ENABLER_PAUSE_PARTICLES" value="2">
This enabler will stop [Particles2D] nodes.
</constant>
- <constant name="ENABLER_PAUSE_ANIMATED_SPRITES" value="5">
- </constant>
<constant name="ENABLER_PARENT_PROCESS" value="3">
This enabler will stop the parent's _process function.
</constant>
<constant name="ENABLER_PARENT_PHYSICS_PROCESS" value="4">
This enabler will stop the parent's _physics_process function.
</constant>
+ <constant name="ENABLER_PAUSE_ANIMATED_SPRITES" value="5">
+ </constant>
<constant name="ENABLER_MAX" value="6">
</constant>
</constants>
diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml
index 5c6a951e7d..8e3cb8ee50 100644
--- a/doc/classes/VisualServer.xml
+++ b/doc/classes/VisualServer.xml
@@ -1884,8 +1884,6 @@
</constant>
<constant name="ARRAY_FORMAT_INDEX" value="256">
</constant>
- <constant name="ARRAY_COMPRESS_BASE" value="9">
- </constant>
<constant name="ARRAY_COMPRESS_VERTEX" value="512">
</constant>
<constant name="ARRAY_COMPRESS_NORMAL" value="1024">
diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml
index a9450c1743..561cd09f43 100644
--- a/doc/classes/WorldEnvironment.xml
+++ b/doc/classes/WorldEnvironment.xml
@@ -4,7 +4,7 @@
Sets environment properties for the entire scene
</brief_description>
<description>
- The [WorldEnvironment] node can be added to a scene in order to set default [Environment] variables for the scene. The [WorldEnvironment] can be overridden by an [Environment] node set on the current [Camera]. Additionally, only one [WorldEnvironment] may be instanced in a given scene at a time. The [WorldEnvironment] allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox).
+ The [code]WorldEnvironment[/code] node can be added to a scene in order to set default [Environment] variables for the scene. The [code]WorldEnvironment[/code] can be overridden by an [Environment] node set on the current [Camera]. Additionally, only one [code]WorldEnvironment[/code] may be instanced in a given scene at a time. The [code]WorldEnvironment[/code] allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox).
</description>
<tutorials>
</tutorials>
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index 39f027a5aa..8ec988bec1 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -895,7 +895,7 @@ void RasterizerSceneGLES3::environment_set_ssr(RID p_env, bool p_enable, int p_m
env->ssr_roughness = p_roughness;
}
-void RasterizerSceneGLES3::environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_radius2, float p_intensity2, float p_bias, float p_light_affect, const Color &p_color, bool p_blur) {
+void RasterizerSceneGLES3::environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_radius2, float p_intensity2, float p_bias, float p_light_affect, const Color &p_color, VS::EnvironmentSSAOQuality p_quality, VisualServer::EnvironmentSSAOBlur p_blur, float p_bilateral_sharpness) {
Environment *env = environment_owner.getornull(p_env);
ERR_FAIL_COND(!env);
@@ -909,6 +909,8 @@ void RasterizerSceneGLES3::environment_set_ssao(RID p_env, bool p_enable, float
env->ssao_light_affect = p_light_affect;
env->ssao_color = p_color;
env->ssao_filter = p_blur;
+ env->ssao_quality = p_quality;
+ env->ssao_bilateral_sharpness = p_bilateral_sharpness;
}
void RasterizerSceneGLES3::environment_set_tonemap(RID p_env, VS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale) {
@@ -1132,9 +1134,9 @@ bool RasterizerSceneGLES3::_setup_material(RasterizerStorageGLES3::Material *p_m
state.current_depth_draw = p_material->shader->spatial.depth_draw_mode;
}
-//glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
+ //glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
-/*
+ /*
if (p_material->flags[VS::MATERIAL_FLAG_WIREFRAME])
glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
else
@@ -3186,6 +3188,15 @@ void RasterizerSceneGLES3::_render_mrts(Environment *env, const CameraMatrix &p_
glDisable(GL_CULL_FACE);
glDisable(GL_BLEND);
+ if (env->ssao_enabled || env->ssr_enabled) {
+
+ //copy normal and roughness to effect buffer
+ glBindFramebuffer(GL_READ_FRAMEBUFFER, storage->frame.current_rt->buffers.fbo);
+ glReadBuffer(GL_COLOR_ATTACHMENT2);
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, storage->frame.current_rt->buffers.effect_fbo);
+ glBlitFramebuffer(0, 0, storage->frame.current_rt->width, storage->frame.current_rt->height, 0, 0, storage->frame.current_rt->width, storage->frame.current_rt->height, GL_COLOR_BUFFER_BIT, GL_NEAREST);
+ }
+
if (env->ssao_enabled) {
//copy diffuse to front buffer
glBindFramebuffer(GL_READ_FRAMEBUFFER, storage->frame.current_rt->buffers.fbo);
@@ -3235,6 +3246,8 @@ void RasterizerSceneGLES3::_render_mrts(Environment *env, const CameraMatrix &p_
// do SSAO!
state.ssao_shader.set_conditional(SsaoShaderGLES3::ENABLE_RADIUS2, env->ssao_radius2 > 0.001);
state.ssao_shader.set_conditional(SsaoShaderGLES3::USE_ORTHOGONAL_PROJECTION, p_cam_projection.is_orthogonal());
+ state.ssao_shader.set_conditional(SsaoShaderGLES3::SSAO_QUALITY_LOW, env->ssao_quality == VS::ENV_SSAO_QUALITY_LOW);
+ state.ssao_shader.set_conditional(SsaoShaderGLES3::SSAO_QUALITY_HIGH, env->ssao_quality == VS::ENV_SSAO_QUALITY_HIGH);
state.ssao_shader.bind();
state.ssao_shader.set_uniform(SsaoShaderGLES3::CAMERA_Z_FAR, p_cam_projection.get_z_far());
state.ssao_shader.set_uniform(SsaoShaderGLES3::CAMERA_Z_NEAR, p_cam_projection.get_z_near());
@@ -3287,6 +3300,9 @@ void RasterizerSceneGLES3::_render_mrts(Environment *env, const CameraMatrix &p_
state.ssao_blur_shader.set_uniform(SsaoBlurShaderGLES3::CAMERA_Z_FAR, p_cam_projection.get_z_far());
state.ssao_blur_shader.set_uniform(SsaoBlurShaderGLES3::CAMERA_Z_NEAR, p_cam_projection.get_z_near());
+ state.ssao_blur_shader.set_uniform(SsaoBlurShaderGLES3::EDGE_SHARPNESS, env->ssao_bilateral_sharpness);
+ state.ssao_blur_shader.set_uniform(SsaoBlurShaderGLES3::FILTER_SCALE, int(env->ssao_filter));
+
GLint axis[2] = { i, 1 - i };
glUniform2iv(state.ssao_blur_shader.get_uniform(SsaoBlurShaderGLES3::AXIS), 1, axis);
glUniform2iv(state.ssao_blur_shader.get_uniform(SsaoBlurShaderGLES3::SCREEN_SIZE), 1, ss);
@@ -3295,6 +3311,8 @@ void RasterizerSceneGLES3::_render_mrts(Environment *env, const CameraMatrix &p_
glBindTexture(GL_TEXTURE_2D, storage->frame.current_rt->effects.ssao.blur_red[i]);
glActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_2D, storage->frame.current_rt->depth);
+ glActiveTexture(GL_TEXTURE2);
+ glBindTexture(GL_TEXTURE_2D, storage->frame.current_rt->buffers.effect);
glBindFramebuffer(GL_FRAMEBUFFER, storage->frame.current_rt->effects.ssao.blur_fbo[1 - i]);
if (i == 0) {
glClearBufferfv(GL_COLOR, 0, white.components); // specular
@@ -3386,12 +3404,6 @@ void RasterizerSceneGLES3::_render_mrts(Environment *env, const CameraMatrix &p_
if (env->ssr_enabled) {
- //copy normal and roughness to effect buffer
- glBindFramebuffer(GL_READ_FRAMEBUFFER, storage->frame.current_rt->buffers.fbo);
- glReadBuffer(GL_COLOR_ATTACHMENT2);
- glBindFramebuffer(GL_DRAW_FRAMEBUFFER, storage->frame.current_rt->buffers.effect_fbo);
- glBlitFramebuffer(0, 0, storage->frame.current_rt->width, storage->frame.current_rt->height, 0, 0, storage->frame.current_rt->width, storage->frame.current_rt->height, GL_COLOR_BUFFER_BIT, GL_NEAREST);
-
//blur diffuse into effect mipmaps using separatable convolution
//storage->shaders.copy.set_conditional(CopyShaderGLES3::GAUSSIAN_HORIZONTAL,true);
_blur_effect_buffer();
@@ -4011,6 +4023,8 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
state.ubo_data.shadow_dual_paraboloid_render_side = 0;
state.ubo_data.shadow_dual_paraboloid_render_zfar = 0;
+ p_cam_projection.get_viewport_size(state.ubo_data.viewport_size[0], state.ubo_data.viewport_size[1]);
+
if (storage->frame.current_rt) {
state.ubo_data.screen_pixel_size[0] = 1.0 / storage->frame.current_rt->width;
state.ubo_data.screen_pixel_size[1] = 1.0 / storage->frame.current_rt->height;
diff --git a/drivers/gles3/rasterizer_scene_gles3.h b/drivers/gles3/rasterizer_scene_gles3.h
index 28a5cef0ee..69b43c7813 100644
--- a/drivers/gles3/rasterizer_scene_gles3.h
+++ b/drivers/gles3/rasterizer_scene_gles3.h
@@ -124,6 +124,7 @@ public:
float z_slope_scale;
float shadow_dual_paraboloid_render_zfar;
float shadow_dual_paraboloid_render_side;
+ float viewport_size[2];
float screen_pixel_size[2];
float shadow_atlas_pixel_size[2];
float shadow_directional_pixel_size[2];
@@ -143,7 +144,7 @@ public:
float fog_height_min;
float fog_height_max;
float fog_height_curve;
- uint8_t padding[8];
+ // make sure this struct is padded to be a multiple of 16 bytes for webgl
} ubo_data;
@@ -379,7 +380,9 @@ public:
float ssao_bias;
float ssao_light_affect;
Color ssao_color;
- bool ssao_filter;
+ VS::EnvironmentSSAOQuality ssao_quality;
+ float ssao_bilateral_sharpness;
+ VS::EnvironmentSSAOBlur ssao_filter;
bool glow_enabled;
int glow_levels;
@@ -456,7 +459,9 @@ public:
ssao_radius2 = 0.0;
ssao_bias = 0.01;
ssao_light_affect = 0;
- ssao_filter = true;
+ ssao_filter = VS::ENV_SSAO_BLUR_3x3;
+ ssao_quality = VS::ENV_SSAO_QUALITY_LOW;
+ ssao_bilateral_sharpness = 4;
tone_mapper = VS::ENV_TONE_MAPPER_LINEAR;
tone_mapper_exposure = 1.0;
@@ -532,7 +537,7 @@ public:
virtual void environment_set_fog(RID p_env, bool p_enable, float p_begin, float p_end, RID p_gradient_texture);
virtual void environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_in, float p_fade_out, float p_depth_tolerance, bool p_roughness);
- virtual void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_radius2, float p_intensity2, float p_bias, float p_light_affect, const Color &p_color, bool p_blur);
+ virtual void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_radius2, float p_intensity2, float p_bias, float p_light_affect, const Color &p_color, VS::EnvironmentSSAOQuality p_quality, VS::EnvironmentSSAOBlur p_blur, float p_bilateral_sharpness);
virtual void environment_set_tonemap(RID p_env, VS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale);
diff --git a/drivers/gles3/shader_compiler_gles3.cpp b/drivers/gles3/shader_compiler_gles3.cpp
index 5fe7b53a7d..ad08c59de8 100644
--- a/drivers/gles3/shader_compiler_gles3.cpp
+++ b/drivers/gles3/shader_compiler_gles3.cpp
@@ -766,10 +766,10 @@ ShaderCompilerGLES3::ShaderCompilerGLES3() {
//builtins
actions[VS::SHADER_SPATIAL].renames["TIME"] = "time";
- //actions[VS::SHADER_SPATIAL].renames["VIEWPORT_SIZE"]=ShaderLanguage::TYPE_VEC2;
+ actions[VS::SHADER_SPATIAL].renames["VIEWPORT_SIZE"] = "viewport_size";
actions[VS::SHADER_SPATIAL].renames["FRAGCOORD"] = "gl_FragCoord";
- actions[VS::SHADER_SPATIAL].renames["FRONT_FACING"] = "gl_FrotFacing";
+ actions[VS::SHADER_SPATIAL].renames["FRONT_FACING"] = "gl_FrontFacing";
actions[VS::SHADER_SPATIAL].renames["NORMALMAP"] = "normalmap";
actions[VS::SHADER_SPATIAL].renames["NORMALMAP_DEPTH"] = "normaldepth";
actions[VS::SHADER_SPATIAL].renames["ALBEDO"] = "albedo";
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index 0b5b9d1d24..41966fd565 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -80,6 +80,7 @@ layout(std140) uniform SceneData { //ubo:0
highp float shadow_dual_paraboloid_render_zfar;
highp float shadow_dual_paraboloid_render_side;
+ highp vec2 viewport_size;
highp vec2 screen_pixel_size;
highp vec2 shadow_atlas_pixel_size;
highp vec2 directional_shadow_pixel_size;
@@ -169,7 +170,7 @@ void light_compute(vec3 N, vec3 L,vec3 V, vec3 light_color, float roughness, ino
float dotNL = max(dot(N,L), 0.0 );
diffuse += dotNL * light_color / M_PI;
- if (roughness < 1.0) {
+ if (roughness > 0.0) {
vec3 H = normalize(V + L);
float dotNH = max(dot(N,H), 0.0 );
@@ -566,6 +567,7 @@ in vec3 normal_interp;
uniform bool no_ambient_light;
+
#ifdef USE_RADIANCE_MAP
@@ -1034,7 +1036,7 @@ LIGHT_SHADER_CODE
}
- if (roughness < 1.0) {
+ if (roughness > 0.0) { // FIXME: roughness == 0 should not disable specular light entirely
// D
@@ -1073,7 +1075,7 @@ LIGHT_SHADER_CODE
float cNdotH = max(dot(N,H), 0.0);
float cLdotH = max(dot(L,H), 0.0);
-#if defined(LIGHT_USE_ANISOTROPY)
+# if defined(LIGHT_USE_ANISOTROPY)
float aspect = sqrt(1.0-anisotropy*0.9);
float rx = roughness/aspect;
@@ -1085,11 +1087,11 @@ LIGHT_SHADER_CODE
float D = D_GGX_anisotropic(cNdotH, ax, ay, XdotH, YdotH);
float G = G_GGX_anisotropic_2cos(cNdotL, ax, ay, XdotH, YdotH) * G_GGX_anisotropic_2cos(cNdotV, ax, ay, XdotH, YdotH);
-#else
+# else
float alpha = roughness * roughness;
float D = D_GGX(cNdotH, alpha);
float G = G_GGX_2cos(cNdotL, alpha) * G_GGX_2cos(cNdotV, alpha);
-#endif
+# endif
// F
float F0 = 1.0; // FIXME
float cLdotH5 = SchlickFresnel(cLdotH);
@@ -1115,7 +1117,9 @@ LIGHT_SHADER_CODE
float Gr = G_GGX_2cos(cNdotL, .25) * G_GGX_2cos(cNdotV, .25);
- specular_light += .25*clearcoat*Gr*Fr*Dr;
+ float specular_brdf_NL = 0.25 * clearcoat * Gr * Fr * Dr * cNdotL;
+
+ specular_light += specular_brdf_NL * light_color * specular_blob_intensity * attenuation;
}
#endif
}
diff --git a/drivers/gles3/shaders/ssao.glsl b/drivers/gles3/shaders/ssao.glsl
index c668e63745..219f0957e0 100644
--- a/drivers/gles3/shaders/ssao.glsl
+++ b/drivers/gles3/shaders/ssao.glsl
@@ -13,8 +13,24 @@ void main() {
#define TWO_PI 6.283185307179586476925286766559
+#ifdef SSAO_QUALITY_HIGH
+
+#define NUM_SAMPLES (80)
+
+#endif
+
+#ifdef SSAO_QUALITY_LOW
+
#define NUM_SAMPLES (15)
+#endif
+
+#if !defined(SSAO_QUALITY_LOW) && !defined(SSAO_QUALITY_HIGH)
+
+#define NUM_SAMPLES (40)
+
+#endif
+
// If using depth mip levels, the log of the maximum pixel offset before we need to switch to a lower
// miplevel to maintain reasonable spatial locality in the cache
// If this number is too small (< 3), too many taps will land in the same pixel, and we'll get bad variance that manifests as flashing.
@@ -212,12 +228,12 @@ void main() {
//visibility=-C.z/camera_z_far;
//return;
-
- //vec3 n_C = texelFetch(source_normal,ssC,0).rgb * 2.0 - 1.0;
-
+#if 0
+ vec3 n_C = texelFetch(source_normal,ssC,0).rgb * 2.0 - 1.0;
+#else
vec3 n_C = reconstructCSFaceNormal(C);
n_C = -n_C;
-
+#endif
// Hash function used in the HPG12 AlchemyAO paper
float randomPatternRotationAngle = mod(float((3 * ssC.x ^ ssC.y + ssC.x * ssC.y) * 10), TWO_PI);
diff --git a/drivers/gles3/shaders/ssao_blur.glsl b/drivers/gles3/shaders/ssao_blur.glsl
index c7c978dc37..472dc21acf 100644
--- a/drivers/gles3/shaders/ssao_blur.glsl
+++ b/drivers/gles3/shaders/ssao_blur.glsl
@@ -15,6 +15,7 @@ void main() {
uniform sampler2D source_ssao; //texunit:0
uniform sampler2D source_depth; //texunit:1
+uniform sampler2D source_normal; //texunit:3
layout(location = 0) out float visibility;
@@ -24,7 +25,7 @@ layout(location = 0) out float visibility;
// Tunable Parameters:
/** Increase to make depth edges crisper. Decrease to reduce flicker. */
-#define EDGE_SHARPNESS (4.0)
+uniform float edge_sharpness;
/** Step in 2-pixel intervals since we already blurred against neighbors in the
first AO pass. This constant can be increased while R decreases to improve
@@ -34,7 +35,8 @@ layout(location = 0) out float visibility;
unobjectionable after shading was applied but eliminated most temporal incoherence
from using small numbers of sample taps.
*/
-#define SCALE (3)
+
+uniform int filter_scale;
/** Filter radius in pixels. This will be multiplied by SCALE. */
#define R (4)
@@ -63,13 +65,14 @@ void main() {
ivec2 ssC = ivec2(gl_FragCoord.xy);
float depth = texelFetch(source_depth, ssC, 0).r;
+ //vec3 normal = texelFetch(source_normal,ssC,0).rgb * 2.0 - 1.0;
depth = depth * 2.0 - 1.0;
depth = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - depth * (camera_z_far - camera_z_near));
float depth_divide = 1.0 / camera_z_far;
- depth*=depth_divide;
+// depth*=depth_divide;
/*
if (depth > camera_z_far*0.999) {
@@ -92,20 +95,23 @@ void main() {
// so the IF statement has no runtime cost
if (r != 0) {
- ivec2 ppos = ssC + axis * (r * SCALE);
+ ivec2 ppos = ssC + axis * (r * filter_scale);
float value = texelFetch(source_ssao, clamp(ppos,ivec2(0),clamp_limit), 0).r;
- float temp_depth = texelFetch(source_depth, clamp(ssC,ivec2(0),clamp_limit), 0).r;
+ ivec2 rpos = clamp(ppos,ivec2(0),clamp_limit);
+ float temp_depth = texelFetch(source_depth, rpos, 0).r;
+ //vec3 temp_normal = texelFetch(source_normal, rpos, 0).rgb * 2.0 - 1.0;
temp_depth = temp_depth * 2.0 - 1.0;
temp_depth = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - temp_depth * (camera_z_far - camera_z_near));
- temp_depth *= depth_divide;
+// temp_depth *= depth_divide;
// spatial domain: offset gaussian tap
float weight = 0.3 + gaussian[abs(r)];
+ //weight *= max(0.0,dot(temp_normal,normal));
// range domain (the "bilateral" weight). As depth difference increases, decrease weight.
weight *= max(0.0, 1.0
- - (EDGE_SHARPNESS * 2000.0) * abs(temp_depth - depth)
+ - edge_sharpness * abs(temp_depth - depth)
);
sum += value * weight;
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index 2a3d48746f..729abd57ef 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -136,7 +136,9 @@ void OS_Unix::initialize_core() {
void OS_Unix::initialize_logger() {
Vector<Logger *> loggers;
loggers.push_back(memnew(UnixTerminalLogger));
- loggers.push_back(memnew(RotatedFileLogger("user://logs/log.txt")));
+ // FIXME: Reenable once we figure out how to get this properly in user://
+ // instead of littering the user's working dirs (res:// + pwd) with log files (GH-12277)
+ //loggers.push_back(memnew(RotatedFileLogger("user://logs/log.txt")));
_set_logger(memnew(CompositeLogger(loggers)));
}
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index ee1faf5a55..0100c221c4 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -1089,6 +1089,7 @@ void CodeTextEditor::update_editor_settings() {
text_editor->set_line_length_guideline_column(EditorSettings::get_singleton()->get("text_editor/line_numbers/line_length_guideline_column"));
text_editor->set_syntax_coloring(EditorSettings::get_singleton()->get("text_editor/highlighting/syntax_highlighting"));
text_editor->set_highlight_all_occurrences(EditorSettings::get_singleton()->get("text_editor/highlighting/highlight_all_occurrences"));
+ text_editor->set_highlight_current_line(EditorSettings::get_singleton()->get("text_editor/highlighting/highlight_current_line"));
text_editor->cursor_set_blink_enabled(EditorSettings::get_singleton()->get("text_editor/cursor/caret_blink"));
text_editor->cursor_set_blink_speed(EditorSettings::get_singleton()->get("text_editor/cursor/caret_blink_speed"));
text_editor->set_draw_breakpoint_gutter(EditorSettings::get_singleton()->get("text_editor/line_numbers/show_breakpoint_gutter"));
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index b980c4f0ec..a0ca9b88e0 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -1368,35 +1368,41 @@ EditorFileDialog::EditorFileDialog() {
VBoxContainer *item_vb = memnew(VBoxContainer);
list_hb->add_child(item_vb);
- item_vb->set_h_size_flags(SIZE_EXPAND_FILL);
- item_list = memnew(ItemList);
- item_list->set_v_size_flags(SIZE_EXPAND_FILL);
- item_vb->add_margin_child(TTR("Directories & Files:"), item_list, true);
+ HBoxContainer *preview_hb = memnew(HBoxContainer);
+ preview_hb->set_v_size_flags(SIZE_EXPAND_FILL);
+ item_vb->add_child(preview_hb);
- HBoxContainer *filter_hb = memnew(HBoxContainer);
- item_vb->add_child(filter_hb);
+ VBoxContainer *list_vb = memnew(VBoxContainer);
+ list_vb->set_h_size_flags(SIZE_EXPAND_FILL);
+ list_vb->add_child(memnew(Label(TTR("Directories & Files:"))));
+ preview_hb->add_child(list_vb);
- VBoxContainer *filter_vb = memnew(VBoxContainer);
- filter_hb->add_child(filter_vb);
- filter_vb->set_h_size_flags(SIZE_EXPAND_FILL);
+ item_list = memnew(ItemList);
+ item_list->set_v_size_flags(SIZE_EXPAND_FILL);
+ list_vb->add_child(item_list);
preview_vb = memnew(VBoxContainer);
- filter_hb->add_child(preview_vb);
+ preview_hb->add_child(preview_vb);
CenterContainer *prev_cc = memnew(CenterContainer);
preview_vb->add_margin_child(TTR("Preview:"), prev_cc);
preview = memnew(TextureRect);
prev_cc->add_child(preview);
preview_vb->hide();
+ HBoxContainer *filename_hbc = memnew(HBoxContainer);
+ filename_hbc->add_child(memnew(Label(TTR("File:"))));
file = memnew(LineEdit);
- //add_child(file);
- filter_vb->add_margin_child(TTR("File:"), file);
-
+ file->set_stretch_ratio(4);
+ file->set_h_size_flags(SIZE_EXPAND_FILL);
+ filename_hbc->add_child(file);
filter = memnew(OptionButton);
- //add_child(filter);
- filter_vb->add_margin_child(TTR("Filter:"), filter);
+ filter->set_stretch_ratio(3);
+ filter->set_h_size_flags(SIZE_EXPAND_FILL);
filter->set_clip_text(true); //too many extensions overflow it
+ filename_hbc->add_child(filter);
+ filename_hbc->set_h_size_flags(SIZE_EXPAND_FILL);
+ item_vb->add_child(filename_hbc);
dir_access = DirAccess::create(DirAccess::ACCESS_RESOURCES);
access = ACCESS_RESOURCES;
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index b77525c0ba..3513126a9b 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -2670,12 +2670,12 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled)
String addon_path = "res://addons/" + p_addon + "/plugin.cfg";
Error err = cf->load(addon_path);
if (err != OK) {
- show_warning(TTR("Unable to enable addon plugin at: '") + addon_path + TTR("' parsing of config failed."));
+ show_warning(vformat(TTR("Unable to enable addon plugin at: '%s' parsing of config failed."), addon_path));
return;
}
if (!cf->has_section_key("plugin", "script")) {
- show_warning(TTR("Unable to find script field for addon plugin at: 'res://addons/") + p_addon + "''.");
+ show_warning(vformat(TTR("Unable to find script field for addon plugin at: 'res://addons/%s'."), p_addon));
return;
}
@@ -2685,18 +2685,18 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled)
Ref<Script> script = ResourceLoader::load(path);
if (script.is_null()) {
- show_warning(TTR("Unable to load addon script from path: '") + path + "'.");
+ show_warning(vformat(TTR("Unable to load addon script from path: '%s'."), path));
return;
}
//could check inheritance..
if (String(script->get_instance_base_type()) != "EditorPlugin") {
- show_warning(TTR("Unable to load addon script from path: '") + path + "' Base type is not EditorPlugin.");
+ show_warning(vformat(TTR("Unable to load addon script from path: '%s' Base type is not EditorPlugin."), path));
return;
}
if (!script->is_tool()) {
- show_warning(TTR("Unable to load addon script from path: '") + path + "' Script is not in tool mode.");
+ show_warning(vformat(TTR("Unable to load addon script from path: '%s' Script is not in tool mode."), path));
return;
}
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 7c45e19f5f..78cc215421 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -544,6 +544,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
{
String lang_hint = "en";
String host_lang = OS::get_singleton()->get_locale();
+ host_lang = TranslationServer::standardize_locale(host_lang);
String best;
@@ -632,6 +633,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("text_editor/highlighting/syntax_highlighting", true);
_initial_set("text_editor/highlighting/highlight_all_occurrences", true);
+ _initial_set("text_editor/highlighting/highlight_current_line", true);
_initial_set("text_editor/cursor/scroll_past_end_of_file", false);
_initial_set("text_editor/indent/type", 0);
@@ -705,7 +707,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("editors/3d/navigation_feel/orbit_sensitivity", 0.4);
hints["editors/3d/navigation_feel/orbit_sensitivity"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/orbit_sensitivity", PROPERTY_HINT_RANGE, "0.0, 2, 0.01");
- _initial_set("editors/3d/navigation_feel/orbit_inertia", 0.15);
+ _initial_set("editors/3d/navigation_feel/orbit_inertia", 0.05);
hints["editors/3d/navigation_feel/orbit_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/orbit_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
_initial_set("editors/3d/navigation_feel/translation_inertia", 0.15);
hints["editors/3d/navigation_feel/translation_inertia"] = PropertyInfo(Variant::REAL, "editors/3d/navigation_feel/translation_inertia", PROPERTY_HINT_RANGE, "0.0, 1, 0.01");
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 2270421eca..34c0a3d439 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -45,7 +45,7 @@
#include "scene/2d/screen_button.h"
#include "scene/2d/sprite.h"
#include "scene/gui/grid_container.h"
-#include "scene/gui/patch_9_rect.h"
+#include "scene/gui/nine_patch_rect.h"
#include "scene/main/canvas_layer.h"
#include "scene/main/viewport.h"
#include "scene/resources/packed_scene.h"
@@ -222,41 +222,38 @@ void CanvasItemEditor::_edit_set_pivot(const Vector2 &mouse_pos) {
undo_redo->commit_action();
}
-void CanvasItemEditor::_snap_if_closer(Point2 p_value, Point2 p_target_snap, Point2 &r_current_snap, bool (&r_snapped)[2], real_t rotation, float p_radius) {
+void CanvasItemEditor::_snap_if_closer_float(float p_value, float p_target_snap, float &r_current_snap, bool &r_snapped, float p_radius) {
float radius = p_radius / zoom;
- float dist;
+ float dist = Math::abs(p_value - p_target_snap);
+ if (p_radius < 0 || dist < radius && (!r_snapped || dist < Math::abs(r_current_snap - p_value))) {
+ r_current_snap = p_target_snap;
+ r_snapped = true;
+ }
+}
+void CanvasItemEditor::_snap_if_closer_point(Point2 p_value, Point2 p_target_snap, Point2 &r_current_snap, bool (&r_snapped)[2], real_t rotation, float p_radius) {
Transform2D rot_trans = Transform2D(rotation, Point2());
p_value = rot_trans.inverse().xform(p_value);
p_target_snap = rot_trans.inverse().xform(p_target_snap);
r_current_snap = rot_trans.inverse().xform(r_current_snap);
- dist = Math::abs(p_value.x - p_target_snap.x);
- if (p_radius < 0 || dist < radius && (!r_snapped[0] || dist < Math::abs(r_current_snap.x - p_value.x))) {
- r_current_snap.x = p_target_snap.x;
- r_snapped[0] = true;
- }
-
- dist = Math::abs(p_value.y - p_target_snap.y);
- if (p_radius < 0 || dist < radius && (!r_snapped[1] || dist < Math::abs(r_current_snap.y - p_value.y))) {
- r_current_snap.y = p_target_snap.y;
- r_snapped[1] = true;
- }
+ _snap_if_closer_float(p_value.x, p_target_snap.x, r_current_snap.x, r_snapped[0], p_radius);
+ _snap_if_closer_float(p_value.y, p_target_snap.y, r_current_snap.y, r_snapped[1], p_radius);
r_current_snap = rot_trans.xform(r_current_snap);
}
void CanvasItemEditor::_snap_other_nodes(Point2 p_value, Point2 &r_current_snap, bool (&r_snapped)[2], const Node *p_current, const CanvasItem *p_to_snap) {
const CanvasItem *canvas_item = Object::cast_to<CanvasItem>(p_current);
- if (canvas_item && p_current != p_to_snap) {
+ if (canvas_item && (!p_to_snap || p_current != p_to_snap)) {
Transform2D ci_transform = canvas_item->get_global_transform_with_canvas();
- Transform2D to_snap_transform = p_to_snap->get_global_transform_with_canvas();
- if (ci_transform.get_rotation() == to_snap_transform.get_rotation()) {
+ Transform2D to_snap_transform = p_to_snap ? p_to_snap->get_global_transform_with_canvas() : Transform2D();
+ if (fmod(ci_transform.get_rotation() - to_snap_transform.get_rotation(), 360.0) == 0.0) {
Point2 begin = ci_transform.xform(canvas_item->get_item_rect().get_position());
Point2 end = ci_transform.xform(canvas_item->get_item_rect().get_position() + canvas_item->get_item_rect().get_size());
- _snap_if_closer(p_value, begin, r_current_snap, r_snapped, ci_transform.get_rotation());
- _snap_if_closer(p_value, end, r_current_snap, r_snapped, ci_transform.get_rotation());
+ _snap_if_closer_point(p_value, begin, r_current_snap, r_snapped, ci_transform.get_rotation());
+ _snap_if_closer_point(p_value, end, r_current_snap, r_snapped, ci_transform.get_rotation());
}
}
for (int i = 0; i < p_current->get_child_count(); i++) {
@@ -291,9 +288,9 @@ Point2 CanvasItemEditor::snap_point(Point2 p_target, unsigned int p_modes, const
}
if (can_snap) {
- _snap_if_closer(p_target, begin, output, snapped, rotation);
- _snap_if_closer(p_target, (begin + end) / 2.0, output, snapped, rotation);
- _snap_if_closer(p_target, end, output, snapped, rotation);
+ _snap_if_closer_point(p_target, begin, output, snapped, rotation);
+ _snap_if_closer_point(p_target, (begin + end) / 2.0, output, snapped, rotation);
+ _snap_if_closer_point(p_target, end, output, snapped, rotation);
}
}
@@ -302,8 +299,8 @@ Point2 CanvasItemEditor::snap_point(Point2 p_target, unsigned int p_modes, const
if (const Control *c = Object::cast_to<Control>(p_canvas_item)) {
begin = p_canvas_item->get_global_transform_with_canvas().xform(_anchor_to_position(c, Point2(c->get_anchor(MARGIN_LEFT), c->get_anchor(MARGIN_TOP))));
end = p_canvas_item->get_global_transform_with_canvas().xform(_anchor_to_position(c, Point2(c->get_anchor(MARGIN_RIGHT), c->get_anchor(MARGIN_BOTTOM))));
- _snap_if_closer(p_target, begin, output, snapped, rotation);
- _snap_if_closer(p_target, end, output, snapped, rotation);
+ _snap_if_closer_point(p_target, begin, output, snapped, rotation);
+ _snap_if_closer_point(p_target, end, output, snapped, rotation);
}
}
@@ -311,17 +308,34 @@ Point2 CanvasItemEditor::snap_point(Point2 p_target, unsigned int p_modes, const
if ((snap_active && snap_node_sides && (p_modes & SNAP_NODE_SIDES)) || (p_forced_modes & SNAP_NODE_SIDES)) {
begin = p_canvas_item->get_global_transform_with_canvas().xform(p_canvas_item->get_item_rect().get_position());
end = p_canvas_item->get_global_transform_with_canvas().xform(p_canvas_item->get_item_rect().get_position() + p_canvas_item->get_item_rect().get_size());
- _snap_if_closer(p_target, begin, output, snapped, rotation);
- _snap_if_closer(p_target, end, output, snapped, rotation);
+ _snap_if_closer_point(p_target, begin, output, snapped, rotation);
+ _snap_if_closer_point(p_target, end, output, snapped, rotation);
}
+ }
+
+ // Other nodes sides
+ if ((snap_active && snap_other_nodes && (p_modes & SNAP_OTHER_NODES)) || (p_forced_modes & SNAP_OTHER_NODES)) {
+ _snap_other_nodes(p_target, output, snapped, get_tree()->get_edited_scene_root(), p_canvas_item);
+ }
- // Other nodes sides
- if ((snap_active && snap_other_nodes && (p_modes & SNAP_OTHER_NODES)) || (p_forced_modes & SNAP_OTHER_NODES)) {
- _snap_other_nodes(p_target, output, snapped, get_tree()->get_edited_scene_root(), p_canvas_item);
+ if (((snap_active && snap_guides && (p_modes & SNAP_GUIDES)) || (p_forced_modes & SNAP_GUIDES)) && fmod(rotation, 360.0) == 0.0) {
+ // Guides
+ if (EditorNode::get_singleton()->get_edited_scene() && EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_vertical_guides_")) {
+ Array vguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_vertical_guides_");
+ for (int i = 0; i < vguides.size(); i++) {
+ _snap_if_closer_float(p_target.x, vguides[i], output.x, snapped[0]);
+ }
+ }
+
+ if (EditorNode::get_singleton()->get_edited_scene() && EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_horizontal_guides_")) {
+ Array hguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_horizontal_guides_");
+ for (int i = 0; i < hguides.size(); i++) {
+ _snap_if_closer_float(p_target.y, hguides[i], output.y, snapped[1]);
+ }
}
}
- if (((snap_active && snap_grid && (p_modes & SNAP_GRID)) || (p_forced_modes & SNAP_GRID)) && rotation == 0.0) {
+ if (((snap_active && snap_grid && (p_modes & SNAP_GRID)) || (p_forced_modes & SNAP_GRID)) && fmod(rotation, 360.0) == 0.0) {
// Grid
Point2 offset = grid_offset;
if (snap_relative) {
@@ -335,7 +349,7 @@ Point2 CanvasItemEditor::snap_point(Point2 p_target, unsigned int p_modes, const
Point2 grid_output;
grid_output.x = Math::stepify(p_target.x - offset.x, grid_step.x * Math::pow(2.0, grid_step_multiplier)) + offset.x;
grid_output.y = Math::stepify(p_target.y - offset.y, grid_step.y * Math::pow(2.0, grid_step_multiplier)) + offset.y;
- _snap_if_closer(p_target, grid_output, output, snapped, 0.0, -1.0);
+ _snap_if_closer_point(p_target, grid_output, output, snapped, 0.0, -1.0);
}
if (((snap_pixel && (p_modes & SNAP_PIXEL)) || (p_forced_modes & SNAP_PIXEL)) && rotation == 0.0) {
@@ -429,8 +443,10 @@ Dictionary CanvasItemEditor::get_state() const {
state["snap_node_sides"] = snap_node_sides;
state["snap_other_nodes"] = snap_other_nodes;
state["snap_grid"] = snap_grid;
+ state["snap_guides"] = snap_guides;
state["show_grid"] = show_grid;
state["show_rulers"] = show_rulers;
+ state["show_guides"] = show_guides;
state["show_helpers"] = show_helpers;
state["snap_rotation"] = snap_rotation;
state["snap_relative"] = snap_relative;
@@ -497,6 +513,12 @@ void CanvasItemEditor::set_state(const Dictionary &p_state) {
smartsnap_config_popup->set_item_checked(idx, snap_other_nodes);
}
+ if (state.has("snap_guides")) {
+ snap_guides = state["snap_guides"];
+ int idx = smartsnap_config_popup->get_item_index(SNAP_USE_GUIDES);
+ smartsnap_config_popup->set_item_checked(idx, snap_guides);
+ }
+
if (state.has("snap_grid")) {
snap_grid = state["snap_grid"];
int idx = snap_config_menu->get_popup()->get_item_index(SNAP_USE_GRID);
@@ -515,6 +537,12 @@ void CanvasItemEditor::set_state(const Dictionary &p_state) {
view_menu->get_popup()->set_item_checked(idx, show_rulers);
}
+ if (state.has("show_guides")) {
+ show_guides = state["show_guides"];
+ int idx = view_menu->get_popup()->get_item_index(SHOW_GUIDES);
+ view_menu->get_popup()->set_item_checked(idx, show_guides);
+ }
+
if (state.has("show_helpers")) {
show_helpers = state["show_helpers"];
int idx = view_menu->get_popup()->get_item_index(SHOW_HELPERS);
@@ -1200,10 +1228,202 @@ void CanvasItemEditor::_update_cursor() {
void CanvasItemEditor::_gui_input_viewport_base(const Ref<InputEvent> &p_event) {
+ Ref<InputEventMouseButton> b = p_event;
+ if (b.is_valid()) {
+ if (b->get_button_index() == BUTTON_LEFT && b->is_pressed()) {
+ if (show_guides && show_rulers && EditorNode::get_singleton()->get_edited_scene()) {
+ Transform2D xform = viewport_scrollable->get_transform() * transform;
+ // Retreive the guide lists
+ Array vguides;
+ if (EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_vertical_guides_")) {
+ vguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_vertical_guides_");
+ }
+ Array hguides;
+ if (EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_horizontal_guides_")) {
+ hguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_horizontal_guides_");
+ }
+
+ // Press button
+ if (b->get_position().x < RULER_WIDTH && b->get_position().y < RULER_WIDTH) {
+ // Drag a new double guide
+ drag = DRAG_DOUBLE_GUIDE;
+ edited_guide_index = -1;
+ } else if (b->get_position().x < RULER_WIDTH) {
+ // Check if we drag an existing horizontal guide
+ float minimum = 1e20;
+ edited_guide_index = -1;
+ for (int i = 0; i < hguides.size(); i++) {
+ if (ABS(xform.xform(Point2(0, hguides[i])).y - b->get_position().y) < MIN(minimum, 8)) {
+ edited_guide_index = i;
+ }
+ }
+
+ if (edited_guide_index >= 0) {
+ // Drag an existing horizontal guide
+ drag = DRAG_H_GUIDE;
+ } else {
+ // Drag a new vertical guide
+ drag = DRAG_V_GUIDE;
+ }
+ } else if (b->get_position().y < RULER_WIDTH) {
+ // Check if we drag an existing vertical guide
+ float minimum = 1e20;
+ edited_guide_index = -1;
+ for (int i = 0; i < vguides.size(); i++) {
+ if (ABS(xform.xform(Point2(vguides[i], 0)).x - b->get_position().x) < MIN(minimum, 8)) {
+ edited_guide_index = i;
+ }
+ }
+
+ if (edited_guide_index >= 0) {
+ // Drag an existing vertical guide
+ drag = DRAG_V_GUIDE;
+ } else {
+ // Drag a new vertical guide
+ drag = DRAG_H_GUIDE;
+ }
+ }
+ }
+ }
+
+ if (b->get_button_index() == BUTTON_LEFT && !b->is_pressed()) {
+ // Release button
+ if (show_guides && EditorNode::get_singleton()->get_edited_scene()) {
+ Transform2D xform = viewport_scrollable->get_transform() * transform;
+
+ // Retreive the guide lists
+ Array vguides;
+ if (EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_vertical_guides_")) {
+ vguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_vertical_guides_");
+ }
+ Array hguides;
+ if (EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_horizontal_guides_")) {
+ hguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_horizontal_guides_");
+ }
+
+ Point2 edited = snap_point(xform.affine_inverse().xform(b->get_position()), SNAP_GRID | SNAP_PIXEL | SNAP_OTHER_NODES);
+ if (drag == DRAG_V_GUIDE) {
+ Array prev_vguides = vguides.duplicate();
+ if (b->get_position().x > RULER_WIDTH) {
+ // Adds a new vertical guide
+ if (edited_guide_index >= 0) {
+ vguides[edited_guide_index] = edited.x;
+ undo_redo->create_action(TTR("Move vertical guide"));
+ undo_redo->add_do_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_vertical_guides_", vguides);
+ undo_redo->add_undo_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_vertical_guides_", prev_vguides);
+ undo_redo->add_undo_method(viewport_base, "update");
+ undo_redo->commit_action();
+ } else {
+ vguides.push_back(edited.x);
+ undo_redo->create_action(TTR("Create new vertical guide"));
+ undo_redo->add_do_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_vertical_guides_", vguides);
+ undo_redo->add_undo_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_vertical_guides_", prev_vguides);
+ undo_redo->add_undo_method(viewport_base, "update");
+ undo_redo->commit_action();
+ }
+ } else {
+ if (edited_guide_index >= 0) {
+ vguides.remove(edited_guide_index);
+ undo_redo->create_action(TTR("Remove vertical guide"));
+ undo_redo->add_do_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_vertical_guides_", vguides);
+ undo_redo->add_undo_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_vertical_guides_", prev_vguides);
+ undo_redo->add_undo_method(viewport_base, "update");
+ undo_redo->commit_action();
+ }
+ }
+ } else if (drag == DRAG_H_GUIDE) {
+ Array prev_hguides = hguides.duplicate();
+ if (b->get_position().y > RULER_WIDTH) {
+ // Adds a new horizontal guide
+ if (edited_guide_index >= 0) {
+ hguides[edited_guide_index] = edited.y;
+ undo_redo->create_action(TTR("Move horizontal guide"));
+ undo_redo->add_do_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_horizontal_guides_", hguides);
+ undo_redo->add_undo_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_horizontal_guides_", prev_hguides);
+ undo_redo->add_undo_method(viewport_base, "update");
+ undo_redo->commit_action();
+ } else {
+ hguides.push_back(edited.y);
+ undo_redo->create_action(TTR("Create new horizontal guide"));
+ undo_redo->add_do_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_horizontal_guides_", hguides);
+ undo_redo->add_undo_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_horizontal_guides_", prev_hguides);
+ undo_redo->add_undo_method(viewport_base, "update");
+ undo_redo->commit_action();
+ }
+ } else {
+ if (edited_guide_index >= 0) {
+ hguides.remove(edited_guide_index);
+ undo_redo->create_action(TTR("Remove horizontal guide"));
+ undo_redo->add_do_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_horizontal_guides_", hguides);
+ undo_redo->add_undo_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_horizontal_guides_", prev_hguides);
+ undo_redo->add_undo_method(viewport_base, "update");
+ undo_redo->commit_action();
+ }
+ }
+ } else if (drag == DRAG_DOUBLE_GUIDE) {
+ Array prev_hguides = hguides.duplicate();
+ Array prev_vguides = vguides.duplicate();
+ if (b->get_position().x > RULER_WIDTH && b->get_position().y > RULER_WIDTH) {
+ // Adds a new horizontal guide a new vertical guide
+ vguides.push_back(edited.x);
+ hguides.push_back(edited.y);
+ undo_redo->create_action(TTR("Create new horizontal and vertical guides"));
+ undo_redo->add_do_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_vertical_guides_", vguides);
+ undo_redo->add_do_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_horizontal_guides_", hguides);
+ undo_redo->add_undo_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_vertical_guides_", prev_vguides);
+ undo_redo->add_undo_method(EditorNode::get_singleton()->get_edited_scene(), "set_meta", "_edit_horizontal_guides_", prev_hguides);
+ undo_redo->add_undo_method(viewport_base, "update");
+ undo_redo->commit_action();
+ }
+ }
+ }
+ if (drag == DRAG_DOUBLE_GUIDE || drag == DRAG_V_GUIDE || drag == DRAG_H_GUIDE) {
+ drag = DRAG_NONE;
+ viewport_base->update();
+ }
+ }
+ }
+
Ref<InputEventMouseMotion> m = p_event;
if (m.is_valid()) {
- if (!viewport_base->has_focus() && (!get_focus_owner() || !get_focus_owner()->is_text_field()))
+ if (!viewport_base->has_focus() && (!get_focus_owner() || !get_focus_owner()->is_text_field())) {
viewport_base->call_deferred("grab_focus");
+ }
+ if (drag == DRAG_DOUBLE_GUIDE || drag == DRAG_H_GUIDE || drag == DRAG_V_GUIDE) {
+ Transform2D xform = viewport_scrollable->get_transform() * transform;
+ Point2 mouse_pos = m->get_position();
+ mouse_pos = xform.affine_inverse().xform(mouse_pos);
+ mouse_pos = xform.xform(snap_point(mouse_pos, SNAP_GRID | SNAP_PIXEL | SNAP_OTHER_NODES));
+
+ edited_guide_pos = mouse_pos;
+ viewport_base->update();
+ }
+ }
+
+ Ref<InputEventKey> k = p_event;
+ if (k.is_valid()) {
+ if (k->is_pressed() && drag == DRAG_NONE) {
+ // Move the object with the arrow keys
+ KeyMoveMODE move_mode = MOVE_VIEW_BASE;
+ if (k->get_alt()) move_mode = MOVE_LOCAL_BASE;
+ if (k->get_control() || k->get_metakey()) move_mode = MOVE_LOCAL_WITH_ROT;
+
+ if (k->get_scancode() == KEY_UP)
+ _key_move(Vector2(0, -1), k->get_shift(), move_mode);
+ else if (k->get_scancode() == KEY_DOWN)
+ _key_move(Vector2(0, 1), k->get_shift(), move_mode);
+ else if (k->get_scancode() == KEY_LEFT)
+ _key_move(Vector2(-1, 0), k->get_shift(), move_mode);
+ else if (k->get_scancode() == KEY_RIGHT)
+ _key_move(Vector2(1, 0), k->get_shift(), move_mode);
+ else if (k->get_scancode() == KEY_ESCAPE) {
+ editor_selection->clear();
+ viewport->update();
+ } else
+ return;
+
+ accept_event();
+ }
}
}
@@ -1741,7 +1961,7 @@ void CanvasItemEditor::_gui_input_viewport(const Ref<InputEvent> &p_event) {
Vector2 anchor = c_trans_rev.xform(dto - drag_from + drag_point_from);
anchor = _position_to_anchor(control, anchor);
- Vector2 anchor_snapped = c_trans_rev.xform(snap_point(dto - drag_from + drag_point_from, SNAP_GRID | SNAP_OTHER_NODES, _get_single_item(), SNAP_NODE_PARENT | SNAP_NODE_SIDES));
+ Vector2 anchor_snapped = c_trans_rev.xform(snap_point(dto - drag_from + drag_point_from, SNAP_GRID | SNAP_GUIDES | SNAP_OTHER_NODES, _get_single_item(), SNAP_NODE_PARENT | SNAP_NODE_SIDES));
anchor_snapped = _position_to_anchor(control, anchor_snapped).snapped(Vector2(0.00001, 0.00001));
bool use_y = Math::abs(drag_vector.y) > Math::abs(drag_vector.x);
@@ -1777,7 +1997,7 @@ void CanvasItemEditor::_gui_input_viewport(const Ref<InputEvent> &p_event) {
}
dfrom = drag_point_from;
- dto = snap_point(dto, SNAP_NODE_ANCHORS | SNAP_NODE_PARENT | SNAP_OTHER_NODES | SNAP_GRID | SNAP_PIXEL, _get_single_item());
+ dto = snap_point(dto, SNAP_NODE_ANCHORS | SNAP_NODE_PARENT | SNAP_OTHER_NODES | SNAP_GRID | SNAP_GUIDES | SNAP_PIXEL, _get_single_item());
drag_vector =
canvas_item->get_global_transform_with_canvas().affine_inverse().xform(dto) -
@@ -2001,32 +2221,6 @@ void CanvasItemEditor::_gui_input_viewport(const Ref<InputEvent> &p_event) {
}
}
}
-
- Ref<InputEventKey> k = p_event;
- if (k.is_valid()) {
- if (k->is_pressed() && drag == DRAG_NONE) {
- // Move the object with the arrow keys
- KeyMoveMODE move_mode = MOVE_VIEW_BASE;
- if (k->get_alt()) move_mode = MOVE_LOCAL_BASE;
- if (k->get_control() || k->get_metakey()) move_mode = MOVE_LOCAL_WITH_ROT;
-
- if (k->get_scancode() == KEY_UP)
- _key_move(Vector2(0, -1), k->get_shift(), move_mode);
- else if (k->get_scancode() == KEY_DOWN)
- _key_move(Vector2(0, 1), k->get_shift(), move_mode);
- else if (k->get_scancode() == KEY_LEFT)
- _key_move(Vector2(-1, 0), k->get_shift(), move_mode);
- else if (k->get_scancode() == KEY_RIGHT)
- _key_move(Vector2(1, 0), k->get_shift(), move_mode);
- else if (k->get_scancode() == KEY_ESCAPE) {
- editor_selection->clear();
- viewport->update();
- } else
- return;
-
- accept_event();
- }
- }
}
void CanvasItemEditor::_draw_text_at_position(Point2 p_position, String p_string, Margin p_side) {
@@ -2065,6 +2259,58 @@ void CanvasItemEditor::_draw_percentage_at_position(float p_value, Point2 p_posi
}
}
+void CanvasItemEditor::_draw_focus() {
+ // Draw the focus around the base viewport
+ if (viewport_base->has_focus()) {
+ get_stylebox("Focus", "EditorStyles")->draw(viewport_base->get_canvas_item(), Rect2(Point2(), viewport_base->get_size()));
+ }
+}
+
+void CanvasItemEditor::_draw_guides() {
+
+ Color guide_color = Color(0.6, 0.0, 0.8);
+ Transform2D xform = viewport_scrollable->get_transform() * transform;
+
+ // Guides already there
+ if (EditorNode::get_singleton()->get_edited_scene() && EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_vertical_guides_")) {
+ Array vguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_vertical_guides_");
+ for (int i = 0; i < vguides.size(); i++) {
+ if (drag == DRAG_V_GUIDE && i == edited_guide_index)
+ continue;
+ float x = xform.xform(Point2(vguides[i], 0)).x;
+ viewport_base->draw_line(Point2(x, 0), Point2(x, viewport_base->get_size().y), guide_color);
+ }
+ }
+
+ if (EditorNode::get_singleton()->get_edited_scene() && EditorNode::get_singleton()->get_edited_scene()->has_meta("_edit_horizontal_guides_")) {
+ Array hguides = EditorNode::get_singleton()->get_edited_scene()->get_meta("_edit_horizontal_guides_");
+ for (int i = 0; i < hguides.size(); i++) {
+ if (drag == DRAG_H_GUIDE && i == edited_guide_index)
+ continue;
+ float y = xform.xform(Point2(0, hguides[i])).y;
+ viewport_base->draw_line(Point2(0, y), Point2(viewport_base->get_size().x, y), guide_color);
+ }
+ }
+
+ // Dragged guide
+ Color text_color = get_color("font_color", "Editor");
+ text_color.a = 0.5;
+ if (drag == DRAG_DOUBLE_GUIDE || drag == DRAG_V_GUIDE) {
+ String str = vformat("%d px", xform.affine_inverse().xform(edited_guide_pos).x);
+ Ref<Font> font = get_font("font", "Label");
+ Size2 text_size = font->get_string_size(str);
+ viewport_base->draw_string(font, Point2(edited_guide_pos.x + 10, RULER_WIDTH + text_size.y / 2 + 10), str, text_color);
+ viewport_base->draw_line(Point2(edited_guide_pos.x, 0), Point2(edited_guide_pos.x, viewport_base->get_size().y), guide_color);
+ }
+ if (drag == DRAG_DOUBLE_GUIDE || drag == DRAG_H_GUIDE) {
+ String str = vformat("%d px", xform.affine_inverse().xform(edited_guide_pos).y);
+ Ref<Font> font = get_font("font", "Label");
+ Size2 text_size = font->get_string_size(str);
+ viewport_base->draw_string(font, Point2(RULER_WIDTH + 10, edited_guide_pos.y + text_size.y / 2 + 10), str, text_color);
+ viewport_base->draw_line(Point2(0, edited_guide_pos.y), Point2(viewport_base->get_size().x, edited_guide_pos.y), guide_color);
+ }
+}
+
void CanvasItemEditor::_draw_rulers() {
Color graduation_color = get_color("font_color", "Editor");
graduation_color.a = 0.5;
@@ -2149,12 +2395,6 @@ void CanvasItemEditor::_draw_rulers() {
viewport_base->draw_rect(Rect2(Point2(), Size2(RULER_WIDTH, RULER_WIDTH)), graduation_color);
}
-void CanvasItemEditor::_draw_focus() {
- if (viewport_base->has_focus()) {
- get_stylebox("Focus", "EditorStyles")->draw(viewport_base->get_canvas_item(), Rect2(Point2(), viewport_base->get_size()));
- }
-}
-
void CanvasItemEditor::_draw_grid() {
if (show_grid) {
//Draw the grid
@@ -2640,6 +2880,8 @@ void CanvasItemEditor::_get_encompassing_rect(Node *p_node, Rect2 &r_rect, const
void CanvasItemEditor::_draw_viewport_base() {
if (show_rulers)
_draw_rulers();
+ if (show_guides)
+ _draw_guides();
_draw_focus();
}
@@ -3126,6 +3368,11 @@ void CanvasItemEditor::_popup_callback(int p_op) {
int idx = smartsnap_config_popup->get_item_index(SNAP_USE_OTHER_NODES);
smartsnap_config_popup->set_item_checked(idx, snap_other_nodes);
} break;
+ case SNAP_USE_GUIDES: {
+ snap_guides = !snap_guides;
+ int idx = smartsnap_config_popup->get_item_index(SNAP_USE_GUIDES);
+ smartsnap_config_popup->set_item_checked(idx, snap_guides);
+ } break;
case SNAP_USE_GRID: {
snap_grid = !snap_grid;
int idx = snap_config_menu->get_popup()->get_item_index(SNAP_USE_GRID);
@@ -3171,6 +3418,13 @@ void CanvasItemEditor::_popup_callback(int p_op) {
viewport->update();
viewport_base->update();
} break;
+ case SHOW_GUIDES: {
+ show_guides = !show_guides;
+ int idx = view_menu->get_popup()->get_item_index(SHOW_GUIDES);
+ view_menu->get_popup()->set_item_checked(idx, show_guides);
+ viewport->update();
+ viewport_base->update();
+ } break;
case LOCK_SELECTED: {
@@ -3438,7 +3692,6 @@ void CanvasItemEditor::_popup_callback(int p_op) {
case ANIM_INSERT_POS_SCALE:
case ANIM_INSERT_ROT_SCALE:
case ANIM_INSERT_POS_ROT_SCALE: {
-
static const bool key_toggles[7][3]={
{true,false,false},
{false,true,false},
@@ -3451,12 +3704,10 @@ void CanvasItemEditor::_popup_callback(int p_op) {
key_pos=key_toggles[p_op-ANIM_INSERT_POS][0];
key_rot=key_toggles[p_op-ANIM_INSERT_POS][1];
key_scale=key_toggles[p_op-ANIM_INSERT_POS][2];
-
for(int i=ANIM_INSERT_POS;i<=ANIM_INSERT_POS_ROT_SCALE;i++) {
int idx = animation_menu->get_popup()->get_item_index(i);
animation_menu->get_popup()->set_item_checked(idx,i==p_op);
}
-
} break;*/
case ANIM_COPY_POSE: {
@@ -3887,6 +4138,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_node_anchors", TTR("Snap to node anchor")), SNAP_USE_NODE_ANCHORS);
smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_node_sides", TTR("Snap to node sides")), SNAP_USE_NODE_SIDES);
smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_other_nodes", TTR("Snap to other nodes")), SNAP_USE_OTHER_NODES);
+ smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_guides", TTR("Snap to guides")), SNAP_USE_GUIDES);
hb->add_child(memnew(VSeparator));
@@ -3938,6 +4190,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_grid", TTR("Show Grid"), KEY_G), SHOW_GRID);
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_helpers", TTR("Show helpers"), KEY_H), SHOW_HELPERS);
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_rulers", TTR("Show rulers"), KEY_R), SHOW_RULERS);
+ p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_guides", TTR("Show guides"), KEY_Y), SHOW_GUIDES);
p->add_separator();
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/center_selection", TTR("Center Selection"), KEY_F), VIEW_CENTER_TO_SELECTION);
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/frame_selection", TTR("Frame Selection"), KEY_MASK_SHIFT | KEY_F), VIEW_FRAME_TO_SELECTION);
@@ -4025,9 +4278,13 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
key_rot = true;
key_scale = false;
+ edited_guide_pos = Point2();
+ edited_guide_index = -1;
+
show_grid = false;
show_helpers = false;
show_rulers = false;
+ show_guides = true;
zoom = 1;
grid_offset = Point2();
grid_step = Point2(10, 10);
@@ -4040,6 +4297,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
snap_node_sides = true;
snap_other_nodes = true;
snap_grid = true;
+ snap_guides = true;
snap_rotation = false;
snap_pixel = false;
skeleton_show_bones = true;
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index a8183ba286..97e3b03569 100644
--- a/editor/plugins/canvas_item_editor_plugin.h
+++ b/editor/plugins/canvas_item_editor_plugin.h
@@ -87,6 +87,7 @@ class CanvasItemEditor : public VBoxContainer {
SNAP_USE_NODE_SIDES,
SNAP_USE_OTHER_NODES,
SNAP_USE_GRID,
+ SNAP_USE_GUIDES,
SNAP_USE_ROTATION,
SNAP_RELATIVE,
SNAP_CONFIGURE,
@@ -94,6 +95,7 @@ class CanvasItemEditor : public VBoxContainer {
SHOW_GRID,
SHOW_HELPERS,
SHOW_RULERS,
+ SHOW_GUIDES,
LOCK_SELECTED,
UNLOCK_SELECTED,
GROUP_SELECTED,
@@ -183,6 +185,9 @@ class CanvasItemEditor : public VBoxContainer {
DRAG_ROTATE,
DRAG_PIVOT,
DRAG_NODE_2D,
+ DRAG_V_GUIDE,
+ DRAG_H_GUIDE,
+ DRAG_DOUBLE_GUIDE,
};
enum KeyMoveMODE {
@@ -213,6 +218,7 @@ class CanvasItemEditor : public VBoxContainer {
Transform2D transform;
bool show_grid;
bool show_rulers;
+ bool show_guides;
bool show_helpers;
float zoom;
@@ -228,6 +234,7 @@ class CanvasItemEditor : public VBoxContainer {
bool snap_node_sides;
bool snap_other_nodes;
bool snap_grid;
+ bool snap_guides;
bool snap_rotation;
bool snap_relative;
bool snap_pixel;
@@ -333,6 +340,9 @@ class CanvasItemEditor : public VBoxContainer {
Point2 display_rotate_from;
Point2 display_rotate_to;
+ int edited_guide_index;
+ Point2 edited_guide_pos;
+
Ref<StyleBoxTexture> select_sb;
Ref<Texture> select_handle;
Ref<Texture> anchor_handle;
@@ -402,6 +412,7 @@ class CanvasItemEditor : public VBoxContainer {
void _draw_percentage_at_position(float p_value, Point2 p_position, Margin p_side);
void _draw_rulers();
+ void _draw_guides();
void _draw_focus();
void _draw_grid();
void _draw_selection();
@@ -417,8 +428,9 @@ class CanvasItemEditor : public VBoxContainer {
void _focus_selection(int p_op);
- void _snap_if_closer(Point2 p_value, Point2 p_target_snap, Point2 &r_current_snap, bool (&r_snapped)[2], real_t rotation = 0.0, float p_radius = 10.0);
- void _snap_other_nodes(Point2 p_value, Point2 &r_current_snap, bool (&r_snapped)[2], const Node *p_current, const CanvasItem *p_to_snap);
+ void _snap_if_closer_float(float p_value, float p_target_snap, float &r_current_snap, bool &r_snapped, float p_radius = 10.0);
+ void _snap_if_closer_point(Point2 p_value, Point2 p_target_snap, Point2 &r_current_snap, bool (&r_snapped)[2], real_t rotation = 0.0, float p_radius = 10.0);
+ void _snap_other_nodes(Point2 p_value, Point2 &r_current_snap, bool (&r_snapped)[2], const Node *p_current, const CanvasItem *p_to_snap = NULL);
void _set_anchors_preset(Control::LayoutPreset p_preset);
void _set_margins_preset(Control::LayoutPreset p_preset);
@@ -476,13 +488,14 @@ protected:
public:
enum SnapMode {
SNAP_GRID = 1 << 0,
- SNAP_PIXEL = 1 << 1,
- SNAP_NODE_PARENT = 1 << 2,
- SNAP_NODE_ANCHORS = 1 << 3,
- SNAP_NODE_SIDES = 1 << 4,
- SNAP_OTHER_NODES = 1 << 5,
-
- SNAP_DEFAULT = 0x03,
+ SNAP_GUIDES = 1 << 1,
+ SNAP_PIXEL = 1 << 2,
+ SNAP_NODE_PARENT = 1 << 3,
+ SNAP_NODE_ANCHORS = 1 << 4,
+ SNAP_NODE_SIDES = 1 << 5,
+ SNAP_OTHER_NODES = 1 << 6,
+
+ SNAP_DEFAULT = 0x07,
};
Point2 snap_point(Point2 p_target, unsigned int p_modes = SNAP_DEFAULT, const CanvasItem *p_canvas_item = NULL, unsigned int p_forced_modes = 0);
diff --git a/editor/plugins/gi_probe_editor_plugin.cpp b/editor/plugins/gi_probe_editor_plugin.cpp
index fcbf282758..443cd2e41f 100644
--- a/editor/plugins/gi_probe_editor_plugin.cpp
+++ b/editor/plugins/gi_probe_editor_plugin.cpp
@@ -60,6 +60,27 @@ void GIProbeEditorPlugin::make_visible(bool p_visible) {
}
}
+EditorProgress *GIProbeEditorPlugin::tmp_progress = NULL;
+
+void GIProbeEditorPlugin::bake_func_begin(int p_steps) {
+
+ ERR_FAIL_COND(tmp_progress != NULL);
+
+ tmp_progress = memnew(EditorProgress("bake_gi", TTR("Bake GI Probe"), p_steps));
+}
+
+void GIProbeEditorPlugin::bake_func_step(int p_step, const String &p_description) {
+
+ ERR_FAIL_COND(tmp_progress == NULL);
+ tmp_progress->step(p_description, p_step);
+}
+
+void GIProbeEditorPlugin::bake_func_end() {
+ ERR_FAIL_COND(tmp_progress == NULL);
+ memdelete(tmp_progress);
+ tmp_progress = NULL;
+}
+
void GIProbeEditorPlugin::_bind_methods() {
ClassDB::bind_method("_bake", &GIProbeEditorPlugin::_bake);
@@ -70,10 +91,15 @@ GIProbeEditorPlugin::GIProbeEditorPlugin(EditorNode *p_node) {
editor = p_node;
bake = memnew(Button);
bake->set_icon(editor->get_gui_base()->get_icon("BakedLight", "EditorIcons"));
+ bake->set_text(TTR("Bake GI Probe"));
bake->hide();
bake->connect("pressed", this, "_bake");
add_control_to_container(CONTAINER_SPATIAL_EDITOR_MENU, bake);
gi_probe = NULL;
+
+ GIProbe::bake_begin_function = bake_func_begin;
+ GIProbe::bake_step_function = bake_func_step;
+ GIProbe::bake_end_function = bake_func_end;
}
GIProbeEditorPlugin::~GIProbeEditorPlugin() {
diff --git a/editor/plugins/gi_probe_editor_plugin.h b/editor/plugins/gi_probe_editor_plugin.h
index a1fecd2911..527f420510 100644
--- a/editor/plugins/gi_probe_editor_plugin.h
+++ b/editor/plugins/gi_probe_editor_plugin.h
@@ -44,6 +44,11 @@ class GIProbeEditorPlugin : public EditorPlugin {
Button *bake;
EditorNode *editor;
+ static EditorProgress *tmp_progress;
+ static void bake_func_begin(int p_steps);
+ static void bake_func_step(int p_step, const String &p_description);
+ static void bake_func_end();
+
void _bake();
protected:
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index 0e8c13b067..a525983c75 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -437,14 +437,10 @@ void Polygon2DEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_snap_step_y"), &Polygon2DEditor::_set_snap_step_y);
}
-inline float _snap_scalar(float p_offset, float p_step, float p_target) {
- return p_step != 0 ? Math::stepify(p_target - p_offset, p_step) + p_offset : p_target;
-}
-
Vector2 Polygon2DEditor::snap_point(Vector2 p_target) const {
if (use_snap) {
- p_target.x = _snap_scalar(snap_offset.x * uv_draw_zoom - uv_draw_ofs.x, snap_step.x * uv_draw_zoom, p_target.x);
- p_target.y = _snap_scalar(snap_offset.y * uv_draw_zoom - uv_draw_ofs.y, snap_step.y * uv_draw_zoom, p_target.y);
+ p_target.x = Math::snap_scalar(snap_offset.x * uv_draw_zoom - uv_draw_ofs.x, snap_step.x * uv_draw_zoom, p_target.x);
+ p_target.y = Math::snap_scalar(snap_offset.y * uv_draw_zoom - uv_draw_ofs.y, snap_step.y * uv_draw_zoom, p_target.y);
}
return p_target;
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index ffda34653d..a1183307fb 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -2360,7 +2360,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("debugger/step_into", TTR("Step Into"), KEY_F11), DEBUG_STEP);
debug_menu->get_popup()->add_separator();
debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("debugger/break", TTR("Break")), DEBUG_BREAK);
- debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("debugger/continue", TTR("Continue")), DEBUG_CONTINUE);
+ debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("debugger/continue", TTR("Continue"), KEY_F12), DEBUG_CONTINUE);
debug_menu->get_popup()->add_separator();
//debug_menu->get_popup()->add_check_item("Show Debugger",DEBUG_SHOW);
debug_menu->get_popup()->add_check_shortcut(ED_SHORTCUT("debugger/keep_debugger_open", TTR("Keep Debugger Open")), DEBUG_SHOW_KEEP_OPEN);
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index b0ee1a32ca..f7dcc4b52d 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -348,6 +348,7 @@ void ShaderEditor::_editor_settings_changed() {
shader_editor->get_text_edit()->set_show_line_numbers(EditorSettings::get_singleton()->get("text_editor/line_numbers/show_line_numbers"));
shader_editor->get_text_edit()->set_syntax_coloring(EditorSettings::get_singleton()->get("text_editor/highlighting/syntax_highlighting"));
shader_editor->get_text_edit()->set_highlight_all_occurrences(EditorSettings::get_singleton()->get("text_editor/highlighting/highlight_all_occurrences"));
+ shader_editor->get_text_edit()->set_highlight_current_line(EditorSettings::get_singleton()->get("text_editor/highlighting/highlight_current_line"));
shader_editor->get_text_edit()->cursor_set_blink_enabled(EditorSettings::get_singleton()->get("text_editor/cursor/caret_blink"));
shader_editor->get_text_edit()->cursor_set_blink_speed(EditorSettings::get_singleton()->get("text_editor/cursor/caret_blink_speed"));
shader_editor->get_text_edit()->add_constant_override("line_spacing", EditorSettings::get_singleton()->get("text_editor/theme/line_spacing"));
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index 547679b056..f96cbabde7 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -2894,7 +2894,7 @@ bool SpatialEditorViewport::_create_instance(Node *parent, String &path, const P
if (parent_spatial)
global_transform = parent_spatial->get_global_transform();
- global_transform.origin = _get_instance_position(p_point);
+ global_transform.origin = spatial_editor->snap_point(_get_instance_position(p_point));
editor_data->get_undo_redo().add_do_method(instanced_scene, "set_global_transform", global_transform);
@@ -4834,6 +4834,15 @@ void SpatialEditor::snap_cursor_to_plane(const Plane &p_plane) {
//cursor.pos=p_plane.project(cursor.pos);
}
+Vector3 SpatialEditor::snap_point(Vector3 p_target, Vector3 p_start) const {
+ if (is_snap_enabled()) {
+ p_target.x = Math::snap_scalar(0.0, get_translate_snap(), p_target.x);
+ p_target.y = Math::snap_scalar(0.0, get_translate_snap(), p_target.y);
+ p_target.z = Math::snap_scalar(0.0, get_translate_snap(), p_target.z);
+ }
+ return p_target;
+}
+
void SpatialEditorPlugin::_bind_methods() {
ClassDB::bind_method("snap_cursor_to_plane", &SpatialEditorPlugin::snap_cursor_to_plane);
diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h
index a9dd1f1327..f2a9886f2a 100644
--- a/editor/plugins/spatial_editor_plugin.h
+++ b/editor/plugins/spatial_editor_plugin.h
@@ -548,6 +548,8 @@ public:
static SpatialEditor *get_singleton() { return singleton; }
void snap_cursor_to_plane(const Plane &p_plane);
+ Vector3 snap_point(Vector3 p_target, Vector3 p_start = Vector3(0, 0, 0)) const;
+
float get_znear() const { return settings_znear->get_value(); }
float get_zfar() const { return settings_zfar->get_value(); }
float get_fov() const { return settings_fov->get_value(); }
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index dc7acd9fdc..b8274122f8 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -142,6 +142,19 @@ void SpriteFramesEditor::_paste_pressed() {
undo_redo->commit_action();
}
+void SpriteFramesEditor::_copy_pressed() {
+ ERR_FAIL_COND(!frames->has_animation(edited_anim));
+
+ if (tree->get_current() < 0)
+ return;
+ Ref<Texture> r = frames->get_frame(edited_anim, tree->get_current());
+ if (!r.is_valid()) {
+ return;
+ }
+
+ EditorSettings::get_singleton()->set_resource_clipboard(r);
+}
+
void SpriteFramesEditor::_empty_pressed() {
ERR_FAIL_COND(!frames->has_animation(edited_anim));
@@ -642,6 +655,7 @@ void SpriteFramesEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_empty_pressed"), &SpriteFramesEditor::_empty_pressed);
ClassDB::bind_method(D_METHOD("_empty2_pressed"), &SpriteFramesEditor::_empty2_pressed);
ClassDB::bind_method(D_METHOD("_delete_pressed"), &SpriteFramesEditor::_delete_pressed);
+ ClassDB::bind_method(D_METHOD("_copy_pressed"), &SpriteFramesEditor::_copy_pressed);
ClassDB::bind_method(D_METHOD("_paste_pressed"), &SpriteFramesEditor::_paste_pressed);
ClassDB::bind_method(D_METHOD("_file_load_request", "files", "at_position"), &SpriteFramesEditor::_file_load_request, DEFVAL(-1));
ClassDB::bind_method(D_METHOD("_update_library", "skipsel"), &SpriteFramesEditor::_update_library, DEFVAL(false));
@@ -725,6 +739,10 @@ SpriteFramesEditor::SpriteFramesEditor() {
load->set_tooltip(TTR("Load Resource"));
hbc->add_child(load);
+ copy = memnew(Button);
+ copy->set_text(TTR("Copy"));
+ hbc->add_child(copy);
+
paste = memnew(Button);
paste->set_text(TTR("Paste"));
hbc->add_child(paste);
@@ -772,6 +790,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
load->connect("pressed", this, "_load_pressed");
_delete->connect("pressed", this, "_delete_pressed");
+ copy->connect("pressed", this, "_copy_pressed");
paste->connect("pressed", this, "_paste_pressed");
empty->connect("pressed", this, "_empty_pressed");
empty2->connect("pressed", this, "_empty2_pressed");
diff --git a/editor/plugins/sprite_frames_editor_plugin.h b/editor/plugins/sprite_frames_editor_plugin.h
index 0d1ab9fd8c..9fdab37f0e 100644
--- a/editor/plugins/sprite_frames_editor_plugin.h
+++ b/editor/plugins/sprite_frames_editor_plugin.h
@@ -44,6 +44,7 @@ class SpriteFramesEditor : public PanelContainer {
Button *load;
Button *_delete;
+ Button *copy;
Button *paste;
Button *empty;
Button *empty2;
@@ -72,6 +73,7 @@ class SpriteFramesEditor : public PanelContainer {
void _load_pressed();
void _load_scene_pressed();
void _file_load_request(const PoolVector<String> &p_path, int p_at_pos = -1);
+ void _copy_pressed();
void _paste_pressed();
void _empty_pressed();
void _empty2_pressed();
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index 0a7f3ff8f9..8870166dba 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -48,8 +48,8 @@ void TextureRegionEditor::_region_draw() {
Ref<Texture> base_tex = NULL;
if (node_sprite)
base_tex = node_sprite->get_texture();
- else if (node_patch9)
- base_tex = node_patch9->get_texture();
+ else if (node_ninepatch)
+ base_tex = node_ninepatch->get_texture();
else if (obj_styleBox.is_valid())
base_tex = obj_styleBox->get_texture();
else if (atlas_tex.is_valid())
@@ -177,12 +177,12 @@ void TextureRegionEditor::_region_draw() {
updating_scroll = false;
float margins[4];
- if (node_patch9 || obj_styleBox.is_valid()) {
- if (node_patch9) {
- margins[0] = node_patch9->get_patch_margin(MARGIN_TOP);
- margins[1] = node_patch9->get_patch_margin(MARGIN_BOTTOM);
- margins[2] = node_patch9->get_patch_margin(MARGIN_LEFT);
- margins[3] = node_patch9->get_patch_margin(MARGIN_RIGHT);
+ if (node_ninepatch || obj_styleBox.is_valid()) {
+ if (node_ninepatch) {
+ margins[0] = node_ninepatch->get_patch_margin(MARGIN_TOP);
+ margins[1] = node_ninepatch->get_patch_margin(MARGIN_BOTTOM);
+ margins[2] = node_ninepatch->get_patch_margin(MARGIN_LEFT);
+ margins[3] = node_ninepatch->get_patch_margin(MARGIN_RIGHT);
} else if (obj_styleBox.is_valid()) {
margins[0] = obj_styleBox->get_margin_size(MARGIN_TOP);
margins[1] = obj_styleBox->get_margin_size(MARGIN_BOTTOM);
@@ -225,14 +225,14 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
if (mb->get_button_index() == BUTTON_LEFT) {
if (mb->is_pressed()) {
- if (node_patch9 || obj_styleBox.is_valid()) {
+ if (node_ninepatch || obj_styleBox.is_valid()) {
edited_margin = -1;
float margins[4];
- if (node_patch9) {
- margins[0] = node_patch9->get_patch_margin(MARGIN_TOP);
- margins[1] = node_patch9->get_patch_margin(MARGIN_BOTTOM);
- margins[2] = node_patch9->get_patch_margin(MARGIN_LEFT);
- margins[3] = node_patch9->get_patch_margin(MARGIN_RIGHT);
+ if (node_ninepatch) {
+ margins[0] = node_ninepatch->get_patch_margin(MARGIN_TOP);
+ margins[1] = node_ninepatch->get_patch_margin(MARGIN_BOTTOM);
+ margins[2] = node_ninepatch->get_patch_margin(MARGIN_LEFT);
+ margins[3] = node_ninepatch->get_patch_margin(MARGIN_RIGHT);
} else if (obj_styleBox.is_valid()) {
margins[0] = obj_styleBox->get_margin_size(MARGIN_TOP);
margins[1] = obj_styleBox->get_margin_size(MARGIN_BOTTOM);
@@ -272,8 +272,8 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
Rect2 r;
if (node_sprite)
r = node_sprite->get_region_rect();
- else if (node_patch9)
- r = node_patch9->get_region_rect();
+ else if (node_ninepatch)
+ r = node_ninepatch->get_region_rect();
else if (obj_styleBox.is_valid())
r = obj_styleBox->get_region_rect();
else if (atlas_tex.is_valid())
@@ -285,9 +285,9 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
if (node_sprite) {
undo_redo->add_do_method(node_sprite, "set_region_rect", rect);
undo_redo->add_undo_method(node_sprite, "set_region_rect", node_sprite->get_region_rect());
- } else if (node_patch9) {
- undo_redo->add_do_method(node_patch9, "set_region_rect", rect);
- undo_redo->add_undo_method(node_patch9, "set_region_rect", node_patch9->get_region_rect());
+ } else if (node_ninepatch) {
+ undo_redo->add_do_method(node_ninepatch, "set_region_rect", rect);
+ undo_redo->add_undo_method(node_ninepatch, "set_region_rect", node_ninepatch->get_region_rect());
} else if (obj_styleBox.is_valid()) {
undo_redo->add_do_method(obj_styleBox.ptr(), "set_region_rect", rect);
undo_redo->add_undo_method(obj_styleBox.ptr(), "set_region_rect", obj_styleBox->get_region_rect());
@@ -310,8 +310,8 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
drag = true;
if (node_sprite)
rect_prev = node_sprite->get_region_rect();
- else if (node_patch9)
- rect_prev = node_patch9->get_region_rect();
+ else if (node_ninepatch)
+ rect_prev = node_ninepatch->get_region_rect();
else if (obj_styleBox.is_valid())
rect_prev = obj_styleBox->get_region_rect();
else if (atlas_tex.is_valid())
@@ -334,9 +334,9 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
if (edited_margin >= 0) {
undo_redo->create_action("Set Margin");
static Margin m[4] = { MARGIN_TOP, MARGIN_BOTTOM, MARGIN_LEFT, MARGIN_RIGHT };
- if (node_patch9) {
- undo_redo->add_do_method(node_patch9, "set_patch_margin", m[edited_margin], node_patch9->get_patch_margin(m[edited_margin]));
- undo_redo->add_undo_method(node_patch9, "set_patch_margin", m[edited_margin], prev_margin);
+ if (node_ninepatch) {
+ undo_redo->add_do_method(node_ninepatch, "set_patch_margin", m[edited_margin], node_ninepatch->get_patch_margin(m[edited_margin]));
+ undo_redo->add_undo_method(node_ninepatch, "set_patch_margin", m[edited_margin], prev_margin);
} else if (obj_styleBox.is_valid()) {
undo_redo->add_do_method(obj_styleBox.ptr(), "set_margin_size", m[edited_margin], obj_styleBox->get_margin_size(m[edited_margin]));
undo_redo->add_undo_method(obj_styleBox.ptr(), "set_margin_size", m[edited_margin], prev_margin);
@@ -351,11 +351,11 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
} else if (atlas_tex.is_valid()) {
undo_redo->add_do_method(atlas_tex.ptr(), "set_region", atlas_tex->get_region());
undo_redo->add_undo_method(atlas_tex.ptr(), "set_region", rect_prev);
- } else if (node_patch9) {
+ } else if (node_ninepatch) {
// FIXME: Is this intentional?
- } else if (node_patch9) {
- undo_redo->add_do_method(node_patch9, "set_region_rect", node_patch9->get_region_rect());
- undo_redo->add_undo_method(node_patch9, "set_region_rect", rect_prev);
+ } else if (node_ninepatch) {
+ undo_redo->add_do_method(node_ninepatch, "set_region_rect", node_ninepatch->get_region_rect());
+ undo_redo->add_undo_method(node_ninepatch, "set_region_rect", rect_prev);
} else if (obj_styleBox.is_valid()) {
undo_redo->add_do_method(obj_styleBox.ptr(), "set_region_rect", obj_styleBox->get_region_rect());
undo_redo->add_undo_method(obj_styleBox.ptr(), "set_region_rect", rect_prev);
@@ -375,8 +375,8 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
drag = false;
if (edited_margin >= 0) {
static Margin m[4] = { MARGIN_TOP, MARGIN_BOTTOM, MARGIN_LEFT, MARGIN_RIGHT };
- if (node_patch9)
- node_patch9->set_patch_margin(m[edited_margin], prev_margin);
+ if (node_ninepatch)
+ node_ninepatch->set_patch_margin(m[edited_margin], prev_margin);
if (obj_styleBox.is_valid())
obj_styleBox->set_margin_size(m[edited_margin], prev_margin);
edited_margin = -1;
@@ -422,8 +422,8 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
if (new_margin < 0)
new_margin = 0;
static Margin m[4] = { MARGIN_TOP, MARGIN_BOTTOM, MARGIN_LEFT, MARGIN_RIGHT };
- if (node_patch9)
- node_patch9->set_patch_margin(m[edited_margin], new_margin);
+ if (node_ninepatch)
+ node_ninepatch->set_patch_margin(m[edited_margin], new_margin);
if (obj_styleBox.is_valid())
obj_styleBox->set_margin_size(m[edited_margin], new_margin);
} else {
@@ -573,8 +573,8 @@ void TextureRegionEditor::_zoom_out() {
void TextureRegionEditor::apply_rect(const Rect2 &rect) {
if (node_sprite)
node_sprite->set_region_rect(rect);
- else if (node_patch9)
- node_patch9->set_region_rect(rect);
+ else if (node_ninepatch)
+ node_ninepatch->set_region_rect(rect);
else if (obj_styleBox.is_valid())
obj_styleBox->set_region_rect(rect);
else if (atlas_tex.is_valid())
@@ -593,8 +593,8 @@ void TextureRegionEditor::_notification(int p_what) {
}
void TextureRegionEditor::_node_removed(Object *p_obj) {
- if (p_obj == node_sprite || p_obj == node_patch9 || p_obj == obj_styleBox.ptr() || p_obj == atlas_tex.ptr()) {
- node_patch9 = NULL;
+ if (p_obj == node_sprite || p_obj == node_ninepatch || p_obj == obj_styleBox.ptr() || p_obj == atlas_tex.ptr()) {
+ node_ninepatch = NULL;
node_sprite = NULL;
obj_styleBox = Ref<StyleBox>(NULL);
atlas_tex = Ref<AtlasTexture>(NULL);
@@ -623,15 +623,15 @@ void TextureRegionEditor::_bind_methods() {
void TextureRegionEditor::edit(Object *p_obj) {
if (node_sprite)
node_sprite->remove_change_receptor(this);
- if (node_patch9)
- node_patch9->remove_change_receptor(this);
+ if (node_ninepatch)
+ node_ninepatch->remove_change_receptor(this);
if (obj_styleBox.is_valid())
obj_styleBox->remove_change_receptor(this);
if (atlas_tex.is_valid())
atlas_tex->remove_change_receptor(this);
if (p_obj) {
node_sprite = Object::cast_to<Sprite>(p_obj);
- node_patch9 = Object::cast_to<NinePatchRect>(p_obj);
+ node_ninepatch = Object::cast_to<NinePatchRect>(p_obj);
if (Object::cast_to<StyleBoxTexture>(p_obj))
obj_styleBox = Ref<StyleBoxTexture>(Object::cast_to<StyleBoxTexture>(p_obj));
if (Object::cast_to<AtlasTexture>(p_obj))
@@ -640,7 +640,7 @@ void TextureRegionEditor::edit(Object *p_obj) {
_edit_region();
} else {
node_sprite = NULL;
- node_patch9 = NULL;
+ node_ninepatch = NULL;
obj_styleBox = Ref<StyleBoxTexture>(NULL);
atlas_tex = Ref<AtlasTexture>(NULL);
}
@@ -659,8 +659,8 @@ void TextureRegionEditor::_edit_region() {
Ref<Texture> texture = NULL;
if (node_sprite)
texture = node_sprite->get_texture();
- else if (node_patch9)
- texture = node_patch9->get_texture();
+ else if (node_ninepatch)
+ texture = node_ninepatch->get_texture();
else if (obj_styleBox.is_valid())
texture = obj_styleBox->get_texture();
else if (atlas_tex.is_valid())
@@ -726,8 +726,8 @@ void TextureRegionEditor::_edit_region() {
if (node_sprite)
rect = node_sprite->get_region_rect();
- else if (node_patch9)
- rect = node_patch9->get_region_rect();
+ else if (node_ninepatch)
+ rect = node_ninepatch->get_region_rect();
else if (obj_styleBox.is_valid())
rect = obj_styleBox->get_region_rect();
else if (atlas_tex.is_valid())
@@ -736,23 +736,10 @@ void TextureRegionEditor::_edit_region() {
edit_draw->update();
}
-inline float _snap_scalar(float p_offset, float p_step, float separation, float p_target) {
- if (p_step != 0) {
- float a = Math::stepify(p_target - p_offset, p_step + separation) + p_offset;
- float b = a;
- if (p_target >= 0)
- b -= separation;
- else
- b += p_step;
- return (Math::abs(p_target - a) < Math::abs(p_target - b)) ? a : b;
- }
- return p_target;
-}
-
Vector2 TextureRegionEditor::snap_point(Vector2 p_target) const {
if (snap_mode == SNAP_GRID) {
- p_target.x = _snap_scalar(snap_offset.x, snap_step.x, snap_separation.x, p_target.x);
- p_target.y = _snap_scalar(snap_offset.y, snap_step.y, snap_separation.y, p_target.y);
+ p_target.x = Math::snap_scalar_seperation(snap_offset.x, snap_step.x, p_target.x, snap_separation.x);
+ p_target.y = Math::snap_scalar_seperation(snap_offset.y, snap_step.y, p_target.y, snap_separation.y);
}
return p_target;
@@ -760,7 +747,7 @@ Vector2 TextureRegionEditor::snap_point(Vector2 p_target) const {
TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
node_sprite = NULL;
- node_patch9 = NULL;
+ node_ninepatch = NULL;
obj_styleBox = Ref<StyleBoxTexture>(NULL);
atlas_tex = Ref<AtlasTexture>(NULL);
editor = p_editor;
diff --git a/editor/plugins/texture_region_editor_plugin.h b/editor/plugins/texture_region_editor_plugin.h
index 0789dde1c1..2058dad791 100644
--- a/editor/plugins/texture_region_editor_plugin.h
+++ b/editor/plugins/texture_region_editor_plugin.h
@@ -37,7 +37,7 @@
#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/2d/sprite.h"
-#include "scene/gui/patch_9_rect.h"
+#include "scene/gui/nine_patch_rect.h"
#include "scene/resources/style_box.h"
#include "scene/resources/texture.h"
@@ -82,7 +82,7 @@ class TextureRegionEditor : public Control {
Vector2 snap_step;
Vector2 snap_separation;
- NinePatchRect *node_patch9;
+ NinePatchRect *node_ninepatch;
Sprite *node_sprite;
Ref<StyleBoxTexture> obj_styleBox;
Ref<AtlasTexture> atlas_tex;
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp
index e500dec0ef..02ead3aee8 100644
--- a/editor/plugins/theme_editor_plugin.cpp
+++ b/editor/plugins/theme_editor_plugin.cpp
@@ -588,6 +588,8 @@ void ThemeEditor::_notification(int p_what) {
time_left = 1.5;
_refresh_interval();
}
+ } else if (p_what == NOTIFICATION_THEME_CHANGED) {
+ theme_menu->set_icon(get_icon("Theme", "EditorIcons"));
}
}
@@ -627,7 +629,9 @@ ThemeEditor::ThemeEditor() {
main_vb->add_child(hb_menu);
theme_menu = memnew(MenuButton);
- theme_menu->set_text(TTR("Theme"));
+ theme_menu->set_text(TTR("Edit theme.."));
+ theme_menu->set_flat(false);
+ theme_menu->set_tooltip(TTR("Theme editing menu."));
theme_menu->get_popup()->add_item(TTR("Add Item"), POPUP_ADD);
theme_menu->get_popup()->add_item(TTR("Add Class Items"), POPUP_CLASS_ADD);
theme_menu->get_popup()->add_item(TTR("Remove Item"), POPUP_REMOVE);
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp
index d12b3f1e0e..9235dafaa6 100644
--- a/editor/plugins/tile_map_editor_plugin.cpp
+++ b/editor/plugins/tile_map_editor_plugin.cpp
@@ -945,6 +945,7 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (mm.is_valid()) {
Point2i new_over_tile = node->world_to_map(xform_inv.xform(mm->get_position()));
+ Point2i old_over_tile = over_tile;
if (new_over_tile != over_tile) {
@@ -963,17 +964,43 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (tool == TOOL_PAINTING) {
+ // Paint using bresenham line to prevent holes in painting if the user moves fast
+
+ Vector<Point2i> points = line(old_over_tile.x, over_tile.x, old_over_tile.y, over_tile.y);
int id = get_selected_tile();
- if (id != TileMap::INVALID_CELL) {
+
+ for (int i = 0; i < points.size(); ++i) {
+
+ Point2i pos = points[i];
if (!paint_undo.has(over_tile)) {
- paint_undo[over_tile] = _get_op_from_cell(over_tile);
+ paint_undo[pos] = _get_op_from_cell(pos);
}
- _set_cell(over_tile, id, flip_h, flip_v, transpose);
+ _set_cell(pos, id, flip_h, flip_v, transpose);
+ }
- return true;
+ return true;
+ }
+
+ if (tool == TOOL_ERASING) {
+
+ // erase using bresenham line to prevent holes in painting if the user moves fast
+
+ Vector<Point2i> points = line(old_over_tile.x, over_tile.x, old_over_tile.y, over_tile.y);
+
+ for (int i = 0; i < points.size(); ++i) {
+
+ Point2i pos = points[i];
+
+ if (!paint_undo.has(over_tile)) {
+ paint_undo[pos] = _get_op_from_cell(pos);
+ }
+
+ _set_cell(pos, TileMap::INVALID_CELL);
}
+
+ return true;
}
if (tool == TOOL_SELECTING) {
@@ -1044,16 +1071,6 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
return true;
}
- if (tool == TOOL_ERASING) {
-
- if (!paint_undo.has(over_tile)) {
- paint_undo[over_tile] = _get_op_from_cell(over_tile);
- }
-
- _set_cell(over_tile, TileMap::INVALID_CELL);
-
- return true;
- }
if (tool == TOOL_PICKING && Input::get_singleton()->is_mouse_button_pressed(BUTTON_LEFT)) {
_pick_tile(over_tile);
diff --git a/editor/plugins/tile_map_editor_plugin.h b/editor/plugins/tile_map_editor_plugin.h
index 5b042e4780..73474a3f3d 100644
--- a/editor/plugins/tile_map_editor_plugin.h
+++ b/editor/plugins/tile_map_editor_plugin.h
@@ -197,7 +197,7 @@ class TileMapEditorPlugin : public EditorPlugin {
TileMapEditor *tile_map_editor;
public:
- virtual bool forward_canvas_gui_input(const Transform2D &p_canvas_xform, const Ref<InputEvent> &p_event) { return tile_map_editor->forward_gui_input(p_event); }
+ virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) { return tile_map_editor->forward_gui_input(p_event); }
virtual void forward_draw_over_canvas(Control *p_canvas) { tile_map_editor->forward_draw_over_canvas(p_canvas); }
virtual String get_name() const { return "TileMap"; }
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index d1210ee26a..18416868ec 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -48,6 +48,7 @@
#include "scene/gui/separator.h"
#include "scene/gui/texture_rect.h"
#include "scene/gui/tool_button.h"
+#include "translation.h"
#include "version.h"
#include "version_hash.gen.h"
@@ -124,7 +125,7 @@ private:
}
if (valid_path == "") {
- set_message(TTR("The path does not exists."), MESSAGE_ERROR);
+ set_message(TTR("The path does not exist."), MESSAGE_ERROR);
memdelete(d);
return "";
}
@@ -1325,6 +1326,28 @@ void ProjectManager::_erase_project() {
erase_ask->popup_centered_minsize();
}
+void ProjectManager::_language_selected(int p_id) {
+
+ String lang = language_btn->get_item_metadata(p_id);
+ EditorSettings::get_singleton()->set("interface/editor/editor_language", lang);
+ language_btn->set_text(lang);
+ language_btn->set_icon(get_icon("Environment", "EditorIcons"));
+
+ language_restart_ask->set_text(TTR("Language changed.\nThe UI will update next time the editor or project manager starts."));
+ language_restart_ask->popup_centered();
+}
+
+void ProjectManager::_restart_confirm() {
+
+ List<String> args = OS::get_singleton()->get_cmdline_args();
+ String exec = OS::get_singleton()->get_executable_path();
+ OS::ProcessID pid = 0;
+ Error err = OS::get_singleton()->execute(exec, args, false, &pid);
+ ERR_FAIL_COND(err);
+
+ get_tree()->quit();
+}
+
void ProjectManager::_exit_dialog() {
get_tree()->quit();
@@ -1398,6 +1421,8 @@ void ProjectManager::_bind_methods() {
ClassDB::bind_method("_rename_project", &ProjectManager::_rename_project);
ClassDB::bind_method("_erase_project", &ProjectManager::_erase_project);
ClassDB::bind_method("_erase_project_confirm", &ProjectManager::_erase_project_confirm);
+ ClassDB::bind_method("_language_selected", &ProjectManager::_language_selected);
+ ClassDB::bind_method("_restart_confirm", &ProjectManager::_restart_confirm);
ClassDB::bind_method("_exit_dialog", &ProjectManager::_exit_dialog);
ClassDB::bind_method("_load_recent_projects", &ProjectManager::_load_recent_projects);
ClassDB::bind_method("_on_project_renamed", &ProjectManager::_on_project_renamed);
@@ -1482,9 +1507,13 @@ ProjectManager::ProjectManager() {
//vb->add_child(memnew(HSeparator));
//vb->add_margin_child("\n",memnew(Control));
+ Control *center_box = memnew(Control);
+ center_box->set_v_size_flags(SIZE_EXPAND_FILL);
+ vb->add_child(center_box);
+
tabs = memnew(TabContainer);
- vb->add_child(tabs);
- tabs->set_v_size_flags(SIZE_EXPAND_FILL);
+ center_box->add_child(tabs);
+ tabs->set_anchors_and_margins_preset(Control::PRESET_WIDE);
HBoxContainer *tree_hb = memnew(HBoxContainer);
projects_hb = tree_hb;
@@ -1585,6 +1614,40 @@ ProjectManager::ProjectManager() {
WARN_PRINT("Asset Library not available, as it requires SSL to work.");
}
+ HBoxContainer *settings_hb = memnew(HBoxContainer);
+ settings_hb->set_alignment(BoxContainer::ALIGN_END);
+ settings_hb->set_h_grow_direction(Control::GROW_DIRECTION_BEGIN);
+
+ language_btn = memnew(OptionButton);
+
+ Vector<String> editor_languages;
+ List<PropertyInfo> editor_settings_properties;
+ EditorSettings::get_singleton()->get_property_list(&editor_settings_properties);
+ for (List<PropertyInfo>::Element *E = editor_settings_properties.front(); E; E = E->next()) {
+ PropertyInfo &pi = E->get();
+ if (pi.name == "interface/editor/editor_language") {
+ editor_languages = pi.hint_string.split(",");
+ }
+ }
+ String current_lang = EditorSettings::get_singleton()->get("interface/editor/editor_language");
+ for (int i = 0; i < editor_languages.size(); i++) {
+ String lang = editor_languages[i];
+ String lang_name = TranslationServer::get_singleton()->get_locale_name(lang);
+ language_btn->add_item(lang_name + " [" + lang + "]", i);
+ language_btn->set_item_metadata(i, lang);
+ if (current_lang == lang) {
+ language_btn->select(i);
+ language_btn->set_text(lang);
+ }
+ }
+ language_btn->set_icon(get_icon("Environment", "EditorIcons"));
+
+ settings_hb->add_child(language_btn);
+ language_btn->connect("item_selected", this, "_language_selected");
+
+ center_box->add_child(settings_hb);
+ settings_hb->set_anchors_and_margins_preset(Control::PRESET_TOP_RIGHT);
+
CenterContainer *cc = memnew(CenterContainer);
Button *cancel = memnew(Button);
cancel->set_text(TTR("Exit"));
@@ -1595,6 +1658,13 @@ ProjectManager::ProjectManager() {
//
+ language_restart_ask = memnew(ConfirmationDialog);
+ language_restart_ask->get_ok()->set_text(TTR("Restart Now"));
+ language_restart_ask->get_ok()->connect("pressed", this, "_restart_confirm");
+ language_restart_ask->get_cancel()->set_text(TTR("Continue"));
+
+ gui_base->add_child(language_restart_ask);
+
erase_ask = memnew(ConfirmationDialog);
erase_ask->get_ok()->set_text(TTR("Remove"));
erase_ask->get_ok()->connect("pressed", this, "_erase_project_confirm");
diff --git a/editor/project_manager.h b/editor/project_manager.h
index bfae0b2297..656bd2d19c 100644
--- a/editor/project_manager.h
+++ b/editor/project_manager.h
@@ -54,6 +54,7 @@ class ProjectManager : public Control {
ProjectListFilter *project_filter;
+ ConfirmationDialog *language_restart_ask;
ConfirmationDialog *erase_ask;
ConfirmationDialog *multi_open_ask;
ConfirmationDialog *multi_run_ask;
@@ -71,6 +72,8 @@ class ProjectManager : public Control {
TabContainer *tabs;
+ OptionButton *language_btn;
+
Control *gui_base;
void _scan_projects();
@@ -84,6 +87,8 @@ class ProjectManager : public Control {
void _erase_project();
void _erase_project_confirm();
void _update_project_buttons();
+ void _language_selected(int p_id);
+ void _restart_confirm();
void _exit_dialog();
void _scan_begin(const String &p_base);
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index 723d7b14ff..3f79d00f80 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -81,6 +81,8 @@ void ProjectSettingsEditor::_notification(int p_what) {
search_button->set_icon(get_icon("Search", "EditorIcons"));
clear_button->set_icon(get_icon("Close", "EditorIcons"));
+ action_add_error->add_color_override("font_color", get_color("error_color", "Editor"));
+
translation_list->connect("button_pressed", this, "_translation_delete");
_update_actions();
popup_add->add_icon_item(get_icon("Keyboard", "EditorIcons"), TTR("Key "), INPUT_KEY); //"Key " - because the word 'key' has already been used as a key animation
@@ -819,12 +821,16 @@ void ProjectSettingsEditor::_action_check(String p_action) {
} else {
if (p_action.find("/") != -1 || p_action.find(":") != -1) {
- action_add->set_text(TTR("Can't contain '/' or ':'"));
+
+ action_add_error->set_text(TTR("Can't contain '/' or ':'"));
+ action_add_error->show();
action_add->set_disabled(true);
return;
}
if (ProjectSettings::get_singleton()->has_setting("input/" + p_action)) {
- action_add->set_text(TTR("Already existing"));
+
+ action_add_error->set_text(TTR("Already existing"));
+ action_add_error->show();
action_add->set_disabled(true);
return;
}
@@ -832,7 +838,7 @@ void ProjectSettingsEditor::_action_check(String p_action) {
action_add->set_disabled(false);
}
- action_add->set_text(TTR("Add"));
+ action_add_error->hide();
}
void ProjectSettingsEditor::_action_adds(String) {
@@ -869,7 +875,7 @@ void ProjectSettingsEditor::_action_add() {
return;
r->select(0);
input_editor->ensure_cursor_is_visible();
- action_add->set_text(TTR("Add"));
+ action_add_error->hide();
}
void ProjectSettingsEditor::_item_checked(const String &p_item, bool p_check) {
@@ -1127,7 +1133,11 @@ void ProjectSettingsEditor::_translation_res_option_changed() {
ERR_FAIL_COND(!remaps.has(key));
PoolStringArray r = remaps[key];
ERR_FAIL_INDEX(idx, r.size());
- r.set(idx, path + ":" + langs[which]);
+ if (translation_locales_idxs_remap.size() > 0) {
+ r.set(idx, path + ":" + langs[translation_locales_idxs_remap[which]]);
+ } else {
+ r.set(idx, path + ":" + langs[which]);
+ }
remaps[key] = r;
updating_translations = true;
@@ -1203,6 +1213,88 @@ void ProjectSettingsEditor::_translation_res_option_delete(Object *p_item, int p
undo_redo->commit_action();
}
+void ProjectSettingsEditor::_translation_filter_option_changed() {
+
+ int sel_id = translation_locale_filter_mode->get_selected_id();
+ TreeItem *t = translation_filter->get_selected();
+ String locale = t->get_tooltip(0);
+ bool checked = t->is_checked(0);
+
+ Variant prev;
+ Array f_locales_all;
+
+ if (ProjectSettings::get_singleton()->has_setting("locale/locale_filter")) {
+ f_locales_all = ProjectSettings::get_singleton()->get("locale/locale_filter");
+ prev = f_locales_all;
+
+ if (f_locales_all.size() != 2) {
+ f_locales_all.clear();
+ f_locales_all.append(sel_id);
+ f_locales_all.append(Array());
+ }
+ } else {
+ f_locales_all.append(sel_id);
+ f_locales_all.append(Array());
+ }
+
+ Array f_locales = f_locales_all[1];
+ int l_idx = f_locales.find(locale);
+
+ if (checked) {
+ if (l_idx == -1) {
+ f_locales.append(locale);
+ }
+ } else {
+ if (l_idx != -1) {
+ f_locales.remove(l_idx);
+ }
+ }
+
+ f_locales = f_locales.sort();
+
+ undo_redo->create_action(TTR("Changed Locale Filter"));
+ undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/locale_filter", f_locales_all);
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/locale_filter", prev);
+ undo_redo->add_do_method(this, "_update_translations");
+ undo_redo->add_undo_method(this, "_update_translations");
+ undo_redo->add_do_method(this, "_settings_changed");
+ undo_redo->add_undo_method(this, "_settings_changed");
+ undo_redo->commit_action();
+}
+
+void ProjectSettingsEditor::_translation_filter_mode_changed(int p_mode) {
+
+ int sel_id = translation_locale_filter_mode->get_selected_id();
+
+ Variant prev;
+ Array f_locales_all;
+
+ if (ProjectSettings::get_singleton()->has_setting("locale/locale_filter")) {
+ f_locales_all = ProjectSettings::get_singleton()->get("locale/locale_filter");
+ prev = f_locales_all;
+
+ if (f_locales_all.size() != 2) {
+ f_locales_all.clear();
+ f_locales_all.append(sel_id);
+ f_locales_all.append(Array());
+ } else {
+ f_locales_all[0] = sel_id;
+ }
+ } else {
+ f_locales_all.append(sel_id);
+ f_locales_all.append(Array());
+ }
+
+ undo_redo->create_action(TTR("Changed Locale Filter Mode"));
+ undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/locale_filter", f_locales_all);
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/locale_filter", prev);
+ undo_redo->add_do_method(this, "_update_translations");
+ undo_redo->add_undo_method(this, "_update_translations");
+ undo_redo->add_do_method(this, "_settings_changed");
+ undo_redo->add_undo_method(this, "_settings_changed");
+ undo_redo->commit_action();
+}
+
void ProjectSettingsEditor::_update_translations() {
//update translations
@@ -1229,6 +1321,61 @@ void ProjectSettingsEditor::_update_translations() {
}
}
+ Vector<String> langs = TranslationServer::get_all_locales();
+ Vector<String> names = TranslationServer::get_all_locale_names();
+
+ //update filter tab
+ Array l_filter_all;
+
+ bool is_arr_empty = true;
+ if (ProjectSettings::get_singleton()->has_setting("locale/locale_filter")) {
+
+ l_filter_all = ProjectSettings::get_singleton()->get("locale/locale_filter");
+
+ if (l_filter_all.size() == 2) {
+
+ translation_locale_filter_mode->select(l_filter_all[0]);
+ is_arr_empty = false;
+ }
+ }
+ if (is_arr_empty) {
+
+ l_filter_all.append(0);
+ l_filter_all.append(Array());
+ translation_locale_filter_mode->select(0);
+ }
+
+ int filter_mode = l_filter_all[0];
+ Array l_filter = l_filter_all[1];
+
+ int s = names.size();
+ if (!translation_locales_list_created) {
+
+ translation_locales_list_created = true;
+ translation_filter->clear();
+ root = translation_filter->create_item(NULL);
+ translation_filter->set_hide_root(true);
+ translation_filter_treeitems.resize(s);
+
+ for (int i = 0; i < s; i++) {
+ String n = names[i];
+ String l = langs[i];
+ TreeItem *t = translation_filter->create_item(root);
+ t->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
+ t->set_text(0, n);
+ t->set_editable(0, true);
+ t->set_tooltip(0, l);
+ t->set_checked(0, l_filter.has(l));
+ translation_filter_treeitems[i] = t;
+ }
+ } else {
+ for (int i = 0; i < s; i++) {
+
+ TreeItem *t = translation_filter_treeitems[i];
+ t->set_checked(0, l_filter.has(t->get_tooltip(0)));
+ }
+ }
+
//update translation remaps
String remap_selected;
@@ -1244,13 +1391,30 @@ void ProjectSettingsEditor::_update_translations() {
translation_remap_options->set_hide_root(true);
translation_res_option_add_button->set_disabled(true);
- Vector<String> langs = TranslationServer::get_all_locales();
- Vector<String> names = TranslationServer::get_all_locale_names();
- String langnames;
+ translation_locales_idxs_remap.clear();
+ translation_locales_idxs_remap.resize(l_filter.size());
+ int fl_idx_count = translation_locales_idxs_remap.size();
+
+ String langnames = "";
+ int l_idx = 0;
for (int i = 0; i < names.size(); i++) {
- if (i > 0)
- langnames += ",";
- langnames += names[i];
+
+ if (filter_mode == SHOW_ONLY_SELECTED_LOCALES && fl_idx_count != 0) {
+ if (l_filter.size() > 0) {
+
+ if (l_filter.find(langs[i]) != -1) {
+ if (langnames.length() > 0)
+ langnames += ",";
+ langnames += names[i];
+ translation_locales_idxs_remap[l_idx] = i;
+ l_idx++;
+ }
+ }
+ } else {
+ if (i > 0)
+ langnames += ",";
+ langnames += names[i];
+ }
}
if (ProjectSettings::get_singleton()->has_setting("locale/translation_remaps")) {
@@ -1295,11 +1459,18 @@ void ProjectSettingsEditor::_update_translations() {
t2->set_editable(1, true);
t2->set_metadata(1, path);
int idx = langs.find(locale);
- print_line("find " + locale + " at " + itos(idx));
+ //print_line("find " + locale + " at " + itos(idx));
if (idx < 0)
idx = 0;
- t2->set_range(1, idx);
+ int f_idx = translation_locales_idxs_remap.find(idx);
+ if (f_idx != -1 && fl_idx_count > 0 && filter_mode == SHOW_ONLY_SELECTED_LOCALES) {
+
+ t2->set_range(1, f_idx);
+ } else {
+
+ t2->set_range(1, idx);
+ }
}
}
}
@@ -1381,6 +1552,9 @@ void ProjectSettingsEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_translation_res_delete"), &ProjectSettingsEditor::_translation_res_delete);
ClassDB::bind_method(D_METHOD("_translation_res_option_delete"), &ProjectSettingsEditor::_translation_res_option_delete);
+ ClassDB::bind_method(D_METHOD("_translation_filter_option_changed"), &ProjectSettingsEditor::_translation_filter_option_changed);
+ ClassDB::bind_method(D_METHOD("_translation_filter_mode_changed"), &ProjectSettingsEditor::_translation_filter_mode_changed);
+
ClassDB::bind_method(D_METHOD("_clear_search_box"), &ProjectSettingsEditor::_clear_search_box);
ClassDB::bind_method(D_METHOD("_toggle_search_bar"), &ProjectSettingsEditor::_toggle_search_bar);
@@ -1528,6 +1702,10 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
action_name->connect("text_entered", this, "_action_adds");
action_name->connect("text_changed", this, "_action_check");
+ action_add_error = memnew(Label);
+ hbc->add_child(action_add_error);
+ action_add_error->hide();
+
add = memnew(Button);
hbc->add_child(add);
add->set_custom_minimum_size(Size2(150, 0) * EDSCALE);
@@ -1601,6 +1779,8 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
translations->set_tab_align(TabContainer::ALIGN_LEFT);
translations->set_name(TTR("Localization"));
tab_container->add_child(translations);
+ //remap for properly select language in popup
+ translation_locales_idxs_remap = Vector<int>();
{
@@ -1684,6 +1864,29 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
}
{
+ VBoxContainer *tvb = memnew(VBoxContainer);
+ translations->add_child(tvb);
+ tvb->set_name(TTR("Locales Filter"));
+ VBoxContainer *tmc = memnew(VBoxContainer);
+ tmc->set_v_size_flags(SIZE_EXPAND_FILL);
+ tvb->add_child(tmc);
+
+ translation_locale_filter_mode = memnew(OptionButton);
+ translation_locale_filter_mode->add_item(TTR("Show all locales"), SHOW_ALL_LOCALES);
+ translation_locale_filter_mode->add_item(TTR("Show only selected locales"), SHOW_ONLY_SELECTED_LOCALES);
+ translation_locale_filter_mode->select(0);
+ tmc->add_margin_child(TTR("Filter mode:"), translation_locale_filter_mode);
+ translation_locale_filter_mode->connect("item_selected", this, "_translation_filter_mode_changed");
+
+ translation_filter = memnew(Tree);
+ translation_filter->set_v_size_flags(SIZE_EXPAND_FILL);
+ translation_filter->set_columns(1);
+ tmc->add_child(memnew(Label(TTR("Locales:"))));
+ tmc->add_child(translation_filter);
+ translation_filter->connect("item_edited", this, "_translation_filter_option_changed");
+ }
+
+ {
autoload_settings = memnew(EditorAutoloadSettings);
autoload_settings->set_name(TTR("AutoLoad"));
tab_container->add_child(autoload_settings);
diff --git a/editor/project_settings_editor.h b/editor/project_settings_editor.h
index 7f9b18a968..dbca158133 100644
--- a/editor/project_settings_editor.h
+++ b/editor/project_settings_editor.h
@@ -49,6 +49,11 @@ class ProjectSettingsEditor : public AcceptDialog {
INPUT_MOUSE_BUTTON
};
+ enum LocaleFilter {
+ SHOW_ALL_LOCALES,
+ SHOW_ONLY_SELECTED_LOCALES,
+ };
+
TabContainer *tab_container;
Timer *timer;
@@ -81,6 +86,7 @@ class ProjectSettingsEditor : public AcceptDialog {
LineEdit *action_name;
Button *action_add;
+ Label *action_add_error;
Tree *input_editor;
bool setting;
bool updating_translations;
@@ -95,6 +101,11 @@ class ProjectSettingsEditor : public AcceptDialog {
EditorFileDialog *translation_res_option_file_open;
Tree *translation_remap;
Tree *translation_remap_options;
+ Tree *translation_filter;
+ bool translation_locales_list_created;
+ OptionButton *translation_locale_filter_mode;
+ Vector<TreeItem *> translation_filter_treeitems;
+ Vector<int> translation_locales_idxs_remap;
EditorAutoloadSettings *autoload_settings;
@@ -142,6 +153,9 @@ class ProjectSettingsEditor : public AcceptDialog {
void _translation_res_option_changed();
void _translation_res_option_delete(Object *p_item, int p_column, int p_button);
+ void _translation_filter_option_changed();
+ void _translation_filter_mode_changed(int p_mode);
+
void _toggle_search_bar(bool p_pressed);
void _clear_search_box();
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index b7cc9347f2..f4d5530faa 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -1766,19 +1766,19 @@ void CustomPropertyEditor::_focus_exit() {
void CustomPropertyEditor::config_action_buttons(const List<String> &p_strings) {
- int w = 100;
- int h = 18;
- int m = 5;
+ int cell_width = 60;
+ int cell_height = 25;
+ int cell_margin = 5;
- set_size(Size2(w, m * 2 + (h + m) * p_strings.size()));
+ set_size(Size2(cell_margin + (cell_width + cell_margin) * p_strings.size(), (cell_margin * 2) + cell_height) * EDSCALE);
for (int i = 0; i < MAX_ACTION_BUTTONS; i++) {
if (i < p_strings.size()) {
action_buttons[i]->show();
action_buttons[i]->set_text(p_strings[i]);
- action_buttons[i]->set_position(Point2(m, m + i * (h + m)));
- action_buttons[i]->set_size(Size2(w - m * 2, h));
+ action_buttons[i]->set_position(Point2(cell_margin + (cell_width + cell_margin) * i, cell_margin) * EDSCALE);
+ action_buttons[i]->set_size(Size2(cell_width, cell_height - cell_margin * 2) * EDSCALE);
action_buttons[i]->set_flat(true);
} else {
action_buttons[i]->hide();
@@ -1788,13 +1788,14 @@ void CustomPropertyEditor::config_action_buttons(const List<String> &p_strings)
void CustomPropertyEditor::config_value_editors(int p_amount, int p_columns, int p_label_w, const List<String> &p_strings) {
- int w = 80;
- int h = 20;
- int m = 10;
+ int cell_width = 95;
+ int cell_height = 25;
+ int cell_margin = 5;
+ int hor_spacing = 5; // Spacing between labels and their values
int rows = ((p_amount - 1) / p_columns) + 1;
- set_size(Size2(m * (1 + p_columns) + (w + p_label_w) * p_columns, m * (1 + rows) + h * rows));
+ set_size(Size2(cell_margin + p_label_w + (cell_width + cell_margin + p_label_w) * p_columns, cell_margin + (cell_height + cell_margin) * rows) * EDSCALE);
for (int i = 0; i < MAX_VALUE_EDITORS; i++) {
@@ -1805,9 +1806,9 @@ void CustomPropertyEditor::config_value_editors(int p_amount, int p_columns, int
value_editor[i]->show();
value_label[i]->show();
value_label[i]->set_text(i < p_strings.size() ? p_strings[i] : String(""));
- value_editor[i]->set_position(Point2(m + p_label_w + c * (w + m + p_label_w), m + r * (h + m)));
- value_editor[i]->set_size(Size2(w, h));
- value_label[i]->set_position(Point2(m + c * (w + m + p_label_w), m + r * (h + m)));
+ value_editor[i]->set_position(Point2(cell_margin + p_label_w + hor_spacing + (cell_width + cell_margin + p_label_w + hor_spacing) * c, cell_margin + (cell_height + cell_margin) * r) * EDSCALE);
+ value_editor[i]->set_size(Size2(cell_width, cell_height));
+ value_label[i]->set_position(Point2(cell_margin + (cell_width + cell_margin + p_label_w + hor_spacing) * c, cell_margin + (cell_height + cell_margin) * r) * EDSCALE);
value_editor[i]->set_editable(!read_only);
} else {
value_editor[i]->hide();
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index 00f44ad9b0..c19b80e649 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -145,9 +145,13 @@ void ScriptCreateDialog::ok_pressed() {
void ScriptCreateDialog::_create_new() {
- String cname;
- if (has_named_classes)
- cname = class_name->get_text();
+ String cname_param;
+
+ if (has_named_classes) {
+ cname_param = class_name->get_text();
+ } else {
+ cname_param = ProjectSettings::get_singleton()->localize_path(file_path->get_text()).get_file().get_basename();
+ }
Ref<Script> scr;
if (script_template != "") {
@@ -159,13 +163,16 @@ void ScriptCreateDialog::_create_new() {
return;
}
scr = scr->duplicate();
- ScriptServer::get_language(language_menu->get_selected())->make_template(cname, parent_name->get_text(), scr);
+ ScriptServer::get_language(language_menu->get_selected())->make_template(cname_param, parent_name->get_text(), scr);
} else {
- scr = ScriptServer::get_language(language_menu->get_selected())->get_template(cname, parent_name->get_text());
+ scr = ScriptServer::get_language(language_menu->get_selected())->get_template(cname_param, parent_name->get_text());
}
- if (cname != "")
- scr->set_name(cname);
+ if (has_named_classes) {
+ String cname = class_name->get_text();
+ if (cname.length())
+ scr->set_name(cname);
+ }
if (!is_built_in) {
String lpath = ProjectSettings::get_singleton()->localize_path(file_path->get_text());
@@ -201,12 +208,20 @@ void ScriptCreateDialog::_lang_changed(int l) {
l = language_menu->get_selected();
ScriptLanguage *language = ScriptServer::get_language(l);
+
if (language->has_named_classes()) {
has_named_classes = true;
} else {
has_named_classes = false;
}
+ if (language->supports_builtin_mode()) {
+ supports_built_in = true;
+ } else {
+ supports_built_in = false;
+ is_built_in = false;
+ }
+
if (ScriptServer::get_language(l)->can_inherit_from_file()) {
can_inherit_from_file = true;
} else {
@@ -496,6 +511,9 @@ void ScriptCreateDialog::_update_dialog() {
}
}
+ if (!supports_built_in)
+ internal->set_pressed(false);
+
/* Is Script created or loaded from existing file */
if (is_new_script_created) {
@@ -503,7 +521,7 @@ void ScriptCreateDialog::_update_dialog() {
get_ok()->set_text(TTR("Create"));
parent_name->set_editable(true);
parent_browse_button->set_disabled(false);
- internal->set_disabled(false);
+ internal->set_disabled(!supports_built_in);
if (is_built_in) {
_msg_path_valid(true, TTR("Built-in script (into scene file)"));
} else {
@@ -734,6 +752,7 @@ ScriptCreateDialog::ScriptCreateDialog() {
is_path_valid = false;
has_named_classes = false;
+ supports_built_in = false;
can_inherit_from_file = false;
is_built_in = false;
diff --git a/editor/script_create_dialog.h b/editor/script_create_dialog.h
index d16c523f0a..c7bbc82d47 100644
--- a/editor/script_create_dialog.h
+++ b/editor/script_create_dialog.h
@@ -62,6 +62,7 @@ class ScriptCreateDialog : public ConfirmationDialog {
bool is_new_script_created;
bool is_path_valid;
bool has_named_classes;
+ bool supports_built_in;
bool can_inherit_from_file;
bool is_parent_name_valid;
bool is_class_name_valid;
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp
index ef61aad341..bc2423fffd 100644
--- a/editor/script_editor_debugger.cpp
+++ b/editor/script_editor_debugger.cpp
@@ -574,7 +574,38 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
for (int i = 0; i < arr.size(); i++) {
p[i] = arr[i];
if (i < perf_items.size()) {
- perf_items[i]->set_text(1, rtos(p[i]));
+
+ float v = p[i];
+ String vs = rtos(v);
+ String tt = vs;
+ switch (Performance::MonitorType((int)perf_items[i]->get_metadata(1))) {
+ case Performance::MONITOR_TYPE_MEMORY: {
+ // for the time being, going above GBs is a bad sign.
+ String unit = "B";
+ if ((int)v > 1073741824) {
+ unit = "GB";
+ v /= 1073741824.0;
+ } else if ((int)v > 1048576) {
+ unit = "MB";
+ v /= 1048576.0;
+ } else if ((int)v > 1024) {
+ unit = "KB";
+ v /= 1024.0;
+ }
+ tt += " bytes";
+ vs = rtos(v) + " " + unit;
+ } break;
+ case Performance::MONITOR_TYPE_TIME: {
+ tt += " seconds";
+ vs += " s";
+ } break;
+ default: {
+ tt += " " + perf_items[i]->get_text(0);
+ } break;
+ }
+
+ perf_items[i]->set_text(1, vs);
+ perf_items[i]->set_tooltip(1, tt);
if (p[i] > perf_max[i])
perf_max[i] = p[i];
}
@@ -775,7 +806,7 @@ void ScriptEditorDebugger::_set_reason_text(const String &p_reason, MessageType
reason->set_tooltip(p_reason);
}
-void ScriptEditorDebugger::_performance_select(Object *, int, bool) {
+void ScriptEditorDebugger::_performance_select() {
perf_draw->update();
}
@@ -785,7 +816,7 @@ void ScriptEditorDebugger::_performance_draw() {
Vector<int> which;
for (int i = 0; i < perf_items.size(); i++) {
- if (perf_items[i]->is_selected(0))
+ if (perf_items[i]->is_checked(0))
which.push_back(i);
}
@@ -816,14 +847,14 @@ void ScriptEditorDebugger::_performance_draw() {
r.position += graph_sb->get_offset();
r.size -= graph_sb->get_minimum_size();
int pi = which[i];
- Color c = get_color("success_color", "Editor");
- c.set_hsv(Math::fmod(c.get_h() + pi * 0.7654, 1), c.get_s(), c.get_v());
- //c = c.linear_interpolate(get_color("base_color", "Editor"), 0.9);
+ Color c = get_color("accent_color", "Editor");
+ float h = (float)which[i] / (float)(perf_items.size());
+ c.set_hsv(Math::fmod(h + 0.4, 0.9), c.get_s() * 0.9, c.get_v() * 1.4);
- c.a = 0.8;
- perf_draw->draw_string(graph_font, r.position + Point2(0, graph_font->get_ascent()), perf_items[pi]->get_text(0), c, r.size.x);
c.a = 0.6;
- perf_draw->draw_string(graph_font, r.position + Point2(graph_font->get_char_size('X').width, graph_font->get_ascent() + graph_font->get_height()), perf_items[pi]->get_text(1), c, r.size.y);
+ perf_draw->draw_string(graph_font, r.position + Point2(0, graph_font->get_ascent()), perf_items[pi]->get_text(0), c, r.size.x);
+ c.a = 0.9;
+ perf_draw->draw_string(graph_font, r.position + Point2(0, graph_font->get_ascent() + graph_font->get_height()), perf_items[pi]->get_text(1), c, r.size.y);
float spacing = point_sep / float(cols);
float from = r.size.width;
@@ -1785,13 +1816,12 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
perf_monitors->set_column_title(1, TTR("Value"));
perf_monitors->set_column_titles_visible(true);
hsp->add_child(perf_monitors);
- perf_monitors->set_select_mode(Tree::SELECT_MULTI);
- perf_monitors->connect("multi_selected", this, "_performance_select");
+ perf_monitors->connect("item_edited", this, "_performance_select");
perf_draw = memnew(Control);
perf_draw->connect("draw", this, "_performance_draw");
hsp->add_child(perf_draw);
hsp->set_name(TTR("Monitors"));
- hsp->set_split_offset(300);
+ hsp->set_split_offset(340 * EDSCALE);
tabs->add_child(hsp);
perf_max.resize(Performance::MONITOR_MAX);
@@ -1801,6 +1831,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
for (int i = 0; i < Performance::MONITOR_MAX; i++) {
String n = Performance::get_singleton()->get_monitor_name(Performance::Monitor(i));
+ Performance::MonitorType mtype = Performance::get_singleton()->get_monitor_type(Performance::Monitor(i));
String base = n.get_slice("/", 0);
String name = n.get_slice("/", 1);
if (!bases.has(base)) {
@@ -1808,12 +1839,16 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
b->set_text(0, base.capitalize());
b->set_editable(0, false);
b->set_selectable(0, false);
+ b->set_expand_right(0, true);
bases[base] = b;
}
TreeItem *it = perf_monitors->create_item(bases[base]);
- it->set_editable(0, false);
- it->set_selectable(0, true);
+ it->set_metadata(1, mtype);
+ it->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
+ it->set_editable(0, true);
+ it->set_selectable(0, false);
+ it->set_selectable(1, false);
it->set_text(0, name.capitalize());
perf_items.push_back(it);
perf_max[i] = 0;
diff --git a/editor/script_editor_debugger.h b/editor/script_editor_debugger.h
index d0faab5892..d18a625eef 100644
--- a/editor/script_editor_debugger.h
+++ b/editor/script_editor_debugger.h
@@ -142,7 +142,7 @@ class ScriptEditorDebugger : public Control {
bool live_debug;
void _performance_draw();
- void _performance_select(Object *, int, bool);
+ void _performance_select();
void _stack_dump_frame_selected();
void _output_clear();
diff --git a/editor/translations/ar.po b/editor/translations/ar.po
index bf0d4bac00..0309680da9 100644
--- a/editor/translations/ar.po
+++ b/editor/translations/ar.po
@@ -1,5 +1,6 @@
# Arabic translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# athomield <athomield@hotmail.com>, 2017.
@@ -7,12 +8,13 @@
# Mohammmad Khashashneh <mohammad.rasmi@gmail.com>, 2016.
# omar anwar aglan <omar.aglan91@yahoo.com>, 2017.
# OWs Tetra <owstetra@gmail.com>, 2017.
+# Wajdi Feki <wajdi.feki@gmail.com>, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2017-09-29 19:44+0000\n"
-"Last-Translator: omar anwar aglan <omar.aglan91@yahoo.com>\n"
+"PO-Revision-Date: 2017-10-25 20:58+0000\n"
+"Last-Translator: Wajdi Feki <wajdi.feki@gmail.com>\n"
"Language-Team: Arabic <https://hosted.weblate.org/projects/godot-engine/"
"godot/ar/>\n"
"Language: ar\n"
@@ -20,99 +22,99 @@ msgstr ""
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n"
-"X-Generator: Weblate 2.17-dev\n"
+"X-Generator: Weblate 2.17\n"
#: editor/animation_editor.cpp
msgid "Disabled"
-msgstr "معطل"
+msgstr "معطّل"
#: editor/animation_editor.cpp
msgid "All Selection"
-msgstr "ÙƒÙÙ„ Ø§Ù„Ù…ÙØ­Ø¯Ø¯"
+msgstr "ÙƒÙÙ„ الإختيار"
#: editor/animation_editor.cpp
msgid "Move Add Key"
-msgstr "تحرك أض٠مÙÙØªØ§Ø­"
+msgstr "Ù…ÙØªØ§Ø­ Ø¥Ø¶Ø§ÙØ© الحركة"
#: editor/animation_editor.cpp
msgid "Anim Change Transition"
-msgstr "الحركة تغير إنتقال"
+msgstr "إنتقالية تغيير التحريك"
#: editor/animation_editor.cpp
msgid "Anim Change Transform"
-msgstr "الحركة تغير تبديل"
+msgstr "تحويل تغيير التحريك"
#: editor/animation_editor.cpp
msgid "Anim Change Value"
-msgstr "الحركة تغير القيمة"
+msgstr "قيمة تغيير التحريك"
#: editor/animation_editor.cpp
msgid "Anim Change Call"
-msgstr "الحركة تغير الخانة"
+msgstr "نداء تغيير التحريك"
#: editor/animation_editor.cpp
msgid "Anim Add Track"
-msgstr "الحركة Ø¥Ø¶Ø§ÙØ© مسار"
+msgstr "مسار Ø¥Ø¶Ø§ÙØ© التحريك"
#: editor/animation_editor.cpp
msgid "Anim Duplicate Keys"
-msgstr "الحركة تكرار Ø§Ù„Ù…ÙØ§ØªÙŠØ­"
+msgstr "Ù…ÙØ§ØªÙŠØ­ نسخ التحريك"
#: editor/animation_editor.cpp
msgid "Move Anim Track Up"
-msgstr "تحرك الحركة متابعة"
+msgstr "Ø±ÙØ¹ مسار التحريك"
#: editor/animation_editor.cpp
msgid "Move Anim Track Down"
-msgstr "تحريك الحركة تتبع أسÙÙ„"
+msgstr "إنزال مسار التحريك"
#: editor/animation_editor.cpp
msgid "Remove Anim Track"
-msgstr "إمسح مسار الحركة"
+msgstr "حذ٠مسار التحريك"
#: editor/animation_editor.cpp
msgid "Set Transitions to:"
-msgstr "حدد التحولات إلي:"
+msgstr "تحديد التحولات ل:"
#: editor/animation_editor.cpp
msgid "Anim Track Rename"
-msgstr "إعادة تسمية مسار الحركة"
+msgstr "تغيير إسم مسار التحريك"
#: editor/animation_editor.cpp
msgid "Anim Track Change Interpolation"
-msgstr "تغير إدخال مسار الحركة"
+msgstr "تغيير إقحام مسار التحريك"
#: editor/animation_editor.cpp
msgid "Anim Track Change Value Mode"
-msgstr "وضع تغير قيمة مسار الحركة"
+msgstr "تغيير صيغة القيمة لمسار التحريك"
#: editor/animation_editor.cpp
msgid "Anim Track Change Wrap Mode"
-msgstr "وضع تغيير ل٠مسار الحركة"
+msgstr "تغيير صيغة الغلا٠لمسار التحريك"
#: editor/animation_editor.cpp
msgid "Edit Node Curve"
-msgstr "تعديل منحني العقدة"
+msgstr "تحرير منحى العقدة"
#: editor/animation_editor.cpp
msgid "Edit Selection Curve"
-msgstr "تعديل المنحني المحدد"
+msgstr "تحرير منحى الإختيار"
#: editor/animation_editor.cpp
msgid "Anim Delete Keys"
-msgstr "Ø­Ø°Ù Ù…ÙØ§ØªÙŠØ­ الحركة"
+msgstr "Ù…ÙØ§ØªÙŠØ­ حذ٠التحريك"
#: editor/animation_editor.cpp editor/plugins/tile_map_editor_plugin.cpp
msgid "Duplicate Selection"
-msgstr "تكرير المحدد"
+msgstr "إختيار النسخ"
#: editor/animation_editor.cpp
msgid "Duplicate Transposed"
-msgstr "تكرير النقل"
+msgstr "نسخ محمّل"
#: editor/animation_editor.cpp
msgid "Remove Selection"
-msgstr "إزالة التحديد"
+msgstr "حذ٠الإختيار"
#: editor/animation_editor.cpp
msgid "Continuous"
@@ -128,11 +130,11 @@ msgstr "Ù…ÙØ·Ù„Ù‚"
#: editor/animation_editor.cpp
msgid "Anim Add Key"
-msgstr "Ø¥Ø¶Ø§ÙØ© Ù…ÙØªØ§Ø­ حركة"
+msgstr "Ù…ÙØªØ§Ø­ Ø¥Ø¶Ø§ÙØ© تحريك"
#: editor/animation_editor.cpp
msgid "Anim Move Keys"
-msgstr "Ù…ÙØªØ§Ø­ حركة"
+msgstr "Ù…ÙØªØ§Ø­ حركة التحريك"
#: editor/animation_editor.cpp
msgid "Scale Selection"
@@ -458,15 +460,15 @@ msgstr "العمود:"
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
-msgstr "الميثود ÙÙŠ العقدة الهد٠يجب أن تحدد!"
+msgstr "الطريقة ÙÙŠ العقدة Ø§Ù„Ù…Ø³ØªÙ‡Ø¯ÙØ© يجب أن تكون محدّدة!"
#: editor/connections_dialog.cpp
msgid ""
"Target method not found! Specify a valid method or attach a script to target "
"Node."
msgstr ""
-"الميثود الهد٠لا يمكن إيجاده! حدد ميثود صالح أو صل كود برمجي إلي العقدة "
-"الهدÙ."
+"لم يتم العثور على الطريقة Ø§Ù„Ù…Ø³ØªÙ‡Ø¯ÙØ©! حدّد طريقة سليمة أو أرÙÙ‚ سيكربت لاستهدا٠"
+"العقدة."
#: editor/connections_dialog.cpp
msgid "Connect To Node:"
@@ -487,11 +489,11 @@ msgstr "إمسح"
#: editor/connections_dialog.cpp
msgid "Add Extra Call Argument:"
-msgstr ""
+msgstr "Ø¥Ø¶Ø§ÙØ© وسيطة إستدعاء إضاÙية"
#: editor/connections_dialog.cpp
msgid "Extra Call Arguments:"
-msgstr ""
+msgstr "وسائط إستدعاء إضاÙية :"
#: editor/connections_dialog.cpp
msgid "Path to Node:"
@@ -745,31 +747,31 @@ msgstr "المالكون"
#: editor/editor_about.cpp
msgid "Platinum Sponsors"
-msgstr ""
+msgstr "الرعاة البلاتينيين"
#: editor/editor_about.cpp
msgid "Gold Sponsors"
-msgstr ""
+msgstr "الرعاة الذهبيين"
#: editor/editor_about.cpp
msgid "Mini Sponsors"
-msgstr ""
+msgstr "الرعاة الصغار"
#: editor/editor_about.cpp
msgid "Gold Donors"
-msgstr ""
+msgstr "المانحين الذهبيين"
#: editor/editor_about.cpp
msgid "Silver Donors"
-msgstr ""
+msgstr "المانحين Ø§Ù„ÙØ¶ÙŠÙŠÙ†"
#: editor/editor_about.cpp
msgid "Bronze Donors"
-msgstr ""
+msgstr "المانحين البرنزيين"
#: editor/editor_about.cpp
msgid "Donors"
-msgstr ""
+msgstr "مانحين"
#: editor/editor_about.cpp
msgid "License"
@@ -1000,7 +1002,7 @@ msgstr "إسم غير صالح، يجب أن لا يتصادم مع الأسما
#: editor/editor_autoload_settings.cpp
msgid "Invalid name. Must not collide with an existing global constant name."
-msgstr "إسم غير صالح، يجب أن لا يتصادم مع أسم ثابت عالمياص موجود Ø¨Ø§Ù„ÙØ¹Ù„."
+msgstr "إسم غير صالح، ييجب ألاّ يتصادم مع إسم موجود لثابت عمومي."
#: editor/editor_autoload_settings.cpp
msgid "Invalid Path."
@@ -1223,10 +1225,6 @@ msgid "File:"
msgstr "الملÙ:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "Ø§Ù„Ù…ÙØµÙÙŠ:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "يجب أن يستخدم صيغة صحيحة."
@@ -1245,19 +1243,19 @@ msgstr "إبحث ÙÙŠ المساعدة"
#: editor/editor_help.cpp
msgid "Class List:"
-msgstr "قائمة Ø§Ù„ÙØµÙˆÙ„:"
+msgstr "قائمة الأصناÙ:"
#: editor/editor_help.cpp
msgid "Search Classes"
-msgstr "إبحث ÙÙŠ Ø§Ù„ÙØµÙˆÙ„"
+msgstr "إبحث ÙÙŠ الأصناÙ"
#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
msgid "Top"
-msgstr ""
+msgstr "Ùوق"
#: editor/editor_help.cpp editor/property_editor.cpp
msgid "Class:"
-msgstr "Ø§Ù„ÙØµÙ„:"
+msgstr "صنÙ:"
#: editor/editor_help.cpp editor/scene_tree_editor.cpp
msgid "Inherits:"
@@ -1331,7 +1329,7 @@ msgstr "الوصÙ:"
#: editor/editor_help.cpp
msgid "Properties"
-msgstr ""
+msgstr "خصائص"
#: editor/editor_help.cpp
msgid "Property Description:"
@@ -1342,6 +1340,8 @@ msgid ""
"There is currently no description for this property. Please help us by "
"[color=$color][url=$url]contributing one[/url][/color]!"
msgstr ""
+"لا يوجد حاليا وص٠لهذه الخاصية. الرجاء المساعدة من خلال [url][/color/] "
+"المساهمة واحد [color=$color][url=$url]!"
#: editor/editor_help.cpp
#, fuzzy
@@ -1357,6 +1357,8 @@ msgid ""
"There is currently no description for this method. Please help us by [color="
"$color][url=$url]contributing one[/url][/color]!"
msgstr ""
+"لا يوجد حاليا وص٠لهذه الطريقة. الرجاء المساعدة من خلال [color=$color][url="
+"$url]المساهمة واحد[/url][/color] !"
#: editor/editor_help.cpp
msgid "Search Text"
@@ -1409,7 +1411,7 @@ msgstr "خطأ خلال Ø§Ù„Ø­ÙØ¸."
#: editor/editor_node.cpp
msgid "Unexpected end of file '%s'."
-msgstr ""
+msgstr "نهاية مل٠غير مرتقبة 's%'."
#: editor/editor_node.cpp
msgid "Missing '%s' or its dependencies."
@@ -1439,7 +1441,7 @@ msgstr "هذه العملية لا يمكنها الإكتمال من غير جØ
#: editor/editor_node.cpp
msgid ""
"Couldn't save scene. Likely dependencies (instances) couldn't be satisfied."
-msgstr "لا يمكن Ø­ÙØ¸ المشهد. علي ما يبدو التبعيات (الأمثلة) لا يمكن ملئها."
+msgstr "لا يمكن Ø­ÙØ¸ المشهد. على الأرجح لا يمكن Ø¥Ø³ØªÙŠÙØ§Ø¡ التبعيات (مجسّدات)."
#: editor/editor_node.cpp
msgid "Failed to load resource."
@@ -1682,19 +1684,24 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+msgid "Unable to load addon script from path: '%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -1962,7 +1969,7 @@ msgstr ""
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Classes"
-msgstr ""
+msgstr "أصناÙ"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Online Docs"
@@ -2215,7 +2222,7 @@ msgid "Frame %"
msgstr ""
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+msgid "Physics Frame %"
msgstr ""
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -2246,7 +2253,7 @@ msgstr ""
#: editor/editor_run_script.cpp
msgid "Write your logic in the _run() method."
-msgstr ""
+msgstr "أكتب منطقك ÙÙŠ الطريقة ()run_"
#: editor/editor_run_script.cpp
msgid "There is an edited scene already."
@@ -2266,7 +2273,7 @@ msgstr ""
#: editor/editor_run_script.cpp
msgid "Did you forget the '_run' method?"
-msgstr ""
+msgstr "هل نسيت الطريقة '_run' ؟"
#: editor/editor_settings.cpp
msgid "Default (Same as Editor)"
@@ -3019,7 +3026,7 @@ msgstr "لا يمكن الإتصال Ø¨Ø§Ù„Ù…ÙØ¶ÙŠÙ:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "No response from host:"
-msgstr "لا إستجابة من Ø§Ù„Ù…ÙØ¶ÙŠÙ:"
+msgstr "لا ردّ من Ø§Ù„Ù…ÙØ¶ÙŠÙ:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "No response."
@@ -3870,7 +3877,7 @@ msgid "Eroding walkable area..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4246,7 +4253,7 @@ msgstr ""
#: editor/plugins/script_editor_plugin.cpp
msgid " Class Reference"
-msgstr ""
+msgstr " مرجع الصنÙ"
#: editor/plugins/script_editor_plugin.cpp
msgid "Next script"
@@ -4332,7 +4339,8 @@ msgstr ""
msgid "Break"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr ""
@@ -4350,7 +4358,7 @@ msgstr ""
#: editor/plugins/script_editor_plugin.cpp
msgid "Search the class hierarchy."
-msgstr ""
+msgstr "إبحث ÙÙŠ هرمية الأصناÙ."
#: editor/plugins/script_editor_plugin.cpp
msgid "Search the reference documentation."
@@ -4426,7 +4434,8 @@ msgid "Cut"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr ""
@@ -5182,16 +5191,20 @@ msgid "Remove All"
msgstr "عملية تحريك"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
+msgid "Edit theme.."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Add Class Items"
+msgid "Theme editing menu."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
+msgid "Add Class Items"
+msgstr "Ø¥Ø¶Ø§ÙØ© بنود للصنÙ"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove Class Items"
-msgstr ""
+msgstr "حذ٠بنود من الصنÙ"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Create Empty Template"
@@ -5466,7 +5479,7 @@ msgstr ""
#: editor/project_manager.cpp
#, fuzzy
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr "المل٠غير موجود."
#: editor/project_manager.cpp
@@ -5596,6 +5609,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5625,6 +5644,10 @@ msgid "Exit"
msgstr ""
#: editor/project_manager.cpp
+msgid "Restart Now"
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Can't run project"
msgstr ""
@@ -5847,6 +5870,14 @@ msgid "Remove Resource Remap Option"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
@@ -5907,6 +5938,27 @@ msgid "Locale"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show all locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "Ø§Ù„Ù…ÙØµÙÙŠ:"
+
+#: editor/project_settings_editor.cpp
+msgid "Locales:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -6006,11 +6058,11 @@ msgstr ""
#: editor/property_selector.cpp
msgid "Select Virtual Method"
-msgstr ""
+msgstr "إختر طريقة Ø¥ÙØªØ±Ø§Ø¶ÙŠØ©"
#: editor/property_selector.cpp
msgid "Select Method"
-msgstr ""
+msgstr "إختر طريقة"
#: editor/pvrtc_compress.cpp
msgid "Could not execute PVRTC tool:"
@@ -6366,7 +6418,7 @@ msgstr ""
#: editor/script_create_dialog.cpp
msgid "Invalid class name"
-msgstr ""
+msgstr "إسم صن٠غير صالح"
#: editor/script_create_dialog.cpp
msgid "Invalid inherited parent name or path"
@@ -6403,7 +6455,7 @@ msgstr ""
#: editor/script_create_dialog.cpp
msgid "Class Name"
-msgstr ""
+msgstr "إسم صنÙ"
#: editor/script_create_dialog.cpp
msgid "Template"
@@ -6669,9 +6721,7 @@ msgstr ""
#: modules/gdscript/gd_functions.cpp
msgid "Invalid instance dictionary (invalid subclasses)"
-msgstr ""
-"instance dictionary نموذج القاموس غير صالح - subclasses Ø§Ù„ÙØ¦Ø© Ø§Ù„ÙØ±Ø¹ÙŠØ© غير "
-"صالحة"
+msgstr "مجسّد القاموس غير صالح (Ø£ØµÙ†Ø§Ù ÙØ±Ø¹ÙŠØ© غير صالحة)"
#: modules/gdscript/gd_functions.cpp
msgid "Object can't provide a length."
@@ -7111,7 +7161,7 @@ msgstr ""
#: modules/visual_script/visual_script_nodes.cpp
msgid "Custom node has no _step() method, can't process graph."
-msgstr ""
+msgstr "العقدة المخصصة لا تحتوي طريقة ()step_ ، لا يمكن معالجة المخطوط."
#: modules/visual_script/visual_script_nodes.cpp
msgid ""
diff --git a/editor/translations/bg.po b/editor/translations/bg.po
index 8906562216..21e2b4f27d 100644
--- a/editor/translations/bg.po
+++ b/editor/translations/bg.po
@@ -1,5 +1,6 @@
# Bulgarian translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Bojidar Marinov <bojidar.marinov.bg@gmail.com>, 2016.
@@ -1212,10 +1213,6 @@ msgid "File:"
msgstr "Файл:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "ТрÑбва да Ñе използва правилно разширение."
@@ -1667,19 +1664,25 @@ msgid "Pick a Main Scene"
msgstr "Изберете главна Ñцена"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "Грешка при зареждането на шрифта."
+
+#: editor/editor_node.cpp
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2200,7 +2203,7 @@ msgid "Frame %"
msgstr ""
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+msgid "Physics Frame %"
msgstr ""
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3861,7 +3864,7 @@ msgid "Eroding walkable area..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4319,7 +4322,8 @@ msgstr ""
msgid "Break"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr ""
@@ -4413,7 +4417,8 @@ msgid "Cut"
msgstr "ИзрÑзване"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "Копиране"
@@ -5171,7 +5176,11 @@ msgid "Remove All"
msgstr "ЗатварÑне на вÑичко"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
@@ -5456,7 +5465,7 @@ msgid "Export With Debug"
msgstr ""
#: editor/project_manager.cpp
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr ""
#: editor/project_manager.cpp
@@ -5588,6 +5597,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5617,6 +5632,10 @@ msgid "Exit"
msgstr "Изход"
#: editor/project_manager.cpp
+msgid "Restart Now"
+msgstr ""
+
+#: editor/project_manager.cpp
#, fuzzy
msgid "Can't run project"
msgstr "Създаване на нов проект"
@@ -5840,6 +5859,14 @@ msgid "Remove Resource Remap Option"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr "ÐаÑтройки на проекта"
@@ -5900,6 +5927,27 @@ msgid "Locale"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show all locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "ПоÑтавÑне на възелите"
+
+#: editor/project_settings_editor.cpp
+msgid "Locales:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
diff --git a/editor/translations/bn.po b/editor/translations/bn.po
index 560a88ca53..3e93381dcd 100644
--- a/editor/translations/bn.po
+++ b/editor/translations/bn.po
@@ -1,5 +1,6 @@
# Bengali translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Abu Md. Maruf Sarker <maruf.webdev@gmail.com>, 2016-2017.
@@ -1249,10 +1250,6 @@ msgid "File:"
msgstr "ফাইল:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "ফিলà§à¦Ÿà¦¾à¦°:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "à¦à¦•টি কারà§à¦¯à¦•র à¦à¦•à§à¦¸à¦Ÿà§‡à¦¨à¦¶à¦¨ বà§à¦¯à¦¬à¦¹à¦¾à¦° করা আবশà§à¦¯à¦•।"
@@ -1727,19 +1724,25 @@ msgid "Pick a Main Scene"
msgstr "à¦à¦•টি মà§à¦–à§à¦¯ দৃশà§à¦¯ মনোনীত করà§à¦¨"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "%s হতে সà§à¦•à§à¦°à¦¿à¦ªà§à¦Ÿ তà§à¦²à¦¤à§‡/লোডে সমসà§à¦¯à¦¾ হয়েছে"
+
+#: editor/editor_node.cpp
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2296,7 +2299,8 @@ msgid "Frame %"
msgstr "ফà§à¦°à§‡à¦® %"
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+#, fuzzy
+msgid "Physics Frame %"
msgstr "সà§à¦¥à¦¿à¦°/বদà§à¦§ ফà§à¦°à§‡à¦® %"
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -4023,7 +4027,7 @@ msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
#, fuzzy
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr "সতরà§à¦•তা"
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4506,7 +4510,8 @@ msgstr "পদারà§à¦ªà¦£ করà§à¦¨"
msgid "Break"
msgstr "বিরতি/ভাঙà§à¦—ন"
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr "সচল"
@@ -4606,7 +4611,8 @@ msgid "Cut"
msgstr "করà§à¦¤à¦¨/কাট করà§à¦¨"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "পà§à¦°à¦¤à¦¿à¦²à¦¿à¦ªà¦¿/কপি করà§à¦¨"
@@ -5385,8 +5391,12 @@ msgid "Remove All"
msgstr "অপসারণ করà§à¦¨"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
-msgstr "থিম"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
+msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
@@ -5691,7 +5701,7 @@ msgstr "Tile Set à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ করà§à¦¨"
#: editor/project_manager.cpp
#, fuzzy
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr "ফাইলটি বিদà§à¦¯à¦®à¦¾à¦¨ নয়।"
#: editor/project_manager.cpp
@@ -5831,6 +5841,12 @@ msgstr "তালিকা হতে পà§à¦°à¦•লà§à¦ª অপসারণ à¦
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5864,6 +5880,11 @@ msgstr "পà§à¦°à¦¸à§à¦¥à¦¾à¦¨ করà§à¦¨"
#: editor/project_manager.cpp
#, fuzzy
+msgid "Restart Now"
+msgstr "পà§à¦¨à¦°à¦¾à¦°à¦®à§à¦­ (সেঃ):"
+
+#: editor/project_manager.cpp
+#, fuzzy
msgid "Can't run project"
msgstr "সংযোগ.."
@@ -6095,6 +6116,15 @@ msgstr "রিসোরà§à¦¸à§‡à¦° পà§à¦¨à¦ƒ-নকশার সিদà§à¦§
#: editor/project_settings_editor.cpp
#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "বà§à¦²à§‡à¦¨à§à¦¡-à¦à¦° সময় পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "পà§à¦°à¦•লà§à¦ªà§‡à¦° সেটিংস (engine.cfg)"
@@ -6155,6 +6185,30 @@ msgid "Locale"
msgstr "ঘটনাসà§à¦¥à¦²"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales Filter"
+msgstr "ছবির ফিলà§à¦Ÿà¦¾à¦°:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Show all locales"
+msgstr "বোনà§â€Œ/হাড় দেখান"
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "ফিলà§à¦Ÿà¦¾à¦°à¦¸à¦®à§‚হ"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales:"
+msgstr "ঘটনাসà§à¦¥à¦²"
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "সà§à¦¬à§Ÿà¦‚কà§à¦°à¦¿à§Ÿ-লোড"
@@ -7763,6 +7817,12 @@ msgstr "ফনà§à¦Ÿ তà§à¦²à¦¤à§‡/লোডে সমসà§à¦¯à¦¾ হয়েà¦
msgid "Invalid font size."
msgstr "ফনà§à¦Ÿà§‡à¦° আকার অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯à¥¤"
+#~ msgid "Filter:"
+#~ msgstr "ফিলà§à¦Ÿà¦¾à¦°:"
+
+#~ msgid "Theme"
+#~ msgstr "থিম"
+
#~ msgid "Method List For '%s':"
#~ msgstr "'%s' à¦à¦° জনà§à¦¯ মেথডের তালিকা:"
@@ -8685,9 +8745,6 @@ msgstr "ফনà§à¦Ÿà§‡à¦° আকার অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯à¥¤"
#~ msgid "Preview Atlas"
#~ msgstr "à¦à¦Ÿà¦²à¦¾à¦¸/মানচিতà§à¦°à¦¾à¦¬à¦²à§€ পà§à¦°à¦¿à¦­à¦¿à¦‰"
-#~ msgid "Image Filter:"
-#~ msgstr "ছবির ফিলà§à¦Ÿà¦¾à¦°:"
-
#~ msgid "Images:"
#~ msgstr "ছবিসমূহ:"
diff --git a/editor/translations/ca.po b/editor/translations/ca.po
index 4d90d8c6c9..1a5a285b94 100644
--- a/editor/translations/ca.po
+++ b/editor/translations/ca.po
@@ -1,5 +1,6 @@
# Catalan translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Roger BR <drai_kin@hotmail.com>, 2016.
@@ -1237,10 +1238,6 @@ msgid "File:"
msgstr "Fitxer:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "Filtre:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "Cal utilitzar una extensió vàlida."
@@ -1714,19 +1711,25 @@ msgid "Pick a Main Scene"
msgstr "Tria una Escena Principal"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "Error carregant lletra."
+
+#: editor/editor_node.cpp
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2280,7 +2283,8 @@ msgid "Frame %"
msgstr "% del Fotograma"
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+#, fuzzy
+msgid "Physics Frame %"
msgstr "% del Fotograma Fix"
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3976,7 +3980,7 @@ msgid "Eroding walkable area..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4442,7 +4446,8 @@ msgstr ""
msgid "Break"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr ""
@@ -4539,7 +4544,8 @@ msgid "Cut"
msgstr "Talla"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "Copia"
@@ -5309,7 +5315,11 @@ msgid "Remove All"
msgstr "Treu"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
@@ -5605,7 +5615,7 @@ msgstr "Exporta el joc de Mosaics (Tiles)"
#: editor/project_manager.cpp
#, fuzzy
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr "El Fitxer no existeix."
#: editor/project_manager.cpp
@@ -5740,6 +5750,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5770,6 +5786,10 @@ msgid "Exit"
msgstr ""
#: editor/project_manager.cpp
+msgid "Restart Now"
+msgstr ""
+
+#: editor/project_manager.cpp
#, fuzzy
msgid "Can't run project"
msgstr "Connecta.."
@@ -5997,6 +6017,15 @@ msgstr ""
#: editor/project_settings_editor.cpp
#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "Canvia Tipus de la Matriu"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "Configuració del Projecte (engine.cfg)"
@@ -6057,6 +6086,27 @@ msgid "Locale"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show all locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "Filtres"
+
+#: editor/project_settings_editor.cpp
+msgid "Locales:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -7672,6 +7722,9 @@ msgstr "Error carregant lletra."
msgid "Invalid font size."
msgstr "La mida de la lletra no és vàlida."
+#~ msgid "Filter:"
+#~ msgstr "Filtre:"
+
#~ msgid "Method List For '%s':"
#~ msgstr "Llista de mètodes de '%s':"
diff --git a/editor/translations/cs.po b/editor/translations/cs.po
index aa971c428f..8083094a39 100644
--- a/editor/translations/cs.po
+++ b/editor/translations/cs.po
@@ -1,5 +1,6 @@
# Czech translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Jan 'spl!te' Kondelík <j.kondelik@centrum.cz>, 2016.
@@ -1225,10 +1226,6 @@ msgid "File:"
msgstr "Soubor:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "Filtr:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "Je nutné použít platnou příponu."
@@ -1681,19 +1678,25 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "Chyba nahrávání fontu."
+
+#: editor/editor_node.cpp
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2219,7 +2222,7 @@ msgid "Frame %"
msgstr ""
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+msgid "Physics Frame %"
msgstr ""
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3893,7 +3896,7 @@ msgid "Eroding walkable area..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4356,7 +4359,8 @@ msgstr ""
msgid "Break"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr ""
@@ -4452,7 +4456,8 @@ msgid "Cut"
msgstr "Vyjmout"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "Kopírovat"
@@ -5215,7 +5220,11 @@ msgid "Remove All"
msgstr "Odebrat"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
@@ -5506,7 +5515,7 @@ msgstr ""
#: editor/project_manager.cpp
#, fuzzy
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr "Soubor neexistuje."
#: editor/project_manager.cpp
@@ -5637,6 +5646,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5667,6 +5682,10 @@ msgid "Exit"
msgstr ""
#: editor/project_manager.cpp
+msgid "Restart Now"
+msgstr ""
+
+#: editor/project_manager.cpp
#, fuzzy
msgid "Can't run project"
msgstr "Připojit.."
@@ -5894,6 +5913,15 @@ msgstr ""
#: editor/project_settings_editor.cpp
#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "Změnit typ hodnot pole"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "Nastavení projektu"
@@ -5954,6 +5982,27 @@ msgid "Locale"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show all locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "Filtr:"
+
+#: editor/project_settings_editor.cpp
+msgid "Locales:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -7545,6 +7594,9 @@ msgstr "Chyba nahrávání fontu."
msgid "Invalid font size."
msgstr "Neplatná velikost fontu."
+#~ msgid "Filter:"
+#~ msgstr "Filtr:"
+
#~ msgid "Method List For '%s':"
#~ msgstr "Seznam metod '%s':"
diff --git a/editor/translations/da.po b/editor/translations/da.po
index 0a8492e137..50da2c54b8 100644
--- a/editor/translations/da.po
+++ b/editor/translations/da.po
@@ -1,5 +1,6 @@
# Danish translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# David Lamhauge <davidlamhauge@gmail.com>, 2016.
@@ -1219,10 +1220,6 @@ msgid "File:"
msgstr "Fil:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "Filter:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "Skal bruge en gyldig udvidelse."
@@ -1675,19 +1672,25 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "Error loading skrifttype."
+
+#: editor/editor_node.cpp
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2211,7 +2214,7 @@ msgid "Frame %"
msgstr ""
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+msgid "Physics Frame %"
msgstr ""
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3881,7 +3884,7 @@ msgid "Eroding walkable area..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4344,7 +4347,8 @@ msgstr ""
msgid "Break"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr ""
@@ -4440,7 +4444,8 @@ msgid "Cut"
msgstr "Cut"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "Kopier"
@@ -5203,7 +5208,11 @@ msgid "Remove All"
msgstr "Fjern"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
@@ -5490,7 +5499,7 @@ msgid "Export With Debug"
msgstr ""
#: editor/project_manager.cpp
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr ""
#: editor/project_manager.cpp
@@ -5621,6 +5630,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5651,6 +5666,10 @@ msgid "Exit"
msgstr ""
#: editor/project_manager.cpp
+msgid "Restart Now"
+msgstr ""
+
+#: editor/project_manager.cpp
#, fuzzy
msgid "Can't run project"
msgstr "Forbind..."
@@ -5877,6 +5896,15 @@ msgid "Remove Resource Remap Option"
msgstr ""
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "Skift Array værditype"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
@@ -5937,6 +5965,27 @@ msgid "Locale"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show all locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "Filter:"
+
+#: editor/project_settings_editor.cpp
+msgid "Locales:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -7520,6 +7569,9 @@ msgstr "Error loading skrifttype."
msgid "Invalid font size."
msgstr "Ugyldig skriftstørrelse."
+#~ msgid "Filter:"
+#~ msgstr "Filter:"
+
#~ msgid "Method List For '%s':"
#~ msgstr "Metode liste For '%s':"
diff --git a/editor/translations/de.po b/editor/translations/de.po
index db3f62b61b..986987978c 100644
--- a/editor/translations/de.po
+++ b/editor/translations/de.po
@@ -1,5 +1,6 @@
# German translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Alexander Mahr <alex.mahr@gmail.com>, 2016.
@@ -1247,10 +1248,6 @@ msgid "File:"
msgstr "Datei:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "Filter:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "Eine gültige Datei-Endung muss verwendet werden."
@@ -1719,22 +1716,30 @@ msgid "Pick a Main Scene"
msgstr "Wähle eine Hauptszene"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+#, fuzzy
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr "Plugin bei ‚"
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+#, fuzzy
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
-"‘ kann nicht aktiviert werden, Einlesen der Konfigurationsdatei "
-"fehlgeschlagen."
+"Skript-Feld für Addon-Plugin in ‚res://addons/‘ konnte nicht gefunden werden."
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
-msgstr ""
-"Skript-Feld für Addon-Plugin in ‚res://addons/‘ konnte nicht gefunden werden."
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "AddOn-Skript konnte nicht geladen werden: '"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
+msgstr "AddOn-Skript konnte nicht geladen werden: '"
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr "AddOn-Skript konnte nicht geladen werden: '"
#: editor/editor_node.cpp
@@ -2284,7 +2289,8 @@ msgid "Frame %"
msgstr "Bild %"
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+#, fuzzy
+msgid "Physics Frame %"
msgstr "Fixiertes Bild %"
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3988,7 +3994,7 @@ msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
#, fuzzy
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr "Warnung"
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4457,7 +4463,8 @@ msgstr "Hineinspringen"
msgid "Break"
msgstr "Unterbrechung"
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr "Fortfahren"
@@ -4555,7 +4562,8 @@ msgid "Cut"
msgstr "Ausschneiden"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "Kopieren"
@@ -5313,8 +5321,12 @@ msgid "Remove All"
msgstr "Alles entfernen"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
-msgstr "Motiv"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
+msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
@@ -5604,7 +5616,7 @@ msgstr "Exportiere mit Debuginformationen"
#: editor/project_manager.cpp
#, fuzzy
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr "Datei existiert nicht."
#: editor/project_manager.cpp
@@ -5746,6 +5758,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr "Sollen wirklich %s Ordner nach Godot-Projekten durchsucht werden?"
@@ -5775,6 +5793,11 @@ msgid "Exit"
msgstr "Verlassen"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Restart Now"
+msgstr "Neu starten (s):"
+
+#: editor/project_manager.cpp
msgid "Can't run project"
msgstr "Projekt kann nicht ausgeführt werden"
@@ -5999,6 +6022,15 @@ msgid "Remove Resource Remap Option"
msgstr "Ressourcen-Remap-Option entfernen"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "Überblendungszeit ändern"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr "Projekteinstellungen (project.godot)"
@@ -6059,6 +6091,30 @@ msgid "Locale"
msgstr "Lokalisierung"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales Filter"
+msgstr "Bildfilter:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Show all locales"
+msgstr "Knochen anzeigen"
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "Nodes filtern"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales:"
+msgstr "Lokalisierung"
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "Autoload"
@@ -7669,6 +7725,17 @@ msgstr "Fehler beim Laden der Schriftart."
msgid "Invalid font size."
msgstr "Ungültige Schriftgröße."
+#~ msgid "Filter:"
+#~ msgstr "Filter:"
+
+#~ msgid "' parsing of config failed."
+#~ msgstr ""
+#~ "‘ kann nicht aktiviert werden, Einlesen der Konfigurationsdatei "
+#~ "fehlgeschlagen."
+
+#~ msgid "Theme"
+#~ msgstr "Motiv"
+
#~ msgid "Method List For '%s':"
#~ msgstr "Methodenliste für '%s':"
@@ -8601,9 +8668,6 @@ msgstr "Ungültige Schriftgröße."
#~ msgid "Preview Atlas"
#~ msgstr "Zeige Atlas-Vorschau"
-#~ msgid "Image Filter:"
-#~ msgstr "Bildfilter:"
-
#~ msgid "Images:"
#~ msgstr "Bilder:"
diff --git a/editor/translations/de_CH.po b/editor/translations/de_CH.po
index e01560fa8a..8c9e4cc1de 100644
--- a/editor/translations/de_CH.po
+++ b/editor/translations/de_CH.po
@@ -1,5 +1,6 @@
# Swiss High German translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Christian Fisch <christian.fiesel@gmail.com>, 2016.
@@ -1208,10 +1209,6 @@ msgid "File:"
msgstr ""
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr ""
@@ -1660,19 +1657,25 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "Fehler beim Instanzieren der %s Szene"
+
+#: editor/editor_node.cpp
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2200,7 +2203,7 @@ msgid "Frame %"
msgstr ""
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+msgid "Physics Frame %"
msgstr ""
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3873,7 +3876,7 @@ msgid "Eroding walkable area..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4339,7 +4342,8 @@ msgstr ""
msgid "Break"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr ""
@@ -4433,7 +4437,8 @@ msgid "Cut"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr ""
@@ -5195,7 +5200,11 @@ msgid "Remove All"
msgstr "Ungültige Bilder löschen"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
@@ -5481,7 +5490,7 @@ msgid "Export With Debug"
msgstr ""
#: editor/project_manager.cpp
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr ""
#: editor/project_manager.cpp
@@ -5617,6 +5626,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5647,6 +5662,10 @@ msgid "Exit"
msgstr ""
#: editor/project_manager.cpp
+msgid "Restart Now"
+msgstr ""
+
+#: editor/project_manager.cpp
#, fuzzy
msgid "Can't run project"
msgstr "Neues Projekt erstellen"
@@ -5873,6 +5892,15 @@ msgstr ""
#: editor/project_settings_editor.cpp
#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "Typ ändern"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "Projekteinstellungen"
@@ -5933,6 +5961,27 @@ msgid "Locale"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show all locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "Node erstellen"
+
+#: editor/project_settings_editor.cpp
+msgid "Locales:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot
index cd26e9cbe0..efddb63796 100644
--- a/editor/translations/editor.pot
+++ b/editor/translations/editor.pot
@@ -1197,10 +1197,6 @@ msgid "File:"
msgstr ""
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr ""
@@ -1640,19 +1636,24 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+msgid "Unable to load addon script from path: '%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2171,7 +2172,7 @@ msgid "Frame %"
msgstr ""
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+msgid "Physics Frame %"
msgstr ""
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3816,7 +3817,7 @@ msgid "Eroding walkable area..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4274,7 +4275,8 @@ msgstr ""
msgid "Break"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr ""
@@ -4368,7 +4370,8 @@ msgid "Cut"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr ""
@@ -5121,7 +5124,11 @@ msgid "Remove All"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
@@ -5404,7 +5411,7 @@ msgid "Export With Debug"
msgstr ""
#: editor/project_manager.cpp
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr ""
#: editor/project_manager.cpp
@@ -5532,6 +5539,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5561,6 +5574,10 @@ msgid "Exit"
msgstr ""
#: editor/project_manager.cpp
+msgid "Restart Now"
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Can't run project"
msgstr ""
@@ -5782,6 +5799,14 @@ msgid "Remove Resource Remap Option"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
@@ -5842,6 +5867,26 @@ msgid "Locale"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show all locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Filter mode:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Locales:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
diff --git a/editor/translations/el.po b/editor/translations/el.po
index 4cf08adc7a..02de498110 100644
--- a/editor/translations/el.po
+++ b/editor/translations/el.po
@@ -1,5 +1,6 @@
# Greek translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# George Tsiamasiotis <gtsiam@windowslive.com>, 2017.
@@ -7,7 +8,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2017-08-27 16:46+0000\n"
+"PO-Revision-Date: 2017-10-24 18:46+0000\n"
"Last-Translator: George Tsiamasiotis <gtsiam@windowslive.com>\n"
"Language-Team: Greek <https://hosted.weblate.org/projects/godot-engine/godot/"
"el/>\n"
@@ -15,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 2.17-dev\n"
+"X-Generator: Weblate 2.17\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -653,9 +654,8 @@ msgstr ""
"Îα αφαιÏεθοÏν; (ΑδÏνατη η αναίÏεση)"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid "Cannot remove:\n"
-msgstr "Δεν είναι δυνατή η επίλυση."
+msgstr "ΑδÏνατη η αφαίÏεση:\n"
#: editor/dependency_editor.cpp
msgid "Error loading:"
@@ -742,32 +742,31 @@ msgstr "ΣυγγÏαφείς"
#: editor/editor_about.cpp
msgid "Platinum Sponsors"
-msgstr ""
+msgstr "ΚοÏυφαίοι ΧοÏηγοί"
#: editor/editor_about.cpp
msgid "Gold Sponsors"
-msgstr ""
+msgstr "ΧÏυσοί ΧοÏυγοί"
#: editor/editor_about.cpp
msgid "Mini Sponsors"
-msgstr ""
+msgstr "ΜικÏοί ΧοÏηγοί"
#: editor/editor_about.cpp
msgid "Gold Donors"
-msgstr ""
+msgstr "ΧÏυσοί ΔωÏητές"
#: editor/editor_about.cpp
msgid "Silver Donors"
-msgstr ""
+msgstr "ΑÏγυÏοί ΔωÏητές"
#: editor/editor_about.cpp
-#, fuzzy
msgid "Bronze Donors"
-msgstr "Κλωνοποίηση κάτω"
+msgstr "Χάλκινοι ΔωÏητές"
#: editor/editor_about.cpp
msgid "Donors"
-msgstr ""
+msgstr "ΔωÏητές"
#: editor/editor_about.cpp
msgid "License"
@@ -894,9 +893,8 @@ msgid "Duplicate"
msgstr "Διπλασιασμός"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Reset Volume"
-msgstr "ΕπαναφοÏά μεγέθυνσης"
+msgstr "ΕπαναφοÏά Έντασης"
#: editor/editor_audio_buses.cpp
msgid "Delete Effect"
@@ -919,9 +917,8 @@ msgid "Duplicate Audio Bus"
msgstr "ΑναπαÏαγωγή διαÏλου ήχου"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Reset Bus Volume"
-msgstr "ΕπαναφοÏά μεγέθυνσης"
+msgstr "ΕπαναφοÏά Έντασης ΔιαÏλου"
#: editor/editor_audio_buses.cpp
msgid "Move Audio Bus"
@@ -1206,9 +1203,8 @@ msgid "Move Favorite Down"
msgstr "Μετακίνηση αγαπημένου κάτω"
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Go to parent folder"
-msgstr "ΑδÏνατη η δημιουÏγία φακέλου."
+msgstr "Πήγαινε στον γονικό φάκελο"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
@@ -1224,10 +1220,6 @@ msgid "File:"
msgstr "ΑÏχείο:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "ΦίλτÏο:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "Απαιτείται η χÏήση έγκυÏης επέκτασης."
@@ -1273,27 +1265,24 @@ msgid "Brief Description:"
msgstr "ΣÏντομη πεÏιγÏαφή:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Members"
-msgstr "Μέλη:"
+msgstr "Μέλη"
#: editor/editor_help.cpp modules/visual_script/visual_script_editor.cpp
msgid "Members:"
msgstr "Μέλη:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Public Methods"
-msgstr "Δημόσιες συναÏτήσεις:"
+msgstr "Δημόσιες συναÏτήσεις"
#: editor/editor_help.cpp
msgid "Public Methods:"
msgstr "Δημόσιες συναÏτήσεις:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "GUI Theme Items"
-msgstr "Στοιχεία του θέματος GUI:"
+msgstr "Στοιχεία του θέματος GUI"
#: editor/editor_help.cpp
msgid "GUI Theme Items:"
@@ -1304,9 +1293,8 @@ msgid "Signals:"
msgstr "Σήματα:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Enumerations"
-msgstr "ΑπαÏιθμήσεις:"
+msgstr "ΑπαÏιθμήσεις"
#: editor/editor_help.cpp
msgid "Enumerations:"
@@ -1317,23 +1305,20 @@ msgid "enum "
msgstr "απαÏίθμηση "
#: editor/editor_help.cpp
-#, fuzzy
msgid "Constants"
-msgstr "ΣταθεÏές:"
+msgstr "ΣταθεÏές"
#: editor/editor_help.cpp
msgid "Constants:"
msgstr "ΣταθεÏές:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Description"
-msgstr "ΠεÏιγÏαφή:"
+msgstr "ΠεÏιγÏαφή"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Properties"
-msgstr "Ιδιότητες:"
+msgstr "Ιδιότητες"
#: editor/editor_help.cpp
msgid "Property Description:"
@@ -1346,9 +1331,8 @@ msgid ""
msgstr ""
#: editor/editor_help.cpp
-#, fuzzy
msgid "Methods"
-msgstr "Λίστα συναÏτήσεων:"
+msgstr "ΣυναÏτήσεις"
#: editor/editor_help.cpp
msgid "Method Description:"
@@ -1400,28 +1384,24 @@ msgid "Error while saving."
msgstr "Σφάλμα κατά την αποθήκευση."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Can't open '%s'."
-msgstr "ΑδÏνατη η λειτουÏγία στο '..'"
+msgstr "ΑδÏνατο το άνοιγμα του '%s'."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Error while parsing '%s'."
-msgstr "Σφάλμα κατά την αποθήκευση."
+msgstr "Σφάλμα κατά η ανάλυση του '%s'."
#: editor/editor_node.cpp
msgid "Unexpected end of file '%s'."
msgstr ""
#: editor/editor_node.cpp
-#, fuzzy
msgid "Missing '%s' or its dependencies."
-msgstr "Η σκηνή '%s' έχει σπασμένες εξαÏτήσεις:"
+msgstr "Λείπει το '%s' ή οι εξαÏτήσεις του."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Error while loading '%s'."
-msgstr "Σφάλμα κατά την αποθήκευση."
+msgstr "Σφάλμα κατά την φόÏτωση του '%s'."
#: editor/editor_node.cpp
msgid "Saving Scene"
@@ -1698,21 +1678,31 @@ msgid "Pick a Main Scene"
msgstr "Επιλογή κÏÏιας σκηνής"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+#, fuzzy
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr "ΑδÏνατη η ενεÏγοποίηση Ï€Ïόσθετης επέκτασης στο: '"
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
-msgstr "' απέτυχε η ανάλυση του αÏγείου παÏαμέτÏων."
-
-#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+#, fuzzy
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
"ΑδÏνατη η έυÏεση του πεδίου 'script' για την Ï€Ïόσθετη επέκταση στο: 'res://"
"addons/"
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "ΑδÏνατη η φόÏτωση δεσμής ενεÏγειών Ï€Ïοσθέτου από τη διαδÏομή: '"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
+msgstr "ΑδÏνατη η φόÏτωση δεσμής ενεÏγειών Ï€Ïοσθέτου από τη διαδÏομή: '"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr "ΑδÏνατη η φόÏτωση δεσμής ενεÏγειών Ï€Ïοσθέτου από τη διαδÏομή: '"
#: editor/editor_node.cpp
@@ -1743,9 +1733,8 @@ msgid "Scene '%s' has broken dependencies:"
msgstr "Η σκηνή '%s' έχει σπασμένες εξαÏτήσεις:"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Clear Recent Scenes"
-msgstr "ΕκκαθάÏιση Ï€Ïόσφατων αÏχείων"
+msgstr "ΕκκαθάÏιση Ï€Ïόσφατων σκηνών"
#: editor/editor_node.cpp
msgid "Save Layout"
@@ -2120,9 +2109,8 @@ msgid "Object properties."
msgstr "Ιδιότητες αντικειμένου."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Changes may be lost!"
-msgstr "Αλλαγή διανυσματικής σταθεÏάς"
+msgstr "Οι αλλαγές μποÏεί να χαθοÏν!"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
#: editor/project_manager.cpp
@@ -2208,7 +2196,7 @@ msgstr "Άνοιγμα του Ï€ÏοηγοÏμενου επεξεÏγαστή"
#: editor/editor_plugin.cpp
#, fuzzy
msgid "Creating Mesh Previews"
-msgstr "ΔημιουÏγία βιβλιοθήκης πλεγμάτων"
+msgstr "ΔημιουÏγία Ï€Ïοεπισκοπήσεων πλεγμάτων"
#: editor/editor_plugin.cpp
msgid "Thumbnail.."
@@ -2260,7 +2248,8 @@ msgid "Frame %"
msgstr "ΚαÏέ %"
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+#, fuzzy
+msgid "Physics Frame %"
msgstr "ΣταθεÏÏŒ καÏέ %"
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3968,7 +3957,7 @@ msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
#, fuzzy
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr "ΠÏοειδοποίηση"
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4437,7 +4426,8 @@ msgstr "Βήμα μέσα"
msgid "Break"
msgstr "Διακοπή"
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr "Συνέχιση"
@@ -4535,7 +4525,8 @@ msgid "Cut"
msgstr "Αποκοπή"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "ΑντιγÏαφή"
@@ -5294,8 +5285,12 @@ msgid "Remove All"
msgstr "ΑφαίÏεση όλων"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
-msgstr "Θέμα"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
+msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
@@ -5585,7 +5580,7 @@ msgstr "Εξαγωγή με αποσφαλμάτωση"
#: editor/project_manager.cpp
#, fuzzy
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr "Το αÏχείο δεν υπάÏχει."
#: editor/project_manager.cpp
@@ -5726,6 +5721,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5756,6 +5757,11 @@ msgid "Exit"
msgstr "Έξοδος"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Restart Now"
+msgstr "Επανεκκίνηση (δευτεÏόλεπτα):"
+
+#: editor/project_manager.cpp
msgid "Can't run project"
msgstr "Δεν είναι δυνατή η εκτέλεση του έÏγου"
@@ -5980,6 +5986,15 @@ msgid "Remove Resource Remap Option"
msgstr "ΑφαίÏεση επιλογής ανακατεÏθυνσης πόÏου"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "Αλλαγή χÏόνου ανάμειξης"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr "Ρυθμίσεις έÏγου (project.godot)"
@@ -6040,6 +6055,30 @@ msgid "Locale"
msgstr "ΠεÏιοχή"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales Filter"
+msgstr "ΠεÏιοχή"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Show all locales"
+msgstr "Εμφάνιση οστών"
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "ΦιλτÏάÏισμα κόμβων"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales:"
+msgstr "ΠεÏιοχή"
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "Αυτόματη φόÏτωση"
@@ -7648,6 +7687,15 @@ msgstr "Σφάλμα κατά την φόÏτωση της γÏαμματοσεÎ
msgid "Invalid font size."
msgstr "Μη έγκυÏο μέγεθος γÏαμματοσειÏάς."
+#~ msgid "Filter:"
+#~ msgstr "ΦίλτÏο:"
+
+#~ msgid "' parsing of config failed."
+#~ msgstr "' απέτυχε η ανάλυση του αÏγείου παÏαμέτÏων."
+
+#~ msgid "Theme"
+#~ msgstr "Θέμα"
+
#~ msgid "Method List For '%s':"
#~ msgstr "Λίστα συναÏτήσεων για '%s':"
diff --git a/editor/translations/es.po b/editor/translations/es.po
index e6a9f205fd..dd4b811bff 100644
--- a/editor/translations/es.po
+++ b/editor/translations/es.po
@@ -1,5 +1,6 @@
# Spanish translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Addiel Lucena Perez <addiell2017@gmail.com>, 2017.
@@ -16,8 +17,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2017-10-05 13:48+0000\n"
-"Last-Translator: Rabid Orange <theorangerabid@gmail.com>\n"
+"PO-Revision-Date: 2017-10-23 01:48+0000\n"
+"Last-Translator: Lisandro Lorea <lisandrolorea@gmail.com>\n"
"Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/"
"godot/es/>\n"
"Language: es\n"
@@ -25,7 +26,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 2.17-dev\n"
+"X-Generator: Weblate 2.17\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -382,9 +383,8 @@ msgid "No Matches"
msgstr "Sin soincidencias"
#: editor/code_editor.cpp
-#, fuzzy
msgid "Replaced %d occurrence(s)."
-msgstr "%d ocurrencias reemplazadas."
+msgstr "%d ocurrencia/s reemplazadas."
#: editor/code_editor.cpp
msgid "Replace"
@@ -1282,10 +1282,6 @@ msgid "File:"
msgstr "Archivo:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "Filtro:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "Debe ser una extensión válida."
@@ -1769,24 +1765,30 @@ msgstr "Elige una escena principal"
#: editor/editor_node.cpp
#, fuzzy
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr "No se pudo activar el plugin addon en: '"
#: editor/editor_node.cpp
#, fuzzy
-msgid "' parsing of config failed."
-msgstr "' análisis de config fallido."
-
-#: editor/editor_node.cpp
-#, fuzzy
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
"No se pudo encontrar el campo del script para el plugin addon en: 'res://"
"addons/"
#: editor/editor_node.cpp
#, fuzzy
-msgid "Unable to load addon script from path: '"
+msgid "Unable to load addon script from path: '%s'."
+msgstr "No se pudo cargar el script addon desde la ruta: '"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
+msgstr "No se pudo cargar el script addon desde la ruta: '"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr "No se pudo cargar el script addon desde la ruta: '"
#: editor/editor_node.cpp
@@ -2349,7 +2351,8 @@ msgid "Frame %"
msgstr "% de cuadro"
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+#, fuzzy
+msgid "Physics Frame %"
msgstr "% de cuadro fijo"
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -2396,7 +2399,7 @@ msgstr "No se pudo instanciar el script:"
#: editor/editor_run_script.cpp
msgid "Did you forget the 'tool' keyword?"
-msgstr "Te olvidaste de la palabra clave 'tool'?"
+msgstr "Has olvidado la palabra clave 'tool'?"
#: editor/editor_run_script.cpp
msgid "Couldn't run script:"
@@ -3266,19 +3269,16 @@ msgid "Resolving.."
msgstr "Guardando…"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Connecting.."
-msgstr "Conectar.."
+msgstr "Conectando.."
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Requesting.."
-msgstr "Prueba"
+msgstr "Solicitando.."
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Error making request"
-msgstr "¡Hubo un error al guardar el recurso!"
+msgstr "Error al realizar la solicitud"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Idle"
@@ -3289,9 +3289,8 @@ msgid "Retry"
msgstr "Reintente"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Download Error"
-msgstr "Abajo"
+msgstr "Error de Descarga"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
@@ -4111,7 +4110,7 @@ msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
#, fuzzy
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr "Advertencia"
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4603,7 +4602,8 @@ msgstr "Step Into"
msgid "Break"
msgstr "Break"
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr "Continuar"
@@ -4707,7 +4707,8 @@ msgid "Cut"
msgstr "Cortar"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "Copiar"
@@ -5496,9 +5497,12 @@ msgid "Remove All"
msgstr "Quitar"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
-msgid "Theme"
-msgstr "Guardar tema"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
+msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
@@ -5809,7 +5813,7 @@ msgstr "Exportar Tile Set"
#: editor/project_manager.cpp
#, fuzzy
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr "El archivo existe."
#: editor/project_manager.cpp
@@ -5954,6 +5958,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5987,6 +5997,11 @@ msgstr "Salir"
#: editor/project_manager.cpp
#, fuzzy
+msgid "Restart Now"
+msgstr "Reiniciar (s):"
+
+#: editor/project_manager.cpp
+#, fuzzy
msgid "Can't run project"
msgstr "Conectar.."
@@ -6220,6 +6235,15 @@ msgstr "Quitar opción de remapeo de recursos"
#: editor/project_settings_editor.cpp
#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "Cambiar tiempo de mezcla"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "Ajustes de proyecto (engine.cfg)"
@@ -6281,6 +6305,30 @@ msgid "Locale"
msgstr "Idioma"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales Filter"
+msgstr "Filtrado de imágenes:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Show all locales"
+msgstr "Crear huesos"
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "Filtros"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales:"
+msgstr "Idioma"
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "AutoLoad"
@@ -7975,6 +8023,17 @@ msgstr "Error al cargar la tipografía."
msgid "Invalid font size."
msgstr "Tamaño de tipografía incorrecto."
+#~ msgid "Filter:"
+#~ msgstr "Filtro:"
+
+#, fuzzy
+#~ msgid "' parsing of config failed."
+#~ msgstr "' análisis de config fallido."
+
+#, fuzzy
+#~ msgid "Theme"
+#~ msgstr "Guardar tema"
+
#~ msgid "Method List For '%s':"
#~ msgstr "Lista de métodos Para '%s':"
@@ -8956,9 +9015,6 @@ msgstr "Tamaño de tipografía incorrecto."
#~ msgid "Preview Atlas"
#~ msgstr "Vista previa del atlas"
-#~ msgid "Image Filter:"
-#~ msgstr "Filtrado de imágenes:"
-
#~ msgid "Images:"
#~ msgstr "Imágenes:"
diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po
index b4f035f991..3d0c4ee410 100644
--- a/editor/translations/es_AR.po
+++ b/editor/translations/es_AR.po
@@ -1,5 +1,6 @@
# Spanish (Argentina) translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Lisandro Lorea <lisandrolorea@gmail.com>, 2016-2017.
@@ -10,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2017-09-01 01:48+0000\n"
+"PO-Revision-Date: 2017-10-23 00:50+0000\n"
"Last-Translator: Lisandro Lorea <lisandrolorea@gmail.com>\n"
"Language-Team: Spanish (Argentina) <https://hosted.weblate.org/projects/"
"godot-engine/godot/es_AR/>\n"
@@ -19,7 +20,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 2.17-dev\n"
+"X-Generator: Weblate 2.17\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -655,9 +656,8 @@ msgstr ""
"Quitarlos de todos modos? (imposible deshacer)"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid "Cannot remove:\n"
-msgstr "No se ha podido resolver."
+msgstr "No se puede remover:\n"
#: editor/dependency_editor.cpp
msgid "Error loading:"
@@ -745,32 +745,31 @@ msgstr "Autores"
#: editor/editor_about.cpp
msgid "Platinum Sponsors"
-msgstr ""
+msgstr "Sponsor Platino"
#: editor/editor_about.cpp
msgid "Gold Sponsors"
-msgstr ""
+msgstr "Sponsor Oro"
#: editor/editor_about.cpp
msgid "Mini Sponsors"
-msgstr ""
+msgstr "Mini Sponsors"
#: editor/editor_about.cpp
msgid "Gold Donors"
-msgstr ""
+msgstr "Donantes Oro"
#: editor/editor_about.cpp
msgid "Silver Donors"
-msgstr ""
+msgstr "Donantes Plata"
#: editor/editor_about.cpp
-#, fuzzy
msgid "Bronze Donors"
-msgstr "Clonar hacia Abajo"
+msgstr "Donantes Bronce"
#: editor/editor_about.cpp
msgid "Donors"
-msgstr ""
+msgstr "Donantes"
#: editor/editor_about.cpp
msgid "License"
@@ -896,9 +895,8 @@ msgid "Duplicate"
msgstr "Duplicar"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Reset Volume"
-msgstr "Resetear el Zoom"
+msgstr "Resetear Volumen"
#: editor/editor_audio_buses.cpp
msgid "Delete Effect"
@@ -921,9 +919,8 @@ msgid "Duplicate Audio Bus"
msgstr "Duplicar Bus de Audio"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Reset Bus Volume"
-msgstr "Resetear el Zoom"
+msgstr "Resetear Volumen de Bus"
#: editor/editor_audio_buses.cpp
msgid "Move Audio Bus"
@@ -1212,9 +1209,8 @@ msgid "Move Favorite Down"
msgstr "Bajar Favorito"
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Go to parent folder"
-msgstr "No se pudo crear la carpeta."
+msgstr "Ir a carpeta padre"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
@@ -1230,10 +1226,6 @@ msgid "File:"
msgstr "Archivo:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "Filtro:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "Debe ser una extensión válida."
@@ -1279,27 +1271,24 @@ msgid "Brief Description:"
msgstr "Descripción Breve:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Members"
-msgstr "Miembros:"
+msgstr "Miembros"
#: editor/editor_help.cpp modules/visual_script/visual_script_editor.cpp
msgid "Members:"
msgstr "Miembros:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Public Methods"
-msgstr "Métodos Públicos:"
+msgstr "Métodos Públicos"
#: editor/editor_help.cpp
msgid "Public Methods:"
msgstr "Métodos Públicos:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "GUI Theme Items"
-msgstr "Items de Tema de la GUI:"
+msgstr "Items de Tema de la GUI"
#: editor/editor_help.cpp
msgid "GUI Theme Items:"
@@ -1310,9 +1299,8 @@ msgid "Signals:"
msgstr "Señales:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Enumerations"
-msgstr "Enumeraciones:"
+msgstr "Enumeraciones"
#: editor/editor_help.cpp
msgid "Enumerations:"
@@ -1323,23 +1311,20 @@ msgid "enum "
msgstr "enum "
#: editor/editor_help.cpp
-#, fuzzy
msgid "Constants"
-msgstr "Constantes:"
+msgstr "Constantes"
#: editor/editor_help.cpp
msgid "Constants:"
msgstr "Constantes:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Description"
-msgstr "Descripción:"
+msgstr "Descripción"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Properties"
-msgstr "Propiedades:"
+msgstr "Propiedades"
#: editor/editor_help.cpp
msgid "Property Description:"
@@ -1350,11 +1335,12 @@ msgid ""
"There is currently no description for this property. Please help us by "
"[color=$color][url=$url]contributing one[/url][/color]!"
msgstr ""
+"Actualmente no existe descripción para esta propiedad. Por favor ayudanos "
+"[color=$color][url=$url]contribuyendo una[/url][/color]!"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Methods"
-msgstr "Lista de Métodos:"
+msgstr "Métodos"
#: editor/editor_help.cpp
msgid "Method Description:"
@@ -1365,6 +1351,8 @@ msgid ""
"There is currently no description for this method. Please help us by [color="
"$color][url=$url]contributing one[/url][/color]!"
msgstr ""
+"Actualmente no existe descripción para este método. Por favor ayudanos "
+"[color=$color][url=$url]contribuyendo una[/url][/color]!"
#: editor/editor_help.cpp
msgid "Search Text"
@@ -1406,28 +1394,24 @@ msgid "Error while saving."
msgstr "Error al grabar."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Can't open '%s'."
-msgstr "No se puede operar en '..'"
+msgstr "No se puede abrir '%s'."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Error while parsing '%s'."
-msgstr "Error al grabar."
+msgstr "Error parsear '%s'."
#: editor/editor_node.cpp
msgid "Unexpected end of file '%s'."
-msgstr ""
+msgstr "Final de archivo inesperado en '%s'."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Missing '%s' or its dependencies."
-msgstr "La escena '%s' tiene dependencias rotas:"
+msgstr "No se encuentra '%s' o sus dependecias."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Error while loading '%s'."
-msgstr "Error al grabar."
+msgstr "Error al cargar '%s'."
#: editor/editor_node.cpp
msgid "Saving Scene"
@@ -1494,18 +1478,26 @@ msgid ""
"Please read the documentation relevant to importing scenes to better "
"understand this workflow."
msgstr ""
+"Este recurso pertenece a una escena que fue importada, por lo tanto no es "
+"editable.\n"
+"Por favor leé la documentación relevante a importar escenas para entender "
+"mejor este workflow."
#: editor/editor_node.cpp
msgid ""
"This resource belongs to a scene that was instanced or inherited.\n"
"Changes to it will not be kept when saving the current scene."
msgstr ""
+"Este recurso pertenece a una escena que fue instanciada o heredada.\n"
+"Los cambios que se le realicen no perduraran al guardar la escena actual."
#: editor/editor_node.cpp
msgid ""
"This resource was imported, so it's not editable. Change its settings in the "
"import panel and then re-import."
msgstr ""
+"Este recurso fue importado, por ende no es editable. Cambiá sus ajustes en "
+"el panel de importación y luego reimportá."
#: editor/editor_node.cpp
msgid ""
@@ -1514,6 +1506,11 @@ msgid ""
"Please read the documentation relevant to importing scenes to better "
"understand this workflow."
msgstr ""
+"Esta escena fue importada, por ende los cambios que se le realicen no "
+"perduraran.\n"
+"Instanciá o hereda para poder realizar cambios.\n"
+"Por favor leé la documentación relevante a importar escenas para entender "
+"mejor este workflow."
#: editor/editor_node.cpp
msgid "Copy Params"
@@ -1694,27 +1691,39 @@ msgid ""
"This option is deprecated. Situations where refresh must be forced are now "
"considered a bug. Please report."
msgstr ""
+"Esta opción esta deprecada. Las situaciones donde se debe forzar un refresco "
+"son ahora consideradas bugs. Por favor reportalo."
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
msgstr "Elegí una Escena Principal"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+#, fuzzy
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr "No se pudo activar el plugin de addon en : '"
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
-msgstr "' fallo el parseo de la configuración."
-
-#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+#, fuzzy
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
"No se pudo encontrar el campo script para el plugin de addon en: 'res://"
"addons/"
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "No se pudo cargar el script de addon desde la ruta: '"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
+msgstr "No se pudo cargar el script de addon desde la ruta: '"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr "No se pudo cargar el script de addon desde la ruta: '"
#: editor/editor_node.cpp
@@ -1745,9 +1754,8 @@ msgid "Scene '%s' has broken dependencies:"
msgstr "La escena '%s' tiene dependencias rotas:"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Clear Recent Scenes"
-msgstr "Reestablecer Archivos Recientes"
+msgstr "Reestablecer Escenas Recientes"
#: editor/editor_node.cpp
msgid "Save Layout"
@@ -2122,9 +2130,8 @@ msgid "Object properties."
msgstr "Propiedades del objeto."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Changes may be lost!"
-msgstr "Cambiar Grupo de Imágenes"
+msgstr "Podrían perderse los cambios!"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
#: editor/project_manager.cpp
@@ -2208,9 +2215,8 @@ msgid "Open the previous Editor"
msgstr "Abrir el Editor anterior"
#: editor/editor_plugin.cpp
-#, fuzzy
msgid "Creating Mesh Previews"
-msgstr "Crear Librería de Meshes"
+msgstr "Creando Vistas Previas de Mesh/es"
#: editor/editor_plugin.cpp
msgid "Thumbnail.."
@@ -2262,7 +2268,8 @@ msgid "Frame %"
msgstr "Frame %"
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+#, fuzzy
+msgid "Physics Frame %"
msgstr "Fixed Frame %"
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -2430,17 +2437,20 @@ msgstr "No se puede navegar a '"
#: editor/filesystem_dock.cpp
msgid "View items as a grid of thumbnails"
-msgstr ""
+msgstr "Ver items como una grilla de miniaturas"
#: editor/filesystem_dock.cpp
msgid "View items as a list"
-msgstr ""
+msgstr "Ver items como una lista"
#: editor/filesystem_dock.cpp
msgid ""
"\n"
"Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
+"\n"
+"Estado: Fallo la importación del archivo. Por favor arreglá el archivo y "
+"reimportá manualmente."
#: editor/filesystem_dock.cpp
msgid ""
@@ -2451,57 +2461,48 @@ msgstr ""
"Fuente: "
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Cannot move/rename resources root."
-msgstr "No se puede cargar/procesar la tipografía de origen."
+msgstr "No se puede mover/renombrar la raiz de recursos."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Cannot move a folder into itself.\n"
-msgstr "No se puede importar un archivo sobre si mismo:"
+msgstr "No se puede mover una carpeta dento de si misma.\n"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Error moving:\n"
-msgstr "Error al mover el directorio:\n"
+msgstr "Error al mover:\n"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Unable to update dependencies:\n"
-msgstr "La escena '%s' tiene dependencias rotas:"
+msgstr "No se pudieron actualizar las dependencias:\n"
#: editor/filesystem_dock.cpp
msgid "No name provided"
-msgstr ""
+msgstr "No se indicó ningún nombre"
#: editor/filesystem_dock.cpp
msgid "Provided name contains invalid characters"
-msgstr ""
+msgstr "El nombre indicado contiene caracteres inválidos"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "No name provided."
-msgstr "Renombrar o Mover.."
+msgstr "No se indicó ningún nombre."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Name contains invalid characters."
-msgstr "Caracteres válidos:"
+msgstr "El nombre indicado contiene caracteres inválidos."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "A file or folder with this name already exists."
-msgstr "El nombre de grupo ya existe!"
+msgstr "Un archivo o carpeta con este nombre ya existe."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Renaming file:"
-msgstr "Renombrar Variable"
+msgstr "Renombrando archivo:"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Renaming folder:"
-msgstr "Renombrar Nodo"
+msgstr "Renombrar carpeta:"
#: editor/filesystem_dock.cpp
msgid "Expand all"
@@ -2516,18 +2517,16 @@ msgid "Copy Path"
msgstr "Copiar Ruta"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Rename.."
-msgstr "Renombrar"
+msgstr "Renombrar.."
#: editor/filesystem_dock.cpp
msgid "Move To.."
msgstr "Mover A.."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Folder.."
-msgstr "Crear Carpeta"
+msgstr "Nueva Carpeta.."
#: editor/filesystem_dock.cpp
msgid "Show In File Manager"
@@ -2596,9 +2595,8 @@ msgid "Import as Single Scene"
msgstr "Importar como Escena Única"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Import with Separate Animations"
-msgstr "Importar con Materiales Separados"
+msgstr "Importar con Animaciones Separadas"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Materials"
@@ -2613,19 +2611,16 @@ msgid "Import with Separate Objects+Materials"
msgstr "Importar con Objetos+Materiales Separados"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Import with Separate Objects+Animations"
-msgstr "Importar con Objetos+Materiales Separados"
+msgstr "Importar con Objetos+Animaciones Separados"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Import with Separate Materials+Animations"
-msgstr "Importar con Materiales Separados"
+msgstr "Importar con Materiales+Animaciones Separados"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Import with Separate Objects+Materials+Animations"
-msgstr "Importar con Objetos+Materiales Separados"
+msgstr "Importar con Objetos+Materiales+Animaciones Separados"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Multiple Scenes"
@@ -2712,9 +2707,8 @@ msgid "Edit Poly"
msgstr "Editar Polígono"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
msgid "Insert Point"
-msgstr "Insertando"
+msgstr "Insertar Punto"
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/collision_polygon_editor_plugin.cpp
@@ -3279,14 +3273,12 @@ msgid "Edit CanvasItem"
msgstr "Editar CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Anchors only"
-msgstr "Anchor"
+msgstr "Solo anclas"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Change Anchors and Margins"
-msgstr "Cambiar Anclas"
+msgstr "Cambiar Anclas y Márgenes"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Change Anchors"
@@ -3344,9 +3336,8 @@ msgid "Pan Mode"
msgstr "Modo Paneo"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Toggles snapping"
-msgstr "Act/Desact. Breakpoint"
+msgstr "Act/Desact. alineado"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -3354,23 +3345,20 @@ msgid "Use Snap"
msgstr "Usar Snap"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snapping options"
-msgstr "Opciones de Animación"
+msgstr "Opciones de alineado"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to grid"
-msgstr "Modo Snap:"
+msgstr "Alinear a la grilla"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Rotation Snap"
msgstr "Usar Snap de Rotación"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Configure Snap..."
-msgstr "Configurar Snap.."
+msgstr "Configurar alineado.."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap Relative"
@@ -3382,24 +3370,23 @@ msgstr "Usar Pixel Snap"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Smart snapping"
-msgstr ""
+msgstr "Alineado inteligente"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to parent"
-msgstr "Expandir al Padre"
+msgstr "Alinear al Padre"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to node anchor"
-msgstr ""
+msgstr "Alinear al ancla de nodo"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to node sides"
-msgstr ""
+msgstr "Alinear a lados de nodo"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to other nodes"
-msgstr ""
+msgstr "Alinear a otros nodos"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Lock the selected object in place (can't be moved)."
@@ -3448,14 +3435,12 @@ msgid "Show Grid"
msgstr "Mostrar la Grilla"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Show helpers"
-msgstr "Mostrar Huesos"
+msgstr "Mostrar ayudantes"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Show rulers"
-msgstr "Mostrar Huesos"
+msgstr "Mostrar reglas"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Center Selection"
@@ -3466,9 +3451,8 @@ msgid "Frame Selection"
msgstr "Encuadrar Selección"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Layout"
-msgstr "Guardar Layout"
+msgstr "Layout"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Keys"
@@ -3492,20 +3476,19 @@ msgstr "Reestablecer Pose"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Drag pivot from mouse position"
-msgstr ""
+msgstr "Arrastrar pivote desde la posición del mouse"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Set pivot at mouse position"
-msgstr "Setear Pos. Out de Curva"
+msgstr "Setear pivote a la posición del mouse"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Multiply grid step by 2"
-msgstr ""
+msgstr "Multiplicar ingremento de grilla por 2"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Divide grid step by 2"
-msgstr ""
+msgstr "Dividir incremento de grilla por 2"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Add %s"
@@ -3584,25 +3567,23 @@ msgstr "Acutalizar desde Escena"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Flat0"
-msgstr ""
+msgstr "Flat0"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Flat1"
-msgstr ""
+msgstr "Flat1"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Ease in"
-msgstr "Ease In"
+msgstr "Ease in"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Ease out"
-msgstr "Ease Out"
+msgstr "Ease out"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Smoothstep"
-msgstr ""
+msgstr "Smoothstep"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Modify Curve Point"
@@ -3931,73 +3912,65 @@ msgid "Bake!"
msgstr "Hacer Bake!"
#: editor/plugins/navigation_mesh_editor_plugin.cpp
-#, fuzzy
msgid "Bake the navigation mesh.\n"
-msgstr "Crear Mesh de Navegación"
+msgstr "Hacer bake de mesh de navegación.\n"
#: editor/plugins/navigation_mesh_editor_plugin.cpp
-#, fuzzy
msgid "Clear the navigation mesh."
-msgstr "Crear Mesh de Navegación"
+msgstr "Reestablecer mesh de navegación."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Setting up Configuration..."
-msgstr ""
+msgstr "Seteando Configuración..."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Calculating grid size..."
-msgstr ""
+msgstr "Calculando tamaño de grilla..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Creating heightfield..."
-msgstr "Creando Octree de Luces"
+msgstr "Creando campo de alturas..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Marking walkable triangles..."
-msgstr "Strings Traducibles.."
+msgstr "Marcando triangulos caminables..."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Constructing compact heightfield..."
-msgstr ""
+msgstr "Construyendo campo de alturas compacto..."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Eroding walkable area..."
-msgstr ""
+msgstr "Erocionando area caminable..."
#: editor/plugins/navigation_mesh_generator.cpp
#, fuzzy
-msgid "Partioning..."
-msgstr "Advertencia"
+msgid "Partitioning..."
+msgstr "Particionando..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Creating contours..."
-msgstr "Creando Octree de Texturas"
+msgstr "Creando contornos..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Creating polymesh..."
-msgstr "Crear Outline Mesh.."
+msgstr "Creando polymesh..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Converting to native navigation mesh..."
-msgstr "Crear Mesh de Navegación"
+msgstr "Convirtiendo a mesh de navegación nativa..."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Navigation Mesh Generator Setup:"
-msgstr ""
+msgstr "Setup de Generador de Meshes de Navegación:"
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Parsing Geometry..."
-msgstr "Parseando Geometría"
+msgstr "Parseando Geometría..."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Done!"
-msgstr ""
+msgstr "Hecho!"
#: editor/plugins/navigation_polygon_editor_plugin.cpp
msgid "Create Navigation Polygon"
@@ -4175,19 +4148,16 @@ msgid "Curve Point #"
msgstr "Punto # de Curva"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Set Curve Point Position"
-msgstr "Setear Pos. de Punto de Curva"
+msgstr "Setear Posición de Punto de Curva"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Set Curve In Position"
-msgstr "Setear Pos. In de Curva"
+msgstr "Setear Posición de Entrada de Curva"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Set Curve Out Position"
-msgstr "Setear Pos. Out de Curva"
+msgstr "Setear Posición de Salida de Curva"
#: editor/plugins/path_editor_plugin.cpp
msgid "Split Path"
@@ -4436,7 +4406,8 @@ msgstr "Step Into"
msgid "Break"
msgstr "Break"
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr "Continuar"
@@ -4534,7 +4505,8 @@ msgid "Cut"
msgstr "Cortar"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "Copiar"
@@ -5209,14 +5181,12 @@ msgid "Insert Empty (After)"
msgstr "Insertar Vacío (Después)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Move (Before)"
-msgstr "Mover Nodo(s)"
+msgstr "Mover (Antes)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Move (After)"
-msgstr "Mover a la Izquierda"
+msgstr "Mover (Despues)"
#: editor/plugins/style_box_editor_plugin.cpp
msgid "StyleBox Preview:"
@@ -5292,8 +5262,12 @@ msgid "Remove All"
msgstr "Quitar Todos"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
-msgstr "Tema"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
+msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
@@ -5429,9 +5403,8 @@ msgid "Mirror Y"
msgstr "Espejar Y"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Paint Tile"
-msgstr "Pintar TileMap"
+msgstr "Pintar Tile"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Pick Tile"
@@ -5494,9 +5467,10 @@ msgid "Delete preset '%s'?"
msgstr "Eliminar preset '%s'?"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export templates for this platform are missing/corrupted: "
-msgstr "Faltan las plantillas de exportación para esta plataforma:"
+msgstr ""
+"Las plantillas de exportación para esta plataforma estan faltando o "
+"corruptas: "
#: editor/project_export.cpp
msgid "Presets"
@@ -5573,33 +5547,35 @@ msgid "Export templates for this platform are missing:"
msgstr "Faltan las plantillas de exportación para esta plataforma:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export templates for this platform are missing/corrupted:"
-msgstr "Faltan las plantillas de exportación para esta plataforma:"
+msgstr ""
+"Las plantillas de exportación para esta plataforma estan faltando o "
+"corruptas:"
#: editor/project_export.cpp
msgid "Export With Debug"
msgstr "Exportar Como Debug"
#: editor/project_manager.cpp
-#, fuzzy
-msgid "The path does not exists."
-msgstr "El archivo existe."
+msgid "The path does not exist."
+msgstr "La ruta no existe."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a 'project.godot' file."
-msgstr "Por favor exportá afuera de la carpeta de proyecto!"
+msgstr "Por favor elegí un archivo 'project.godot'."
#: editor/project_manager.cpp
msgid ""
"Your project will be created in a non empty folder (you might want to create "
"a new folder)."
msgstr ""
+"Tu proyecto será creado en una carpeta no vacía (podrías preferir crear una "
+"carpeta nueva)."
#: editor/project_manager.cpp
msgid "Please choose a folder that does not contain a 'project.godot' file."
msgstr ""
+"Por favor elegí una carpeta que no contenga un archivo 'project.godot'."
#: editor/project_manager.cpp
msgid "Imported Project"
@@ -5607,25 +5583,23 @@ msgstr "Proyecto Importado"
#: editor/project_manager.cpp
msgid " "
-msgstr ""
+msgstr " "
#: editor/project_manager.cpp
msgid "It would be a good idea to name your project."
-msgstr ""
+msgstr "Sería buena idea darle un nombre a tu proyecto."
#: editor/project_manager.cpp
msgid "Invalid project path (changed anything?)."
msgstr "Ruta de proyecto inválida (cambiaste algo?)."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't get project.godot in project path."
-msgstr "No se pudo crear project.godot en la ruta de proyecto."
+msgstr "No se pudo obtener project.godot en la ruta de proyecto."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't edit project.godot in project path."
-msgstr "No se pudo crear project.godot en la ruta de proyecto."
+msgstr "No se pudo editar project.godot en la ruta de proyecto."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -5636,14 +5610,12 @@ msgid "The following files failed extraction from package:"
msgstr "Los siguientes archivos no se pudieron extraer del paquete:"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Rename Project"
-msgstr "Proyecto Sin Nombre"
+msgstr "Renombrar Proyecto"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't get project.godot in the project path."
-msgstr "No se pudo crear project.godot en la ruta de proyecto."
+msgstr "No se pudo obtener project.godot en la ruta de proyecto."
#: editor/project_manager.cpp
msgid "New Game Project"
@@ -5666,9 +5638,8 @@ msgid "Project Name:"
msgstr "Nombre del Proyecto:"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Create folder"
-msgstr "Crear Carpeta"
+msgstr "Crear carpeta"
#: editor/project_manager.cpp
msgid "Project Path:"
@@ -5687,9 +5658,8 @@ msgid "Unnamed Project"
msgstr "Proyecto Sin Nombre"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Can't open project"
-msgstr "No se puede ejecutar el proyecto"
+msgstr "No se pudo abrir el proyecto"
#: editor/project_manager.cpp
msgid "Are you sure to open more than one project?"
@@ -5726,6 +5696,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5757,6 +5733,11 @@ msgid "Exit"
msgstr "Salir"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Restart Now"
+msgstr "Reiniciar (s):"
+
+#: editor/project_manager.cpp
msgid "Can't run project"
msgstr "No se puede ejecutar el proyecto"
@@ -5914,9 +5895,8 @@ msgid "Add Global Property"
msgstr "Agregar Propiedad Global"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Select a setting item first!"
-msgstr "Selecciona un ítem de configuración primero!"
+msgstr "Selecciona un ítem primero!"
#: editor/project_settings_editor.cpp
msgid "No property '"
@@ -5931,14 +5911,12 @@ msgid "Delete Item"
msgstr "Eliminar Ãtem"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Can't contain '/' or ':'"
-msgstr "No se puede conectar al host:"
+msgstr "No puede contener '/' o ':'"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Already existing"
-msgstr "Act/Desact. Persistente"
+msgstr "Ya existe"
#: editor/project_settings_editor.cpp
msgid "Error saving settings."
@@ -5981,6 +5959,15 @@ msgid "Remove Resource Remap Option"
msgstr "Remover Opción de Remapeo de Recursos"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "Cambiar Tiempo de Blend"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr "Configuración de Proyecto (project.godot)"
@@ -6041,6 +6028,30 @@ msgid "Locale"
msgstr "Locale"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales Filter"
+msgstr "Filtro de Imágenes:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Show all locales"
+msgstr "Mostrar Huesos"
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "Filtrar nodos"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales:"
+msgstr "Locale"
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "AutoLoad"
@@ -6089,18 +6100,16 @@ msgid "New Script"
msgstr "Nuevo Script"
#: editor/property_editor.cpp
-#, fuzzy
msgid "Make Unique"
-msgstr "Crear Huesos"
+msgstr "Convertir en Unico"
#: editor/property_editor.cpp
msgid "Show in File System"
msgstr "Mostrar en Sistema de Archivos"
#: editor/property_editor.cpp
-#, fuzzy
msgid "Convert To %s"
-msgstr "Convertir A.."
+msgstr "Convertir A %s"
#: editor/property_editor.cpp
msgid "Error loading file: Not a resource!"
@@ -6139,9 +6148,8 @@ msgid "Select Property"
msgstr "Seleccionar Propiedad"
#: editor/property_selector.cpp
-#, fuzzy
msgid "Select Virtual Method"
-msgstr "Seleccionar Método"
+msgstr "Seleccionar Método Virtual"
#: editor/property_selector.cpp
msgid "Select Method"
@@ -6496,12 +6504,11 @@ msgstr "Ruta base inválida"
#: editor/script_create_dialog.cpp
msgid "Directory of the same name exists"
-msgstr ""
+msgstr "Existe un directorio con el mismo nombre"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "File exists, will be reused"
-msgstr "El Archivo Existe, Sobreescribir?"
+msgstr "El archivo existe, será reutilizado"
#: editor/script_create_dialog.cpp
msgid "Invalid extension"
@@ -6589,7 +6596,7 @@ msgstr "Funcion:"
#: editor/script_editor_debugger.cpp
msgid "Pick one or more items from the list to display the graph."
-msgstr ""
+msgstr "Elegir uno o mas items de la lista para mostrar el gráfico."
#: editor/script_editor_debugger.cpp
msgid "Errors"
@@ -6752,22 +6759,20 @@ msgid "Change Probe Extents"
msgstr "Cambiar Extensión de Sonda"
#: modules/gdnative/gd_native_library_editor.cpp
-#, fuzzy
msgid "Library"
-msgstr "MeshLibrary.."
+msgstr "Biblioteca"
#: modules/gdnative/gd_native_library_editor.cpp
-#, fuzzy
msgid "Status"
-msgstr "Estado:"
+msgstr "Estado"
#: modules/gdnative/gd_native_library_editor.cpp
msgid "Libraries: "
-msgstr ""
+msgstr "Bibliotecas: "
#: modules/gdnative/register_types.cpp
msgid "GDNative"
-msgstr ""
+msgstr "GDNative"
#: modules/gdscript/gd_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -6832,14 +6837,12 @@ msgid "Snap View"
msgstr "Anclar Vista"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Prev Level (%sDown Wheel)"
-msgstr "Nivel Prev. ("
+msgstr "Nivel Previo (%sRueda Abajo)"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Next Level (%sUp Wheel)"
-msgstr "Nivel Anterior ("
+msgstr "Nivel Siguiente (%sRueda Arriba)"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Clip Disabled"
@@ -6923,7 +6926,7 @@ msgstr "Elegir Instancia:"
#: modules/mono/editor/mono_bottom_panel.cpp
msgid "Builds"
-msgstr ""
+msgstr "Builds"
#: modules/visual_script/visual_script.cpp
msgid ""
@@ -7132,7 +7135,7 @@ msgstr "Obtener"
#: modules/visual_script/visual_script_editor.cpp
msgid "Script already has function '%s'"
-msgstr ""
+msgstr "El script ya tiene una función '%s'"
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Input Value"
@@ -7554,6 +7557,8 @@ msgid ""
"VehicleWheel serves to provide a wheel system to a VehicleBody. Please use "
"it as a child of a VehicleBody."
msgstr ""
+"VehicleWheel sirve para proveer un sistema de ruedas a VehicleBody. Por "
+"favor usálo como hijo de VehicleBody."
#: scene/gui/color_picker.cpp
msgid "Raw Mode"
@@ -7631,6 +7636,15 @@ msgstr "Error cargando tipografía."
msgid "Invalid font size."
msgstr "Tamaño de tipografía inválido."
+#~ msgid "Filter:"
+#~ msgstr "Filtro:"
+
+#~ msgid "' parsing of config failed."
+#~ msgstr "' falló el parseo de la configuración."
+
+#~ msgid "Theme"
+#~ msgstr "Tema"
+
#~ msgid "Method List For '%s':"
#~ msgstr "Lista de Métodos Para '%s':"
@@ -8577,9 +8591,6 @@ msgstr "Tamaño de tipografía inválido."
#~ msgid "Preview Atlas"
#~ msgstr "Vista Previa de Atlas"
-#~ msgid "Image Filter:"
-#~ msgstr "Filtro de Imágenes:"
-
#~ msgid "Images:"
#~ msgstr "Imágenes:"
diff --git a/editor/translations/fa.po b/editor/translations/fa.po
index 6ee3ccb17e..87e473d49c 100644
--- a/editor/translations/fa.po
+++ b/editor/translations/fa.po
@@ -1,5 +1,6 @@
# Persian translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# alabd14313 <alabd14313@yahoo.com>, 2016.
@@ -1233,10 +1234,6 @@ msgid "File:"
msgstr "پرونده:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "صاÙÛŒ:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "باید از یک پسوند معتبر Ø§Ø³ØªÙØ§Ø¯Ù‡ شود."
@@ -1691,19 +1688,25 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "خطای بارگذاری قلم."
+
+#: editor/editor_node.cpp
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2231,7 +2234,7 @@ msgid "Frame %"
msgstr ""
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+msgid "Physics Frame %"
msgstr ""
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3910,7 +3913,7 @@ msgid "Eroding walkable area..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4373,7 +4376,8 @@ msgstr ""
msgid "Break"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr ""
@@ -4469,7 +4473,8 @@ msgid "Cut"
msgstr "بریدن"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "کپی کردن"
@@ -5232,7 +5237,11 @@ msgid "Remove All"
msgstr "برداشتن"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
@@ -5522,7 +5531,7 @@ msgstr ""
#: editor/project_manager.cpp
#, fuzzy
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr "پرونده موجود نیست."
#: editor/project_manager.cpp
@@ -5653,6 +5662,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5685,6 +5700,10 @@ msgid "Exit"
msgstr ""
#: editor/project_manager.cpp
+msgid "Restart Now"
+msgstr ""
+
+#: editor/project_manager.cpp
#, fuzzy
msgid "Can't run project"
msgstr "در حال اتصال..."
@@ -5911,6 +5930,15 @@ msgid "Remove Resource Remap Option"
msgstr ""
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "نوع مقدار آرایه را تغییر بده"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
@@ -5971,6 +5999,27 @@ msgid "Locale"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show all locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "صاÙÛŒ:"
+
+#: editor/project_settings_editor.cpp
+msgid "Locales:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -7576,6 +7625,9 @@ msgstr "خطای بارگذاری قلم."
msgid "Invalid font size."
msgstr "اندازه‌ی قلم نامعتبر."
+#~ msgid "Filter:"
+#~ msgstr "صاÙÛŒ:"
+
#~ msgid "Method List For '%s':"
#~ msgstr "لیست متد برای 's%' :"
diff --git a/editor/translations/fi.po b/editor/translations/fi.po
index 170a487e54..12cafa85fc 100644
--- a/editor/translations/fi.po
+++ b/editor/translations/fi.po
@@ -1,5 +1,6 @@
# Finnish translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# ekeimaja <ekeimaja@gmail.com>, 2017.
@@ -1241,10 +1242,6 @@ msgid "File:"
msgstr "Tiedosto:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "Suodatin:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
#, fuzzy
msgid "Must use a valid extension."
msgstr "Käytä sopivaa laajennusta"
@@ -1716,19 +1713,25 @@ msgid "Pick a Main Scene"
msgstr "Valitse pääscene"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "Virhe ladattaessa skripti %s:stä"
+
+#: editor/editor_node.cpp
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2267,7 +2270,8 @@ msgid "Frame %"
msgstr "Frame %"
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+#, fuzzy
+msgid "Physics Frame %"
msgstr "Kiinteä Frame %"
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3968,7 +3972,7 @@ msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
#, fuzzy
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr "Varoitus"
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4443,7 +4447,8 @@ msgstr ""
msgid "Break"
msgstr "Keskeytä"
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr "Jatka"
@@ -4543,7 +4548,8 @@ msgid "Cut"
msgstr "Leikkaa"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "Kopioi"
@@ -5324,8 +5330,12 @@ msgid "Remove All"
msgstr "Poista"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
-msgstr "Teema"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
+msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
@@ -5618,7 +5628,7 @@ msgstr "Vie debugaten"
#: editor/project_manager.cpp
#, fuzzy
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr "Tiedostoa ei ole olemassa."
#: editor/project_manager.cpp
@@ -5756,6 +5766,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5787,6 +5803,11 @@ msgstr "Poistu"
#: editor/project_manager.cpp
#, fuzzy
+msgid "Restart Now"
+msgstr "Käynnistä uudelleen (s):"
+
+#: editor/project_manager.cpp
+#, fuzzy
msgid "Can't run project"
msgstr "Yhdistä..."
@@ -6013,6 +6034,15 @@ msgstr ""
#: editor/project_settings_editor.cpp
#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "Muuta kameran kokoa"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "Projektin asetukset"
@@ -6073,6 +6103,29 @@ msgid "Locale"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Show all locales"
+msgstr "Näytä luut"
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "Suodattimet"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales:"
+msgstr "Skaalaus:"
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -7608,6 +7661,12 @@ msgstr "Virhe fontin latauksessa."
msgid "Invalid font size."
msgstr "Virheellinen fonttikoko."
+#~ msgid "Filter:"
+#~ msgstr "Suodatin:"
+
+#~ msgid "Theme"
+#~ msgstr "Teema"
+
#~ msgid "Arguments:"
#~ msgstr "Argumentit:"
diff --git a/editor/translations/fr.po b/editor/translations/fr.po
index d484d50ffe..9e2f80498d 100644
--- a/editor/translations/fr.po
+++ b/editor/translations/fr.po
@@ -1,5 +1,6 @@
# French translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Antoine Carrier <ac.g392@gmail.com>, 2017.
@@ -17,6 +18,7 @@
# Onyx Steinheim <thevoxelmanonyx@gmail.com>, 2016.
# rafeu <duchainer@gmail.com>, 2016-2017.
# Rémi Verschelde <rverschelde@gmail.com>, 2016-2017.
+# Robin Arys <robinarys@hotmail.com>, 2017.
# Roger BR <drai_kin@hotmail.com>, 2016.
# Thomas Baijot <thomasbaijot@gmail.com>, 2016.
#
@@ -24,8 +26,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2017-09-25 10:46+0000\n"
-"Last-Translator: keltwookie <keltwookie@protonmail.com>\n"
+"PO-Revision-Date: 2017-10-25 22:46+0000\n"
+"Last-Translator: Robin Arys <robinarys@hotmail.com>\n"
"Language-Team: French <https://hosted.weblate.org/projects/godot-engine/"
"godot/fr/>\n"
"Language: fr\n"
@@ -33,7 +35,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 2.17-dev\n"
+"X-Generator: Weblate 2.17\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -737,11 +739,11 @@ msgstr "La communauté Godot vous dit merci !"
#: editor/editor_about.cpp
msgid "Thanks!"
-msgstr "Merci !"
+msgstr "Merci!"
#: editor/editor_about.cpp
msgid "Godot Engine contributors"
-msgstr "Contributeurs Godot Engine"
+msgstr "Contributeurs de Godot Engine"
#: editor/editor_about.cpp
msgid "Project Founders"
@@ -1242,16 +1244,12 @@ msgstr "Répertoires et fichiers :"
#: editor/editor_file_dialog.cpp
msgid "Preview:"
-msgstr "Aperçu :"
+msgstr "Aperçu:"
#: editor/editor_file_dialog.cpp editor/script_editor_debugger.cpp
#: scene/gui/file_dialog.cpp
msgid "File:"
-msgstr "Fichier :"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "Filtre :"
+msgstr "Fichier:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
@@ -1336,7 +1334,7 @@ msgstr "Recensements :"
#: editor/editor_help.cpp
msgid "Enumerations:"
-msgstr "Recensements :"
+msgstr "Recensements:"
#: editor/editor_help.cpp
msgid "enum "
@@ -1392,7 +1390,7 @@ msgstr "Chercher du texte"
#: editor/editor_log.cpp
msgid "Output:"
-msgstr "Sortie :"
+msgstr "Sortie:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
#: editor/property_editor.cpp editor/script_editor_debugger.cpp
@@ -1724,20 +1722,30 @@ msgid "Pick a Main Scene"
msgstr "Choisir une scène principale"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+#, fuzzy
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr "impossible d'activer le plugin depuis :"
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
-msgstr "L'analyse de la configuration a échoué."
-
-#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+#, fuzzy
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
"Impossible de trouver le champ de script pour le plugin dans : 'res://addons/"
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "Impossible de charger le script d'ajout depuis le chemin :"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
+msgstr "Impossible de charger le script d'ajout depuis le chemin :"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr "Impossible de charger le script d'ajout depuis le chemin :"
#: editor/editor_node.cpp
@@ -1795,11 +1803,11 @@ msgstr "%d fichier(s) supplémentaire(s)"
#: editor/editor_node.cpp
msgid "%d more file(s) or folder(s)"
-msgstr "%s fichier(s) ou dossier(s) supplémentaire(s)"
+msgstr "%d fichier(s) ou dossier(s) supplémentaire(s)"
#: editor/editor_node.cpp
msgid "Distraction Free Mode"
-msgstr "Mode sans distraction"
+msgstr "Mode Sans Distraction"
#: editor/editor_node.cpp
msgid "Toggle distraction-free mode."
@@ -2286,7 +2294,8 @@ msgid "Frame %"
msgstr "% d'image"
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+#, fuzzy
+msgid "Physics Frame %"
msgstr "Frame fixe %"
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3998,7 +4007,7 @@ msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
#, fuzzy
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr "Avertissement"
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4464,7 +4473,8 @@ msgstr "Rentrer"
msgid "Break"
msgstr "Mettre en pause"
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr "Continuer"
@@ -4562,7 +4572,8 @@ msgid "Cut"
msgstr "Couper"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "Copier"
@@ -5320,8 +5331,12 @@ msgid "Remove All"
msgstr "Supprimer tout"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
-msgstr "Thème"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
+msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
@@ -5611,7 +5626,7 @@ msgstr "Exporter avec debug"
#: editor/project_manager.cpp
#, fuzzy
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr "Le fichier n'existe pas."
#: editor/project_manager.cpp
@@ -5752,6 +5767,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5783,6 +5804,11 @@ msgid "Exit"
msgstr "Quitter"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Restart Now"
+msgstr "Redémarrer (s) :"
+
+#: editor/project_manager.cpp
msgid "Can't run project"
msgstr "Impossible de lancer le projet"
@@ -6007,6 +6033,15 @@ msgid "Remove Resource Remap Option"
msgstr "Supprimer option de remap de ressource"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "Changer le temps de mélange"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr "Paramètres du projet (project.godot)"
@@ -6067,6 +6102,30 @@ msgid "Locale"
msgstr "Langue"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales Filter"
+msgstr "Filtre d'image :"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Show all locales"
+msgstr "Afficher les os"
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "Filtrer les noeuds"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales:"
+msgstr "Langue"
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "AutoLoad"
@@ -7667,6 +7726,15 @@ msgstr "Erreur lors du chargement de la police."
msgid "Invalid font size."
msgstr "Taille de police invalide."
+#~ msgid "Filter:"
+#~ msgstr "Filtre:"
+
+#~ msgid "' parsing of config failed."
+#~ msgstr "L'analyse de la configuration a échoué."
+
+#~ msgid "Theme"
+#~ msgstr "Thème"
+
#~ msgid "Method List For '%s':"
#~ msgstr "Liste des méthodes pour « %s » :"
@@ -8608,9 +8676,6 @@ msgstr "Taille de police invalide."
#~ msgid "Preview Atlas"
#~ msgstr "Aperçu de l'atlas"
-#~ msgid "Image Filter:"
-#~ msgstr "Filtre d'image :"
-
#~ msgid "Images:"
#~ msgstr "Images :"
diff --git a/editor/translations/hu.po b/editor/translations/hu.po
index 38444d19d3..07457b4692 100644
--- a/editor/translations/hu.po
+++ b/editor/translations/hu.po
@@ -1,5 +1,6 @@
# Hungarian translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Varga Dániel <danikah.danikah@gmail.com>, 2016.
@@ -1202,10 +1203,6 @@ msgid "File:"
msgstr ""
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr ""
@@ -1645,19 +1642,24 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+msgid "Unable to load addon script from path: '%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2176,7 +2178,7 @@ msgid "Frame %"
msgstr ""
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+msgid "Physics Frame %"
msgstr ""
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3821,7 +3823,7 @@ msgid "Eroding walkable area..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4279,7 +4281,8 @@ msgstr ""
msgid "Break"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr ""
@@ -4373,7 +4376,8 @@ msgid "Cut"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr ""
@@ -5126,7 +5130,11 @@ msgid "Remove All"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
@@ -5409,7 +5417,7 @@ msgid "Export With Debug"
msgstr ""
#: editor/project_manager.cpp
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr ""
#: editor/project_manager.cpp
@@ -5537,6 +5545,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5566,6 +5580,10 @@ msgid "Exit"
msgstr ""
#: editor/project_manager.cpp
+msgid "Restart Now"
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Can't run project"
msgstr ""
@@ -5787,6 +5805,14 @@ msgid "Remove Resource Remap Option"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
@@ -5847,6 +5873,26 @@ msgid "Locale"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show all locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Filter mode:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Locales:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
diff --git a/editor/translations/id.po b/editor/translations/id.po
index aa57d09136..06fc7eb599 100644
--- a/editor/translations/id.po
+++ b/editor/translations/id.po
@@ -1,5 +1,6 @@
# Indonesian translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Abdul Aziz Muslim Alqudsy <abdul.aziz.muslim.alqudsy@gmail.com>, 2016.
@@ -1263,10 +1264,6 @@ msgid "File:"
msgstr "File:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "Filter:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "Harus menggunakan ekstensi yang sah."
@@ -1742,19 +1739,25 @@ msgid "Pick a Main Scene"
msgstr "Pilih sebuah Scene Utama"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "Error memuat font."
+
+#: editor/editor_node.cpp
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2287,7 +2290,7 @@ msgid "Frame %"
msgstr ""
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+msgid "Physics Frame %"
msgstr ""
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3974,7 +3977,7 @@ msgid "Eroding walkable area..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4437,7 +4440,8 @@ msgstr ""
msgid "Break"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr ""
@@ -4533,7 +4537,8 @@ msgid "Cut"
msgstr "Potong"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "Kopy"
@@ -5300,7 +5305,11 @@ msgid "Remove All"
msgstr "Hapus"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
@@ -5592,7 +5601,7 @@ msgstr "Ekspor Tile Set"
#: editor/project_manager.cpp
#, fuzzy
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr "File tidak ada."
#: editor/project_manager.cpp
@@ -5730,6 +5739,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5760,6 +5775,10 @@ msgid "Exit"
msgstr "Keluar"
#: editor/project_manager.cpp
+msgid "Restart Now"
+msgstr ""
+
+#: editor/project_manager.cpp
#, fuzzy
msgid "Can't run project"
msgstr "Menyambungkan.."
@@ -5988,6 +6007,15 @@ msgid "Remove Resource Remap Option"
msgstr ""
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "Ganti Ukuran Kamera"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
@@ -6048,6 +6076,27 @@ msgid "Locale"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show all locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "Filter:"
+
+#: editor/project_settings_editor.cpp
+msgid "Locales:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -7666,6 +7715,9 @@ msgstr "Error memuat font."
msgid "Invalid font size."
msgstr "Ukuran font tidak sah."
+#~ msgid "Filter:"
+#~ msgstr "Filter:"
+
#~ msgid "Method List For '%s':"
#~ msgstr "Daftar Fungsi Untuk '%s':"
diff --git a/editor/translations/it.po b/editor/translations/it.po
index 01a7ddfd49..45c48d6ac4 100644
--- a/editor/translations/it.po
+++ b/editor/translations/it.po
@@ -1,9 +1,11 @@
# Italian translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Dario Bonfanti <bonfi.96@hotmail.it>, 2016-2017.
# dariocavada <cavada@ectrlsolutions.com>, 2017.
+# Giovanni Solimeno (Crax97) <gsolimeno97@gmail.com>, 2017.
# Marco Melorio <m.melorio@icloud.com>, 2017.
# RealAquilus <JamesHeller@live.it>, 2017.
#
@@ -11,7 +13,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2017-10-09 18:46+0000\n"
+"PO-Revision-Date: 2017-10-23 16:46+0000\n"
"Last-Translator: Dario Bonfanti <bonfi.96@hotmail.it>\n"
"Language-Team: Italian <https://hosted.weblate.org/projects/godot-engine/"
"godot/it/>\n"
@@ -20,7 +22,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 2.17-dev\n"
+"X-Generator: Weblate 2.17\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -658,9 +660,8 @@ msgstr ""
"Rimuoverli comunque? (no undo)"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid "Cannot remove:\n"
-msgstr "Impossibile risolvete."
+msgstr "Impossibile rimouvere:\n"
#: editor/dependency_editor.cpp
msgid "Error loading:"
@@ -688,7 +689,7 @@ msgstr "Errori in caricamento!"
#: editor/dependency_editor.cpp
msgid "Permanently delete %d item(s)? (No undo!)"
-msgstr "Elimina permanentemente %d elementi? (No undo!)"
+msgstr "Eliminare permanentemente %d elementi? (No undo!)"
#: editor/dependency_editor.cpp
msgid "Owns"
@@ -696,7 +697,7 @@ msgstr "Possiede"
#: editor/dependency_editor.cpp
msgid "Resources Without Explicit Ownership:"
-msgstr "Risorse Senza Proprietà Esplicita:"
+msgstr "Risorse Non Possedute Esplicitamente:"
#: editor/dependency_editor.cpp editor/editor_node.cpp
msgid "Orphan Resource Explorer"
@@ -747,32 +748,31 @@ msgstr "Autori"
#: editor/editor_about.cpp
msgid "Platinum Sponsors"
-msgstr ""
+msgstr "Sponsors Platino"
#: editor/editor_about.cpp
msgid "Gold Sponsors"
-msgstr ""
+msgstr "Sponsors Oro"
#: editor/editor_about.cpp
msgid "Mini Sponsors"
-msgstr ""
+msgstr "Sponsors Mini"
#: editor/editor_about.cpp
msgid "Gold Donors"
-msgstr ""
+msgstr "Donatori Oro"
#: editor/editor_about.cpp
msgid "Silver Donors"
-msgstr ""
+msgstr "Sponsors Argento"
#: editor/editor_about.cpp
-#, fuzzy
msgid "Bronze Donors"
-msgstr "Clona Sotto"
+msgstr "Donatori Bronzo"
#: editor/editor_about.cpp
msgid "Donors"
-msgstr ""
+msgstr "Donatori"
#: editor/editor_about.cpp
msgid "License"
@@ -808,7 +808,7 @@ msgstr "Licenze"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
msgid "Error opening package file, not in zip format."
-msgstr "Errore aprendo il pacchetto file, non è un formato di tipo zip."
+msgstr "Errore nell'apertura del package, non in formato zip."
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
@@ -882,7 +882,7 @@ msgstr "Solo"
#: editor/editor_audio_buses.cpp
msgid "Mute"
-msgstr "Mute"
+msgstr "Muto"
#: editor/editor_audio_buses.cpp
msgid "Bypass"
@@ -898,9 +898,8 @@ msgid "Duplicate"
msgstr "duplica"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Reset Volume"
-msgstr "Resetta Zoom"
+msgstr "Ripristina Volume"
#: editor/editor_audio_buses.cpp
msgid "Delete Effect"
@@ -923,9 +922,8 @@ msgid "Duplicate Audio Bus"
msgstr "Duplica bus audio"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Reset Bus Volume"
-msgstr "Resetta Zoom"
+msgstr "Ripristina Volume del Bus"
#: editor/editor_audio_buses.cpp
msgid "Move Audio Bus"
@@ -937,7 +935,7 @@ msgstr "Salva Layout Bus Audio Come..."
#: editor/editor_audio_buses.cpp
msgid "Location for New Layout.."
-msgstr "Posizione per Nuovo Layout..."
+msgstr "Posizione per Nuovo Layout.."
#: editor/editor_audio_buses.cpp
msgid "Open Audio Bus Layout"
@@ -1214,9 +1212,8 @@ msgid "Move Favorite Down"
msgstr "Sposta Preferito Giù"
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Go to parent folder"
-msgstr "Impossibile creare cartella."
+msgstr "Vai nella cartella padre"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
@@ -1232,10 +1229,6 @@ msgid "File:"
msgstr "File:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "Filtro:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "Necessaria un'estensione valida."
@@ -1281,27 +1274,24 @@ msgid "Brief Description:"
msgstr "Breve Descrizione:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Members"
-msgstr "Membri:"
+msgstr "Membri"
#: editor/editor_help.cpp modules/visual_script/visual_script_editor.cpp
msgid "Members:"
msgstr "Membri:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Public Methods"
-msgstr "Metodi Pubblici:"
+msgstr "Metodi Pubblici"
#: editor/editor_help.cpp
msgid "Public Methods:"
msgstr "Metodi Pubblici:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "GUI Theme Items"
-msgstr "Elementi Tema GUI:"
+msgstr "Elementi Tema GUI"
#: editor/editor_help.cpp
msgid "GUI Theme Items:"
@@ -1312,9 +1302,8 @@ msgid "Signals:"
msgstr "Segnali:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Enumerations"
-msgstr "Enumerazioni:"
+msgstr "Enumerazioni"
#: editor/editor_help.cpp
msgid "Enumerations:"
@@ -1325,23 +1314,20 @@ msgid "enum "
msgstr "enum "
#: editor/editor_help.cpp
-#, fuzzy
msgid "Constants"
-msgstr "Costanti:"
+msgstr "Costanti"
#: editor/editor_help.cpp
msgid "Constants:"
msgstr "Costanti:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Description"
-msgstr "Descrizione:"
+msgstr "Descrizione"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Properties"
-msgstr "Proprietà:"
+msgstr "Proprietà"
#: editor/editor_help.cpp
msgid "Property Description:"
@@ -1352,11 +1338,12 @@ msgid ""
"There is currently no description for this property. Please help us by "
"[color=$color][url=$url]contributing one[/url][/color]!"
msgstr ""
+"Al momento una descrizione per questa proprietà non esiste. Aiutaci [color="
+"$color][url=$url]aggiungendone una[/url][/color]!"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Methods"
-msgstr "Lista Metodi:"
+msgstr "Metodi"
#: editor/editor_help.cpp
msgid "Method Description:"
@@ -1367,6 +1354,8 @@ msgid ""
"There is currently no description for this method. Please help us by [color="
"$color][url=$url]contributing one[/url][/color]!"
msgstr ""
+"Al momento una descrizione per questo metodo non esiste. Aiutaci [color="
+"$color][url=$url]aggiungendone una[/url][/color]!"
#: editor/editor_help.cpp
msgid "Search Text"
@@ -1408,28 +1397,24 @@ msgid "Error while saving."
msgstr "Errore durante il salvataggio."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Can't open '%s'."
-msgstr "Non posso operare su '..'"
+msgstr "Impossibile aprire '%s'."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Error while parsing '%s'."
-msgstr "Errore durante il salvataggio."
+msgstr "Errore durante l'elaborazione di '%s'."
#: editor/editor_node.cpp
msgid "Unexpected end of file '%s'."
-msgstr ""
+msgstr "Fine file '%s' non prevista."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Missing '%s' or its dependencies."
-msgstr "La scena '%s' ha rotto le dipendenze:"
+msgstr "'%s' mancante o dipendenze mancanti."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Error while loading '%s'."
-msgstr "Errore durante il salvataggio."
+msgstr "Errore durante il caricamento di '%s'."
#: editor/editor_node.cpp
msgid "Saving Scene"
@@ -1497,18 +1482,26 @@ msgid ""
"Please read the documentation relevant to importing scenes to better "
"understand this workflow."
msgstr ""
+"Questa risorsa appartiene a una scena che è stata importata, di conseguenza "
+"non è modificabile.\n"
+"Si consiglia di leggere la documentazione riguardante l'importazione delle "
+"scene per comprendere al meglio questo workflow."
#: editor/editor_node.cpp
msgid ""
"This resource belongs to a scene that was instanced or inherited.\n"
"Changes to it will not be kept when saving the current scene."
msgstr ""
+"Questa risorsa appartiene a una scena istanziata o ereditata.\n"
+"Le modifiche ad essa non verranno mantenute salvando la scena corrente."
#: editor/editor_node.cpp
msgid ""
"This resource was imported, so it's not editable. Change its settings in the "
"import panel and then re-import."
msgstr ""
+"Questa risorsa è stata importata, non è quindi modificabile. Modificane le "
+"impostazioni nel pannello di importazione e re-importala."
#: editor/editor_node.cpp
msgid ""
@@ -1517,6 +1510,11 @@ msgid ""
"Please read the documentation relevant to importing scenes to better "
"understand this workflow."
msgstr ""
+"Questa scena é stata importata, pertanto i cambiamenti ad essa non verranno "
+"mantenuti.\n"
+"Istanziarla o ereditarla consentirà di effettuare dei cambiamenti.\n"
+"Si conaiglia di leggere la documentazione relativa all'importazione delle "
+"scene per comprendere meglio questo workflow."
#: editor/editor_node.cpp
msgid "Copy Params"
@@ -1696,26 +1694,38 @@ msgid ""
"This option is deprecated. Situations where refresh must be forced are now "
"considered a bug. Please report."
msgstr ""
+"Questa opzione é deprecata. Situazioni dove un refresh é obbligatorio sono "
+"ora considerate come bug. Si prega di effettuare un report."
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
msgstr "Scegli una Scena Principale"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+#, fuzzy
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr "Non riesco ad abilitare il plugin aggiunto a: '"
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
-msgstr "' fallita lettura della configurazione."
-
-#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+#, fuzzy
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
"Impossibile trovare il campo per lo script aggiuntivo in: 'res://addons/"
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "Impossibile caricare uno script aggiuntivo dal percorso: '"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
+msgstr "Impossibile caricare uno script aggiuntivo dal percorso: '"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr "Impossibile caricare uno script aggiuntivo dal percorso: '"
#: editor/editor_node.cpp
@@ -1746,9 +1756,8 @@ msgid "Scene '%s' has broken dependencies:"
msgstr "La scena '%s' ha rotto le dipendenze:"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Clear Recent Scenes"
-msgstr "Elimina File recenti"
+msgstr "Rimuovi Scene Recenti"
#: editor/editor_node.cpp
msgid "Save Layout"
@@ -2122,9 +2131,8 @@ msgid "Object properties."
msgstr "Proprietà oggetto."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Changes may be lost!"
-msgstr "Cambia Gruppo Immagine"
+msgstr "I cambiamenti potrebbero essere persi!"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
#: editor/project_manager.cpp
@@ -2208,9 +2216,8 @@ msgid "Open the previous Editor"
msgstr "Apri l'Editor precedente"
#: editor/editor_plugin.cpp
-#, fuzzy
msgid "Creating Mesh Previews"
-msgstr "Creazione Libreria Mesh"
+msgstr "Creazione Anteprime Mesh"
#: editor/editor_plugin.cpp
msgid "Thumbnail.."
@@ -2262,7 +2269,8 @@ msgid "Frame %"
msgstr "Frame %"
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+#, fuzzy
+msgid "Physics Frame %"
msgstr "Frame Fisso %"
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -2430,17 +2438,20 @@ msgstr "Impossibile navigare a '"
#: editor/filesystem_dock.cpp
msgid "View items as a grid of thumbnails"
-msgstr ""
+msgstr "Visualizza elementi come una griglia di miniature"
#: editor/filesystem_dock.cpp
msgid "View items as a list"
-msgstr ""
+msgstr "Visualizza elementi come una lista"
#: editor/filesystem_dock.cpp
msgid ""
"\n"
"Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
+"\n"
+"Stato: Importazione file fallita. Si prega di sistemare il file e "
+"reimportarlo manualmente."
#: editor/filesystem_dock.cpp
msgid ""
@@ -2451,57 +2462,48 @@ msgstr ""
"Sorgente: "
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Cannot move/rename resources root."
-msgstr "Impossibile caricare/processare il font sorgente."
+msgstr "Impossibile spostare/rinominare risorse root."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Cannot move a folder into itself.\n"
-msgstr "Impossibile importare un file su se stesso:"
+msgstr "Impossibile spostare una cartella in se stessa.\n"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Error moving:\n"
-msgstr "Errore spostamento directory:\n"
+msgstr "Errore spostamento:\n"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Unable to update dependencies:\n"
-msgstr "La scena '%s' ha rotto le dipendenze:"
+msgstr "Impossibile aggiornare le dipendenze:\n"
#: editor/filesystem_dock.cpp
msgid "No name provided"
-msgstr ""
+msgstr "Nessun nome fornito"
#: editor/filesystem_dock.cpp
msgid "Provided name contains invalid characters"
-msgstr ""
+msgstr "Il nome fornito contiene caratteri non validi"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "No name provided."
-msgstr "Rinomina o Sposta.."
+msgstr "Nessun nome fornito."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Name contains invalid characters."
-msgstr "Caratteri validi:"
+msgstr "Il nome contiene caratteri non validi."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "A file or folder with this name already exists."
-msgstr "Il nome del gruppo è già esistente!"
+msgstr "Un file o cartella con questo nome é già esistente."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Renaming file:"
-msgstr "Rinomina Variabile"
+msgstr "Rinomina file:"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Renaming folder:"
-msgstr "Rinomina Nodo"
+msgstr "Rinomina cartella:"
#: editor/filesystem_dock.cpp
msgid "Expand all"
@@ -2516,18 +2518,16 @@ msgid "Copy Path"
msgstr "Copia Percorso"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Rename.."
-msgstr "Rinomina"
+msgstr "Rinomina.."
#: editor/filesystem_dock.cpp
msgid "Move To.."
msgstr "Sposta in.."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Folder.."
-msgstr "Crea Cartella"
+msgstr "Nuova Cartella.."
#: editor/filesystem_dock.cpp
msgid "Show In File Manager"
@@ -2595,9 +2595,8 @@ msgid "Import as Single Scene"
msgstr "Importa come Scena Singola"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Import with Separate Animations"
-msgstr "Importa con Materiali Separati"
+msgstr "Importa con Animazioni Separate"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Materials"
@@ -3969,7 +3968,7 @@ msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
#, fuzzy
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr "Avvertimento"
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4438,7 +4437,8 @@ msgstr "Step Into"
msgid "Break"
msgstr "Break"
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr "Continua"
@@ -4537,7 +4537,8 @@ msgid "Cut"
msgstr "Taglia"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "Copia"
@@ -5030,7 +5031,7 @@ msgstr "Allinea Selezione Con Vista"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Tool Select"
-msgstr "Strumento Selezione"
+msgstr "Strumento Seleziona"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Tool Move"
@@ -5300,8 +5301,12 @@ msgid "Remove All"
msgstr "Rimuovi"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
-msgstr "Tema"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
+msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
@@ -5596,7 +5601,7 @@ msgstr "Esporta Con Debug"
#: editor/project_manager.cpp
#, fuzzy
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr "File non esistente."
#: editor/project_manager.cpp
@@ -5737,6 +5742,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr "Stai per esaminare %s cartelle per progetti Godot esistenti. Confermi?"
@@ -5767,6 +5778,11 @@ msgstr "Esci"
#: editor/project_manager.cpp
#, fuzzy
+msgid "Restart Now"
+msgstr "Restart (s):"
+
+#: editor/project_manager.cpp
+#, fuzzy
msgid "Can't run project"
msgstr "Impossibile connettersi."
@@ -5994,6 +6010,15 @@ msgid "Remove Resource Remap Option"
msgstr "Rimuovi Opzione di Remap Rimorse"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "Cambia tempo di Blend"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr "Impostazioni Progetto (project.godot)"
@@ -6054,6 +6079,30 @@ msgid "Locale"
msgstr "Locale"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales Filter"
+msgstr "Filtro Immagine:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Show all locales"
+msgstr "Mostra Ossa"
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "Filtri"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales:"
+msgstr "Locale"
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "AutoLoad"
@@ -7677,6 +7726,15 @@ msgstr "Errore caricamento font."
msgid "Invalid font size."
msgstr "Dimensione font Invalida."
+#~ msgid "Filter:"
+#~ msgstr "Filtro:"
+
+#~ msgid "' parsing of config failed."
+#~ msgstr "' fallita lettura della configurazione."
+
+#~ msgid "Theme"
+#~ msgstr "Tema"
+
#~ msgid "Method List For '%s':"
#~ msgstr "Lista Metodi Per '%s':"
@@ -8617,9 +8675,6 @@ msgstr "Dimensione font Invalida."
#~ msgid "Preview Atlas"
#~ msgstr "Anteprima Atlas"
-#~ msgid "Image Filter:"
-#~ msgstr "Filtro Immagine:"
-
#~ msgid "Images:"
#~ msgstr "Immagini:"
diff --git a/editor/translations/ja.po b/editor/translations/ja.po
index fa60fc2e5a..59d3b9499b 100644
--- a/editor/translations/ja.po
+++ b/editor/translations/ja.po
@@ -1,5 +1,6 @@
# Japanese translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# akirakido <achts.y@gmail.com>, 2016-2017.
@@ -1370,10 +1371,6 @@ msgid "File:"
msgstr "ファイル:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "フィルター:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "æœ‰åŠ¹ãªæ‹¡å¼µå­ã‚’使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚"
@@ -1902,19 +1899,25 @@ msgid "Pick a Main Scene"
msgstr "メインシーンを指定"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "フォント読ã¿è¾¼ã¿ã‚¨ãƒ©ãƒ¼ã€‚"
+
+#: editor/editor_node.cpp
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2549,7 +2552,7 @@ msgstr "フレーム %"
#: editor/editor_profiler.cpp
#, fuzzy
-msgid "Fixed Frame %"
+msgid "Physics Frame %"
msgstr "固定フレーム %"
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -4493,7 +4496,7 @@ msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
#, fuzzy
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr "警告"
#: editor/plugins/navigation_mesh_generator.cpp
@@ -5022,7 +5025,8 @@ msgstr "ステップイン"
msgid "Break"
msgstr "(デãƒãƒƒã‚°ã§ï¼‰ãƒ–レーク"
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr "実行を継続"
@@ -5124,7 +5128,8 @@ msgid "Cut"
msgstr "切りå–り"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "コピー"
@@ -5938,8 +5943,12 @@ msgid "Remove All"
msgstr "削除"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
-msgstr "テーマ"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
+msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
@@ -6255,7 +6264,7 @@ msgstr "デãƒãƒƒã‚°ä»˜ãエクスãƒãƒ¼ãƒˆ"
#: editor/project_manager.cpp
#, fuzzy
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr "ファイルãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“."
#: editor/project_manager.cpp
@@ -6400,6 +6409,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -6431,6 +6446,11 @@ msgstr "終了"
#: editor/project_manager.cpp
#, fuzzy
+msgid "Restart Now"
+msgstr "アニメーションを最åˆã‹ã‚‰å†ç”Ÿã™ã‚‹ :"
+
+#: editor/project_manager.cpp
+#, fuzzy
msgid "Can't run project"
msgstr "接続失敗."
@@ -6678,6 +6698,15 @@ msgstr "リソースã®ãƒªãƒžãƒƒãƒ—オプションを除去"
#: editor/project_settings_editor.cpp
#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "ブレンドã™ã‚‹æ™‚間を変更"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "プロジェクト設定 (project.godot)"
@@ -6740,6 +6769,30 @@ msgid "Locale"
msgstr "ロケール"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales Filter"
+msgstr "ロケール"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Show all locales"
+msgstr "ボーンを表示ã™ã‚‹"
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "フィルター"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales:"
+msgstr "ロケール"
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "自動読ã¿è¾¼ã¿"
@@ -8483,6 +8536,12 @@ msgstr "フォント読ã¿è¾¼ã¿ã‚¨ãƒ©ãƒ¼ã€‚"
msgid "Invalid font size."
msgstr "無効ãªãƒ•ォント サイズã§ã™ã€‚"
+#~ msgid "Filter:"
+#~ msgstr "フィルター:"
+
+#~ msgid "Theme"
+#~ msgstr "テーマ"
+
#, fuzzy
#~ msgid "Method List For '%s':"
#~ msgstr "'%s' ã®ãƒ¡ã‚½ãƒƒãƒ‰ä¸€è¦§ï¼š"
diff --git a/editor/translations/ko.po b/editor/translations/ko.po
index bbee0acb37..02141b6dc3 100644
--- a/editor/translations/ko.po
+++ b/editor/translations/ko.po
@@ -1,14 +1,16 @@
# Korean translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# 박한얼 (volzhs) <volzhs@gmail.com>, 2016-2017.
+# Ch <ccwpc@hanmail.net>, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2017-10-16 18:47+0000\n"
+"PO-Revision-Date: 2017-10-24 20:47+0000\n"
"Last-Translator: 박한얼 <volzhs@gmail.com>\n"
"Language-Team: Korean <https://hosted.weblate.org/projects/godot-engine/"
"godot/ko/>\n"
@@ -21,7 +23,7 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Disabled"
-msgstr "사용 안함"
+msgstr "비활성화ë¨"
#: editor/animation_editor.cpp
msgid "All Selection"
@@ -654,7 +656,7 @@ msgstr ""
#: editor/dependency_editor.cpp
msgid "Cannot remove:\n"
-msgstr ""
+msgstr "제거할 수 없습니다:\n"
#: editor/dependency_editor.cpp
msgid "Error loading:"
@@ -717,7 +719,7 @@ msgstr "ê°ì‚¬í•©ë‹ˆë‹¤!"
#: editor/editor_about.cpp
msgid "Godot Engine contributors"
-msgstr ""
+msgstr "Godot Engine 기여ìž"
#: editor/editor_about.cpp
msgid "Project Founders"
@@ -725,7 +727,7 @@ msgstr "프로ì íЏ 창립ìž"
#: editor/editor_about.cpp
msgid "Lead Developer"
-msgstr ""
+msgstr "리드 개발ìž"
#: editor/editor_about.cpp editor/project_manager.cpp
msgid "Project Manager"
@@ -733,7 +735,7 @@ msgstr "프로ì íЏ 매니저"
#: editor/editor_about.cpp
msgid "Developers"
-msgstr ""
+msgstr "개발ìžë“¤"
#: editor/editor_about.cpp
msgid "Authors"
@@ -741,40 +743,39 @@ msgstr "ì €ìž"
#: editor/editor_about.cpp
msgid "Platinum Sponsors"
-msgstr ""
+msgstr "플래티넘 스í°ì„œ"
#: editor/editor_about.cpp
msgid "Gold Sponsors"
-msgstr ""
+msgstr "골드 스í°ì„œ"
#: editor/editor_about.cpp
msgid "Mini Sponsors"
-msgstr ""
+msgstr "미니 스í°ì„œ"
#: editor/editor_about.cpp
msgid "Gold Donors"
-msgstr ""
+msgstr "골드 기ì¦ìž"
#: editor/editor_about.cpp
msgid "Silver Donors"
-msgstr ""
+msgstr "브론즈 기ì¦ìž"
#: editor/editor_about.cpp
-#, fuzzy
msgid "Bronze Donors"
-msgstr "아래로 복제"
+msgstr "브론즈 기ì¦ìž"
#: editor/editor_about.cpp
msgid "Donors"
-msgstr ""
+msgstr "기ì¦ìž"
#: editor/editor_about.cpp
msgid "License"
-msgstr ""
+msgstr "ë¼ì´ì„ ìФ"
#: editor/editor_about.cpp
msgid "Thirdparty License"
-msgstr ""
+msgstr "서드파티 ë¼ì´ì„ ìФ"
#: editor/editor_about.cpp
msgid ""
@@ -783,6 +784,9 @@ msgid ""
"is an exhaustive list of all such thirdparty components with their "
"respective copyright statements and license terms."
msgstr ""
+"Godot Engineì€ MIT ë¼ì´ì„ ìŠ¤ì™€ 호환ë˜ëŠ” ìˆ˜ë§Žì€ ì„œë“œíŒŒí‹° ìžìœ  오픈소스 ë¼ì´ë¸ŒëŸ¬"
+"ë¦¬ì— ì˜ì¡´í•©ë‹ˆë‹¤. 다ìŒì€ 그러한 서드파티 ì»´í¬ë„ŒíŠ¸ì˜ ì™„ì „í•œ 목ë¡ê³¼ ì´ì— 대ì‘하"
+"는 저작권 선언문 ë° ë¼ì´ì„¼ìŠ¤ìž…ë‹ˆë‹¤."
#: editor/editor_about.cpp
msgid "All Components"
@@ -794,11 +798,11 @@ msgstr "ì»´í¬ë„ŒíЏ"
#: editor/editor_about.cpp
msgid "Licenses"
-msgstr ""
+msgstr "ë¼ì´ì„ ìФ"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
msgid "Error opening package file, not in zip format."
-msgstr ""
+msgstr "패키지 파ì¼ì„ 여는 ë° ì˜¤ë¥˜ê°€ ë°œìƒí–ˆìŠµë‹ˆë‹¤. zip í¬ë§·ì´ 아닙니다."
#: editor/editor_asset_installer.cpp
msgid "Uncompressing Assets"
@@ -811,7 +815,7 @@ msgstr "패키지가 성공ì ìœ¼ë¡œ 설치ë˜ì—ˆìŠµë‹ˆë‹¤!"
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Success!"
-msgstr ""
+msgstr "성공!"
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp editor/project_manager.cpp
@@ -824,7 +828,7 @@ msgstr "패키지 ì¸ìŠ¤í†¨ëŸ¬"
#: editor/editor_audio_buses.cpp
msgid "Speakers"
-msgstr ""
+msgstr "스피커"
#: editor/editor_audio_buses.cpp
msgid "Add Effect"
@@ -840,23 +844,24 @@ msgstr "오디오 버스 솔로 토글"
#: editor/editor_audio_buses.cpp
msgid "Toggle Audio Bus Mute"
-msgstr ""
+msgstr "오디오 버스 뮤트 토글"
#: editor/editor_audio_buses.cpp
+#, fuzzy
msgid "Toggle Audio Bus Bypass Effects"
-msgstr ""
+msgstr "오디오 버스 ì´íŽ™íŠ¸ 무시 토글"
#: editor/editor_audio_buses.cpp
msgid "Select Audio Bus Send"
-msgstr ""
+msgstr "오디오 버스 전송 ì„ íƒ"
#: editor/editor_audio_buses.cpp
msgid "Add Audio Bus Effect"
-msgstr ""
+msgstr "오디오 버스 ì´íŽ™íŠ¸ 추가"
#: editor/editor_audio_buses.cpp
msgid "Move Bus Effect"
-msgstr ""
+msgstr "버스 ì´íŽ™íŠ¸ ì´ë™"
#: editor/editor_audio_buses.cpp
msgid "Delete Bus Effect"
@@ -864,19 +869,20 @@ msgstr "버스 ì´íŽ™íŠ¸ ì‚­ì œ"
#: editor/editor_audio_buses.cpp
msgid "Audio Bus, Drag and Drop to rearrange."
-msgstr ""
+msgstr "오디오 버스, 드래그 ë° ë“œë¡­ìœ¼ë¡œ 재배치하세요."
#: editor/editor_audio_buses.cpp
msgid "Solo"
-msgstr ""
+msgstr "솔로"
#: editor/editor_audio_buses.cpp
msgid "Mute"
-msgstr ""
+msgstr "뮤트"
#: editor/editor_audio_buses.cpp
+#, fuzzy
msgid "Bypass"
-msgstr ""
+msgstr "ë°”ì´íŒ¨ìФ"
#: editor/editor_audio_buses.cpp
msgid "Bus options"
@@ -888,9 +894,8 @@ msgid "Duplicate"
msgstr "복제"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Reset Volume"
-msgstr "줌 리셋"
+msgstr "볼륨 리셋"
#: editor/editor_audio_buses.cpp
msgid "Delete Effect"
@@ -902,7 +907,7 @@ msgstr "오디오 버스 추가"
#: editor/editor_audio_buses.cpp
msgid "Master bus can't be deleted!"
-msgstr ""
+msgstr "주 버스는 삭제할 수 없습니다!"
#: editor/editor_audio_buses.cpp
msgid "Delete Audio Bus"
@@ -913,9 +918,8 @@ msgid "Duplicate Audio Bus"
msgstr "오디오 버스 복제"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Reset Bus Volume"
-msgstr "줌 리셋"
+msgstr "버스 볼륨 리셋"
#: editor/editor_audio_buses.cpp
msgid "Move Audio Bus"
@@ -923,23 +927,23 @@ msgstr "오디오 버스 ì´ë™"
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
-msgstr ""
+msgstr "오디오 버스 ë ˆì´ì•„ì›ƒì„ ë‹¤ë¥¸ ì´ë¦„으로 저장.."
#: editor/editor_audio_buses.cpp
msgid "Location for New Layout.."
-msgstr ""
+msgstr "새 ë ˆì´ì•„ì›ƒì„ ì €ìž¥í•  장소.."
#: editor/editor_audio_buses.cpp
msgid "Open Audio Bus Layout"
-msgstr ""
+msgstr "오디오 버스 ë ˆì´ì•„웃 열기"
#: editor/editor_audio_buses.cpp
msgid "There is no 'res://default_bus_layout.tres' file."
-msgstr ""
+msgstr "'res://default_bus_layout.tres' 파ì¼ì´ 없습니다."
#: editor/editor_audio_buses.cpp
msgid "Invalid file, not an audio bus layout."
-msgstr "오디오 버스 ë ˆì´ì•„ì›ƒì´ ì•„ë‹Œ, 유효하지 ì•Šì€ íŒŒì¼."
+msgstr "올바르지 ì•Šì€ íŒŒì¼ìž…니다. 오디오 버스 ë ˆì´ì•„ì›ƒì´ ì•„ë‹™ë‹ˆë‹¤."
#: editor/editor_audio_buses.cpp
msgid "Add Bus"
@@ -947,7 +951,7 @@ msgstr "버스 추가"
#: editor/editor_audio_buses.cpp
msgid "Create a new Bus Layout."
-msgstr "새로운 버스 ë ˆì´ì•„웃 만들기."
+msgstr "새로운 버스 ë ˆì´ì•„ì›ƒì„ ë§Œë“­ë‹ˆë‹¤."
#: editor/editor_audio_buses.cpp editor/property_editor.cpp
#: editor/script_create_dialog.cpp
@@ -956,7 +960,7 @@ msgstr "로드"
#: editor/editor_audio_buses.cpp
msgid "Load an existing Bus Layout."
-msgstr "기존 버스 ë ˆì´ì•„웃 불러오기."
+msgstr "기존 버스 ë ˆì´ì•„ì›ƒì„ ë¶ˆëŸ¬ì˜µë‹ˆë‹¤."
#: editor/editor_audio_buses.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -965,7 +969,7 @@ msgstr "다른 ì´ë¦„으로 저장"
#: editor/editor_audio_buses.cpp
msgid "Save this Bus Layout to a file."
-msgstr ""
+msgstr "ì´ ë²„ìŠ¤ ë ˆì´ì•„ì›ƒì„ íŒŒì¼ë¡œ 저장합니다.."
#: editor/editor_audio_buses.cpp editor/import_dock.cpp
msgid "Load Default"
@@ -973,7 +977,7 @@ msgstr "기본값 불러오기"
#: editor/editor_audio_buses.cpp
msgid "Load the default Bus Layout."
-msgstr ""
+msgstr "기본 버스 ë ˆì´ì•„ì›ƒì„ ë¶ˆëŸ¬ì˜µë‹ˆë‹¤."
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
@@ -1011,7 +1015,7 @@ msgstr "리소스 경로가 아닙니다."
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
-msgstr "ìžë™ 로드 추가"
+msgstr "오토 로드 추가"
#: editor/editor_autoload_settings.cpp
msgid "Autoload '%s' already exists!"
@@ -1113,7 +1117,7 @@ msgstr "패킹중"
#: editor/editor_export.cpp platform/javascript/export/export.cpp
msgid "Template file not found:\n"
-msgstr ""
+msgstr "í…œí”Œë¦¿ì„ ì°¾ì„ ìˆ˜ 없습니다:\n"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "File Exists, Overwrite?"
@@ -1200,9 +1204,8 @@ msgid "Move Favorite Down"
msgstr "ì¦ê²¨ì°¾ê¸° 아래로 ì´ë™"
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Go to parent folder"
-msgstr "í´ë”를 만들 수 없습니다."
+msgstr "부모 í´ë”로 ì´ë™"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
@@ -1218,10 +1221,6 @@ msgid "File:"
msgstr "파ì¼:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "í•„í„°:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "유효한 확장ìžë¥¼ 사용해야 합니다."
@@ -1267,27 +1266,24 @@ msgid "Brief Description:"
msgstr "간단한 설명:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Members"
-msgstr "멤버:"
+msgstr "멤버"
#: editor/editor_help.cpp modules/visual_script/visual_script_editor.cpp
msgid "Members:"
msgstr "멤버:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Public Methods"
-msgstr "공개 함수:"
+msgstr "공개 메소드"
#: editor/editor_help.cpp
msgid "Public Methods:"
msgstr "공개 함수:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "GUI Theme Items"
-msgstr "GUI 테마 항목:"
+msgstr "GUI 테마 항목"
#: editor/editor_help.cpp
msgid "GUI Theme Items:"
@@ -1298,9 +1294,8 @@ msgid "Signals:"
msgstr "시그ë„:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Enumerations"
-msgstr "Enumerations:"
+msgstr "Enumerations"
#: editor/editor_help.cpp
msgid "Enumerations:"
@@ -1308,41 +1303,40 @@ msgstr "Enumerations:"
#: editor/editor_help.cpp
msgid "enum "
-msgstr ""
+msgstr "enum "
#: editor/editor_help.cpp
-#, fuzzy
msgid "Constants"
-msgstr "ìƒìˆ˜:"
+msgstr "ìƒìˆ˜"
#: editor/editor_help.cpp
msgid "Constants:"
msgstr "ìƒìˆ˜:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Description"
-msgstr "설명:"
+msgstr "설명"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Properties"
-msgstr "ì†ì„±:"
+msgstr "ì†ì„±"
#: editor/editor_help.cpp
msgid "Property Description:"
msgstr "ì†ì„± 설명:"
#: editor/editor_help.cpp
+#, fuzzy
msgid ""
"There is currently no description for this property. Please help us by "
"[color=$color][url=$url]contributing one[/url][/color]!"
msgstr ""
+"현재 ì´ ì†ì„±ì— 대한 ìƒì„¸ì„¤ëª…ì´ ì—†ìŠµë‹ˆë‹¤. [color=$color][url=$url]관련 정보를 "
+"기여하여[/url][/color] ë” ë‚˜ì•„ì§€ê²Œ ë„와주세요!"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Methods"
-msgstr "함수 목ë¡:"
+msgstr "메서드"
#: editor/editor_help.cpp
msgid "Method Description:"
@@ -1353,6 +1347,8 @@ msgid ""
"There is currently no description for this method. Please help us by [color="
"$color][url=$url]contributing one[/url][/color]!"
msgstr ""
+"현재 ì´ ë©”ì„œë“œì— ëŒ€í•œ ìƒì„¸ì„¤ëª…ì´ ì—†ìŠµë‹ˆë‹¤. [color=$color][url=$url]관련 ì •ë³´"
+"를 기여하여[/url][/color] ë” ë‚˜ì•„ì§€ê²Œ ë„와주세요!"
#: editor/editor_help.cpp
msgid "Search Text"
@@ -1394,28 +1390,24 @@ msgid "Error while saving."
msgstr "저장 중 ì—러."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Can't open '%s'."
-msgstr "'..'ì— ìˆ˜í–‰í•  수 ì—†ìŒ"
+msgstr "'%s' 열수 ì—†ìŒ."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Error while parsing '%s'."
-msgstr "저장 중 ì—러."
+msgstr "'%s' 파싱 중 ì—러."
#: editor/editor_node.cpp
msgid "Unexpected end of file '%s'."
-msgstr ""
+msgstr "예ìƒì¹˜ 못한 파ì¼ì˜ ë '%s' 입니다.."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Missing '%s' or its dependencies."
-msgstr "'%s' ì”¬ì˜ ì¢…ì† í•­ëª©ì´ ê¹¨ì ¸ìžˆìŠµë‹ˆë‹¤.:"
+msgstr "'%s' 없거나 ì¢…ì† í•­ëª©ì´ ì—†ìŠµë‹ˆë‹¤."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Error while loading '%s'."
-msgstr "저장 중 ì—러."
+msgstr "'%s' 로딩 중 ì—러."
#: editor/editor_node.cpp
msgid "Saving Scene"
@@ -1481,18 +1473,25 @@ msgid ""
"Please read the documentation relevant to importing scenes to better "
"understand this workflow."
msgstr ""
+"ì´ ë¦¬ì†ŒìŠ¤ëŠ” ê°€ì ¸ì™”ë˜ ì”¬ì— ì†í•œ 것ì´ë¯€ë¡œ 수정할 수 없습니다.\n"
+"관련 작업 절차를 ë” ìž˜ ì´í•´í•˜ë ¤ë©´ 씬 가져오기(scene importing)ê³¼ ê´€ë ¨ëœ ë¬¸ì„œ"
+"를 확ì¸í•´ì£¼ì‹­ì‹œì˜¤."
#: editor/editor_node.cpp
msgid ""
"This resource belongs to a scene that was instanced or inherited.\n"
"Changes to it will not be kept when saving the current scene."
msgstr ""
+"ì´ ë¦¬ì†ŒìŠ¤ëŠ” ì¸ìŠ¤í„´ìŠ¤ ë˜ì—ˆê±°ë‚˜ ìƒì†ëœ ê²ƒì— ì†í•©ë‹ˆë‹¤.\n"
+"ì´ ë¦¬ì†ŒìŠ¤ì— ëŒ€í•œ ìˆ˜ì •ì€ í˜„ìž¬ ì”¬ì„ ì €ìž¥í•˜ëŠ” 경우 유지ë˜ì§€ 않습니다."
#: editor/editor_node.cpp
msgid ""
"This resource was imported, so it's not editable. Change its settings in the "
"import panel and then re-import."
msgstr ""
+"ì´ ë¦¬ì†ŒìŠ¤ëŠ” 가져오기ë˜ì—ˆìœ¼ë¯€ë¡œ 수정할 수 없습니다. 가져오기 패ë„ì—서 ì†ì„±ì„ "
+"변경한 뒤 다시 가져오십시오."
#: editor/editor_node.cpp
msgid ""
@@ -1501,6 +1500,10 @@ msgid ""
"Please read the documentation relevant to importing scenes to better "
"understand this workflow."
msgstr ""
+"ì´ ì”¬ì€ ê°€ì ¸ì˜¤ê¸°ë˜ì—ˆìœ¼ë¯€ë¡œ ë³€ê²½ì‚¬í•­ì´ ìœ ì§€ë˜ì§€ ì•Šì„ ê²ƒìž…ë‹ˆë‹¤.\n"
+"ì¸ìŠ¤í„´ìŠ¤í™” í˜¹ì€ ìƒì†ì„ 하면 ì”¬ì„ ìˆ˜ì •í•  수 있게 ë©ë‹ˆë‹¤.\n"
+"관련 작업 절차를 ë” ìž˜ ì´í•´í•˜ë ¤ë©´ 씬 가져오기(scene importing)와 ê´€ë ¨ëœ ë¬¸ì„œ"
+"를 확ì¸í•´ì£¼ì‹­ì‹œì˜¤."
#: editor/editor_node.cpp
msgid "Copy Params"
@@ -1591,7 +1594,7 @@ msgstr "저장 ë° ë‹«ê¸°"
#: editor/editor_node.cpp
msgid "Save changes to '%s' before closing?"
-msgstr ""
+msgstr "닫기 ì „ì— '%s' ì— ë³€ê²½ì‚¬í•­ì„ ì €ìž¥í•˜ì‹œê² ìŠµë‹ˆê¹Œ?"
#: editor/editor_node.cpp
msgid "Save Scene As.."
@@ -1663,36 +1666,46 @@ msgstr "저장 ë° ì¢…ë£Œ"
#: editor/editor_node.cpp
msgid "Save changes to the following scene(s) before quitting?"
-msgstr ""
+msgstr "닫기 ì „ì— ë‹¤ìŒ ì”¬(들)ì˜ ë³€ê²½ì‚¬í•­ì„ ì €ìž¥í•˜ì‹œê² ìŠµë‹ˆê¹Œ?"
#: editor/editor_node.cpp
msgid "Save changes the following scene(s) before opening Project Manager?"
-msgstr ""
+msgstr "프로ì íЏ 매니저를 열기 ì „ì— ë‹¤ìŒ ì”¬(들)ì˜ ë³€ê²½ì‚¬í•­ì„ ì €ìž¥í•˜ì‹œê² ìŠµë‹ˆê¹Œ?"
#: editor/editor_node.cpp
msgid ""
"This option is deprecated. Situations where refresh must be forced are now "
"considered a bug. Please report."
msgstr ""
+"ì´ ì˜µì…˜ì€ ë” ì´ìƒ 사용ë˜ì§€ 않습니다. 반드시 ìƒˆë¡œê³ ì¹¨ì„ í•´ì•¼ 하는 ìƒí™©ì€ ì´ì œ "
+"버그입니다. 신고해주십시오."
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
msgstr "ë©”ì¸ ì”¬ ì„ íƒ"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
-msgstr ""
+#, fuzzy
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
+msgstr "ì´ ê³³ì— ìžˆëŠ” 확장기능 플러그ì¸ì„ 활성화할 수 없습니다: '"
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
-msgstr ""
+#, fuzzy
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
+msgstr "ì´ ê³³ì— ìžˆëŠ” 확장기능 플러그ì¸ì„ 활성화할 수 없습니다: '"
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "ì´ ê³³ì— ìžˆëŠ” 확장기능 플러그ì¸ì„ 활성화할 수 없습니다: '"
+
+#: editor/editor_node.cpp
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -1700,6 +1713,8 @@ msgid ""
"Scene '%s' was automatically imported, so it can't be modified.\n"
"To make changes to it, a new inherited scene can be created."
msgstr ""
+"'%s' ì”¬ì€ ìžë™ìœ¼ë¡œ ìž„í¬íЏ ë˜ì™¸ì„œ, 변경할 수 없습니다.\n"
+"ë³€ê²½ì‚¬í•­ì„ ì ìš©í•˜ë ¤ë©´, 새로운 ìƒì† ì”¬ì„ ë§Œë“œì„¸ìš”."
#: editor/editor_node.cpp editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
@@ -1719,9 +1734,8 @@ msgid "Scene '%s' has broken dependencies:"
msgstr "'%s' ì”¬ì˜ ì¢…ì† í•­ëª©ì´ ê¹¨ì ¸ìžˆìŠµë‹ˆë‹¤.:"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Clear Recent Scenes"
-msgstr "Bones 없애기"
+msgstr "최근 씬 지우기"
#: editor/editor_node.cpp
msgid "Save Layout"
@@ -1989,11 +2003,11 @@ msgstr "온ë¼ì¸ 문서"
#: editor/editor_node.cpp
msgid "Q&A"
-msgstr ""
+msgstr "Q&A"
#: editor/editor_node.cpp
msgid "Issue Tracker"
-msgstr ""
+msgstr "ì´ìŠˆ 트래커"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
msgid "Community"
@@ -2096,9 +2110,8 @@ msgid "Object properties."
msgstr "오브ì íЏ ì†ì„±."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Changes may be lost!"
-msgstr "ì´ë¯¸ì§€ 그룹 변경"
+msgstr "ë³€ê²½ì‚¬í•­ì„ ìžƒì„ ìˆ˜ 있습니다!"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
#: editor/project_manager.cpp
@@ -2119,7 +2132,7 @@ msgstr "출력"
#: editor/editor_node.cpp
msgid "Don't Save"
-msgstr ""
+msgstr "저장하지 않ìŒ"
#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
@@ -2182,9 +2195,8 @@ msgid "Open the previous Editor"
msgstr "ì´ì „ ì—디터 열기"
#: editor/editor_plugin.cpp
-#, fuzzy
msgid "Creating Mesh Previews"
-msgstr "메쉬 ë¼ì´ë¸ŒëŸ¬ë¦¬ ìƒì„± 중"
+msgstr "메쉬 미리보기 ìƒì„± 중"
#: editor/editor_plugin.cpp
msgid "Thumbnail.."
@@ -2236,7 +2248,8 @@ msgid "Frame %"
msgstr "프레임 %"
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+#, fuzzy
+msgid "Physics Frame %"
msgstr "고정 프레임 %"
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -2257,7 +2270,7 @@ msgstr "프레임 #:"
#: editor/editor_run_native.cpp
msgid "Select device from the list"
-msgstr ""
+msgstr "목ë¡ì—서 기기를 ì„ íƒí•˜ì„¸ìš”"
#: editor/editor_run_native.cpp
msgid ""
@@ -2418,24 +2431,20 @@ msgstr ""
"소스: "
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Cannot move/rename resources root."
-msgstr "소스 í°íŠ¸ë¥¼ 로드/처리할 수 없습니다."
+msgstr "리소스 루트를 옮기거나 ì´ë¦„ì„ ë³€ê²½í•  수 없습니다."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Cannot move a folder into itself.\n"
-msgstr "ìžì‹ ì„ 가져올 수 없습니다:"
+msgstr "í´ë”를 ìžì‹ ì˜ 하위로 ì´ë™í•  수 없습니다.\n"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Error moving:\n"
-msgstr "디렉토리 ì´ë™ ì—러:\n"
+msgstr "ì´ë™ ì—러:\n"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Unable to update dependencies:\n"
-msgstr "'%s' ì”¬ì˜ ì¢…ì† í•­ëª©ì´ ê¹¨ì ¸ìžˆìŠµë‹ˆë‹¤.:"
+msgstr "종ì†í•­ëª©ì„ ì—…ë°ì´íЏ í•  수 없습니다:\n"
#: editor/filesystem_dock.cpp
msgid "No name provided"
@@ -2446,29 +2455,24 @@ msgid "Provided name contains invalid characters"
msgstr ""
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "No name provided."
-msgstr "ì´ë¦„ 변경 ë˜ëŠ” ì´ë™.."
+msgstr "ì´ë¦„ì´ ì œê³µë˜ì§€ 않았습니다."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Name contains invalid characters."
-msgstr "유효한 문ìž:"
+msgstr "ì´ë¦„ì— ìœ íš¨í•˜ì§€ ì•Šì€ ë¬¸ìžê°€ 있습니다."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "A file or folder with this name already exists."
-msgstr "그룹 ì´ë¦„ì´ ì´ë¯¸ 사용중입니다!"
+msgstr "파ì¼ì´ë‚˜ í´ë”ê°€ 해당 ì´ë¦„ì„ ì‚¬ìš©ì¤‘ìž…ë‹ˆë‹¤."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Renaming file:"
-msgstr "변수명 변경"
+msgstr "파ì¼ëª… 변경:"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Renaming folder:"
-msgstr "노드 ì´ë¦„ 변경"
+msgstr "í´ë”명 변경:"
#: editor/filesystem_dock.cpp
msgid "Expand all"
@@ -2483,18 +2487,16 @@ msgid "Copy Path"
msgstr "경로 복사"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Rename.."
-msgstr "ì´ë¦„ 변경"
+msgstr "ì´ë¦„ 변경.."
#: editor/filesystem_dock.cpp
msgid "Move To.."
msgstr "ì´ë™.."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Folder.."
-msgstr "í´ë” ìƒì„±"
+msgstr "새 í´ë”.."
#: editor/filesystem_dock.cpp
msgid "Show In File Manager"
@@ -2560,9 +2562,8 @@ msgid "Import as Single Scene"
msgstr "ë‹¨ì¼ ì”¬ìœ¼ë¡œ 가져오기"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Import with Separate Animations"
-msgstr "애니메ì´ì…˜ 가져오기.."
+msgstr "애니메ì´ì…˜ì„ 분리시켜 가져오기"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Materials"
@@ -2674,9 +2675,8 @@ msgid "Edit Poly"
msgstr "í´ë¦¬ê³¤ 편집"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
msgid "Insert Point"
-msgstr "삽입 중"
+msgstr "í¬ì¸íЏ 삽입"
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/collision_polygon_editor_plugin.cpp
@@ -3235,14 +3235,12 @@ msgid "Edit CanvasItem"
msgstr "CanvasItem 편집"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Anchors only"
-msgstr "앵커"
+msgstr "앵커만"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Change Anchors and Margins"
-msgstr "앵커 변경"
+msgstr "앵커와 마진 변경"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Change Anchors"
@@ -3298,9 +3296,8 @@ msgid "Pan Mode"
msgstr "팬 모드"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Toggles snapping"
-msgstr "ì¤‘ë‹¨ì  í† ê¸€"
+msgstr "스냅 토글"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -3308,23 +3305,20 @@ msgid "Use Snap"
msgstr "스냅 사용"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snapping options"
-msgstr "애니메ì´ì…˜ 옵션"
+msgstr "스냅 옵션"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to grid"
-msgstr "스냅 모드:"
+msgstr "ê·¸ë¦¬ë“œì— ë§žì¶¤"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Rotation Snap"
msgstr "회전 스냅 사용"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Configure Snap..."
-msgstr "스냅 설정.."
+msgstr "스냅 설정..."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap Relative"
@@ -3339,9 +3333,8 @@ msgid "Smart snapping"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to parent"
-msgstr "부모로 확장"
+msgstr "ë¶€ëª¨ì— ë§žì¶¤"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to node anchor"
@@ -3402,14 +3395,12 @@ msgid "Show Grid"
msgstr "그리드 ë³´ì´ê¸°"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Show helpers"
-msgstr "뼈대 보기"
+msgstr "í—¬í¼ ë³´ê¸°"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Show rulers"
-msgstr "뼈대 보기"
+msgstr "ìž ë³´ê¸°"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Center Selection"
@@ -3420,9 +3411,8 @@ msgid "Frame Selection"
msgstr "ì„ íƒí•­ëª© 화면 꽉차게 표시"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Layout"
-msgstr "ë ˆì´ì•„웃 저장"
+msgstr "ë ˆì´ì•„웃"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Keys"
@@ -3449,9 +3439,8 @@ msgid "Drag pivot from mouse position"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Set pivot at mouse position"
-msgstr "커브 í¬ì¸íЏ Out 설정"
+msgstr "마우스 ìœ„ì¹˜ì— í”¼ë²— 설정"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Multiply grid step by 2"
@@ -3545,14 +3534,12 @@ msgid "Flat1"
msgstr ""
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Ease in"
-msgstr "ê°ì†"
+msgstr "Ease in"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Ease out"
-msgstr "ê°€ì†"
+msgstr "Ease out"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Smoothstep"
@@ -3579,24 +3566,20 @@ msgid "Remove point"
msgstr "í¬ì¸íЏ 제거"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Left linear"
-msgstr "ì§ì„ í˜•"
+msgstr "왼쪽 선형"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Right linear"
-msgstr "우측 뷰"
+msgstr "오른쪽 선형"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Load preset"
-msgstr "리소스 로드"
+msgstr "프리셋 로드"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Remove Curve Point"
-msgstr "경로 í¬ì¸íЏ ì‚­ì œ"
+msgstr "커프 í¬ì¸íЏ ì‚­ì œ"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Toggle Curve Linear Tangent"
@@ -3654,19 +3637,16 @@ msgid "RMB: Erase Point."
msgstr "ìš°í´ë¦­: í¬ì¸íЏ ì‚­ì œ."
#: editor/plugins/line_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove Point from Line2D"
-msgstr "커브ì—서 í¬ì¸íЏ ì‚­ì œ"
+msgstr "Line2Dì—서 í¬ì¸íЏ ì‚­ì œ"
#: editor/plugins/line_2d_editor_plugin.cpp
-#, fuzzy
msgid "Add Point to Line2D"
-msgstr "ì»¤ë¸Œì— í¬ì¸íЏ 추가"
+msgstr "Line2Dì— í¬ì¸íЏ 추가"
#: editor/plugins/line_2d_editor_plugin.cpp
-#, fuzzy
msgid "Move Point in Line2D"
-msgstr "ì»¤ë¸Œì˜ í¬ì¸íЏ ì´ë™"
+msgstr "Line2Dì˜ í¬ì¸íЏ ì´ë™"
#: editor/plugins/line_2d_editor_plugin.cpp
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -3699,9 +3679,8 @@ msgid "Add Point (in empty space)"
msgstr "í¬ì¸íЏ 추가 (빈 공간)"
#: editor/plugins/line_2d_editor_plugin.cpp
-#, fuzzy
msgid "Split Segment (in line)"
-msgstr "세그먼트 분할 (커브)"
+msgstr "세그먼트 ë¶„í•  (ë¼ì¸)"
#: editor/plugins/line_2d_editor_plugin.cpp
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -3890,14 +3869,12 @@ msgid "Bake!"
msgstr "굽기!"
#: editor/plugins/navigation_mesh_editor_plugin.cpp
-#, fuzzy
msgid "Bake the navigation mesh.\n"
-msgstr "네비게ì´ì…˜ 메쉬 만들기"
+msgstr "네비게ì´ì…˜ 메쉬 만들기.\n"
#: editor/plugins/navigation_mesh_editor_plugin.cpp
-#, fuzzy
msgid "Clear the navigation mesh."
-msgstr "네비게ì´ì…˜ 메쉬 만들기"
+msgstr "네비게ì´ì…˜ 메쉬 지우기."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Setting up Configuration..."
@@ -3908,14 +3885,12 @@ msgid "Calculating grid size..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Creating heightfield..."
-msgstr "ë¼ì´íЏ 오í¬íŠ¸ë¦¬ ìƒì„± 중"
+msgstr "Heightfield ìƒì„± 중..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Marking walkable triangles..."
-msgstr "번역 가능한 문ìžì—´.."
+msgstr "걷기 가능한 트ë¼ì´ì•µê¸€ 표시 중..."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Constructing compact heightfield..."
@@ -3927,32 +3902,28 @@ msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
#, fuzzy
-msgid "Partioning..."
-msgstr "경고"
+msgid "Partitioning..."
+msgstr "분할중..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Creating contours..."
-msgstr "오í¬íŠ¸ë¦¬ í…ìŠ¤ì³ ìƒì„± 중"
+msgstr "윤곽선 ìƒì„± 중..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Creating polymesh..."
-msgstr "외곽선 메쉬 만들기.."
+msgstr "í´ë¦¬ 메쉬 ìƒì„± 중..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Converting to native navigation mesh..."
-msgstr "네비게ì´ì…˜ 메쉬 만들기"
+msgstr "네ì´í‹°ë¸Œ 네비게ì´ì…˜ 메쉬로 변환 중..."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Navigation Mesh Generator Setup:"
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Parsing Geometry..."
-msgstr "지오미트리 ë¶„ì„ ì¤‘"
+msgstr "지오미트리 ë¶„ì„ ì¤‘..."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Done!"
@@ -3968,9 +3939,8 @@ msgstr "ì—미션 ë§ˆìŠ¤í¬ ì •ë¦¬"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Generating AABB"
-msgstr "AABB ìƒì„±"
+msgstr "AABB ìƒì„± 중"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
@@ -3998,9 +3968,8 @@ msgstr "ì—미션 ë§ˆìŠ¤í¬ ë¡œë“œ"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Particles"
-msgstr "버í…스"
+msgstr "파티í´"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generated Point Count:"
@@ -4008,24 +3977,20 @@ msgstr "ìƒì„±ëœ í¬ì¸íЏ 개수:"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Generation Time (sec):"
-msgstr "í‰ê·  시간 (ì´ˆ)"
+msgstr "ìƒì„± 시간 (ì´ˆ):"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Emission Mask"
-msgstr "ì—미션 ë§ˆìŠ¤í¬ ì„¤ì •"
+msgstr "ì—미션 마스í¬"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Capture from Pixel"
-msgstr "씬으로부터 만들기"
+msgstr "픽셀로부터 캡ì³"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Emission Colors"
-msgstr "ì—미션 위치:"
+msgstr "ì—미션 ì¹¼ë¼"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Node does not contain geometry."
@@ -4052,14 +4017,12 @@ msgid "Generate AABB"
msgstr "AABB ìƒì„±"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Create Emission Points From Mesh"
-msgstr "메쉬로부터 ì—미터 만들기"
+msgstr "메쉬로부터 ì—미션 í¬ì¸íЏ 만들기"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Create Emission Points From Node"
-msgstr "노드로부터 ì—미터 만들기"
+msgstr "노드로부터 ì—미터 í¬ì¸íЏ 만들기"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Clear Emitter"
@@ -4070,14 +4033,12 @@ msgid "Create Emitter"
msgstr "ì—미터 만들기"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Emission Points:"
-msgstr "ì—미션 위치:"
+msgstr "ì—미션 í¬ì¸íЏ:"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Surface Points"
-msgstr "서페ì´ìФ %d"
+msgstr "서페ì´ìФ í¬ì¸íЏ"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Surface Points+Normal (Directed)"
@@ -4088,9 +4049,8 @@ msgid "Volume"
msgstr "배출량"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Emission Source: "
-msgstr "ì—미션 채움:"
+msgstr "ì—미션 소스: "
#: editor/plugins/particles_editor_plugin.cpp
#, fuzzy
@@ -4102,14 +4062,12 @@ msgid "Remove Point from Curve"
msgstr "커브ì—서 í¬ì¸íЏ ì‚­ì œ"
#: editor/plugins/path_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove Out-Control from Curve"
-msgstr "ì»¤ë¸Œì˜ ì•„ì›ƒ-컨트롤 ì´ë™"
+msgstr "ì»¤ë¸Œì˜ ì•„ì›ƒ-컨트롤 ì‚­ì œ"
#: editor/plugins/path_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove In-Control from Curve"
-msgstr "커브ì—서 í¬ì¸íЏ ì‚­ì œ"
+msgstr "ì»¤ë¸Œì˜ ì¸-컨트롤 ì‚­ì œ"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
@@ -4147,19 +4105,16 @@ msgid "Curve Point #"
msgstr "커브 í¬ì¸íЏ #"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Set Curve Point Position"
msgstr "커브 í¬ì¸íЏ 위치 설정"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Set Curve In Position"
-msgstr "커브 í¬ì¸íЏ In 설정"
+msgstr "ì»¤ë¸Œì˜ In 위치 설정"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Set Curve Out Position"
-msgstr "커브 í¬ì¸íЏ Out 설정"
+msgstr "ì»¤ë¸Œì˜ Out 위치 설정"
#: editor/plugins/path_editor_plugin.cpp
msgid "Split Path"
@@ -4170,14 +4125,12 @@ msgid "Remove Path Point"
msgstr "경로 í¬ì¸íЏ ì‚­ì œ"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Remove Out-Control Point"
-msgstr "ì»¤ë¸Œì˜ ì•„ì›ƒ-컨트롤 ì´ë™"
+msgstr "아웃-컨트롤 í¬ì¸íЏ ì‚­ì œ"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Remove In-Control Point"
-msgstr "ì»¤ë¸Œì˜ ì¸-컨트롤 ì´ë™"
+msgstr "ì¸-컨트롤 í¬ì¸íЏ ì‚­ì œ"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create UV Map"
@@ -4287,15 +4240,16 @@ msgid "Paste"
msgstr "붙여넣기"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Clear Recent Files"
-msgstr "Bones 없애기"
+msgstr "최근 íŒŒì¼ ì§€ìš°ê¸°"
#: editor/plugins/script_editor_plugin.cpp
msgid ""
"Close and save changes?\n"
"\""
msgstr ""
+"ë³€ê²½ì‚¬í•­ì„ ì €ìž¥í•˜ê³  닫겠습니까?\n"
+"\""
#: editor/plugins/script_editor_plugin.cpp
msgid "Error while saving theme"
@@ -4382,9 +4336,8 @@ msgid "Run"
msgstr "실행"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Scripts Panel"
-msgstr "ì¦ê²¨ì°¾ê¸° 토글"
+msgstr "스í¬ë¦½íЏ íŒ¨ë„ í† ê¸€"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
@@ -4410,7 +4363,8 @@ msgstr "프로시저 단위 실행"
msgid "Break"
msgstr "ì •ì§€"
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr "계ì†"
@@ -4419,14 +4373,12 @@ msgid "Keep Debugger Open"
msgstr "디버거 í•­ìƒ ì—´ì–´ë†“ê¸°"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Debug with external editor"
-msgstr "ì—디터ì—서 열기"
+msgstr "외부 ì—디터와 디버그"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Open Godot online documentation"
-msgstr "ë ˆí¼ëŸ°ìФ 문서 검색."
+msgstr "Godot 온ë¼ì¸ 문서 열기"
#: editor/plugins/script_editor_plugin.cpp
msgid "Search the class hierarchy."
@@ -4445,9 +4397,8 @@ msgid "Go to next edited document."
msgstr "ë‹¤ìŒ íŽ¸ì§‘ 문서로 ì´ë™."
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Discard"
-msgstr "비연ì†ì ì¸"
+msgstr "저장 안함"
#: editor/plugins/script_editor_plugin.cpp
msgid "Create Script"
@@ -4487,9 +4438,8 @@ msgid "Pick Color"
msgstr "ìƒ‰ìƒ ì„ íƒ"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Convert Case"
-msgstr "ì´ë¯¸ì§€ 변환 중"
+msgstr "ëŒ€ì†Œë¬¸ìž ë³€í™˜"
#: editor/plugins/script_text_editor.cpp
msgid "Uppercase"
@@ -4510,7 +4460,8 @@ msgid "Cut"
msgstr "잘ë¼ë‚´ê¸°"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "복사하기"
@@ -4530,9 +4481,8 @@ msgid "Move Down"
msgstr "아래로 ì´ë™"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Delete Line"
-msgstr "í¬ì¸íЏ ì‚­ì œ"
+msgstr "ë¼ì¸ ì‚­ì œ"
#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
@@ -4588,14 +4538,12 @@ msgid "Goto Previous Breakpoint"
msgstr "ì´ì „ 중단ì ìœ¼ë¡œ ì´ë™"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Convert To Uppercase"
-msgstr "변환.."
+msgstr "대문ìžë¡œ 변환"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Convert To Lowercase"
-msgstr "변환.."
+msgstr "소문ìžë¡œ 변환"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
@@ -4837,28 +4785,24 @@ msgid "Objects Drawn"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Material Changes"
-msgstr "변경사항만 갱신"
+msgstr "머터리얼 변경"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Shader Changes"
-msgstr "변경사항만 갱신"
+msgstr "ì…°ì´ë” 변경"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Surface Changes"
-msgstr "변경사항만 갱신"
+msgstr "서피스 변경"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Draw Calls"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Vertices"
-msgstr "버í…스"
+msgstr "버틱스"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align with view"
@@ -4877,19 +4821,16 @@ msgid "Display Overdraw"
msgstr "Overdraw 표시"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Display Unshaded"
-msgstr "Shadeless 표시"
+msgstr "ìŒì˜ ì—†ì´ í‘œì‹œ"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "View Environment"
-msgstr "환경"
+msgstr "환경 보기"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "View Gizmos"
-msgstr "기즈모"
+msgstr "기즈모 보기"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Information"
@@ -4900,9 +4841,8 @@ msgid "Audio Listener"
msgstr "오디오 리스너"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Doppler Enable"
-msgstr "활성화"
+msgstr "ë„플러 활성화"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Left"
@@ -4913,30 +4853,26 @@ msgid "Freelook Right"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Freelook Forward"
-msgstr "앞으로 가기"
+msgstr "ìžìœ ì‹œì  앞으로 ì´ë™"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Freelook Backwards"
-msgstr "뒤로"
+msgstr "ìžìœ ì‹œì  뒤로 ì´ë™"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Up"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Freelook Down"
-msgstr "휠 아래로."
+msgstr "ìžìœ ì‹œì  아래로 ì´ë™"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "preview"
msgstr "미리보기"
@@ -4945,17 +4881,18 @@ msgid "XForm Dialog"
msgstr "변환 다ì´ì–¼ë¡œê·¸"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Select Mode (Q)\n"
-msgstr "ì„ íƒ ëª¨ë“œ"
+msgstr "ì„ íƒ ëª¨ë“œ (Q)\n"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid ""
"Drag: Rotate\n"
"Alt+Drag: Move\n"
"Alt+RMB: Depth list selection"
-msgstr "알트+ìš°í´ë¦­: 겹친 오브ì íЏ ì„ íƒ"
+msgstr ""
+"드래그: 회전\n"
+"알트+드래그: ì´ë™\n"
+"알트+ìš°í´ë¦­: 겹친 오브ì íЏ ì„ íƒ"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Move Mode (W)"
@@ -5014,24 +4951,20 @@ msgid "Align Selection With View"
msgstr "ì„ íƒ í•­ëª©ì„ ë·°ì— ì •ë ¬"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Select"
-msgstr "ì„ íƒ"
+msgstr "ì„ íƒ íˆ´"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Move"
-msgstr "ì´ë™"
+msgstr "ì´ë™ 툴"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Rotate"
-msgstr "컨트롤: 회전"
+msgstr "회전 툴"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Scale"
-msgstr "í¬ê¸°:"
+msgstr "í¬ê¸°ì¡°ì ˆ 툴"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform"
@@ -5203,21 +5136,18 @@ msgid "Insert Empty (After)"
msgstr "빈 프레임 삽입 (ì´í›„)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Move (Before)"
-msgstr "노드 삭제"
+msgstr "ì´ë™ (ì´ì „)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Move (After)"
-msgstr "왼쪽으로 ì´ë™"
+msgstr "ì´ë™ (ì´í›„)"
#: editor/plugins/style_box_editor_plugin.cpp
msgid "StyleBox Preview:"
msgstr "StyleBox 미리보기:"
#: editor/plugins/texture_region_editor_plugin.cpp
-#, fuzzy
msgid "Set Region Rect"
msgstr "구역 설정"
@@ -5279,18 +5209,20 @@ msgid "Remove Item"
msgstr "ì•„ì´í…œ ì‚­ì œ"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Items"
-msgstr "í´ëž˜ìФ ì•„ì´í…œ ì‚­ì œ"
+msgstr "모든 ì•„ì´í…œ ì‚­ì œ"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All"
-msgstr "삭제"
+msgstr "ëª¨ë‘ ì‚­ì œ"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
-msgstr "테마"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
+msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
@@ -5382,9 +5314,8 @@ msgid "Color"
msgstr "색깔"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Erase Selection"
-msgstr "ì„ íƒë¶€ë¶„ 지우기"
+msgstr "ì„ íƒ ì§€ìš°ê¸°"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
@@ -5592,7 +5523,7 @@ msgstr "íƒ€ì¼ ì…‹ 내보내기"
#: editor/project_manager.cpp
#, fuzzy
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr "파ì¼ì´ 존재하지 않습니다."
#: editor/project_manager.cpp
@@ -5732,6 +5663,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr "%s ì—서 기존 Godot 프로ì íŠ¸ë“¤ì„ ìŠ¤ìº”í•˜ë ¤ê³  합니다. 진행하시겠습니까?"
@@ -5763,6 +5700,11 @@ msgstr "종료"
#: editor/project_manager.cpp
#, fuzzy
+msgid "Restart Now"
+msgstr "재시작 (초):"
+
+#: editor/project_manager.cpp
+#, fuzzy
msgid "Can't run project"
msgstr "연결하기.."
@@ -5993,6 +5935,15 @@ msgstr "리소스 리맵핑 옵션 제거"
#: editor/project_settings_editor.cpp
#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "연결 시간 변경"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "프로ì íЏ 설정 (engine.cfg)"
@@ -6053,6 +6004,30 @@ msgid "Locale"
msgstr "지역"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales Filter"
+msgstr "ì´ë¯¸ì§€ í•„í„°:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Show all locales"
+msgstr "뼈대 보기"
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "í•„í„°"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales:"
+msgstr "지역"
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "ìžë™ 로드"
@@ -7641,6 +7616,12 @@ msgstr "í°íЏ 로딩 ì—러."
msgid "Invalid font size."
msgstr "유요하지 ì•Šì€ í°íЏ 사ì´ì¦ˆ."
+#~ msgid "Filter:"
+#~ msgstr "í•„í„°:"
+
+#~ msgid "Theme"
+#~ msgstr "테마"
+
#~ msgid "Method List For '%s':"
#~ msgstr "'%s' 함수 목ë¡:"
@@ -8524,9 +8505,6 @@ msgstr "유요하지 ì•Šì€ í°íЏ 사ì´ì¦ˆ."
#~ msgid "Preview Atlas"
#~ msgstr "ì•„í‹€ë¼ìФ 미리보기"
-#~ msgid "Image Filter:"
-#~ msgstr "ì´ë¯¸ì§€ í•„í„°:"
-
#~ msgid "Images:"
#~ msgstr "ì´ë¯¸ì§€:"
diff --git a/editor/translations/lt.po b/editor/translations/lt.po
new file mode 100644
index 0000000000..b85e8e01aa
--- /dev/null
+++ b/editor/translations/lt.po
@@ -0,0 +1,7371 @@
+# Lithuanian translation of the Godot Engine editor
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# This file is distributed under the same license as the Godot source code.
+#
+# Ignas Kiela <ignaskiela@super.lt>, 2017.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Godot Engine editor\n"
+"PO-Revision-Date: 2017-10-23 18:47+0000\n"
+"Last-Translator: Ignas Kiela <ignaskiela@super.lt>\n"
+"Language-Team: Lithuanian <https://hosted.weblate.org/projects/godot-engine/"
+"godot/lt/>\n"
+"Language: lt\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8-bit\n"
+"Plural-Forms: nplurals=4; plural=n==1 ? 0 : n%10>=2 && (n%100<10 || n"
+"%100>=20) ? 1 : n%10==0 || (n%100>10 && n%100<20) ? 2 : 3;\n"
+"X-Generator: Weblate 2.17\n"
+
+#: editor/animation_editor.cpp
+msgid "Disabled"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "All Selection"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Move Add Key"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Anim Change Transition"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Anim Change Transform"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Anim Change Value"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Anim Change Call"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Anim Add Track"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Anim Duplicate Keys"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Move Anim Track Up"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Move Anim Track Down"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Remove Anim Track"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Set Transitions to:"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Anim Track Rename"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Anim Track Change Interpolation"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Anim Track Change Value Mode"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Anim Track Change Wrap Mode"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Edit Node Curve"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Edit Selection Curve"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Anim Delete Keys"
+msgstr ""
+
+#: editor/animation_editor.cpp editor/plugins/tile_map_editor_plugin.cpp
+msgid "Duplicate Selection"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Duplicate Transposed"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Remove Selection"
+msgstr "Panaikinti pasirinkimÄ…"
+
+#: editor/animation_editor.cpp
+msgid "Continuous"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Discrete"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Trigger"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Anim Add Key"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Anim Move Keys"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Scale Selection"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Scale From Cursor"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Goto Next Step"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Goto Prev Step"
+msgstr ""
+
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
+msgid "Linear"
+msgstr ""
+
+#: editor/animation_editor.cpp editor/plugins/theme_editor_plugin.cpp
+msgid "Constant"
+msgstr "Konstanta"
+
+#: editor/animation_editor.cpp
+msgid "In"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Out"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "In-Out"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Out-In"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Transitions"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Optimize Animation"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Clean-Up Animation"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Create NEW track for %s and insert key?"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Create %d NEW tracks and insert keys?"
+msgstr ""
+
+#: editor/animation_editor.cpp editor/create_dialog.cpp
+#: editor/editor_audio_buses.cpp editor/plugins/abstract_polygon_2d_editor.cpp
+#: editor/plugins/light_occluder_2d_editor_plugin.cpp
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_create_dialog.cpp
+msgid "Create"
+msgstr "Sukurti"
+
+#: editor/animation_editor.cpp
+msgid "Anim Create & Insert"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Anim Insert Track & Key"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Anim Insert Key"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Change Anim Len"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Change Anim Loop"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Anim Create Typed Value Key"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Anim Insert"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Anim Scale Keys"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Anim Add Call Track"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Animation zoom."
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Length (s):"
+msgstr "Ilgis:"
+
+#: editor/animation_editor.cpp
+msgid "Animation length (in seconds)."
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Step (s):"
+msgstr "Žingsnis(iai):"
+
+#: editor/animation_editor.cpp
+msgid "Cursor step snap (in seconds)."
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Enable/Disable looping in animation."
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Add new tracks."
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Move current track up."
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Move current track down."
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Remove selected track."
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Track tools"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Enable editing of individual keys by clicking them."
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Anim. Optimizer"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Max. Linear Error:"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Max. Angular Error:"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Max Optimizable Angle:"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Optimize"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Select an AnimationPlayer from the Scene Tree to edit animations."
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Key"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Transition"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Scale Ratio:"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Call Functions in Which Node?"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Remove invalid keys"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Remove unresolved and empty tracks"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Clean-up all animations"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Clean-Up Animation(s) (NO UNDO!)"
+msgstr ""
+
+#: editor/animation_editor.cpp
+msgid "Clean-Up"
+msgstr ""
+
+#: editor/array_property_edit.cpp
+msgid "Resize Array"
+msgstr ""
+
+#: editor/array_property_edit.cpp
+msgid "Change Array Value Type"
+msgstr ""
+
+#: editor/array_property_edit.cpp
+msgid "Change Array Value"
+msgstr ""
+
+#: editor/code_editor.cpp
+msgid "Go to Line"
+msgstr ""
+
+#: editor/code_editor.cpp
+msgid "Line Number:"
+msgstr ""
+
+#: editor/code_editor.cpp
+msgid "No Matches"
+msgstr ""
+
+#: editor/code_editor.cpp
+msgid "Replaced %d occurrence(s)."
+msgstr ""
+
+#: editor/code_editor.cpp
+msgid "Replace"
+msgstr ""
+
+#: editor/code_editor.cpp
+msgid "Replace All"
+msgstr ""
+
+#: editor/code_editor.cpp
+msgid "Match Case"
+msgstr ""
+
+#: editor/code_editor.cpp
+msgid "Whole Words"
+msgstr ""
+
+#: editor/code_editor.cpp
+msgid "Selection Only"
+msgstr ""
+
+#: editor/code_editor.cpp editor/editor_node.cpp
+#: editor/plugins/asset_library_editor_plugin.cpp
+#: editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/script_text_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
+msgid "Search"
+msgstr ""
+
+#: editor/code_editor.cpp editor/editor_help.cpp
+msgid "Find"
+msgstr ""
+
+#: editor/code_editor.cpp
+msgid "Next"
+msgstr ""
+
+#: editor/code_editor.cpp
+msgid "Not found!"
+msgstr ""
+
+#: editor/code_editor.cpp
+msgid "Replace By"
+msgstr ""
+
+#: editor/code_editor.cpp
+msgid "Case Sensitive"
+msgstr ""
+
+#: editor/code_editor.cpp
+msgid "Backwards"
+msgstr ""
+
+#: editor/code_editor.cpp
+msgid "Prompt On Replace"
+msgstr ""
+
+#: editor/code_editor.cpp
+msgid "Skip"
+msgstr ""
+
+#: editor/code_editor.cpp
+msgid "Zoom In"
+msgstr ""
+
+#: editor/code_editor.cpp
+msgid "Zoom Out"
+msgstr ""
+
+#: editor/code_editor.cpp
+msgid "Reset Zoom"
+msgstr ""
+
+#: editor/code_editor.cpp editor/script_editor_debugger.cpp
+msgid "Line:"
+msgstr ""
+
+#: editor/code_editor.cpp
+msgid "Col:"
+msgstr ""
+
+#: editor/connections_dialog.cpp
+msgid "Method in target Node must be specified!"
+msgstr ""
+
+#: editor/connections_dialog.cpp
+msgid ""
+"Target method not found! Specify a valid method or attach a script to target "
+"Node."
+msgstr ""
+
+#: editor/connections_dialog.cpp
+msgid "Connect To Node:"
+msgstr ""
+
+#: editor/connections_dialog.cpp editor/editor_autoload_settings.cpp
+#: editor/groups_editor.cpp editor/plugins/item_list_editor_plugin.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
+msgid "Add"
+msgstr ""
+
+#: editor/connections_dialog.cpp editor/dependency_editor.cpp
+#: editor/plugins/animation_tree_editor_plugin.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp
+#: editor/project_settings_editor.cpp
+msgid "Remove"
+msgstr ""
+
+#: editor/connections_dialog.cpp
+msgid "Add Extra Call Argument:"
+msgstr ""
+
+#: editor/connections_dialog.cpp
+msgid "Extra Call Arguments:"
+msgstr ""
+
+#: editor/connections_dialog.cpp
+msgid "Path to Node:"
+msgstr ""
+
+#: editor/connections_dialog.cpp
+msgid "Make Function"
+msgstr ""
+
+#: editor/connections_dialog.cpp
+msgid "Deferred"
+msgstr ""
+
+#: editor/connections_dialog.cpp
+msgid "Oneshot"
+msgstr ""
+
+#: editor/connections_dialog.cpp editor/dependency_editor.cpp
+#: editor/export_template_manager.cpp
+#: editor/plugins/animation_player_editor_plugin.cpp
+#: editor/plugins/asset_library_editor_plugin.cpp
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+#: editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
+#: editor/run_settings_dialog.cpp editor/settings_config_dialog.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Close"
+msgstr ""
+
+#: editor/connections_dialog.cpp
+msgid "Connect"
+msgstr ""
+
+#: editor/connections_dialog.cpp
+msgid "Connect '%s' to '%s'"
+msgstr ""
+
+#: editor/connections_dialog.cpp
+msgid "Connecting Signal:"
+msgstr ""
+
+#: editor/connections_dialog.cpp
+msgid "Create Subscription"
+msgstr ""
+
+#: editor/connections_dialog.cpp
+msgid "Connect.."
+msgstr ""
+
+#: editor/connections_dialog.cpp
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Disconnect"
+msgstr ""
+
+#: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp
+msgid "Signals"
+msgstr ""
+
+#: editor/create_dialog.cpp
+msgid "Create New"
+msgstr ""
+
+#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
+#: editor/filesystem_dock.cpp
+msgid "Favorites:"
+msgstr ""
+
+#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
+msgid "Recent:"
+msgstr ""
+
+#: editor/create_dialog.cpp editor/editor_node.cpp
+#: editor/plugins/asset_library_editor_plugin.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+msgid "Search:"
+msgstr ""
+
+#: editor/create_dialog.cpp editor/editor_help.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
+#: editor/quick_open.cpp
+msgid "Matches:"
+msgstr ""
+
+#: editor/create_dialog.cpp editor/editor_help.cpp
+#: editor/plugins/asset_library_editor_plugin.cpp editor/property_selector.cpp
+#: editor/script_editor_debugger.cpp
+msgid "Description:"
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid "Search Replacement For:"
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid "Dependencies For:"
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid ""
+"Scene '%s' is currently being edited.\n"
+"Changes will not take effect unless reloaded."
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid ""
+"Resource '%s' is in use.\n"
+"Changes will take effect when reloaded."
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid "Dependencies"
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid "Resource"
+msgstr ""
+
+#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
+#: editor/script_create_dialog.cpp
+msgid "Path"
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid "Dependencies:"
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid "Fix Broken"
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid "Dependency Editor"
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid "Search Replacement Resource:"
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid "Owners Of:"
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid "Remove selected files from the project? (no undo)"
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid ""
+"The files being removed are required by other resources in order for them to "
+"work.\n"
+"Remove them anyway? (no undo)"
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid "Cannot remove:\n"
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid "Error loading:"
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid "Scene failed to load due to missing dependencies:"
+msgstr ""
+
+#: editor/dependency_editor.cpp editor/editor_node.cpp
+msgid "Open Anyway"
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid "Which action should be taken?"
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid "Fix Dependencies"
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid "Errors loading!"
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid "Permanently delete %d item(s)? (No undo!)"
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid "Owns"
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid "Resources Without Explicit Ownership:"
+msgstr ""
+
+#: editor/dependency_editor.cpp editor/editor_node.cpp
+msgid "Orphan Resource Explorer"
+msgstr ""
+
+#: editor/dependency_editor.cpp
+msgid "Delete selected files?"
+msgstr ""
+
+#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
+#: editor/editor_node.cpp editor/filesystem_dock.cpp
+#: editor/plugins/item_list_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/scene_tree_dock.cpp
+msgid "Delete"
+msgstr ""
+
+#: editor/editor_about.cpp
+msgid "Thanks from the Godot community!"
+msgstr ""
+
+#: editor/editor_about.cpp
+msgid "Thanks!"
+msgstr ""
+
+#: editor/editor_about.cpp
+msgid "Godot Engine contributors"
+msgstr ""
+
+#: editor/editor_about.cpp
+msgid "Project Founders"
+msgstr ""
+
+#: editor/editor_about.cpp
+msgid "Lead Developer"
+msgstr ""
+
+#: editor/editor_about.cpp editor/project_manager.cpp
+msgid "Project Manager"
+msgstr ""
+
+#: editor/editor_about.cpp
+msgid "Developers"
+msgstr ""
+
+#: editor/editor_about.cpp
+msgid "Authors"
+msgstr ""
+
+#: editor/editor_about.cpp
+msgid "Platinum Sponsors"
+msgstr ""
+
+#: editor/editor_about.cpp
+msgid "Gold Sponsors"
+msgstr ""
+
+#: editor/editor_about.cpp
+msgid "Mini Sponsors"
+msgstr ""
+
+#: editor/editor_about.cpp
+msgid "Gold Donors"
+msgstr ""
+
+#: editor/editor_about.cpp
+msgid "Silver Donors"
+msgstr ""
+
+#: editor/editor_about.cpp
+msgid "Bronze Donors"
+msgstr ""
+
+#: editor/editor_about.cpp
+msgid "Donors"
+msgstr ""
+
+#: editor/editor_about.cpp
+msgid "License"
+msgstr ""
+
+#: editor/editor_about.cpp
+msgid "Thirdparty License"
+msgstr ""
+
+#: editor/editor_about.cpp
+msgid ""
+"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."
+msgstr ""
+
+#: editor/editor_about.cpp
+msgid "All Components"
+msgstr ""
+
+#: editor/editor_about.cpp
+msgid "Components"
+msgstr ""
+
+#: editor/editor_about.cpp
+msgid "Licenses"
+msgstr ""
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Error opening package file, not in zip format."
+msgstr ""
+
+#: editor/editor_asset_installer.cpp
+msgid "Uncompressing Assets"
+msgstr ""
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+msgstr ""
+
+#: editor/editor_asset_installer.cpp
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Success!"
+msgstr ""
+
+#: editor/editor_asset_installer.cpp
+#: editor/plugins/asset_library_editor_plugin.cpp editor/project_manager.cpp
+msgid "Install"
+msgstr ""
+
+#: editor/editor_asset_installer.cpp
+msgid "Package Installer"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Speakers"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Add Effect"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Rename Audio Bus"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Toggle Audio Bus Solo"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Toggle Audio Bus Mute"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Toggle Audio Bus Bypass Effects"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Select Audio Bus Send"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Add Audio Bus Effect"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Move Bus Effect"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Delete Bus Effect"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Solo"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Mute"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Bypass"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Bus options"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Reset Volume"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Delete Effect"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Add Audio Bus"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Master bus can't be deleted!"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Delete Audio Bus"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Duplicate Audio Bus"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Reset Bus Volume"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Move Audio Bus"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Save Audio Bus Layout As.."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Location for New Layout.."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Open Audio Bus Layout"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "There is no 'res://default_bus_layout.tres' file."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Invalid file, not an audio bus layout."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Add Bus"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp editor/property_editor.cpp
+#: editor/script_create_dialog.cpp
+msgid "Load"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Load an existing Bus Layout."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Save As"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Save this Bus Layout to a file."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+msgid "Load Default"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Load the default Bus Layout."
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp
+msgid "Invalid name."
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp
+msgid "Valid characters:"
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp
+msgid "Invalid name. Must not collide with an existing engine class name."
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp
+msgid "Invalid name. Must not collide with an existing buit-in type name."
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp
+msgid "Invalid name. Must not collide with an existing global constant name."
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp
+msgid "Invalid Path."
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp
+msgid "File does not exist."
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp
+msgid "Not in resource path."
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp
+msgid "Add AutoLoad"
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp
+msgid "Autoload '%s' already exists!"
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp
+msgid "Rename Autoload"
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp
+msgid "Toggle AutoLoad Globals"
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp
+msgid "Move Autoload"
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp
+msgid "Remove Autoload"
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp
+msgid "Enable"
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp
+msgid "Rearrange Autoloads"
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp editor/editor_file_dialog.cpp
+#: scene/gui/file_dialog.cpp
+msgid "Path:"
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp
+msgid "Node Name:"
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp editor/project_manager.cpp
+msgid "Name"
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp
+msgid "Singleton"
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp
+msgid "List:"
+msgstr ""
+
+#: editor/editor_data.cpp
+msgid "Updating Scene"
+msgstr ""
+
+#: editor/editor_data.cpp
+msgid "Storing local changes.."
+msgstr ""
+
+#: editor/editor_data.cpp
+msgid "Updating scene.."
+msgstr ""
+
+#: editor/editor_dir_dialog.cpp
+msgid "Please select a base directory first"
+msgstr ""
+
+#: editor/editor_dir_dialog.cpp
+msgid "Choose a Directory"
+msgstr ""
+
+#: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp
+#: editor/filesystem_dock.cpp scene/gui/file_dialog.cpp
+msgid "Create Folder"
+msgstr ""
+
+#: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp
+#: editor/editor_plugin_settings.cpp editor/filesystem_dock.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_export.cpp
+#: scene/gui/file_dialog.cpp
+msgid "Name:"
+msgstr ""
+
+#: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp
+#: editor/filesystem_dock.cpp scene/gui/file_dialog.cpp
+msgid "Could not create folder."
+msgstr ""
+
+#: editor/editor_dir_dialog.cpp
+msgid "Choose"
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid "Storing File:"
+msgstr ""
+
+#: editor/editor_export.cpp
+msgid "Packing"
+msgstr ""
+
+#: editor/editor_export.cpp platform/javascript/export/export.cpp
+msgid "Template file not found:\n"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "File Exists, Overwrite?"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "All Recognized"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "All Files (*)"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/editor_help.cpp editor/editor_node.cpp
+#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp scene/gui/file_dialog.cpp
+msgid "Open"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open File(s)"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a Directory"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File or Directory"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/editor_node.cpp
+#: editor/plugins/animation_player_editor_plugin.cpp
+#: editor/plugins/script_editor_plugin.cpp scene/gui/file_dialog.cpp
+msgid "Save"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Save a File"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Go Back"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Go Forward"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Go Up"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Refresh"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Toggle Hidden Files"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Toggle Favorite"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Toggle Mode"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Focus Path"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Move Favorite Up"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Move Favorite Down"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Go to parent folder"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Directories & Files:"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Preview:"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp editor/script_editor_debugger.cpp
+#: scene/gui/file_dialog.cpp
+msgid "File:"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Must use a valid extension."
+msgstr ""
+
+#: editor/editor_file_system.cpp
+msgid "ScanSources"
+msgstr ""
+
+#: editor/editor_file_system.cpp
+msgid "(Re)Importing Assets"
+msgstr ""
+
+#: editor/editor_help.cpp editor/editor_node.cpp
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Search Help"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "Class List:"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "Search Classes"
+msgstr ""
+
+#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+msgid "Top"
+msgstr ""
+
+#: editor/editor_help.cpp editor/property_editor.cpp
+msgid "Class:"
+msgstr ""
+
+#: editor/editor_help.cpp editor/scene_tree_editor.cpp
+msgid "Inherits:"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "Inherited by:"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "Brief Description:"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "Members"
+msgstr ""
+
+#: editor/editor_help.cpp modules/visual_script/visual_script_editor.cpp
+msgid "Members:"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "Public Methods"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "Public Methods:"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "GUI Theme Items"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "GUI Theme Items:"
+msgstr ""
+
+#: editor/editor_help.cpp modules/visual_script/visual_script_editor.cpp
+msgid "Signals:"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "Enumerations"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "Enumerations:"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "Constants"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "Constants:"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "Description"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "Properties"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "Property Description:"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid ""
+"There is currently no description for this property. Please help us by "
+"[color=$color][url=$url]contributing one[/url][/color]!"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "Methods"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "Method Description:"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid ""
+"There is currently no description for this method. Please help us by [color="
+"$color][url=$url]contributing one[/url][/color]!"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "Search Text"
+msgstr ""
+
+#: editor/editor_log.cpp
+msgid "Output:"
+msgstr ""
+
+#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
+#: editor/property_editor.cpp editor/script_editor_debugger.cpp
+#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
+msgid "Clear"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Save Resource As.."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
+msgid "I see.."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't open file for writing:"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Requested file format unknown:"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Error while saving."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't open '%s'."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Error while parsing '%s'."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unexpected end of file '%s'."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Missing '%s' or its dependencies."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Error while loading '%s'."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Saving Scene"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Analyzing"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Creating Thumbnail"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "This operation can't be done without a tree root."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"Couldn't save scene. Likely dependencies (instances) couldn't be satisfied."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Failed to load resource."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't load MeshLibrary for merging!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Error saving MeshLibrary!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't load TileSet for merging!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Error saving TileSet!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Error trying to save layout!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Default editor layout overridden."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Layout name not found!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Restored default layout to base settings."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource belongs to a scene that was imported, so it's not editable.\n"
+"Please read the documentation relevant to importing scenes to better "
+"understand this workflow."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource belongs to a scene that was instanced or inherited.\n"
+"Changes to it will not be kept when saving the current scene."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource was imported, so it's not editable. Change its settings in the "
+"import panel and then re-import."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This scene was imported, so changes to it will not be kept.\n"
+"Instancing it or inheriting will allow making changes to it.\n"
+"Please read the documentation relevant to importing scenes to better "
+"understand this workflow."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Copy Params"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Paste Params"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/resource_preloader_editor_plugin.cpp
+msgid "Paste Resource"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Copy Resource"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Make Built-In"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Make Sub-Resources Unique"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Open in Help"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "There is no defined scene to run."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"No main scene has ever been defined, select one?\n"
+"You can change it later in \"Project Settings\" under the 'application' "
+"category."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"Selected scene '%s' does not exist, select a valid one?\n"
+"You can change it later in \"Project Settings\" under the 'application' "
+"category."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"Selected scene '%s' is not a scene file, select a valid one?\n"
+"You can change it later in \"Project Settings\" under the 'application' "
+"category."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Current scene was never saved, please save it prior to running."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Could not start subprocess!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Open Scene"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Open Base Scene"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Quick Open Scene.."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Quick Open Script.."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Save & Close"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Save changes to '%s' before closing?"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Save Scene As.."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "No"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Yes"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "This scene has never been saved. Save before running?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/scene_tree_dock.cpp
+msgid "This operation can't be done without a scene."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Export Mesh Library"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Export Tile Set"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "This operation can't be done without a selected node."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Current scene not saved. Open anyway?"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't reload a scene that was never saved."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Revert"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "This action cannot be undone. Revert anyway?"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Quick Run Scene.."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Quit"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Exit the editor?"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Open Project Manager?"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Save & Quit"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Save changes to the following scene(s) before quitting?"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Save changes the following scene(s) before opening Project Manager?"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This option is deprecated. Situations where refresh must be forced are now "
+"considered a bug. Please report."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Pick a Main Scene"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '%s'."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"Scene '%s' was automatically imported, so it can't be modified.\n"
+"To make changes to it, a new inherited scene can be created."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
+msgid "Ugh"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"Error loading scene, it must be inside the project path. Use 'Import' to "
+"open the scene, then save it inside the project path."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Scene '%s' has broken dependencies:"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Clear Recent Scenes"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Save Layout"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Delete Layout"
+msgstr ""
+
+#: editor/editor_node.cpp editor/import_dock.cpp
+#: editor/script_create_dialog.cpp
+msgid "Default"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Switch Scene Tab"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "%d more file(s)"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "%d more file(s) or folder(s)"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Distraction Free Mode"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Toggle distraction-free mode."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Scene"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Go to previously opened scene."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Next tab"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Previous tab"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Filter Files.."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Operations with scene files."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "New Scene"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "New Inherited Scene.."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Open Scene.."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Save Scene"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Save all Scenes"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Close Scene"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+msgid "Open Recent"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Convert To.."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "MeshLibrary.."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "TileSet.."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_text_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp scene/gui/line_edit.cpp
+#: scene/gui/text_edit.cpp
+msgid "Undo"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_text_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Redo"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Revert Scene"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Miscellaneous project or scene-wide tools."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Project"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Project Settings"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Run Script"
+msgstr ""
+
+#: editor/editor_node.cpp editor/project_export.cpp
+msgid "Export"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Tools"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Quit to Project List"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+msgid "Debug"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Deploy with Remote Debug"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"When exporting or deploying, the resulting executable will attempt to "
+"connect to the IP of this computer in order to be debugged."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Small Deploy with Network FS"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"When this option is enabled, export or deploy will produce a minimal "
+"executable.\n"
+"The filesystem will be provided from the project by the editor over the "
+"network.\n"
+"On Android, deploy will use the USB cable for faster performance. This "
+"option speeds up testing for games with a large footprint."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Visible Collision Shapes"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"Collision shapes and raycast nodes (for 2D and 3D) will be visible on the "
+"running game if this option is turned on."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Visible Navigation"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"Navigation meshes and polygons will be visible on the running game if this "
+"option is turned on."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Sync Scene Changes"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"When this option is turned on, any changes made to the scene in the editor "
+"will be replicated in the running game.\n"
+"When used remotely on a device, this is more efficient with network "
+"filesystem."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Sync Script Changes"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"When this option is turned on, any script that is saved will be reloaded on "
+"the running game.\n"
+"When used remotely on a device, this is more efficient with network "
+"filesystem."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Editor"
+msgstr ""
+
+#: editor/editor_node.cpp editor/settings_config_dialog.cpp
+msgid "Editor Settings"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Editor Layout"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Toggle Fullscreen"
+msgstr ""
+
+#: editor/editor_node.cpp editor/project_export.cpp
+msgid "Manage Export Templates"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Help"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+msgid "Classes"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+msgid "Online Docs"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Q&A"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Issue Tracker"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
+msgid "Community"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "About"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Play the project."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Play"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Pause the scene"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Pause Scene"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Stop the scene."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Stop"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Play the edited scene."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Play Scene"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Play custom scene"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Play Custom Scene"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Spins when the editor window repaints!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Update Always"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Update Changes"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Disable Update Spinner"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Inspector"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Create a new resource in memory and edit it."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Load an existing resource from disk and edit it."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Save the currently edited resource."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+msgid "Save As.."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Go to the previous edited object in history."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Go to the next edited object in history."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "History of recently edited objects."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Object properties."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Changes may be lost!"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
+#: editor/project_manager.cpp
+msgid "Import"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "FileSystem"
+msgstr ""
+
+#: editor/editor_node.cpp editor/node_dock.cpp
+msgid "Node"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Output"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Import Templates From ZIP File"
+msgstr ""
+
+#: editor/editor_node.cpp editor/project_export.cpp
+msgid "Export Project"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Export Library"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Merge With Existing"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Password:"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Open & Run a Script"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "New Inherited"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Load Errors"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp
+msgid "Select"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Open 2D Editor"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Open 3D Editor"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Open Script Editor"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Open Asset Library"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Open the next Editor"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Open the previous Editor"
+msgstr ""
+
+#: editor/editor_plugin.cpp
+msgid "Creating Mesh Previews"
+msgstr ""
+
+#: editor/editor_plugin.cpp
+msgid "Thumbnail.."
+msgstr ""
+
+#: editor/editor_plugin_settings.cpp
+msgid "Installed Plugins:"
+msgstr ""
+
+#: editor/editor_plugin_settings.cpp
+msgid "Update"
+msgstr ""
+
+#: editor/editor_plugin_settings.cpp
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Version:"
+msgstr ""
+
+#: editor/editor_plugin_settings.cpp
+msgid "Author:"
+msgstr ""
+
+#: editor/editor_plugin_settings.cpp
+msgid "Status:"
+msgstr ""
+
+#: editor/editor_profiler.cpp
+msgid "Stop Profiling"
+msgstr ""
+
+#: editor/editor_profiler.cpp
+msgid "Start Profiling"
+msgstr ""
+
+#: editor/editor_profiler.cpp
+msgid "Measure:"
+msgstr ""
+
+#: editor/editor_profiler.cpp
+msgid "Frame Time (sec)"
+msgstr ""
+
+#: editor/editor_profiler.cpp
+msgid "Average Time (sec)"
+msgstr ""
+
+#: editor/editor_profiler.cpp
+msgid "Frame %"
+msgstr ""
+
+#: editor/editor_profiler.cpp
+msgid "Physics Frame %"
+msgstr ""
+
+#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
+msgid "Time:"
+msgstr ""
+
+#: editor/editor_profiler.cpp
+msgid "Inclusive"
+msgstr ""
+
+#: editor/editor_profiler.cpp
+msgid "Self"
+msgstr ""
+
+#: editor/editor_profiler.cpp
+msgid "Frame #:"
+msgstr ""
+
+#: editor/editor_run_native.cpp
+msgid "Select device from the list"
+msgstr ""
+
+#: editor/editor_run_native.cpp
+msgid ""
+"No runnable export preset found for this platform.\n"
+"Please add a runnable preset in the export menu."
+msgstr ""
+
+#: editor/editor_run_script.cpp
+msgid "Write your logic in the _run() method."
+msgstr ""
+
+#: editor/editor_run_script.cpp
+msgid "There is an edited scene already."
+msgstr ""
+
+#: editor/editor_run_script.cpp
+msgid "Couldn't instance script:"
+msgstr ""
+
+#: editor/editor_run_script.cpp
+msgid "Did you forget the 'tool' keyword?"
+msgstr ""
+
+#: editor/editor_run_script.cpp
+msgid "Couldn't run script:"
+msgstr ""
+
+#: editor/editor_run_script.cpp
+msgid "Did you forget the '_run' method?"
+msgstr ""
+
+#: editor/editor_settings.cpp
+msgid "Default (Same as Editor)"
+msgstr ""
+
+#: editor/editor_sub_scene.cpp
+msgid "Select Node(s) to Import"
+msgstr ""
+
+#: editor/editor_sub_scene.cpp
+msgid "Scene Path:"
+msgstr ""
+
+#: editor/editor_sub_scene.cpp
+msgid "Import From Node:"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Re-Download"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Uninstall"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "(Installed)"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Download"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "(Missing)"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "(Current)"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Remove template version '%s'?"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Can't open export templates zip."
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Invalid version.txt format inside templates."
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid ""
+"Invalid version.txt format inside templates. Revision is not a valid "
+"identifier."
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "No version.txt found inside templates."
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Error creating path for templates:\n"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Extracting Export Templates"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Importing:"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Current Version:"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Installed Versions:"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Install From File"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Remove Template"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Select template file"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Export Template Manager"
+msgstr ""
+
+#: editor/file_type_cache.cpp
+msgid "Can't open file_type_cache.cch for writing, not saving file type cache!"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Cannot navigate to '"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "View items as a list"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Status: Import of file failed. Please fix file and reimport manually."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Source: "
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Cannot move/rename resources root."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Cannot move a folder into itself.\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Error moving:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Unable to update dependencies:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "No name provided"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Provided name contains invalid characters"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "No name provided."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Name contains invalid characters."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "A file or folder with this name already exists."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Renaming file:"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Renaming folder:"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Expand all"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Collapse all"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Copy Path"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Rename.."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Move To.."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "New Folder.."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Show In File Manager"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Instance"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Edit Dependencies.."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "View Owners.."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Previous Directory"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Next Directory"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Re-Scan Filesystem"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Toggle folder status as Favorite"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Instance the selected scene(s) as child of the selected node."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid ""
+"Scanning Files,\n"
+"Please Wait.."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Move"
+msgstr ""
+
+#: editor/filesystem_dock.cpp editor/plugins/animation_tree_editor_plugin.cpp
+#: editor/project_manager.cpp
+msgid "Rename"
+msgstr ""
+
+#: editor/groups_editor.cpp
+msgid "Add to Group"
+msgstr ""
+
+#: editor/groups_editor.cpp
+msgid "Remove from Group"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Single Scene"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import with Separate Animations"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import with Separate Materials"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import with Separate Objects"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import with Separate Objects+Materials"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import with Separate Objects+Animations"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import with Separate Materials+Animations"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import with Separate Objects+Materials+Animations"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+#: editor/plugins/cube_grid_theme_editor_plugin.cpp
+msgid "Import Scene"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Importing Scene.."
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Running Custom Script.."
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Couldn't load post-import script:"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Invalid/broken script for post-import (check console):"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Error running post-import script:"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Saving.."
+msgstr ""
+
+#: editor/import_dock.cpp
+msgid "Set as Default for '%s'"
+msgstr ""
+
+#: editor/import_dock.cpp
+msgid "Clear Default for '%s'"
+msgstr ""
+
+#: editor/import_dock.cpp
+msgid " Files"
+msgstr ""
+
+#: editor/import_dock.cpp
+msgid "Import As:"
+msgstr ""
+
+#: editor/import_dock.cpp editor/property_editor.cpp
+msgid "Preset.."
+msgstr ""
+
+#: editor/import_dock.cpp
+msgid "Reimport"
+msgstr ""
+
+#: editor/multi_node_edit.cpp
+msgid "MultiNode Set"
+msgstr ""
+
+#: editor/node_dock.cpp
+msgid "Groups"
+msgstr ""
+
+#: editor/node_dock.cpp
+msgid "Select a Node to edit Signals and Groups."
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#: editor/plugins/light_occluder_2d_editor_plugin.cpp
+msgid "Create Poly"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#: editor/plugins/collision_polygon_editor_plugin.cpp
+#: editor/plugins/light_occluder_2d_editor_plugin.cpp
+msgid "Edit Poly"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Insert Point"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#: editor/plugins/collision_polygon_editor_plugin.cpp
+#: editor/plugins/light_occluder_2d_editor_plugin.cpp
+msgid "Edit Poly (Remove Point)"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Poly And Point"
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#: editor/plugins/light_occluder_2d_editor_plugin.cpp
+msgid "Create a new polygon from scratch."
+msgstr ""
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Toggle Autoplay"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "New Animation Name:"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "New Anim"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Change Animation Name:"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Delete Animation?"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Remove Animation"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "ERROR: Invalid animation name!"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "ERROR: Animation name already exists!"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Rename Animation"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Add Animation"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Blend Next Changed"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Change Blend Time"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Load Animation"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Duplicate Animation"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "ERROR: No animation to copy!"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "ERROR: No animation resource on clipboard!"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Pasted Animation"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Paste Animation"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "ERROR: No animation to edit!"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Play selected animation backwards from current pos. (A)"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Play selected animation backwards from end. (Shift+A)"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Stop animation playback. (S)"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Play selected animation from start. (Shift+D)"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Play selected animation from current pos. (D)"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Animation position (in seconds)."
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Scale animation playback globally for the node."
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Create new animation in player."
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Load animation from disk."
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Load an animation from disk."
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Save the current animation"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Display list of animations in player."
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Autoplay on Load"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Edit Target Blend Times"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Animation Tools"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Copy Animation"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Create New Animation"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Animation Name:"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
+#: editor/script_create_dialog.cpp
+msgid "Error!"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Blend Times:"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Next (Auto Queue):"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Cross-Animation Blend Times"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Animation"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "New name:"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Edit Filters"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Scale:"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Fade In (s):"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Fade Out (s):"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Blend"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Mix"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Auto Restart:"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Restart (s):"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Random Restart (s):"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Start!"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Amount:"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Blend:"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Blend 0:"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Blend 1:"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "X-Fade Time (s):"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Current:"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Add Input"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Clear Auto-Advance"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Set Auto-Advance"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Delete Input"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Animation tree is valid."
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Animation tree is invalid."
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Animation Node"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "OneShot Node"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Mix Node"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Blend2 Node"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Blend3 Node"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Blend4 Node"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "TimeScale Node"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "TimeSeek Node"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Transition Node"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Import Animations.."
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Edit Node Filters"
+msgstr ""
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+msgid "Filters.."
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Free"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Contents:"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "View Files"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Can't resolve hostname:"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Can't resolve."
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Connection error, please try again."
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Can't connect."
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Can't connect to host:"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "No response from host:"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "No response."
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Request failed, return code:"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Req. Failed."
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Request failed, too many redirects"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Redirect Loop."
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Failed:"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Bad download hash, assuming file has been tampered with."
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Expected:"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Got:"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Failed sha256 hash check"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Asset Download Error:"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Fetching:"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Resolving.."
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Connecting.."
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Requesting.."
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Error making request"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Idle"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Retry"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Download Error"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Download for this asset is already in progress!"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "first"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "prev"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "next"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "last"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "All"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+#: editor/project_settings_editor.cpp
+msgid "Plugins"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Sort:"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Reverse"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+#: editor/project_settings_editor.cpp
+msgid "Category:"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Site:"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Support.."
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Official"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Testing"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Assets ZIP File"
+msgstr ""
+
+#: editor/plugins/camera_editor_plugin.cpp
+msgid "Preview"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Configure Snap"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Grid Offset:"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Grid Step:"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Rotation Offset:"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Rotation Step:"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Move Pivot"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Move Action"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Edit IK Chain"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Edit CanvasItem"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Anchors only"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Change Anchors and Margins"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Change Anchors"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Paste Pose"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Select Mode"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Drag: Rotate"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Alt+Drag: Move"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Press 'v' to Change Pivot, 'Shift+v' to Drag Pivot (while moving)."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Alt+RMB: Depth list selection"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Move Mode"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Rotate Mode"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Show a list of all objects at the position clicked\n"
+"(same as Alt+RMB in select mode)."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Click to change object's rotation pivot."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Pan Mode"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Toggles snapping"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Use Snap"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Snapping options"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Snap to grid"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Use Rotation Snap"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Configure Snap..."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Snap Relative"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Use Pixel Snap"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Smart snapping"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Snap to parent"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Snap to node anchor"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Snap to node sides"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Snap to other nodes"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Lock the selected object in place (can't be moved)."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Unlock the selected object (can be moved)."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Makes sure the object's children are not selectable."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Restores the object's children's ability to be selected."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Make Bones"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Clear Bones"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Show Bones"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Make IK Chain"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Clear IK Chain"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Show Grid"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Show helpers"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Show rulers"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Center Selection"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Frame Selection"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Layout"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Insert Keys"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Insert Key"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Insert Key (Existing Tracks)"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Copy Pose"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Clear Pose"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Drag pivot from mouse position"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Set pivot at mouse position"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Multiply grid step by 2"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Divide grid step by 2"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Add %s"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Adding %s..."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
+msgid "Create Node"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
+msgid "Error instancing scene from %s"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
+msgid "OK :("
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
+msgid "No parent to instance a child at."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
+msgid "This operation requires a single selected node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Change default type"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Drag & drop + Shift : Add node as sibling\n"
+"Drag & drop + Alt : Change node type"
+msgstr ""
+
+#: editor/plugins/collision_polygon_editor_plugin.cpp
+msgid "Create Poly3D"
+msgstr ""
+
+#: editor/plugins/collision_shape_2d_editor_plugin.cpp
+msgid "Set Handle"
+msgstr ""
+
+#: editor/plugins/cube_grid_theme_editor_plugin.cpp
+msgid "Remove item %d?"
+msgstr ""
+
+#: editor/plugins/cube_grid_theme_editor_plugin.cpp
+#: editor/plugins/theme_editor_plugin.cpp
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Add Item"
+msgstr ""
+
+#: editor/plugins/cube_grid_theme_editor_plugin.cpp
+msgid "Remove Selected Item"
+msgstr ""
+
+#: editor/plugins/cube_grid_theme_editor_plugin.cpp
+msgid "Import from Scene"
+msgstr ""
+
+#: editor/plugins/cube_grid_theme_editor_plugin.cpp
+msgid "Update from Scene"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Flat0"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Flat1"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Ease in"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Ease out"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Smoothstep"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Modify Curve Point"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Modify Curve Tangent"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Load Curve Preset"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Add point"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Remove point"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Left linear"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Right linear"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Load preset"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Remove Curve Point"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Toggle Curve Linear Tangent"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Hold Shift to edit tangents individually"
+msgstr ""
+
+#: editor/plugins/gradient_editor_plugin.cpp
+msgid "Add/Remove Color Ramp Point"
+msgstr ""
+
+#: editor/plugins/gradient_editor_plugin.cpp
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Modify Color Ramp"
+msgstr ""
+
+#: editor/plugins/item_list_editor_plugin.cpp
+msgid "Item %d"
+msgstr ""
+
+#: editor/plugins/item_list_editor_plugin.cpp
+msgid "Items"
+msgstr ""
+
+#: editor/plugins/item_list_editor_plugin.cpp
+msgid "Item List Editor"
+msgstr ""
+
+#: editor/plugins/light_occluder_2d_editor_plugin.cpp
+msgid ""
+"No OccluderPolygon2D resource on this node.\n"
+"Create and assign one?"
+msgstr ""
+
+#: editor/plugins/light_occluder_2d_editor_plugin.cpp
+msgid "Create Occluder Polygon"
+msgstr ""
+
+#: editor/plugins/light_occluder_2d_editor_plugin.cpp
+msgid "Edit existing polygon:"
+msgstr ""
+
+#: editor/plugins/light_occluder_2d_editor_plugin.cpp
+msgid "LMB: Move Point."
+msgstr ""
+
+#: editor/plugins/light_occluder_2d_editor_plugin.cpp
+msgid "Ctrl+LMB: Split Segment."
+msgstr ""
+
+#: editor/plugins/light_occluder_2d_editor_plugin.cpp
+msgid "RMB: Erase Point."
+msgstr ""
+
+#: editor/plugins/line_2d_editor_plugin.cpp
+msgid "Remove Point from Line2D"
+msgstr ""
+
+#: editor/plugins/line_2d_editor_plugin.cpp
+msgid "Add Point to Line2D"
+msgstr ""
+
+#: editor/plugins/line_2d_editor_plugin.cpp
+msgid "Move Point in Line2D"
+msgstr ""
+
+#: editor/plugins/line_2d_editor_plugin.cpp
+#: editor/plugins/path_2d_editor_plugin.cpp
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Select Points"
+msgstr ""
+
+#: editor/plugins/line_2d_editor_plugin.cpp
+#: editor/plugins/path_2d_editor_plugin.cpp
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Shift+Drag: Select Control Points"
+msgstr ""
+
+#: editor/plugins/line_2d_editor_plugin.cpp
+#: editor/plugins/path_2d_editor_plugin.cpp
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Click: Add Point"
+msgstr ""
+
+#: editor/plugins/line_2d_editor_plugin.cpp
+#: editor/plugins/path_2d_editor_plugin.cpp
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Right Click: Delete Point"
+msgstr ""
+
+#: editor/plugins/line_2d_editor_plugin.cpp
+#: editor/plugins/path_2d_editor_plugin.cpp
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Add Point (in empty space)"
+msgstr ""
+
+#: editor/plugins/line_2d_editor_plugin.cpp
+msgid "Split Segment (in line)"
+msgstr ""
+
+#: editor/plugins/line_2d_editor_plugin.cpp
+#: editor/plugins/path_2d_editor_plugin.cpp
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Delete Point"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Mesh is empty!"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Static Trimesh Body"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Static Convex Body"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "This doesn't work on scene root!"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Trimesh Shape"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Convex Shape"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Navigation Mesh"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "MeshInstance lacks a Mesh!"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Mesh has not surface to create outlines from!"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Could not create outline!"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Outline"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Mesh"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Trimesh Static Body"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Convex Static Body"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Trimesh Collision Sibling"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Convex Collision Sibling"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Outline Mesh.."
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Outline Mesh"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Outline Size:"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "No mesh source specified (and no MultiMesh set in node)."
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "No mesh source specified (and MultiMesh contains no Mesh)."
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Mesh source is invalid (invalid path)."
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Mesh source is invalid (not a MeshInstance)."
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Mesh source is invalid (contains no Mesh resource)."
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "No surface source specified."
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Surface source is invalid (invalid path)."
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Surface source is invalid (no geometry)."
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Surface source is invalid (no faces)."
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Parent has no solid faces to populate."
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Couldn't map area."
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Select a Source Mesh:"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Select a Target Surface:"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Populate Surface"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Populate MultiMesh"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Target Surface:"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Source Mesh:"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "X-Axis"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Y-Axis"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Z-Axis"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Mesh Up Axis:"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Random Rotation:"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Random Tilt:"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Random Scale:"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Populate"
+msgstr ""
+
+#: editor/plugins/navigation_mesh_editor_plugin.cpp
+msgid "Bake!"
+msgstr ""
+
+#: editor/plugins/navigation_mesh_editor_plugin.cpp
+msgid "Bake the navigation mesh.\n"
+msgstr ""
+
+#: editor/plugins/navigation_mesh_editor_plugin.cpp
+msgid "Clear the navigation mesh."
+msgstr ""
+
+#: editor/plugins/navigation_mesh_generator.cpp
+msgid "Setting up Configuration..."
+msgstr ""
+
+#: editor/plugins/navigation_mesh_generator.cpp
+msgid "Calculating grid size..."
+msgstr ""
+
+#: editor/plugins/navigation_mesh_generator.cpp
+msgid "Creating heightfield..."
+msgstr ""
+
+#: editor/plugins/navigation_mesh_generator.cpp
+msgid "Marking walkable triangles..."
+msgstr ""
+
+#: editor/plugins/navigation_mesh_generator.cpp
+msgid "Constructing compact heightfield..."
+msgstr ""
+
+#: editor/plugins/navigation_mesh_generator.cpp
+msgid "Eroding walkable area..."
+msgstr ""
+
+#: editor/plugins/navigation_mesh_generator.cpp
+msgid "Partitioning..."
+msgstr ""
+
+#: editor/plugins/navigation_mesh_generator.cpp
+msgid "Creating contours..."
+msgstr ""
+
+#: editor/plugins/navigation_mesh_generator.cpp
+msgid "Creating polymesh..."
+msgstr ""
+
+#: editor/plugins/navigation_mesh_generator.cpp
+msgid "Converting to native navigation mesh..."
+msgstr ""
+
+#: editor/plugins/navigation_mesh_generator.cpp
+msgid "Navigation Mesh Generator Setup:"
+msgstr ""
+
+#: editor/plugins/navigation_mesh_generator.cpp
+msgid "Parsing Geometry..."
+msgstr ""
+
+#: editor/plugins/navigation_mesh_generator.cpp
+msgid "Done!"
+msgstr ""
+
+#: editor/plugins/navigation_polygon_editor_plugin.cpp
+msgid "Create Navigation Polygon"
+msgstr ""
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Clear Emission Mask"
+msgstr ""
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generating AABB"
+msgstr ""
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Can only set point into a ParticlesMaterial process material"
+msgstr ""
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Error loading image:"
+msgstr ""
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "No pixels with transparency > 128 in image.."
+msgstr ""
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Set Emission Mask"
+msgstr ""
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generate Visibility Rect"
+msgstr ""
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Load Emission Mask"
+msgstr ""
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Particles"
+msgstr ""
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generated Point Count:"
+msgstr ""
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generation Time (sec):"
+msgstr ""
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Emission Mask"
+msgstr ""
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Capture from Pixel"
+msgstr ""
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Emission Colors"
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Node does not contain geometry."
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Node does not contain geometry (faces)."
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "A processor material of type 'ParticlesMaterial' is required."
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Faces contain no area!"
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "No faces!"
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate AABB"
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Create Emission Points From Mesh"
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Create Emission Points From Node"
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Clear Emitter"
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Create Emitter"
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Emission Points:"
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Surface Points"
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Surface Points+Normal (Directed)"
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Volume"
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Emission Source: "
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate Visibility AABB"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+msgid "Remove Point from Curve"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+msgid "Remove Out-Control from Curve"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+msgid "Remove In-Control from Curve"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Add Point to Curve"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+msgid "Move Point in Curve"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+msgid "Move In-Control in Curve"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+msgid "Move Out-Control in Curve"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+msgid "Select Control Points (Shift+Drag)"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Split Segment (in curve)"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Close Curve"
+msgstr ""
+
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Curve Point #"
+msgstr ""
+
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Set Curve Point Position"
+msgstr ""
+
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Set Curve In Position"
+msgstr ""
+
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Set Curve Out Position"
+msgstr ""
+
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Split Path"
+msgstr ""
+
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Remove Path Point"
+msgstr ""
+
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Remove Out-Control Point"
+msgstr ""
+
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Remove In-Control Point"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Create UV Map"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Transform UV Map"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Polygon 2D UV Editor"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Move Point"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Ctrl: Rotate"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Shift: Move All"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Shift+Ctrl: Scale"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Move Polygon"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Rotate Polygon"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Scale Polygon"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+#: editor/plugins/script_text_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_manager.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Edit"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Polygon->UV"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "UV->Polygon"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Clear UV"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Enable Snap"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Grid"
+msgstr ""
+
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+msgid "ERROR: Couldn't load resource!"
+msgstr ""
+
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+msgid "Add Resource"
+msgstr ""
+
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+msgid "Rename Resource"
+msgstr ""
+
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Delete Resource"
+msgstr ""
+
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+msgid "Resource clipboard is empty!"
+msgstr ""
+
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Load Resource"
+msgstr ""
+
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+#: editor/plugins/script_text_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
+#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
+msgid "Paste"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Clear Recent Files"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid ""
+"Close and save changes?\n"
+"\""
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Error while saving theme"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Error saving"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Error importing theme"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Error importing"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Import Theme"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Save Theme As.."
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid " Class Reference"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Next script"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Previous script"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "File"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp editor/property_editor.cpp
+msgid "New"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Save All"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Soft Reload Script"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "History Prev"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "History Next"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Reload Theme"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Save Theme"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Save Theme As"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Close Docs"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Close All"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+msgid "Run"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Toggle Scripts Panel"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/script_text_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Find.."
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/script_text_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Find Next"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+msgid "Step Over"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+msgid "Step Into"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+msgid "Break"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
+msgid "Continue"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Keep Debugger Open"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Debug with external editor"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Open Godot online documentation"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Search the class hierarchy."
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Search the reference documentation."
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Go to previous edited document."
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Go to next edited document."
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Discard"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Create Script"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?:"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+msgid "Debugger"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid ""
+"Built-in scripts can only be edited when the scene they belong to is loaded"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Only resources from filesystem can be dropped."
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Pick Color"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Convert Case"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Uppercase"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Lowercase"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Capitalize"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp scene/gui/line_edit.cpp
+#: scene/gui/text_edit.cpp
+msgid "Cut"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
+#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
+msgid "Copy"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp scene/gui/line_edit.cpp
+#: scene/gui/text_edit.cpp
+msgid "Select All"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp
+msgid "Move Up"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp
+msgid "Move Down"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Delete Line"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Indent Left"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Indent Right"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Toggle Comment"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Clone Down"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Complete Symbol"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Trim Trailing Whitespace"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Convert Indent To Spaces"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Convert Indent To Tabs"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Auto Indent"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Toggle Breakpoint"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Remove All Breakpoints"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Goto Next Breakpoint"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Goto Previous Breakpoint"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Convert To Uppercase"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Convert To Lowercase"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Find Previous"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Replace.."
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Goto Function.."
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Goto Line.."
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Contextual Help"
+msgstr ""
+
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Shader"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Change Scalar Constant"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Change Vec Constant"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Change RGB Constant"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Change Scalar Operator"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Change Vec Operator"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Change Vec Scalar Operator"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Change RGB Operator"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Toggle Rot Only"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Change Scalar Function"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Change Vec Function"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Change Scalar Uniform"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Change Vec Uniform"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Change RGB Uniform"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Change Default Value"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Change XForm Uniform"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Change Texture Uniform"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Change Cubemap Uniform"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Change Comment"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Add/Remove to Color Ramp"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Add/Remove to Curve Map"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Modify Curve Map"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Change Input Name"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Connect Graph Nodes"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Disconnect Graph Nodes"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Remove Shader Graph Node"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Move Shader Graph Node"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Duplicate Graph Node(s)"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Delete Shader Graph Node(s)"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Error: Cyclic Connection Link"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Error: Missing Input Connections"
+msgstr ""
+
+#: editor/plugins/shader_graph_editor_plugin.cpp
+msgid "Add Shader Graph Node"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Orthogonal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Perspective"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Transform Aborted."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "X-Axis Transform."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Y-Axis Transform."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Z-Axis Transform."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Plane Transform."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rotating %s degrees."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom View."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top View."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear View."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front View."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left View."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right View."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Keying is disabled (no key inserted)."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Animation Key Inserted."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Objects Drawn"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Material Changes"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Shader Changes"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Surface Changes"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Draw Calls"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Vertices"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Align with view"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Display Normal"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Display Wireframe"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Display Overdraw"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Display Unshaded"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Environment"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Gizmos"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Information"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Audio Listener"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Doppler Enable"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Left"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Right"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Forward"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Backwards"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Up"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Down"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Speed Modifier"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "preview"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "XForm Dialog"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Select Mode (Q)\n"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Drag: Rotate\n"
+"Alt+Drag: Move\n"
+"Alt+RMB: Depth list selection"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Move Mode (W)"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rotate Mode (E)"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Scale Mode (R)"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom View"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top View"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear View"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front View"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left View"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right View"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Switch Perspective/Orthogonal view"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Insert Animation Key"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Focus Origin"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Focus Selection"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Align Selection With View"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Tool Select"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Tool Move"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Tool Rotate"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Tool Scale"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Transform"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Configure Snap.."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Local Coords"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Transform Dialog.."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "1 Viewport"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "2 Viewports"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "2 Viewports (Alt)"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "3 Viewports"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "3 Viewports (Alt)"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "4 Viewports"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Origin"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Grid"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Settings"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Settings"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Translate Snap:"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rotate Snap (deg.):"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Scale Snap (%):"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Viewport Settings"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Perspective FOV (deg.):"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Z-Near:"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Z-Far:"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Transform Change"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Translate:"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rotate (deg.):"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Scale (ratio):"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Transform Type"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Pre"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Post"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "ERROR: Couldn't load frame resource!"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Add Frame"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Resource clipboard is empty or not a texture!"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Paste Frame"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Add Empty"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation FPS"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "(empty)"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Animations"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Speed (FPS):"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Loop"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Animation Frames"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Insert Empty (Before)"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Insert Empty (After)"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Move (Before)"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Move (After)"
+msgstr ""
+
+#: editor/plugins/style_box_editor_plugin.cpp
+msgid "StyleBox Preview:"
+msgstr ""
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+msgid "Set Region Rect"
+msgstr ""
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+msgid "Snap Mode:"
+msgstr ""
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+msgid "<None>"
+msgstr ""
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+msgid "Pixel Snap"
+msgstr ""
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+msgid "Grid Snap"
+msgstr ""
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+msgid "Auto Slice"
+msgstr ""
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+msgid "Offset:"
+msgstr ""
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+msgid "Step:"
+msgstr ""
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+msgid "Separation:"
+msgstr ""
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+msgid "Texture Region"
+msgstr ""
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+msgid "Texture Region Editor"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Can't save theme to file:"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Add All Items"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Add All"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Remove Item"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Remove All Items"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Remove All"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Add Class Items"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Remove Class Items"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Create Empty Template"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Create Empty Editor Template"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "CheckBox Radio1"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "CheckBox Radio2"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Item"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Check Item"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Checked Item"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Has"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Many"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp editor/project_export.cpp
+msgid "Options"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Have,Many,Several,Options!"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Tab 1"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Tab 2"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Tab 3"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
+#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
+msgid "Type:"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Data Type:"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Icon"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Style"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Font"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Color"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Erase Selection"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Paint TileMap"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Line Draw"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rectangle Paint"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Bucket Fill"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Erase TileMap"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Erase selection"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Find tile"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Transpose"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Mirror X"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Mirror Y"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Paint Tile"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Pick Tile"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rotate 0 degrees"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rotate 90 degrees"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rotate 180 degrees"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rotate 270 degrees"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Could not find tile:"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Item name or ID:"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create from scene?"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Merge from scene?"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create from Scene"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Merge from Scene"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp editor/script_editor_debugger.cpp
+msgid "Error"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Runnable"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Delete patch '"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Delete preset '%s'?"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted: "
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Presets"
+msgstr ""
+
+#: editor/project_export.cpp editor/project_settings_editor.cpp
+msgid "Add.."
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Resources"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export all resources in the project"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export selected scenes (and dependencies)"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export selected resources (and dependencies)"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export Mode:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Resources to export:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Filters to export non-resource files (comma separated, e.g: *.json, *.txt)"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Filters to exclude files from project (comma separated, e.g: *.json, *.txt)"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Patches"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Make Patch"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Features"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Feature List:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export PCK/Zip"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing/corrupted:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export With Debug"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "The path does not exist."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Please choose a 'project.godot' file."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
+"Your project will be created in a non empty folder (you might want to create "
+"a new folder)."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Please choose a folder that does not contain a 'project.godot' file."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Imported Project"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid " "
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "It would be a good idea to name your project."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Invalid project path (changed anything?)."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Couldn't get project.godot in project path."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Couldn't edit project.godot in project path."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Couldn't create project.godot in project path."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "The following files failed extraction from package:"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Rename Project"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Couldn't get project.godot in the project path."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "New Game Project"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Import Existing Project"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Create New Project"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Install Project:"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Project Name:"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Create folder"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Project Path:"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Browse"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "That's a BINGO!"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Unnamed Project"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Can't open project"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Are you sure to open more than one project?"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
+"Can't run project: no main scene defined.\n"
+"Please edit the project and set the main scene in \"Project Settings\" under "
+"the \"Application\" category."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
+"Can't run project: Assets need to be imported.\n"
+"Please edit the project to trigger the initial import."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Are you sure to run more than one project?"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Remove project from the list? (Folder contents will not be modified)"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
+"You are about the scan %s folders for existing Godot projects. Do you "
+"confirm?"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Project List"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Scan"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Select a Folder to Scan"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "New Project"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Templates"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Exit"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Restart Now"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Can't run project"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Key "
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Joy Button"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Joy Axis"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Mouse Button"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Invalid action (anything goes but '/' or ':')."
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Action '%s' already exists!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Rename Input Action Event"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Add Input Action Event"
+msgstr ""
+
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
+msgid "Meta+"
+msgstr ""
+
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
+msgid "Shift+"
+msgstr ""
+
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
+msgid "Alt+"
+msgstr ""
+
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
+msgid "Control+"
+msgstr ""
+
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
+msgid "Press a Key.."
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Mouse Button Index:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Left Button"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Right Button"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Middle Button"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Wheel Up Button"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Wheel Down Button"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Button 6"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Button 7"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Button 8"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Button 9"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Joypad Axis Index:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Axis"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Joypad Button Index:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Add Input Action"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Erase Input Action Event"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Add Event"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Device"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Button"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Left Button."
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Right Button."
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Middle Button."
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Wheel Up."
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Wheel Down."
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Add Global Property"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Select a setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "No property '"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Setting '"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Delete Item"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Can't contain '/' or ':'"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Already existing"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Error saving settings."
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Settings saved OK."
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Add Translation"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Remove Translation"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Add Remapped Path"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Resource Remap Add Remap"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Change Resource Remap Language"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Remove Resource Remap"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Remove Resource Remap Option"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Project Settings (project.godot)"
+msgstr ""
+
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
+msgid "General"
+msgstr ""
+
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
+msgid "Property:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Input Map"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Action:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Device:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Index:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Localization"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Translations"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Translations:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Remaps"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Resources:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Remaps by Locale:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Locale"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show all locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Filter mode:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Locales:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "AutoLoad"
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "Pick a Viewport"
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "Ease In"
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "Ease Out"
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "Zero"
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "Easing In-Out"
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "Easing Out-In"
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "File.."
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "Dir.."
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "Assign"
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "Select Node"
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "New Script"
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "Make Unique"
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "Show in File System"
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "Convert To %s"
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "Error loading file: Not a resource!"
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "Selected node is not a Viewport!"
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "Pick a Node"
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "Bit %d, val %d."
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "On"
+msgstr ""
+
+#: editor/property_editor.cpp modules/visual_script/visual_script_editor.cpp
+msgid "Set"
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "Properties:"
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "Sections:"
+msgstr ""
+
+#: editor/property_selector.cpp
+msgid "Select Property"
+msgstr ""
+
+#: editor/property_selector.cpp
+msgid "Select Virtual Method"
+msgstr ""
+
+#: editor/property_selector.cpp
+msgid "Select Method"
+msgstr ""
+
+#: editor/pvrtc_compress.cpp
+msgid "Could not execute PVRTC tool:"
+msgstr ""
+
+#: editor/pvrtc_compress.cpp
+msgid "Can't load back converted image using PVRTC tool:"
+msgstr ""
+
+#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
+msgid "Reparent Node"
+msgstr ""
+
+#: editor/reparent_dialog.cpp
+msgid "Reparent Location (Select new Parent):"
+msgstr ""
+
+#: editor/reparent_dialog.cpp
+msgid "Keep Global Transform"
+msgstr ""
+
+#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
+msgid "Reparent"
+msgstr ""
+
+#: editor/run_settings_dialog.cpp
+msgid "Run Mode:"
+msgstr ""
+
+#: editor/run_settings_dialog.cpp
+msgid "Current Scene"
+msgstr ""
+
+#: editor/run_settings_dialog.cpp
+msgid "Main Scene"
+msgstr ""
+
+#: editor/run_settings_dialog.cpp
+msgid "Main Scene Arguments:"
+msgstr ""
+
+#: editor/run_settings_dialog.cpp
+msgid "Scene Run Settings"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp editor/script_create_dialog.cpp
+#: scene/gui/dialogs.cpp
+msgid "OK"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "No parent to instance the scenes at."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Error loading scene from %s"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Ok"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot instance the scene '%s' because the current scene exists within one "
+"of its nodes."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Instance Scene(s)"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "This operation can't be done on the tree root."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Move Node In Parent"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Move Nodes In Parent"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate Node(s)"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Delete Node(s)?"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Can not perform with the root node."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "This operation can't be done on instanced scenes."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Save New Scene As.."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Editable Children"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Load As Placeholder"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Discard Instancing"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Makes Sense!"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Can't operate on nodes from a foreign scene!"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Can't operate on nodes the current scene inherits from!"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Remove Node(s)"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid ""
+"Couldn't save new scene. Likely dependencies (instances) couldn't be "
+"satisfied."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Error saving scene."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Error duplicating scene to save it."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Sub-Resources:"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Clear Inheritance"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp
+msgid "Open in Editor"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Delete Node(s)"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Add Child Node"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Instance Child Scene"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Change Type"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Attach Script"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Clear Script"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Merge From Scene"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Save Branch as Scene"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Copy Node Path"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Delete (No Confirm)"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Add/Create a New Node"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid ""
+"Instance a scene file as a Node. Creates an inherited scene if no root node "
+"exists."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Filter nodes"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Attach a new or existing script for the selected node."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Clear a script for the selected node."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Clear Inheritance? (No Undo!)"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Clear!"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid "Toggle Spatial Visible"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid "Toggle CanvasItem Visible"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid "Node configuration warning:"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid ""
+"Node has connection(s) and group(s)\n"
+"Click to show signals dock."
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid ""
+"Node has connections.\n"
+"Click to show signals dock."
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid ""
+"Node is in group(s).\n"
+"Click to show groups dock."
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid "Instance:"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid "Open script"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid ""
+"Node is locked.\n"
+"Click to unlock"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid ""
+"Children are not selectable.\n"
+"Click to make selectable"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid "Toggle Visibility"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid "Invalid node name, the following characters are not allowed:"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid "Rename Node"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid "Scene Tree (Nodes):"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid "Node Configuration Warning!"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid "Select a Node"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Error loading template '%s'"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Error - Could not create script in filesystem."
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Error loading script from %s"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Path is empty"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Path is not local"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Invalid base path"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Directory of the same name exists"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "File exists, will be reused"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Invalid extension"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Wrong extension chosen"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Invalid Path"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Invalid class name"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Invalid inherited parent name or path"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Script valid"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Allowed: a-z, A-Z, 0-9 and _"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Built-in script (into scene file)"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Create new script file"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Load existing script file"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Language"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Inherits"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Class Name"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Template"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Built-in Script"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "Attach Node Script"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Bytes:"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Warning"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Error:"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Source:"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Function:"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Pick one or more items from the list to display the graph."
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Errors"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Child Process Connected"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Inspect Previous Instance"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Inspect Next Instance"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Stack Frames"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Variable"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Errors:"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Stack Trace (if applicable):"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Remote Inspector"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Live Scene Tree:"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Remote Object Properties: "
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Profiler"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Monitor"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Value"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Monitors"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "List of Video Memory Usage by Resource:"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Total:"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Video Mem"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Resource Path"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Type"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Format"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Usage"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Misc"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Clicked Control:"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Clicked Control Type:"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Live Edit Root:"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Set From Tree"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Shortcuts"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Light Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change AudioStreamPlayer3D Emission Angle"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Camera FOV"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Camera Size"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Sphere Shape Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Box Shape Extents"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Capsule Shape Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Capsule Shape Height"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Ray Shape Length"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Notifier Extents"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Particles AABB"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Probe Extents"
+msgstr ""
+
+#: modules/gdnative/gd_native_library_editor.cpp
+msgid "Library"
+msgstr ""
+
+#: modules/gdnative/gd_native_library_editor.cpp
+msgid "Status"
+msgstr ""
+
+#: modules/gdnative/gd_native_library_editor.cpp
+msgid "Libraries: "
+msgstr ""
+
+#: modules/gdnative/register_types.cpp
+msgid "GDNative"
+msgstr ""
+
+#: modules/gdscript/gd_functions.cpp
+#: modules/visual_script/visual_script_builtin_funcs.cpp
+msgid "Invalid type argument to convert(), use TYPE_* constants."
+msgstr ""
+
+#: modules/gdscript/gd_functions.cpp modules/mono/glue/glue_header.h
+#: modules/visual_script/visual_script_builtin_funcs.cpp
+msgid "Not enough bytes for decoding bytes, or invalid format."
+msgstr ""
+
+#: modules/gdscript/gd_functions.cpp
+msgid "step argument is zero!"
+msgstr ""
+
+#: modules/gdscript/gd_functions.cpp
+msgid "Not a script with an instance"
+msgstr ""
+
+#: modules/gdscript/gd_functions.cpp
+msgid "Not based on a script"
+msgstr ""
+
+#: modules/gdscript/gd_functions.cpp
+msgid "Not based on a resource file"
+msgstr ""
+
+#: modules/gdscript/gd_functions.cpp
+msgid "Invalid instance dictionary format (missing @path)"
+msgstr ""
+
+#: modules/gdscript/gd_functions.cpp
+msgid "Invalid instance dictionary format (can't load script at @path)"
+msgstr ""
+
+#: modules/gdscript/gd_functions.cpp
+msgid "Invalid instance dictionary format (invalid script at @path)"
+msgstr ""
+
+#: modules/gdscript/gd_functions.cpp
+msgid "Invalid instance dictionary (invalid subclasses)"
+msgstr ""
+
+#: modules/gdscript/gd_functions.cpp
+msgid "Object can't provide a length."
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Delete Selection"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Duplicate Selection"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Snap View"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Prev Level (%sDown Wheel)"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Next Level (%sUp Wheel)"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Clip Disabled"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Clip Above"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Clip Below"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Edit X Axis"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Edit Y Axis"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Edit Z Axis"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Cursor Rotate X"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Cursor Rotate Y"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Cursor Rotate Z"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Cursor Back Rotate X"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Cursor Back Rotate Y"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Cursor Back Rotate Z"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Cursor Clear Rotation"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Create Area"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Create Exterior Connector"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Erase Area"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Selection -> Duplicate"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Selection -> Clear"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Settings"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Pick Distance:"
+msgstr ""
+
+#: modules/mono/editor/mono_bottom_panel.cpp
+msgid "Builds"
+msgstr ""
+
+#: modules/visual_script/visual_script.cpp
+msgid ""
+"A node yielded without working memory, please read the docs on how to yield "
+"properly!"
+msgstr ""
+
+#: modules/visual_script/visual_script.cpp
+msgid ""
+"Node yielded, but did not return a function state in the first working "
+"memory."
+msgstr ""
+
+#: modules/visual_script/visual_script.cpp
+msgid ""
+"Return value must be assigned to first element of node working memory! Fix "
+"your node please."
+msgstr ""
+
+#: modules/visual_script/visual_script.cpp
+msgid "Node returned an invalid sequence output: "
+msgstr ""
+
+#: modules/visual_script/visual_script.cpp
+msgid "Found sequence bit but not the node in the stack, report bug!"
+msgstr ""
+
+#: modules/visual_script/visual_script.cpp
+msgid "Stack overflow with stack depth: "
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change Signal Arguments"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change Argument Type"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change Argument name"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Set Variable Default Value"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Set Variable Type"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Functions:"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Variables:"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Name is not a valid identifier:"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Name already in use by another func/var/signal:"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Rename Function"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Rename Variable"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Rename Signal"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Function"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Variable"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Signal"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change Expression"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove VisualScript Nodes"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Duplicate VisualScript Nodes"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Hold Meta to drop a Getter. Hold Shift to drop a generic signature."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Hold Ctrl to drop a Getter. Hold Shift to drop a generic signature."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Hold Meta to drop a simple reference to the node."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Hold Ctrl to drop a simple reference to the node."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Hold Meta to drop a Variable Setter."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Hold Ctrl to drop a Variable Setter."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Preload Node"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node(s) From Tree"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Getter Property"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Setter Property"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change Base Type"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Move Node(s)"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove VisualScript Node"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Connect Nodes"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Condition"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Sequence"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Switch"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Iterator"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "While"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Return"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Call"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Get"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Script already has function '%s'"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change Input Value"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Can't copy the function node."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Clipboard is empty!"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Paste VisualScript Nodes"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Edit Variable"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Edit Signal"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Signal"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Variable:"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Signal:"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Base Type:"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Available Nodes:"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Select or create a function to edit graph"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Edit Signal Arguments:"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Edit Variable:"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Delete Selected"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Find Node Type"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Copy Nodes"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Cut Nodes"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Paste Nodes"
+msgstr ""
+
+#: modules/visual_script/visual_script_flow_control.cpp
+msgid "Input type not iterable: "
+msgstr ""
+
+#: modules/visual_script/visual_script_flow_control.cpp
+msgid "Iterator became invalid"
+msgstr ""
+
+#: modules/visual_script/visual_script_flow_control.cpp
+msgid "Iterator became invalid: "
+msgstr ""
+
+#: modules/visual_script/visual_script_func_nodes.cpp
+msgid "Invalid index property name."
+msgstr ""
+
+#: modules/visual_script/visual_script_func_nodes.cpp
+msgid "Base object is not a Node!"
+msgstr ""
+
+#: modules/visual_script/visual_script_func_nodes.cpp
+msgid "Path does not lead Node!"
+msgstr ""
+
+#: modules/visual_script/visual_script_func_nodes.cpp
+msgid "Invalid index property name '%s' in node %s."
+msgstr ""
+
+#: modules/visual_script/visual_script_nodes.cpp
+msgid ": Invalid argument of type: "
+msgstr ""
+
+#: modules/visual_script/visual_script_nodes.cpp
+msgid ": Invalid arguments: "
+msgstr ""
+
+#: modules/visual_script/visual_script_nodes.cpp
+msgid "VariableGet not found in script: "
+msgstr ""
+
+#: modules/visual_script/visual_script_nodes.cpp
+msgid "VariableSet not found in script: "
+msgstr ""
+
+#: modules/visual_script/visual_script_nodes.cpp
+msgid "Custom node has no _step() method, can't process graph."
+msgstr ""
+
+#: modules/visual_script/visual_script_nodes.cpp
+msgid ""
+"Invalid return value from _step(), must be integer (seq out), or string "
+"(error)."
+msgstr ""
+
+#: platform/javascript/export/export.cpp
+msgid "Run in Browser"
+msgstr ""
+
+#: platform/javascript/export/export.cpp
+msgid "Run exported HTML in the system's default browser."
+msgstr ""
+
+#: platform/javascript/export/export.cpp
+msgid "Could not write file:\n"
+msgstr ""
+
+#: platform/javascript/export/export.cpp
+msgid "Could not read file:\n"
+msgstr ""
+
+#: platform/javascript/export/export.cpp
+msgid "Could not open template for export:\n"
+msgstr ""
+
+#: scene/2d/animated_sprite.cpp
+msgid ""
+"A SpriteFrames resource must be created or set in the 'Frames' property in "
+"order for AnimatedSprite to display frames."
+msgstr ""
+
+#: scene/2d/canvas_modulate.cpp
+msgid ""
+"Only one visible CanvasModulate is allowed per scene (or set of instanced "
+"scenes). The first created one will work, while the rest will be ignored."
+msgstr ""
+
+#: scene/2d/collision_polygon_2d.cpp
+msgid ""
+"CollisionPolygon2D only serves to provide a collision shape to a "
+"CollisionObject2D derived node. Please only use it as a child of Area2D, "
+"StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."
+msgstr ""
+
+#: scene/2d/collision_polygon_2d.cpp
+msgid "An empty CollisionPolygon2D has no effect on collision."
+msgstr ""
+
+#: scene/2d/collision_shape_2d.cpp
+msgid ""
+"CollisionShape2D only serves to provide a collision shape to a "
+"CollisionObject2D derived node. Please only use it as a child of Area2D, "
+"StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."
+msgstr ""
+
+#: scene/2d/collision_shape_2d.cpp
+msgid ""
+"A shape must be provided for CollisionShape2D to function. Please create a "
+"shape resource for it!"
+msgstr ""
+
+#: scene/2d/light_2d.cpp
+msgid ""
+"A texture with the shape of the light must be supplied to the 'texture' "
+"property."
+msgstr ""
+
+#: scene/2d/light_occluder_2d.cpp
+msgid ""
+"An occluder polygon must be set (or drawn) for this occluder to take effect."
+msgstr ""
+
+#: scene/2d/light_occluder_2d.cpp
+msgid "The occluder polygon for this occluder is empty. Please draw a polygon!"
+msgstr ""
+
+#: scene/2d/navigation_polygon.cpp
+msgid ""
+"A NavigationPolygon resource must be set or created for this node to work. "
+"Please set a property or draw a polygon."
+msgstr ""
+
+#: scene/2d/navigation_polygon.cpp
+msgid ""
+"NavigationPolygonInstance must be a child or grandchild to a Navigation2D "
+"node. It only provides navigation data."
+msgstr ""
+
+#: scene/2d/parallax_layer.cpp
+msgid ""
+"ParallaxLayer node only works when set as child of a ParallaxBackground node."
+msgstr ""
+
+#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
+msgid ""
+"A material to process the particles is not assigned, so no behavior is "
+"imprinted."
+msgstr ""
+
+#: scene/2d/path_2d.cpp
+msgid "PathFollow2D only works when set as a child of a Path2D node."
+msgstr ""
+
+#: scene/2d/physics_body_2d.cpp
+msgid ""
+"Size changes to RigidBody2D (in character or rigid modes) will be overriden "
+"by the physics engine when running.\n"
+"Change the size in children collision shapes instead."
+msgstr ""
+
+#: scene/2d/remote_transform_2d.cpp
+msgid "Path property must point to a valid Node2D node to work."
+msgstr ""
+
+#: scene/2d/sprite.cpp
+msgid ""
+"Path property must point to a valid Viewport node to work. Such Viewport "
+"must be set to 'render target' mode."
+msgstr ""
+
+#: scene/2d/sprite.cpp
+msgid ""
+"The Viewport set in the path property must be set as 'render target' in "
+"order for this sprite to work."
+msgstr ""
+
+#: scene/2d/visibility_notifier_2d.cpp
+msgid ""
+"VisibilityEnable2D works best when used with the edited scene root directly "
+"as parent."
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
+msgid "ARVRCamera must have an ARVROrigin node as its parent"
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
+msgid "ARVRController must have an ARVROrigin node as its parent"
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
+msgid ""
+"The controller id must not be 0 or this controller will not be bound to an "
+"actual controller"
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
+msgid "ARVRAnchor must have an ARVROrigin node as its parent"
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
+msgid ""
+"The anchor id must not be 0 or this anchor will not be bound to an actual "
+"anchor"
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
+msgid "ARVROrigin requires an ARVRCamera child node"
+msgstr ""
+
+#: scene/3d/collision_polygon.cpp
+msgid ""
+"CollisionPolygon only serves to provide a collision shape to a "
+"CollisionObject derived node. Please only use it as a child of Area, "
+"StaticBody, RigidBody, KinematicBody, etc. to give them a shape."
+msgstr ""
+
+#: scene/3d/collision_polygon.cpp
+msgid "An empty CollisionPolygon has no effect on collision."
+msgstr ""
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"CollisionShape only serves to provide a collision shape to a CollisionObject "
+"derived node. Please only use it as a child of Area, StaticBody, RigidBody, "
+"KinematicBody, etc. to give them a shape."
+msgstr ""
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr ""
+
+#: scene/3d/navigation_mesh.cpp
+msgid "A NavigationMesh resource must be set or created for this node to work."
+msgstr ""
+
+#: scene/3d/navigation_mesh.cpp
+msgid ""
+"NavigationMeshInstance must be a child or grandchild to a Navigation node. "
+"It only provides navigation data."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
+"Nothing is visible because meshes have not been assigned to draw passes."
+msgstr ""
+
+#: scene/3d/physics_body.cpp
+msgid ""
+"Size changes to RigidBody (in character or rigid modes) will be overriden by "
+"the physics engine when running.\n"
+"Change the size in children collision shapes instead."
+msgstr ""
+
+#: scene/3d/remote_transform.cpp
+msgid "Path property must point to a valid Spatial node to work."
+msgstr ""
+
+#: scene/3d/scenario_fx.cpp
+msgid ""
+"Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."
+msgstr ""
+
+#: scene/3d/sprite_3d.cpp
+msgid ""
+"A SpriteFrames resource must be created or set in the 'Frames' property in "
+"order for AnimatedSprite3D to display frames."
+msgstr ""
+
+#: scene/3d/vehicle_body.cpp
+msgid ""
+"VehicleWheel serves to provide a wheel system to a VehicleBody. Please use "
+"it as a child of a VehicleBody."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Raw Mode"
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Add current color as a preset"
+msgstr ""
+
+#: scene/gui/dialogs.cpp
+msgid "Cancel"
+msgstr ""
+
+#: scene/gui/dialogs.cpp
+msgid "Alert!"
+msgstr ""
+
+#: scene/gui/dialogs.cpp
+msgid "Please Confirm..."
+msgstr ""
+
+#: scene/gui/popup.cpp
+msgid ""
+"Popups will hide by default unless you call popup() or any of the popup*() "
+"functions. Making them visible for editing is fine though, but they will "
+"hide upon running."
+msgstr ""
+
+#: scene/gui/scroll_container.cpp
+msgid ""
+"ScrollContainer is intended to work with a single child control.\n"
+"Use a container as child (VBox,HBox,etc), or a Control and set the custom "
+"minimum size manually."
+msgstr ""
+
+#: scene/main/scene_tree.cpp
+msgid ""
+"Default Environment as specified in Project Setings (Rendering -> Viewport -"
+"> Default Environment) could not be loaded."
+msgstr ""
+
+#: scene/main/viewport.cpp
+msgid ""
+"This viewport is not set as render target. If you intend for it to display "
+"its contents directly to the screen, make it a child of a Control so it can "
+"obtain a size. Otherwise, make it a RenderTarget and assign its internal "
+"texture to some node for display."
+msgstr ""
+
+#: scene/resources/dynamic_font.cpp
+msgid "Error initializing FreeType."
+msgstr ""
+
+#: scene/resources/dynamic_font.cpp
+msgid "Unknown font format."
+msgstr ""
+
+#: scene/resources/dynamic_font.cpp
+msgid "Error loading font."
+msgstr ""
+
+#: scene/resources/dynamic_font.cpp
+msgid "Invalid font size."
+msgstr ""
diff --git a/editor/translations/nb.po b/editor/translations/nb.po
index 04f87dde0b..b4c3df0fb9 100644
--- a/editor/translations/nb.po
+++ b/editor/translations/nb.po
@@ -1,5 +1,6 @@
# Norwegian Bokmål translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Anonymous <GentleSaucepan@protonmail.com>, 2017.
@@ -1209,10 +1210,6 @@ msgid "File:"
msgstr ""
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr ""
@@ -1655,19 +1652,24 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+msgid "Unable to load addon script from path: '%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2187,7 +2189,7 @@ msgid "Frame %"
msgstr ""
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+msgid "Physics Frame %"
msgstr ""
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3838,7 +3840,7 @@ msgid "Eroding walkable area..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4300,7 +4302,8 @@ msgstr ""
msgid "Break"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr ""
@@ -4394,7 +4397,8 @@ msgid "Cut"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr ""
@@ -5152,7 +5156,11 @@ msgid "Remove All"
msgstr "Fjern Funksjon"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
@@ -5436,7 +5444,7 @@ msgid "Export With Debug"
msgstr ""
#: editor/project_manager.cpp
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr ""
#: editor/project_manager.cpp
@@ -5564,6 +5572,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5593,6 +5607,10 @@ msgid "Exit"
msgstr ""
#: editor/project_manager.cpp
+msgid "Restart Now"
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Can't run project"
msgstr ""
@@ -5815,6 +5833,14 @@ msgid "Remove Resource Remap Option"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
@@ -5875,6 +5901,27 @@ msgid "Locale"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show all locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "Lim inn Noder"
+
+#: editor/project_settings_editor.cpp
+msgid "Locales:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
diff --git a/editor/translations/nl.po b/editor/translations/nl.po
index 5a5665675b..a9ed678eac 100644
--- a/editor/translations/nl.po
+++ b/editor/translations/nl.po
@@ -1,22 +1,24 @@
# Dutch translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Aram Nap <xyphex.aram@gmail.com>, 2017.
+# Robin Arys <robinarys@hotmail.com>, 2017.
# Senno Kaasjager <senno.kaasjager@gmail.com>, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2017-09-19 22:45+0000\n"
-"Last-Translator: Senno Kaasjager <senno.kaasjager@gmail.com>\n"
+"PO-Revision-Date: 2017-10-25 23:45+0000\n"
+"Last-Translator: Robin Arys <robinarys@hotmail.com>\n"
"Language-Team: Dutch <https://hosted.weblate.org/projects/godot-engine/godot/"
"nl/>\n"
"Language: nl\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 2.17-dev\n"
+"X-Generator: Weblate 2.17\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -85,7 +87,7 @@ msgstr "Anim Track Wijzig Waarde Modus"
#: editor/animation_editor.cpp
#, fuzzy
msgid "Anim Track Change Wrap Mode"
-msgstr "Anim Track Wijzig Waarde Modus"
+msgstr "Animatiespoor Wijzig Wikkelmodus"
#: editor/animation_editor.cpp
msgid "Edit Node Curve"
@@ -279,7 +281,7 @@ msgstr "Verwijder geselecteerde track."
#: editor/animation_editor.cpp
msgid "Track tools"
-msgstr "Track tools"
+msgstr "Spoorgereedschappen"
#: editor/animation_editor.cpp
msgid "Enable editing of individual keys by clicking them."
@@ -312,7 +314,7 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Key"
-msgstr "Key"
+msgstr "Sleutel"
#: editor/animation_editor.cpp
msgid "Transition"
@@ -576,7 +578,7 @@ msgstr "Zoeken:"
#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/quick_open.cpp
msgid "Matches:"
-msgstr "Matches:"
+msgstr "Overeenkomsten:"
#: editor/create_dialog.cpp editor/editor_help.cpp
#: editor/plugins/asset_library_editor_plugin.cpp editor/property_selector.cpp
@@ -660,7 +662,7 @@ msgstr ""
#: editor/dependency_editor.cpp
msgid "Cannot remove:\n"
-msgstr ""
+msgstr "Niet wisbaar:\n"
#: editor/dependency_editor.cpp
msgid "Error loading:"
@@ -715,71 +717,71 @@ msgstr "Verwijder"
#: editor/editor_about.cpp
msgid "Thanks from the Godot community!"
-msgstr ""
+msgstr "Bedankt van de Godot gemeenschap!"
#: editor/editor_about.cpp
msgid "Thanks!"
-msgstr ""
+msgstr "Bedankt!"
#: editor/editor_about.cpp
msgid "Godot Engine contributors"
-msgstr ""
+msgstr "Godot Engine medewerkers"
#: editor/editor_about.cpp
msgid "Project Founders"
-msgstr ""
+msgstr "Projectoprichters"
#: editor/editor_about.cpp
msgid "Lead Developer"
-msgstr ""
+msgstr "Hoofdontwikkelaar"
#: editor/editor_about.cpp editor/project_manager.cpp
msgid "Project Manager"
-msgstr ""
+msgstr "Project Manager"
#: editor/editor_about.cpp
msgid "Developers"
-msgstr ""
+msgstr "Ontwikkelaars"
#: editor/editor_about.cpp
msgid "Authors"
-msgstr ""
+msgstr "Auteurs"
#: editor/editor_about.cpp
msgid "Platinum Sponsors"
-msgstr ""
+msgstr "Platina Sponsors"
#: editor/editor_about.cpp
msgid "Gold Sponsors"
-msgstr ""
+msgstr "Gouden Sponsors"
#: editor/editor_about.cpp
msgid "Mini Sponsors"
-msgstr ""
+msgstr "Mini Sponsors"
#: editor/editor_about.cpp
msgid "Gold Donors"
-msgstr ""
+msgstr "Gouden Donors"
#: editor/editor_about.cpp
msgid "Silver Donors"
-msgstr ""
+msgstr "Zilveren Donors"
#: editor/editor_about.cpp
msgid "Bronze Donors"
-msgstr ""
+msgstr "Bronzen Donors"
#: editor/editor_about.cpp
msgid "Donors"
-msgstr ""
+msgstr "Donors"
#: editor/editor_about.cpp
msgid "License"
-msgstr ""
+msgstr "Licentie"
#: editor/editor_about.cpp
msgid "Thirdparty License"
-msgstr ""
+msgstr "Derde partijslicentie"
#: editor/editor_about.cpp
msgid ""
@@ -788,33 +790,34 @@ msgid ""
"is an exhaustive list of all such thirdparty components with their "
"respective copyright statements and license terms."
msgstr ""
+"Godot Engine maakt gebruik van enkele gratis en open-source bibliotheken, "
+"ontwikkeld door derden, die compatibel zijn met onze MIT licentie. Wat volgt "
+"is een exhaustieve lijst van alle componenten van een derde partij met hun "
+"respectievelijke copyrightberichten en licentietermen."
#: editor/editor_about.cpp
-#, fuzzy
msgid "All Components"
-msgstr "Constanten:"
+msgstr "Alle Componenten"
#: editor/editor_about.cpp
-#, fuzzy
msgid "Components"
-msgstr "Constanten:"
+msgstr "Componenten"
#: editor/editor_about.cpp
msgid "Licenses"
-msgstr ""
+msgstr "Licenties"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
msgid "Error opening package file, not in zip format."
-msgstr ""
+msgstr "Fout bij het openen van het pakketbestand, geen zip-formaat."
#: editor/editor_asset_installer.cpp
-#, fuzzy
msgid "Uncompressing Assets"
-msgstr "Aan Het Herimporteren"
+msgstr "Bronnen aan het uitpakken"
#: editor/editor_asset_installer.cpp editor/project_manager.cpp
msgid "Package Installed Successfully!"
-msgstr ""
+msgstr "Pakket Succesvol Geïnstalleerd!"
#: editor/editor_asset_installer.cpp
#: editor/plugins/asset_library_editor_plugin.cpp
@@ -828,115 +831,105 @@ msgstr "Installeer"
#: editor/editor_asset_installer.cpp
msgid "Package Installer"
-msgstr ""
+msgstr "Pakketinstalleerder"
#: editor/editor_audio_buses.cpp
msgid "Speakers"
-msgstr ""
+msgstr "Luidsprekers"
#: editor/editor_audio_buses.cpp
msgid "Add Effect"
-msgstr ""
+msgstr "Geluidseffect Toevoegen"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Rename Audio Bus"
-msgstr "Open Audio Bus Layout"
+msgstr "Hernoem audiobus"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Toggle Audio Bus Solo"
-msgstr "Open Audio Bus Layout"
+msgstr "Verander audiobus solo"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Toggle Audio Bus Mute"
-msgstr "Open Audio Bus Layout"
+msgstr "Verander audiobus stil"
#: editor/editor_audio_buses.cpp
msgid "Toggle Audio Bus Bypass Effects"
-msgstr ""
+msgstr "Verander audiobusomleiding"
#: editor/editor_audio_buses.cpp
+#, fuzzy
msgid "Select Audio Bus Send"
-msgstr ""
+msgstr "Selecteer audiobus verzend"
#: editor/editor_audio_buses.cpp
msgid "Add Audio Bus Effect"
-msgstr ""
+msgstr "Voeg audiobuseffect toe"
#: editor/editor_audio_buses.cpp
msgid "Move Bus Effect"
-msgstr ""
+msgstr "Verplaats audiobuseffect"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Delete Bus Effect"
-msgstr "Geselecteerde Verwijderen"
+msgstr "Verwijder audiobuseffect"
#: editor/editor_audio_buses.cpp
msgid "Audio Bus, Drag and Drop to rearrange."
-msgstr ""
+msgstr "Audiobus, versleep om volgorde te veranderen."
#: editor/editor_audio_buses.cpp
msgid "Solo"
-msgstr ""
+msgstr "Solo"
#: editor/editor_audio_buses.cpp
msgid "Mute"
-msgstr ""
+msgstr "Stil"
#: editor/editor_audio_buses.cpp
msgid "Bypass"
-msgstr ""
+msgstr "Omleiden"
#: editor/editor_audio_buses.cpp
msgid "Bus options"
-msgstr ""
+msgstr "Audiobusopties"
#: editor/editor_audio_buses.cpp editor/plugins/tile_map_editor_plugin.cpp
#: editor/scene_tree_dock.cpp
msgid "Duplicate"
-msgstr ""
+msgstr "Dupliceren"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Reset Volume"
-msgstr "Reset Zoom"
+msgstr "Herstel Volume"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Delete Effect"
-msgstr "Geselecteerde Verwijderen"
+msgstr "Effect Verwijderen"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Add Audio Bus"
-msgstr "Bus Toevoegen"
+msgstr "Audiobus Toevoegen"
#: editor/editor_audio_buses.cpp
msgid "Master bus can't be deleted!"
-msgstr ""
+msgstr "Hoofdaudiobus kan niet verwijderd worden!"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Delete Audio Bus"
-msgstr "Optimaliseer Animatie"
+msgstr "Verwijder audiobus"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Duplicate Audio Bus"
-msgstr "Dupliceer Selectie"
+msgstr "Dupliceer Audiobus"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Reset Bus Volume"
-msgstr "Reset Zoom"
+msgstr "Reset Audiobus Volume"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Move Audio Bus"
-msgstr "Open Audio Bus Layout"
+msgstr "Verplaats audiobus"
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
@@ -952,20 +945,19 @@ msgstr "Open Audio Bus Lay-out"
#: editor/editor_audio_buses.cpp
msgid "There is no 'res://default_bus_layout.tres' file."
-msgstr ""
+msgstr "Er is geen 'res://default_bus_layout.tres' bestand."
#: editor/editor_audio_buses.cpp
msgid "Invalid file, not an audio bus layout."
-msgstr ""
+msgstr "Ongeldig bestand, geen audiobus layout."
#: editor/editor_audio_buses.cpp
msgid "Add Bus"
msgstr "Bus Toevoegen"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Create a new Bus Layout."
-msgstr "Sla Audio Bus Layout Op Als.."
+msgstr "Maak een nieuwe audiobus layout."
#: editor/editor_audio_buses.cpp editor/property_editor.cpp
#: editor/script_create_dialog.cpp
@@ -974,7 +966,7 @@ msgstr "Laden"
#: editor/editor_audio_buses.cpp
msgid "Load an existing Bus Layout."
-msgstr ""
+msgstr "Laad een bestaand audiobus layout."
#: editor/editor_audio_buses.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -982,18 +974,16 @@ msgid "Save As"
msgstr "Opslaan Als"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Save this Bus Layout to a file."
-msgstr "Sla Audio Bus Layout Op Als.."
+msgstr "Sla deze audiobus layout op in een bestand."
#: editor/editor_audio_buses.cpp editor/import_dock.cpp
-#, fuzzy
msgid "Load Default"
-msgstr "Standaard"
+msgstr "Laad Standaard"
#: editor/editor_audio_buses.cpp
msgid "Load the default Bus Layout."
-msgstr ""
+msgstr "Laad de standaard audiobus layout."
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
@@ -1044,7 +1034,7 @@ msgstr "Autoload Hernoemen"
#: editor/editor_autoload_settings.cpp
msgid "Toggle AutoLoad Globals"
-msgstr "Toggle AutoLoad Globals"
+msgstr "AutoLoad-Globalen omschakelen"
#: editor/editor_autoload_settings.cpp
msgid "Move Autoload"
@@ -1097,7 +1087,7 @@ msgstr "Scene aan het updaten.."
#: editor/editor_dir_dialog.cpp
msgid "Please select a base directory first"
-msgstr ""
+msgstr "Kies eerst een basisfolder"
#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
@@ -1125,12 +1115,10 @@ msgid "Choose"
msgstr "Kies"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Storing File:"
-msgstr "Opslag Bestand:"
+msgstr "Bestand Opslaan:"
#: editor/editor_export.cpp
-#, fuzzy
msgid "Packing"
msgstr "Inpakken"
@@ -1223,9 +1211,8 @@ msgid "Move Favorite Down"
msgstr "Verplaats Favoriet Naar Beneden"
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Go to parent folder"
-msgstr "Map kon niet gemaakt worden."
+msgstr "Ga naar bovenliggende folder"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
@@ -1233,7 +1220,7 @@ msgstr "Mappen & Bestanden:"
#: editor/editor_file_dialog.cpp
msgid "Preview:"
-msgstr "Preview:"
+msgstr "Voorbeeld:"
#: editor/editor_file_dialog.cpp editor/script_editor_debugger.cpp
#: scene/gui/file_dialog.cpp
@@ -1241,10 +1228,6 @@ msgid "File:"
msgstr "Bestand:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "Filter:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "Een geldige extensie moet gebruikt worden."
@@ -1254,9 +1237,8 @@ msgid "ScanSources"
msgstr "Scan Bronnen"
#: editor/editor_file_system.cpp
-#, fuzzy
msgid "(Re)Importing Assets"
-msgstr "Aan Het Herimporteren"
+msgstr "Bronnen (Her)Importeren"
#: editor/editor_help.cpp editor/editor_node.cpp
#: editor/plugins/script_editor_plugin.cpp
@@ -1273,7 +1255,7 @@ msgstr "Zoek Klasses"
#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
msgid "Top"
-msgstr ""
+msgstr "Boven"
#: editor/editor_help.cpp editor/property_editor.cpp
msgid "Class:"
@@ -1292,27 +1274,24 @@ msgid "Brief Description:"
msgstr "Korte Beschrijving:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Members"
-msgstr "Leden:"
+msgstr "Leden"
#: editor/editor_help.cpp modules/visual_script/visual_script_editor.cpp
msgid "Members:"
msgstr "Leden:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Public Methods"
-msgstr "Publieke Methodes:"
+msgstr "Publieke Methodes"
#: editor/editor_help.cpp
msgid "Public Methods:"
msgstr "Publieke Methodes:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "GUI Theme Items"
-msgstr "GUI Thema Items:"
+msgstr "GUI Thema Items"
#: editor/editor_help.cpp
msgid "GUI Theme Items:"
@@ -1323,36 +1302,32 @@ msgid "Signals:"
msgstr "Signalen:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Enumerations"
-msgstr "Functies:"
+msgstr "Enumeraties"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Enumerations:"
-msgstr "Functies:"
+msgstr "Enumeraties:"
#: editor/editor_help.cpp
msgid "enum "
-msgstr ""
+msgstr "enum "
#: editor/editor_help.cpp
-#, fuzzy
msgid "Constants"
-msgstr "Constanten:"
+msgstr "Constanten"
#: editor/editor_help.cpp
msgid "Constants:"
msgstr "Constanten:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Description"
-msgstr "Omschrijving:"
+msgstr "Beschrijving"
#: editor/editor_help.cpp
msgid "Properties"
-msgstr ""
+msgstr "Eigenschappen"
#: editor/editor_help.cpp
msgid "Property Description:"
@@ -1363,11 +1338,12 @@ msgid ""
"There is currently no description for this property. Please help us by "
"[color=$color][url=$url]contributing one[/url][/color]!"
msgstr ""
+"Er is momenteel geen beschrijving voor deze eigenschap. Help ons alsjeblieft "
+"door [color=$color][url=$url]een toe te voegen[/url][/color]!"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Methods"
-msgstr "Methode Lijst:"
+msgstr "Methodes"
#: editor/editor_help.cpp
msgid "Method Description:"
@@ -1378,15 +1354,16 @@ msgid ""
"There is currently no description for this method. Please help us by [color="
"$color][url=$url]contributing one[/url][/color]!"
msgstr ""
+"Er is momenteel geen beschrijving voor deze methode. Help ons alsjeblieft "
+"door [color=$color][url=$url]een toe te voegen[/url][/color]!"
#: editor/editor_help.cpp
msgid "Search Text"
msgstr "Zoek Tekst"
#: editor/editor_log.cpp
-#, fuzzy
msgid "Output:"
-msgstr " Uitvoer:"
+msgstr "Uitvoer:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
#: editor/property_editor.cpp editor/script_editor_debugger.cpp
@@ -1404,7 +1381,6 @@ msgstr "Resource Opslaan Als.."
#: editor/editor_node.cpp editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
-#, fuzzy
msgid "I see.."
msgstr "Ik snap het.."
@@ -1418,30 +1394,27 @@ msgstr "Opgevraagde bestandsformaat onbekend:"
#: editor/editor_node.cpp
msgid "Error while saving."
-msgstr "Error bij het opslaan."
+msgstr "Fout bij het opslaan."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Can't open '%s'."
-msgstr "Kan niet verbinden."
+msgstr "Kan '%s' niet openen."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Error while parsing '%s'."
-msgstr "Error bij het opslaan."
+msgstr "Fout tijdens het parsen van '%s'."
#: editor/editor_node.cpp
msgid "Unexpected end of file '%s'."
-msgstr ""
+msgstr "Onverwacht einde van het bestand '%s'."
#: editor/editor_node.cpp
msgid "Missing '%s' or its dependencies."
-msgstr ""
+msgstr "'%s' of zijn afhankelijkheden ontbreken."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Error while loading '%s'."
-msgstr "Error bij het opslaan."
+msgstr "Fout tijdens het laden van '%s'."
#: editor/editor_node.cpp
msgid "Saving Scene"
@@ -1457,7 +1430,7 @@ msgstr "Thumbnail Aan Het Maken"
#: editor/editor_node.cpp
msgid "This operation can't be done without a tree root."
-msgstr ""
+msgstr "Deze operatie kan niet gedaan worden zonder boomwortel."
#: editor/editor_node.cpp
msgid ""
@@ -1492,7 +1465,7 @@ msgstr "Error bij het opslaan van layout!"
#: editor/editor_node.cpp
msgid "Default editor layout overridden."
-msgstr ""
+msgstr "Standaard editor layout overschreven."
#: editor/editor_node.cpp
msgid "Layout name not found!"
@@ -1500,26 +1473,36 @@ msgstr "Lay-out naam niet gevonden!"
#: editor/editor_node.cpp
msgid "Restored default layout to base settings."
-msgstr ""
+msgstr "Standaard layout hersteld naar basisinstellingen."
#: editor/editor_node.cpp
+#, fuzzy
msgid ""
"This resource belongs to a scene that was imported, so it's not editable.\n"
"Please read the documentation relevant to importing scenes to better "
"understand this workflow."
msgstr ""
+"Dit bestand hoort bij een scene die geïmporteerd werd, dus het is niet "
+"bewerkbaar.\n"
+"Lees de documentatie over scenes importeren om deze workflow beter te "
+"begrijpen."
#: editor/editor_node.cpp
msgid ""
"This resource belongs to a scene that was instanced or inherited.\n"
"Changes to it will not be kept when saving the current scene."
msgstr ""
+"Dit bestand hoort bij een scene die werd geïnstantieerd of overgeërfd.\n"
+"Aanpassingen zullen niet worden bijgehouden bij het opslaan van de huidige "
+"scene."
#: editor/editor_node.cpp
msgid ""
"This resource was imported, so it's not editable. Change its settings in the "
"import panel and then re-import."
msgstr ""
+"Dit bestand werd geïmporteerd, dus het is niet bewerkbaar. Pas de "
+"instellingen aan in het importeerpaneel en importeer het nadien opnieuw."
#: editor/editor_node.cpp
msgid ""
@@ -1528,38 +1511,43 @@ msgid ""
"Please read the documentation relevant to importing scenes to better "
"understand this workflow."
msgstr ""
+"Deze scene werd geïmporteerd, dus aanpassingen zullen niet worden "
+"opgeslagen.\n"
+"Instantieer het of erf het over om er aanpassingen aan te maken.\n"
+"Lees de documentatie over scenes importeren om deze workflow beter te "
+"begrijpen."
#: editor/editor_node.cpp
msgid "Copy Params"
-msgstr ""
+msgstr "Kopieer Parameters"
#: editor/editor_node.cpp
msgid "Paste Params"
-msgstr ""
+msgstr "Plak Parameters"
#: editor/editor_node.cpp editor/plugins/resource_preloader_editor_plugin.cpp
msgid "Paste Resource"
-msgstr ""
+msgstr "Plak Bron"
#: editor/editor_node.cpp
msgid "Copy Resource"
-msgstr ""
+msgstr "Kopieer Bron"
#: editor/editor_node.cpp
msgid "Make Built-In"
-msgstr ""
+msgstr "Integreer"
#: editor/editor_node.cpp
msgid "Make Sub-Resources Unique"
-msgstr ""
+msgstr "Maak Onderliggende Bronnen Uniek"
#: editor/editor_node.cpp
msgid "Open in Help"
-msgstr ""
+msgstr "Open in Help"
#: editor/editor_node.cpp
msgid "There is no defined scene to run."
-msgstr ""
+msgstr "Er is geen startscene gedefinieerd."
#: editor/editor_node.cpp
msgid ""
@@ -1567,6 +1555,9 @@ msgid ""
"You can change it later in \"Project Settings\" under the 'application' "
"category."
msgstr ""
+"Er is nooit een hoofdscene gekozen, wil je er een selecteren?\n"
+"Je kan dit later nog aanpassen in \"Projectinstellingen\" onder de categorie "
+"'toepassing'."
#: editor/editor_node.cpp
msgid ""
@@ -1574,6 +1565,9 @@ msgid ""
"You can change it later in \"Project Settings\" under the 'application' "
"category."
msgstr ""
+"De geselecteerde scene '%s' bestaat niet, selecteer een andere?\n"
+"Je kan dit later aanpassen in \"Projectinstellingen\" onder de categorie "
+"'toepassing'."
#: editor/editor_node.cpp
msgid ""
@@ -1581,175 +1575,197 @@ msgid ""
"You can change it later in \"Project Settings\" under the 'application' "
"category."
msgstr ""
+"De geselecteerde scene '%s' is geen scenebestand, selecteer een andere?\n"
+"Je kan dit later aanpassen in \"Projectinstellingen\" onder de categorie "
+"'toepassing'."
#: editor/editor_node.cpp
msgid "Current scene was never saved, please save it prior to running."
-msgstr ""
+msgstr "De huidige scene werd nooit opgeslagen, sla ze op voor het uitvoeren."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
-msgstr ""
+msgstr "Kon het subproces niet opstarten!"
#: editor/editor_node.cpp
msgid "Open Scene"
-msgstr ""
+msgstr "Scene Openen"
#: editor/editor_node.cpp
msgid "Open Base Scene"
-msgstr ""
+msgstr "Open Basisscene"
#: editor/editor_node.cpp
msgid "Quick Open Scene.."
-msgstr ""
+msgstr "Open Scene Snel..."
#: editor/editor_node.cpp
msgid "Quick Open Script.."
-msgstr ""
+msgstr "Open Script Snel..."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Save & Close"
-msgstr "Sla een Bestand Op"
+msgstr "Opslaan & Sluiten"
#: editor/editor_node.cpp
msgid "Save changes to '%s' before closing?"
-msgstr ""
+msgstr "Sla wijzigen aan '%s' op voor het afsluiten?"
#: editor/editor_node.cpp
msgid "Save Scene As.."
-msgstr ""
+msgstr "Sla Scene Op Als..."
#: editor/editor_node.cpp
msgid "No"
-msgstr ""
+msgstr "Nee"
#: editor/editor_node.cpp
msgid "Yes"
-msgstr ""
+msgstr "Ja"
#: editor/editor_node.cpp
msgid "This scene has never been saved. Save before running?"
-msgstr ""
+msgstr "Deze scene is nooit opgeslagen. Sla op voor het uitvoeren?"
#: editor/editor_node.cpp editor/scene_tree_dock.cpp
msgid "This operation can't be done without a scene."
-msgstr ""
+msgstr "Deze operatie kan niet uitgevoerd worden zonder scene."
#: editor/editor_node.cpp
msgid "Export Mesh Library"
-msgstr ""
+msgstr "Exporteer Mesh Library"
#: editor/editor_node.cpp
msgid "Export Tile Set"
-msgstr ""
+msgstr "Exporteer Tile Set"
#: editor/editor_node.cpp
msgid "This operation can't be done without a selected node."
msgstr ""
+"Deze operatie kan niet uitgevoerd worden zonder een geselecteerde knoop."
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
-msgstr ""
+msgstr "De huidige scene is nog niet opgeslagen. Toch openen?"
#: editor/editor_node.cpp
msgid "Can't reload a scene that was never saved."
-msgstr ""
+msgstr "Een scene die nooit opgeslagen is kan je niet opnieuw laden."
#: editor/editor_node.cpp
msgid "Revert"
-msgstr ""
+msgstr "Herstellen"
#: editor/editor_node.cpp
msgid "This action cannot be undone. Revert anyway?"
-msgstr ""
+msgstr "Deze actie kan niet ongedaan gemaakt worden. Toch herstellen?"
#: editor/editor_node.cpp
msgid "Quick Run Scene.."
-msgstr ""
+msgstr "Snel Scene Uitvoeren..."
#: editor/editor_node.cpp
msgid "Quit"
-msgstr ""
+msgstr "Afsluiten"
#: editor/editor_node.cpp
msgid "Exit the editor?"
-msgstr ""
+msgstr "Sluit de editor af?"
#: editor/editor_node.cpp
msgid "Open Project Manager?"
-msgstr ""
+msgstr "Open de Project Manager?"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Save & Quit"
-msgstr "Sla een Bestand Op"
+msgstr "Opslaan & Afsluiten"
#: editor/editor_node.cpp
msgid "Save changes to the following scene(s) before quitting?"
msgstr ""
+"Wil je de wijzigen aan de volgende scene(s) opslaan voor het afsluiten?"
#: editor/editor_node.cpp
msgid "Save changes the following scene(s) before opening Project Manager?"
msgstr ""
+"Wil je de wijzigen aan de volgende scene(s) opslaan voor de Project Manager "
+"opent?"
#: editor/editor_node.cpp
msgid ""
"This option is deprecated. Situations where refresh must be forced are now "
"considered a bug. Please report."
msgstr ""
+"Deze optie is verouderd. Situaties waar een hernieuwing geforceerd moet "
+"worden zijn softwarefouten. Rapporteer dit alsjeblieft."
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
-msgstr ""
+msgstr "Kies een Hoofdscene"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
-msgstr ""
+#, fuzzy
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
+msgstr "Onmogelijk om de plugin op: '"
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
-msgstr ""
+#, fuzzy
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
+msgstr "Onmogelijk om scriptveld te vinden voor de plugin op: 'res://addons/"
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
-msgstr ""
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "Volgend script kon niet geladen worden: '"
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
-msgstr ""
+#, fuzzy
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
+msgstr "Volgend script kon niet geladen worden: '"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
+msgstr "Volgend script kon niet geladen worden: '"
#: editor/editor_node.cpp
msgid ""
"Scene '%s' was automatically imported, so it can't be modified.\n"
"To make changes to it, a new inherited scene can be created."
msgstr ""
+"Scene '%s' werd automatisch geïmporteerd, dus ze kan niet aangepast worden.\n"
+"Om aanpassingen te doen kan je een erfende scene aanmaken."
#: editor/editor_node.cpp editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "Ugh"
-msgstr ""
+msgstr "Oeps"
#: editor/editor_node.cpp
msgid ""
"Error loading scene, it must be inside the project path. Use 'Import' to "
"open the scene, then save it inside the project path."
msgstr ""
+"Fout tijdens het laden van de scene, ze moet zich in het projectpad "
+"bevinden. Gebruik 'Importeer' om de scene te openen en sla ze nadien ergens "
+"in het projectpad op."
#: editor/editor_node.cpp
msgid "Scene '%s' has broken dependencies:"
-msgstr ""
+msgstr "De scene '%s' heeft kapotte afhankelijkheden:"
#: editor/editor_node.cpp
msgid "Clear Recent Scenes"
-msgstr ""
+msgstr "Maak Leeg"
#: editor/editor_node.cpp
msgid "Save Layout"
-msgstr ""
+msgstr "Layout Opslaan"
#: editor/editor_node.cpp
msgid "Delete Layout"
-msgstr ""
+msgstr "Layout Verwijderen"
#: editor/editor_node.cpp editor/import_dock.cpp
#: editor/script_create_dialog.cpp
@@ -1758,87 +1774,87 @@ msgstr "Standaard"
#: editor/editor_node.cpp
msgid "Switch Scene Tab"
-msgstr ""
+msgstr "Scenetab Wisselen"
#: editor/editor_node.cpp
msgid "%d more file(s)"
-msgstr ""
+msgstr "nog %d bestand(en)"
#: editor/editor_node.cpp
msgid "%d more file(s) or folder(s)"
-msgstr ""
+msgstr "nog %d bestand(en) of folder(s)"
#: editor/editor_node.cpp
msgid "Distraction Free Mode"
-msgstr ""
+msgstr "Afleidingsvrije Modus"
#: editor/editor_node.cpp
msgid "Toggle distraction-free mode."
-msgstr ""
+msgstr "Afleidingsvrije modus veranderen."
#: editor/editor_node.cpp
msgid "Scene"
-msgstr ""
+msgstr "Scène"
#: editor/editor_node.cpp
msgid "Go to previously opened scene."
-msgstr ""
+msgstr "Ga naar de vorige geopende scene."
#: editor/editor_node.cpp
msgid "Next tab"
-msgstr ""
+msgstr "Volgend tabblad"
#: editor/editor_node.cpp
msgid "Previous tab"
-msgstr ""
+msgstr "Vorig tabblad"
#: editor/editor_node.cpp
msgid "Filter Files.."
-msgstr ""
+msgstr "Bestanden Filteren..."
#: editor/editor_node.cpp
msgid "Operations with scene files."
-msgstr ""
+msgstr "Operaties met scenebestanden."
#: editor/editor_node.cpp
msgid "New Scene"
-msgstr ""
+msgstr "Nieuwe Scene"
#: editor/editor_node.cpp
msgid "New Inherited Scene.."
-msgstr ""
+msgstr "Nieuwe Geërfde Scene..."
#: editor/editor_node.cpp
msgid "Open Scene.."
-msgstr ""
+msgstr "Scene Openen..."
#: editor/editor_node.cpp
msgid "Save Scene"
-msgstr ""
+msgstr "Scene Opslaan"
#: editor/editor_node.cpp
msgid "Save all Scenes"
-msgstr ""
+msgstr "Alle Scenes Opslaan"
#: editor/editor_node.cpp
msgid "Close Scene"
-msgstr ""
+msgstr "Scene Sluiten"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
-msgstr ""
+msgstr "Recente Scenes Openen"
#: editor/editor_node.cpp
msgid "Convert To.."
-msgstr ""
+msgstr "Converteer Naar..."
#: editor/editor_node.cpp
msgid "MeshLibrary.."
-msgstr ""
+msgstr "MeshLibrary..."
#: editor/editor_node.cpp
msgid "TileSet.."
-msgstr ""
+msgstr "TileSet..."
#: editor/editor_node.cpp editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp scene/gui/line_edit.cpp
@@ -1849,57 +1865,59 @@ msgstr "Ongedaan Maken"
#: editor/editor_node.cpp editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
msgid "Redo"
-msgstr ""
+msgstr "Opnieuw"
#: editor/editor_node.cpp
msgid "Revert Scene"
-msgstr ""
+msgstr "Scene Herstellen"
#: editor/editor_node.cpp
msgid "Miscellaneous project or scene-wide tools."
-msgstr ""
+msgstr "Diverse project of scene-brede gereedschappen."
#: editor/editor_node.cpp
msgid "Project"
-msgstr ""
+msgstr "Project"
#: editor/editor_node.cpp
msgid "Project Settings"
-msgstr ""
+msgstr "Projectinstellingen"
#: editor/editor_node.cpp
msgid "Run Script"
-msgstr ""
+msgstr "Voer Script Uit"
#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export"
-msgstr ""
+msgstr "Exporteren"
#: editor/editor_node.cpp
msgid "Tools"
-msgstr ""
+msgstr "Gereedschappen"
#: editor/editor_node.cpp
msgid "Quit to Project List"
-msgstr ""
+msgstr "Sluit af naar Projectlijst"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Debug"
-msgstr ""
+msgstr "Debuggen"
#: editor/editor_node.cpp
msgid "Deploy with Remote Debug"
-msgstr ""
+msgstr "Start met Debuggen op Afstand"
#: editor/editor_node.cpp
msgid ""
"When exporting or deploying, the resulting executable will attempt to "
"connect to the IP of this computer in order to be debugged."
msgstr ""
+"Na het exporteren of opstarten van het programma zal het proberen verbinding "
+"maken met het IP-adres van deze computer zodat het gedebugd kan worden."
#: editor/editor_node.cpp
msgid "Small Deploy with Network FS"
-msgstr ""
+msgstr "Kleine Deployatie over het Netwerk"
#: editor/editor_node.cpp
msgid ""
@@ -1913,7 +1931,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Visible Collision Shapes"
-msgstr ""
+msgstr "Collision Shapes Zichtbaar"
#: editor/editor_node.cpp
msgid ""
@@ -1923,7 +1941,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Visible Navigation"
-msgstr ""
+msgstr "Navigatie Zichtbaar"
#: editor/editor_node.cpp
msgid ""
@@ -2240,7 +2258,7 @@ msgid "Frame %"
msgstr ""
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+msgid "Physics Frame %"
msgstr ""
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3910,7 +3928,7 @@ msgid "Eroding walkable area..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4373,7 +4391,8 @@ msgstr ""
msgid "Break"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr ""
@@ -4469,7 +4488,8 @@ msgid "Cut"
msgstr "Knippen"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "Kopiëren"
@@ -5235,7 +5255,11 @@ msgid "Remove All"
msgstr "Verwijderen"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
@@ -5526,7 +5550,7 @@ msgstr ""
#: editor/project_manager.cpp
#, fuzzy
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr "Bestand bestaat niet."
#: editor/project_manager.cpp
@@ -5657,6 +5681,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5687,6 +5717,10 @@ msgid "Exit"
msgstr ""
#: editor/project_manager.cpp
+msgid "Restart Now"
+msgstr ""
+
+#: editor/project_manager.cpp
#, fuzzy
msgid "Can't run project"
msgstr "Verbind.."
@@ -5913,6 +5947,14 @@ msgid "Remove Resource Remap Option"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
@@ -5973,6 +6015,27 @@ msgid "Locale"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show all locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "Filter:"
+
+#: editor/project_settings_editor.cpp
+msgid "Locales:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -7563,6 +7626,12 @@ msgstr "Error bij het laden van lettertype."
msgid "Invalid font size."
msgstr "Ongeldige lettertype grootte."
+#~ msgid "Filter:"
+#~ msgstr "Filter:"
+
+#~ msgid "' parsing of config failed."
+#~ msgstr "' te activeren. Het configuratiebestand kon niet gelezen worden."
+
#~ msgid "Method List For '%s':"
#~ msgstr "Methodelijst voor '%s':"
diff --git a/editor/translations/pl.po b/editor/translations/pl.po
index 297cc89d14..1d14c94e1f 100644
--- a/editor/translations/pl.po
+++ b/editor/translations/pl.po
@@ -1,5 +1,6 @@
# Polish translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# 8-bit Pixel <dawdejw@gmail.com>, 2016.
@@ -11,13 +12,14 @@
# Maksymilian Świąć <maksymilian.swiac@gmail.com>, 2017.
# Mietek Szcześniak <ravaging@go2.pl>, 2016.
# Rafal Brozio <rafal.brozio@gmail.com>, 2016.
+# Sebastian Krzyszkowiak <dos@dosowisko.net>, 2017.
# siatek papieros <sbigneu@gmail.com>, 2016.
#
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2017-06-26 08:24+0000\n"
-"Last-Translator: Daniel Lewan <vision360.daniel@gmail.com>\n"
+"PO-Revision-Date: 2017-10-23 16:47+0000\n"
+"Last-Translator: Sebastian Krzyszkowiak <dos@dosowisko.net>\n"
"Language-Team: Polish <https://hosted.weblate.org/projects/godot-engine/"
"godot/pl/>\n"
"Language: pl\n"
@@ -25,7 +27,7 @@ msgstr ""
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 2.15-dev\n"
+"X-Generator: Weblate 2.17\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -734,7 +736,7 @@ msgstr "Usuń"
#: editor/editor_about.cpp
msgid "Thanks from the Godot community!"
-msgstr "Podziękowania od społeczności Godot'a!"
+msgstr "Podziękowania od społeczności Godota!"
#: editor/editor_about.cpp
msgid "Thanks!"
@@ -1268,10 +1270,6 @@ msgid "File:"
msgstr "Plik:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "Filtr:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "Rozszerzenie musi być poprawne."
@@ -1744,19 +1742,25 @@ msgid "Pick a Main Scene"
msgstr "Wybierz główną scenę"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "Błąd przy ładowaniu sceny z %s"
+
+#: editor/editor_node.cpp
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2315,7 +2319,8 @@ msgid "Frame %"
msgstr "% Ramek"
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+#, fuzzy
+msgid "Physics Frame %"
msgstr "% Ramek Fixed"
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -4043,7 +4048,7 @@ msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
#, fuzzy
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr "Ostrzeżenie"
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4523,7 +4528,8 @@ msgstr "Krok w"
msgid "Break"
msgstr "Przerwa"
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr "Kontynuuj"
@@ -4626,7 +4632,8 @@ msgid "Cut"
msgstr "Wytnij"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "Kopiuj"
@@ -5404,9 +5411,12 @@ msgid "Remove All"
msgstr "Usuń"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
-msgid "Theme"
-msgstr "Zapisz motyw"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
+msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
@@ -5711,7 +5721,7 @@ msgstr "Eksportuj TileSet"
#: editor/project_manager.cpp
#, fuzzy
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr "Plik nie istnieje."
#: editor/project_manager.cpp
@@ -5850,6 +5860,12 @@ msgstr "Usunąć projekt z listy? (Zawartość folderu nie zostanie zmodyfikowan
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5883,6 +5899,11 @@ msgstr "Wyjdź"
#: editor/project_manager.cpp
#, fuzzy
+msgid "Restart Now"
+msgstr "Restart(y):"
+
+#: editor/project_manager.cpp
+#, fuzzy
msgid "Can't run project"
msgstr "Połącz.."
@@ -6113,6 +6134,15 @@ msgstr "Usuń opcję mapowania zasobu"
#: editor/project_settings_editor.cpp
#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "Zmień rozmiar kamery"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "Ustawienia projektu (engine.cfg)"
@@ -6174,6 +6204,30 @@ msgstr "Lokalizacja"
#: editor/project_settings_editor.cpp
#, fuzzy
+msgid "Locales Filter"
+msgstr "Lokalizacja"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Show all locales"
+msgstr "Utwórz Kości"
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "Filtry"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales:"
+msgstr "Lokalizacja"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "AutoLoad"
msgstr "Autoładowanie"
@@ -7801,6 +7855,13 @@ msgstr "Błąd ładowania fonta."
msgid "Invalid font size."
msgstr "Niepoprawny rozmiar fonta."
+#~ msgid "Filter:"
+#~ msgstr "Filtr:"
+
+#, fuzzy
+#~ msgid "Theme"
+#~ msgstr "Zapisz motyw"
+
#~ msgid "Method List For '%s':"
#~ msgstr "Lista metod '%s':"
diff --git a/editor/translations/pr.po b/editor/translations/pr.po
index 53881a76de..6f42056ecf 100644
--- a/editor/translations/pr.po
+++ b/editor/translations/pr.po
@@ -1,5 +1,6 @@
# Pirate translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Zion Nimchuk <zionnimchuk@gmail.com>, 2016-2017.
@@ -1205,10 +1206,6 @@ msgid "File:"
msgstr ""
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr ""
@@ -1653,19 +1650,24 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+msgid "Unable to load addon script from path: '%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2185,7 +2187,7 @@ msgid "Frame %"
msgstr ""
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+msgid "Physics Frame %"
msgstr ""
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3839,7 +3841,7 @@ msgid "Eroding walkable area..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4301,7 +4303,8 @@ msgstr ""
msgid "Break"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr ""
@@ -4395,7 +4398,8 @@ msgid "Cut"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr ""
@@ -5154,7 +5158,11 @@ msgid "Remove All"
msgstr "Discharge ye' Signal"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
@@ -5437,7 +5445,7 @@ msgid "Export With Debug"
msgstr ""
#: editor/project_manager.cpp
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr ""
#: editor/project_manager.cpp
@@ -5566,6 +5574,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5596,6 +5610,10 @@ msgid "Exit"
msgstr ""
#: editor/project_manager.cpp
+msgid "Restart Now"
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Can't run project"
msgstr ""
@@ -5819,6 +5837,14 @@ msgid "Remove Resource Remap Option"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
@@ -5879,6 +5905,27 @@ msgid "Locale"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show all locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "Paste yer Node"
+
+#: editor/project_settings_editor.cpp
+msgid "Locales:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po
index 5ad3ae0989..490ad2accc 100644
--- a/editor/translations/pt_BR.po
+++ b/editor/translations/pt_BR.po
@@ -1,5 +1,6 @@
# Portuguese (Brazil) translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Allyson Souza <allyson_as@outlook.com>, 2017.
@@ -9,15 +10,15 @@
# Joaquim Ferreira <joaquimferreira1996@bol.com.br>, 2016.
# jonathan railarem <railarem@gmail.com>, 2017.
# Mailson Silva Marins <mailsons335@gmail.com>, 2016.
-# manokara <marknokalt@live.com>, 2017.
+# Marcus Correia <marknokalt@live.com>, 2017.
# Michael Alexsander Silva Dias <michael.a.s.dias@gmail.com>, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: 2016-05-30\n"
-"PO-Revision-Date: 2017-10-21 09:44+0000\n"
-"Last-Translator: manokara <marknokalt@live.com>\n"
+"PO-Revision-Date: 2017-10-22 02:54+0000\n"
+"Last-Translator: Marcus Correia <marknokalt@live.com>\n"
"Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/"
"godot-engine/godot/pt_BR/>\n"
"Language: pt_BR\n"
@@ -92,9 +93,8 @@ msgid "Anim Track Change Value Mode"
msgstr "Mudar Modo de Valor da Trilha"
#: editor/animation_editor.cpp
-#, fuzzy
msgid "Anim Track Change Wrap Mode"
-msgstr "Mudar Modo de Valor da Trilha"
+msgstr "Mudar Modo de Cobertura da Trilha de Animação"
#: editor/animation_editor.cpp
msgid "Edit Node Curve"
@@ -663,9 +663,8 @@ msgstr ""
"Removê-los mesmo assim? (irreversível)"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid "Cannot remove:\n"
-msgstr "Não foi possível resolver."
+msgstr "Não foi possível remover:\n"
#: editor/dependency_editor.cpp
msgid "Error loading:"
@@ -752,32 +751,31 @@ msgstr "Autores"
#: editor/editor_about.cpp
msgid "Platinum Sponsors"
-msgstr ""
+msgstr "Patrocinadores Platina"
#: editor/editor_about.cpp
msgid "Gold Sponsors"
-msgstr ""
+msgstr "Patrocinadores Ouro"
#: editor/editor_about.cpp
msgid "Mini Sponsors"
-msgstr ""
+msgstr "Patrocinadores Mini"
#: editor/editor_about.cpp
msgid "Gold Donors"
-msgstr ""
+msgstr "Doadores Ouro"
#: editor/editor_about.cpp
msgid "Silver Donors"
-msgstr ""
+msgstr "Doadores Prata"
#: editor/editor_about.cpp
-#, fuzzy
msgid "Bronze Donors"
-msgstr "Clonar Abaixo"
+msgstr "Doadores Bronze"
#: editor/editor_about.cpp
msgid "Donors"
-msgstr ""
+msgstr "Doadores"
#: editor/editor_about.cpp
msgid "License"
@@ -846,44 +844,36 @@ msgid "Add Effect"
msgstr "Ad. Efeito"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Rename Audio Bus"
-msgstr "Renomear Pista de Ãudio"
+msgstr "Renomear Canal de Ãudio"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Toggle Audio Bus Solo"
-msgstr "Alternar Solo da Pista de Ãudio"
+msgstr "Alternar Solo do Canal de Ãudio"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Toggle Audio Bus Mute"
-msgstr "Alternar Silenciamento da Pista de Ãudio"
+msgstr "Alternar Silenciamento do Canal de Ãudio"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Toggle Audio Bus Bypass Effects"
-msgstr "Alternar Efeitos de Desvio da Pista de Ãudio."
+msgstr "Alternar Efeitos de Desvio do Canal de Ãudio"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Select Audio Bus Send"
-msgstr "Selecionar pista de áudio para envio"
+msgstr "Selecionar Canal de Ãudio para Envio"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Add Audio Bus Effect"
-msgstr "Adicionar efeito à Pista de àudio"
+msgstr "Adicionar Efeito ao Canal de Ãudio"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Move Bus Effect"
-msgstr "Mover efeito da pista"
+msgstr "Mover Efeito de Canal"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Delete Bus Effect"
-msgstr "Excluir efeito da pista"
+msgstr "Excluir Efeito de Canal"
#: editor/editor_audio_buses.cpp
msgid "Audio Bus, Drag and Drop to rearrange."
@@ -911,75 +901,64 @@ msgid "Duplicate"
msgstr "Duplicar"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Reset Volume"
-msgstr "Redefinir Ampliação"
+msgstr "Redefinir Volume"
#: editor/editor_audio_buses.cpp
msgid "Delete Effect"
msgstr "Excluir Efeito"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Add Audio Bus"
-msgstr "Adicionar pista de áudio"
+msgstr "Adicionar Canal de Ãudio"
#: editor/editor_audio_buses.cpp
msgid "Master bus can't be deleted!"
msgstr "Pista mestre não pode ser deletada!"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Delete Audio Bus"
-msgstr "Excluir pista de áudio"
+msgstr "Excluir Canal de Ãudio"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Duplicate Audio Bus"
-msgstr "Duplicar pista de áudio"
+msgstr "Duplicar Canal de Ãudio"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Reset Bus Volume"
-msgstr "Redefinir Ampliação"
+msgstr "Redefinir Volume do Canal"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Move Audio Bus"
-msgstr "Mover pista de áudio"
+msgstr "Mover Canal de Ãudio"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Save Audio Bus Layout As.."
-msgstr "Salvar layout das pista de áudio como..."
+msgstr "Salvar Layout de Canais de Ãudio Como..."
#: editor/editor_audio_buses.cpp
msgid "Location for New Layout.."
msgstr "Localização para o Novo Layout.."
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Open Audio Bus Layout"
-msgstr "Abrir Layout de Pista de Ãudio"
+msgstr "Abrir Layout de Canais de Ãudio"
#: editor/editor_audio_buses.cpp
msgid "There is no 'res://default_bus_layout.tres' file."
msgstr "Não há nenhum arquivo 'res://default_bus_layout.tres'."
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Invalid file, not an audio bus layout."
-msgstr "Arquivo inválido, não é um layout de pista de áudio."
+msgstr "Arquivo inválido, não é um layout de canais de áudio."
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Add Bus"
-msgstr "Adicionar Pista"
+msgstr "Adicionar Canal"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Create a new Bus Layout."
-msgstr "Criar um novo Layout de Pista."
+msgstr "Criar um novo Layout de Canais."
#: editor/editor_audio_buses.cpp editor/property_editor.cpp
#: editor/script_create_dialog.cpp
@@ -987,9 +966,8 @@ msgid "Load"
msgstr "Carregar"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Load an existing Bus Layout."
-msgstr "Carregar um Layout de Pista existente."
+msgstr "Carregar um Layout de Canais existente."
#: editor/editor_audio_buses.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
@@ -997,18 +975,16 @@ msgid "Save As"
msgstr "Salvar Como"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Save this Bus Layout to a file."
-msgstr "Salvar este Layout de Bus em um arquivo."
+msgstr "Salvar este Layout de Canais em um arquivo."
#: editor/editor_audio_buses.cpp editor/import_dock.cpp
msgid "Load Default"
msgstr "Carregar Padrão"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Load the default Bus Layout."
-msgstr "Carregar o Layout de Bus padrão."
+msgstr "Carregar o Layout de Canais padrão."
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
@@ -1236,9 +1212,8 @@ msgid "Move Favorite Down"
msgstr "Mover Favorito Abaixo"
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Go to parent folder"
-msgstr "Não foi possível criar a pasta."
+msgstr "Ir para pasta pai"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
@@ -1254,10 +1229,6 @@ msgid "File:"
msgstr "Arquivo:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "Filtro:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "Deve usar uma extensão válida."
@@ -1303,27 +1274,24 @@ msgid "Brief Description:"
msgstr "Descrição breve:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Members"
-msgstr "Membros:"
+msgstr "Membros"
#: editor/editor_help.cpp modules/visual_script/visual_script_editor.cpp
msgid "Members:"
msgstr "Membros:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Public Methods"
-msgstr "Métodos Públicos:"
+msgstr "Métodos Públicos"
#: editor/editor_help.cpp
msgid "Public Methods:"
msgstr "Métodos Públicos:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "GUI Theme Items"
-msgstr "Itens do Tema de GUI:"
+msgstr "Itens do Tema de GUI"
#: editor/editor_help.cpp
msgid "GUI Theme Items:"
@@ -1334,9 +1302,8 @@ msgid "Signals:"
msgstr "Sinais:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Enumerations"
-msgstr "Enumerações:"
+msgstr "Enumerações"
#: editor/editor_help.cpp
msgid "Enumerations:"
@@ -1347,23 +1314,20 @@ msgid "enum "
msgstr "enum "
#: editor/editor_help.cpp
-#, fuzzy
msgid "Constants"
-msgstr "Constantes:"
+msgstr "Constantes"
#: editor/editor_help.cpp
msgid "Constants:"
msgstr "Constantes:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Description"
-msgstr "Descrição:"
+msgstr "Descrição"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Properties"
-msgstr "Propriedades:"
+msgstr "Propriedades"
#: editor/editor_help.cpp
msgid "Property Description:"
@@ -1374,11 +1338,12 @@ msgid ""
"There is currently no description for this property. Please help us by "
"[color=$color][url=$url]contributing one[/url][/color]!"
msgstr ""
+"Atualmente não existe descrição para esta propriedade. Por favor nos ajude "
+"[color=$color][url=$url]contribuindo uma[/url][/color]!"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Methods"
-msgstr "Lista de Métodos:"
+msgstr "Métodos"
#: editor/editor_help.cpp
msgid "Method Description:"
@@ -1389,6 +1354,8 @@ msgid ""
"There is currently no description for this method. Please help us by [color="
"$color][url=$url]contributing one[/url][/color]!"
msgstr ""
+"Atualmente não existe descrição para este método. Por favor nos ajude [color="
+"$color][url=$url]contribuindo uma[/url][/color]!"
#: editor/editor_help.cpp
msgid "Search Text"
@@ -1430,28 +1397,24 @@ msgid "Error while saving."
msgstr "Erro ao salvar."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Can't open '%s'."
-msgstr "Não é possível operar em \"..\""
+msgstr "Não é possível abrir '%s'."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Error while parsing '%s'."
-msgstr "Erro ao salvar."
+msgstr "Erro ao processar '%s'."
#: editor/editor_node.cpp
msgid "Unexpected end of file '%s'."
-msgstr ""
+msgstr "Final inesperado do arquivo '%s'."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Missing '%s' or its dependencies."
-msgstr "A cena \"%s\" tem dependências quebradas:"
+msgstr "Falta '%s' ou suas dependências."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Error while loading '%s'."
-msgstr "Erro ao salvar."
+msgstr "Erro ao carregar '%s'."
#: editor/editor_node.cpp
msgid "Saving Scene"
@@ -1466,9 +1429,8 @@ msgid "Creating Thumbnail"
msgstr "Criando Miniatura"
#: editor/editor_node.cpp
-#, fuzzy
msgid "This operation can't be done without a tree root."
-msgstr "Essa operação não pode ser realizada sem uma cena."
+msgstr "Essa operação não pode ser realizada sem uma raiz da cena."
#: editor/editor_node.cpp
msgid ""
@@ -1519,18 +1481,25 @@ msgid ""
"Please read the documentation relevant to importing scenes to better "
"understand this workflow."
msgstr ""
+"Este recurso pertence a uma cena que foi importada, mas não é editável.\n"
+"Por favor, leia a documentação referente a importação de cenas para entender "
+"melhor esse procedimento."
#: editor/editor_node.cpp
msgid ""
"This resource belongs to a scene that was instanced or inherited.\n"
"Changes to it will not be kept when saving the current scene."
msgstr ""
+"Este recurso pertence a uma cena que foi instanciada ou herdada.\n"
+"Mudanças nele não serão mantidas ao salvar a cena atual."
#: editor/editor_node.cpp
msgid ""
"This resource was imported, so it's not editable. Change its settings in the "
"import panel and then re-import."
msgstr ""
+"Este recurso foi importado, então não é editável. Mude suas configurações no "
+"painel de importação e então re-importe."
#: editor/editor_node.cpp
msgid ""
@@ -1539,6 +1508,10 @@ msgid ""
"Please read the documentation relevant to importing scenes to better "
"understand this workflow."
msgstr ""
+"Essa cena foi importada, então mudanças nela não irão ser mantidas.\n"
+"Instanciar ou herdar a cena permitirá fazer mudanças a ela.\n"
+"Por favor, leia a documentação referente a importação de cenas para entender "
+"melhor esse procedimento."
#: editor/editor_node.cpp
msgid "Copy Params"
@@ -1703,12 +1676,10 @@ msgid "Save & Quit"
msgstr "Salvar e Sair"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Save changes to the following scene(s) before quitting?"
msgstr "Salvar mudanças na(s) seguinte(s) cena(s) antes de sair?"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Save changes the following scene(s) before opening Project Manager?"
msgstr ""
"Salvar mudanças na(s) seguinte(s) cena(s) antes de abrir o Gerenciador de "
@@ -1719,26 +1690,38 @@ msgid ""
"This option is deprecated. Situations where refresh must be forced are now "
"considered a bug. Please report."
msgstr ""
+"Esta opção está descontinuada. Situações em que a atualização precisa ser "
+"forçada são consideradas um bug agora. Reporte por favor."
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
msgstr "Escolha uma Cena Principal"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+#, fuzzy
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr "Não foi possível ativar o plugin em: '"
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
-msgstr "' falha no processamento de configurações."
-
-#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+#, fuzzy
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
"Não foi possível encontrar o campo de script para o plugin em: 'res://addons/"
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "Não foi possível carregar o script de extensão no caminho: '"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
+msgstr "Não foi possível carregar o script de extensão no caminho: '"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr "Não foi possível carregar o script de extensão no caminho: '"
#: editor/editor_node.cpp
@@ -1767,9 +1750,8 @@ msgid "Scene '%s' has broken dependencies:"
msgstr "A cena \"%s\" tem dependências quebradas:"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Clear Recent Scenes"
-msgstr "Limpar Ossos"
+msgstr "Limpar Cenas Recentes"
#: editor/editor_node.cpp
msgid "Save Layout"
@@ -2035,14 +2017,12 @@ msgid "Online Docs"
msgstr "Docs Online"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Q&A"
-msgstr "Q&A"
+msgstr "Perguntas e Respostas"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Issue Tracker"
-msgstr "Rastreador de problemas"
+msgstr "Rastreador de Problemas"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
msgid "Community"
@@ -2145,9 +2125,8 @@ msgid "Object properties."
msgstr "Propriedades do objeto."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Changes may be lost!"
-msgstr "Alterar Grupo de Imagens"
+msgstr "Mudanças podem ser perdidas!"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
#: editor/project_manager.cpp
@@ -2231,9 +2210,8 @@ msgid "Open the previous Editor"
msgstr "Abrir o Editor anterior"
#: editor/editor_plugin.cpp
-#, fuzzy
msgid "Creating Mesh Previews"
-msgstr "Criando MeshLibrary"
+msgstr "Criando Previsualizações de Malha"
#: editor/editor_plugin.cpp
msgid "Thumbnail.."
@@ -2285,7 +2263,8 @@ msgid "Frame %"
msgstr "% de Quadro"
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+#, fuzzy
+msgid "Physics Frame %"
msgstr "% de Quadro Fixo"
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -2358,9 +2337,8 @@ msgid "Import From Node:"
msgstr "Importar a Partir do Nó:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Re-Download"
-msgstr "Recarregar"
+msgstr "Baixar Novamente"
#: editor/export_template_manager.cpp
msgid "Uninstall"
@@ -2383,7 +2361,6 @@ msgid "(Current)"
msgstr "(Atual)"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Remove template version '%s'?"
msgstr "Remover versão '%s' do modelo?"
@@ -2392,23 +2369,20 @@ msgid "Can't open export templates zip."
msgstr "Não se pôde abrir zip dos modelos de exportação."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Invalid version.txt format inside templates."
-msgstr "Formato do version.txt dentro de templates é inválido."
+msgstr "Formato do version.txt dentro dos modelos é inválido."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid ""
"Invalid version.txt format inside templates. Revision is not a valid "
"identifier."
msgstr ""
-"Formato do version.txt dentro de templates é inválido. A revisão não é um "
+"Formato do version.txt dentro dos modelos é inválido. A revisão não é um "
"identificador válido."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "No version.txt found inside templates."
-msgstr "Não foi encontrado um version.txt dentro de templates."
+msgstr "Não foi encontrado um version.txt dentro dos modelos."
#: editor/export_template_manager.cpp
msgid "Error creating path for templates:\n"
@@ -2458,17 +2432,20 @@ msgstr "Não é possível navegar para '"
#: editor/filesystem_dock.cpp
msgid "View items as a grid of thumbnails"
-msgstr ""
+msgstr "Visualizar itens como uma grade de miniaturas"
#: editor/filesystem_dock.cpp
msgid "View items as a list"
-msgstr ""
+msgstr "Visualizar itens como uma lista"
#: editor/filesystem_dock.cpp
msgid ""
"\n"
"Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
+"\n"
+"Estado: Falha na importação do arquivo. Por favor, conserte o arquivo e re-"
+"importe manualmente."
#: editor/filesystem_dock.cpp
msgid ""
@@ -2479,57 +2456,48 @@ msgstr ""
"Origem: "
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Cannot move/rename resources root."
-msgstr "Não se pôde carregar/processar fonte de origem."
+msgstr "Não foi possível mover/renomear raiz dos recurso."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Cannot move a folder into itself.\n"
-msgstr "Não é possível importar arquivo sobre si mesmo:"
+msgstr "Não é possível mover uma pasta nela mesma.\n"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Error moving:\n"
-msgstr "Erro ao mover diretório:\n"
+msgstr "Erro ao mover:\n"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Unable to update dependencies:\n"
-msgstr "A cena \"%s\" tem dependências quebradas:"
+msgstr "Não foi possível atualizar dependências:\n"
#: editor/filesystem_dock.cpp
msgid "No name provided"
-msgstr ""
+msgstr "Nenhum nome fornecido"
#: editor/filesystem_dock.cpp
msgid "Provided name contains invalid characters"
-msgstr ""
+msgstr "O nome fornecido contém caracteres inválidos"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "No name provided."
-msgstr "Renomear ou Mover..."
+msgstr "Nenhum nome fornecido."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Name contains invalid characters."
-msgstr "Caracteres válidos:"
+msgstr "Nome contém caracteres inválidos."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "A file or folder with this name already exists."
-msgstr "O nome do grupo já existe!"
+msgstr "Um arquivo ou pasta com esse nome já existe."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Renaming file:"
-msgstr "Renomear Variável"
+msgstr "Renomear arquivo:"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Renaming folder:"
-msgstr "Renomear Nó"
+msgstr "Renomear pasta:"
#: editor/filesystem_dock.cpp
msgid "Expand all"
@@ -2544,18 +2512,16 @@ msgid "Copy Path"
msgstr "Copiar Caminho"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Rename.."
-msgstr "Renomear"
+msgstr "Renomear..."
#: editor/filesystem_dock.cpp
msgid "Move To.."
msgstr "Mover Para..."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Folder.."
-msgstr "Criar Pasta"
+msgstr "Nova Pasta..."
#: editor/filesystem_dock.cpp
msgid "Show In File Manager"
@@ -2623,9 +2589,8 @@ msgid "Import as Single Scene"
msgstr "Importar como Cena Única"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Import with Separate Animations"
-msgstr "Importar com Materiais Separados"
+msgstr "Importar com Animações Separadas"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Materials"
@@ -2640,19 +2605,16 @@ msgid "Import with Separate Objects+Materials"
msgstr "Importar com Objetos+Materiais serparados"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Import with Separate Objects+Animations"
-msgstr "Importar com Objetos+Materiais serparados"
+msgstr "Importar com Objetos+Animações Separados"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Import with Separate Materials+Animations"
-msgstr "Importar com Materiais Separados"
+msgstr "Importar com Materiais+Animações Separados"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Import with Separate Objects+Materials+Animations"
-msgstr "Importar com Objetos+Materiais serparados"
+msgstr "Importar com Objetos+Materiais+Animações Separados"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Multiple Scenes"
@@ -2739,9 +2701,8 @@ msgid "Edit Poly"
msgstr "Editar Polígono"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
msgid "Insert Point"
-msgstr "Inserindo"
+msgstr "Inserir Ponto"
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/collision_polygon_editor_plugin.cpp
@@ -3307,14 +3268,12 @@ msgid "Edit CanvasItem"
msgstr "Editar CanvaItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Anchors only"
-msgstr "Âncora"
+msgstr "Apenas âncoras"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Change Anchors and Margins"
-msgstr "Alterar Âncoras"
+msgstr "Alterar Âncoras e Margens"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Change Anchors"
@@ -3351,7 +3310,6 @@ msgid "Move Mode"
msgstr "Modo Mover"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Rotate Mode"
msgstr "Modo Rotacionar"
@@ -3373,9 +3331,8 @@ msgid "Pan Mode"
msgstr "Modo Panorâmico"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Toggles snapping"
-msgstr "Alternar Ponto de interrupção"
+msgstr "Alternar Encaixar"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -3383,23 +3340,20 @@ msgid "Use Snap"
msgstr "Usar Snap"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snapping options"
-msgstr "Opções da Animação"
+msgstr "Opções da Encaixe"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to grid"
-msgstr "Modo Snap:"
+msgstr "Encaixar na grade"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Rotation Snap"
msgstr "Usar Snap de Rotação"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Configure Snap..."
-msgstr "Configurar Snap..."
+msgstr "Configurar Encaixe..."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap Relative"
@@ -3411,24 +3365,23 @@ msgstr "Usar Snap de Pixel"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Smart snapping"
-msgstr ""
+msgstr "Encaixe inteligente"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to parent"
-msgstr "Expandir para Pai"
+msgstr "Encaixar no pai"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to node anchor"
-msgstr ""
+msgstr "Encaixar na âncora do nó"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to node sides"
-msgstr ""
+msgstr "Encaixar nos lados do lá"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to other nodes"
-msgstr ""
+msgstr "Encaixar em outros nós"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Lock the selected object in place (can't be moved)."
@@ -3477,14 +3430,12 @@ msgid "Show Grid"
msgstr "Mostrar Grade"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Show helpers"
-msgstr "Mostrar Ossos"
+msgstr "Mostrar auxiliadores"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Show rulers"
-msgstr "Mostrar Ossos"
+msgstr "Mostrar réguas"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Center Selection"
@@ -3495,9 +3446,8 @@ msgid "Frame Selection"
msgstr "Seleção de Quadros"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Layout"
-msgstr "Salvar Layout"
+msgstr "Layout"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Keys"
@@ -3521,20 +3471,19 @@ msgstr "Limpar Pose"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Drag pivot from mouse position"
-msgstr ""
+msgstr "Arrastar o pivô para a posição do mouse"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Set pivot at mouse position"
-msgstr "Definir Pos da Saída da Curva"
+msgstr "Colocar o pivô na posição do mouse"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Multiply grid step by 2"
-msgstr ""
+msgstr "Multiplifcar passo da grade por 2"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Divide grid step by 2"
-msgstr ""
+msgstr "Dividir passo da grade por 2"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Add %s"
@@ -3613,40 +3562,35 @@ msgstr "Atualizar a partir de Cena"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Flat0"
-msgstr ""
+msgstr "Flat0"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Flat1"
-msgstr ""
+msgstr "Flat1"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Ease in"
-msgstr "Ease In"
+msgstr "Suavizar início"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Ease out"
-msgstr "Ease Out"
+msgstr "Suavizar final"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Smoothstep"
-msgstr ""
+msgstr "Passo suave"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Modify Curve Point"
msgstr "Modificar Ponto da Curva"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Modify Curve Tangent"
msgstr "Modificar Tangente da Curva"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Load Curve Preset"
-msgstr "Carregar Recurso"
+msgstr "Carregar Definição de Curva"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Add point"
@@ -3665,19 +3609,16 @@ msgid "Right linear"
msgstr "Linear direita"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Load preset"
-msgstr "Carregar Recurso"
+msgstr "Carregar definição"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Remove Curve Point"
-msgstr "Remover Ponto do Caminho"
+msgstr "Remover Ponto da Curva"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Curve Linear Tangent"
-msgstr "Alternar Curva Linear Tangente"
+msgstr "Alternar Curva Targente Linear"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Hold Shift to edit tangents individually"
@@ -3966,73 +3907,65 @@ msgid "Bake!"
msgstr "Precalcular!"
#: editor/plugins/navigation_mesh_editor_plugin.cpp
-#, fuzzy
msgid "Bake the navigation mesh.\n"
-msgstr "Criar Mesh de Navegação"
+msgstr "Preparar a malha de navegação.\n"
#: editor/plugins/navigation_mesh_editor_plugin.cpp
-#, fuzzy
msgid "Clear the navigation mesh."
-msgstr "Criar Mesh de Navegação"
+msgstr "Apagar a malha de navegação."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Setting up Configuration..."
-msgstr ""
+msgstr "Preparando Configuração..."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Calculating grid size..."
-msgstr ""
+msgstr "Calculando tamanho da grade..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Creating heightfield..."
-msgstr "Criando Luz Octree"
+msgstr "Criando mapa de altura..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Marking walkable triangles..."
-msgstr "Strings Traduzíveis..."
+msgstr "Marcando triângulos caminháveis..."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Constructing compact heightfield..."
-msgstr ""
+msgstr "Construindo um mapa de altura compacto..."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Eroding walkable area..."
-msgstr ""
+msgstr "Erodindo área caminhável..."
#: editor/plugins/navigation_mesh_generator.cpp
#, fuzzy
-msgid "Partioning..."
-msgstr "Aviso"
+msgid "Partitioning..."
+msgstr "Particionando..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Creating contours..."
-msgstr "Criando Textura Octree"
+msgstr "Criando contornos..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Creating polymesh..."
-msgstr "Criar Mesh de Contorno..."
+msgstr "Criando polimalha..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Converting to native navigation mesh..."
-msgstr "Criar Mesh de Navegação"
+msgstr "Convertando para malha de navegação nativa..."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Navigation Mesh Generator Setup:"
-msgstr ""
+msgstr "Configuração do Gerador de Malha de Navegação:"
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Parsing Geometry..."
-msgstr "Analisando Geometria"
+msgstr "Analisando Geometria..."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Done!"
-msgstr ""
+msgstr "Pronto!"
#: editor/plugins/navigation_polygon_editor_plugin.cpp
msgid "Create Navigation Polygon"
@@ -4048,10 +3981,9 @@ msgid "Generating AABB"
msgstr "Gerando AABB"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
-"Só é permitido colocar um ponto em um material processador ParticlesMaterial."
+"Só é permitido colocar um ponto em um material processador ParticlesMaterial"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Error loading image:"
@@ -4108,7 +4040,6 @@ msgid "Node does not contain geometry (faces)."
msgstr "O nó não contém geometria (faces)."
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "A processor material of type 'ParticlesMaterial' is required."
msgstr "Um material processador do tipo 'ParticlesMaterial' é necessário."
@@ -4169,14 +4100,12 @@ msgid "Remove Point from Curve"
msgstr "Remover Ponto da Curva"
#: editor/plugins/path_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove Out-Control from Curve"
-msgstr "Mover Controle de Saída na Curva"
+msgstr "Remover Controle de Saída da Curva"
#: editor/plugins/path_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove In-Control from Curve"
-msgstr "Remover Ponto da Curva"
+msgstr "Remover Controle de Entrada da Curva"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
@@ -4214,19 +4143,16 @@ msgid "Curve Point #"
msgstr "Ponto da Curva nº"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Set Curve Point Position"
-msgstr "Definir Pos do Ponto da Curva"
+msgstr "Definir Posição do Ponto da Curva"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Set Curve In Position"
-msgstr "Definir Pos da Entrada da Curva"
+msgstr "Colocar a Curva na Posição"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Set Curve Out Position"
-msgstr "Definir Pos da Saída da Curva"
+msgstr "Definir Posição de Saída da Curva"
#: editor/plugins/path_editor_plugin.cpp
msgid "Split Path"
@@ -4237,14 +4163,12 @@ msgid "Remove Path Point"
msgstr "Remover Ponto do Caminho"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Remove Out-Control Point"
-msgstr "Mover Controle de Saída na Curva"
+msgstr "Remover Ponto de Controle de Saída"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Remove In-Control Point"
-msgstr "Mover Controle de Entrada na Curva"
+msgstr "Remover Ponto de Controle de Entrada"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create UV Map"
@@ -4354,9 +4278,8 @@ msgid "Paste"
msgstr "Colar"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Clear Recent Files"
-msgstr "Limpar Ossos"
+msgstr "Limpar Arquivos Recentes"
#: editor/plugins/script_editor_plugin.cpp
msgid ""
@@ -4443,18 +4366,16 @@ msgid "Close Docs"
msgstr "Fechar Docs"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Close All"
-msgstr "Fechar"
+msgstr "Fechar Tudo"
#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
msgid "Run"
msgstr "Rodar"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Scripts Panel"
-msgstr "Alternar Favorito"
+msgstr "Alternar Painel de Scripts"
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
@@ -4480,7 +4401,8 @@ msgstr "Passo para dentro"
msgid "Break"
msgstr "Pausar"
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr "Continuar"
@@ -4489,14 +4411,12 @@ msgid "Keep Debugger Open"
msgstr "Manter Depurador Aberto"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Debug with external editor"
-msgstr "Abrir o próximo Editor"
+msgstr "Depurar com um editor externo"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Open Godot online documentation"
-msgstr "Pesquise a documentação de referência."
+msgstr "Abrir a documentação online da Godot"
#: editor/plugins/script_editor_plugin.cpp
msgid "Search the class hierarchy."
@@ -4515,9 +4435,8 @@ msgid "Go to next edited document."
msgstr "Ir para o próximo documento editado."
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Discard"
-msgstr "Discreto"
+msgstr "Descartar"
#: editor/plugins/script_editor_plugin.cpp
msgid "Create Script"
@@ -4551,19 +4470,16 @@ msgstr ""
"carregada"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Only resources from filesystem can be dropped."
msgstr "Apenas recursos de Arquivos podem ser soltos."
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Pick Color"
-msgstr "Cor"
+msgstr "Escolher Cor"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Convert Case"
-msgstr "Convertendo Imagens"
+msgstr "Converter Maíusculas/Minúsculas"
#: editor/plugins/script_text_editor.cpp
msgid "Uppercase"
@@ -4584,7 +4500,8 @@ msgid "Cut"
msgstr "Recortar"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "Copiar"
@@ -4604,9 +4521,8 @@ msgid "Move Down"
msgstr "Mover para Baixo"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Delete Line"
-msgstr "Excluir Ponto"
+msgstr "Excluir Linha"
#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
@@ -4662,14 +4578,12 @@ msgid "Goto Previous Breakpoint"
msgstr "Ir ao Ponto de Interrupção Anterior"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Convert To Uppercase"
-msgstr "Converter Para..."
+msgstr "Converter para Maíusculo"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Convert To Lowercase"
-msgstr "Converter Para..."
+msgstr "Converter Para Minúsculo"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
@@ -4911,28 +4825,24 @@ msgid "Objects Drawn"
msgstr "Objetos Desenhados"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Material Changes"
-msgstr "Atualizar nas Mudanças"
+msgstr "Mudanças de Material"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Shader Changes"
-msgstr "Atualizar nas Mudanças"
+msgstr "Mudanças de Shader"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Surface Changes"
-msgstr "Atualizar nas Mudanças"
+msgstr "Mudanças de Superfície"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Draw Calls"
msgstr "Chamadas de Desenho"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Vertices"
-msgstr "Vértice"
+msgstr "Vértices"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align with view"
@@ -4951,19 +4861,16 @@ msgid "Display Overdraw"
msgstr "Exibição Overdraw"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Display Unshaded"
-msgstr "Exibição Shadeless"
+msgstr "Exibir Sem Sombreamento"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "View Environment"
-msgstr "Ambiente"
+msgstr "Visualizar Ambiente"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "View Gizmos"
-msgstr "Gizmos"
+msgstr "Visualizar Gizmos"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Information"
@@ -4974,66 +4881,58 @@ msgid "Audio Listener"
msgstr "Ouvinte de Ãudio"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Doppler Enable"
-msgstr "Habilitar"
+msgstr "Habilitar Doppler"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Freelook Left"
-msgstr "Olhar Livre à Esquerda"
+msgstr "Visão Livre Esquerda"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Freelook Right"
-msgstr "Olhar Livre à Direita"
+msgstr "Visão Livre Direita"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Freelook Forward"
-msgstr "Avançar"
+msgstr "Visão Livre Frente"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Freelook Backwards"
-msgstr "Para trás"
+msgstr "Visão Livre Trás"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Freelook Up"
-msgstr "Olhar Livre Acima"
+msgstr "Visão Livre Cima"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Freelook Down"
-msgstr "Roda para Baixo."
+msgstr "Visão Livre Baixo"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Freelook Speed Modifier"
-msgstr "Modificador de velocidade do Olhar Livre"
+msgstr "Modificador de velocidade da Visão Livre"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "preview"
-msgstr "Visualização"
+msgstr "previsualizar"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
msgstr "Diálogo XForm"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Select Mode (Q)\n"
-msgstr "Modo de Seleção"
+msgstr "Modo de Seleção (Q)\n"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid ""
"Drag: Rotate\n"
"Alt+Drag: Move\n"
"Alt+RMB: Depth list selection"
-msgstr "Alt+RMB: Lista de seleção de profundidade"
+msgstr ""
+"Arrastar: Rotacionar\n"
+"Alt+Arrastar: Mover\n"
+"Alt+RMB: Lista de Profundidade"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Move Mode (W)"
@@ -5080,9 +4979,8 @@ msgid "Insert Animation Key"
msgstr "Inserir Chanve de Animação"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Focus Origin"
-msgstr "Ver Origem"
+msgstr "Origem do Foco"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Focus Selection"
@@ -5093,24 +4991,20 @@ msgid "Align Selection With View"
msgstr "Alinhar Seleção com Visualização"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Select"
-msgstr "Selecionar"
+msgstr "Ferramenta Selecionar"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Move"
-msgstr "Mover"
+msgstr "Ferramenta Mover"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Rotate"
-msgstr "Ctrl: Rotaciona"
+msgstr "Ferramenta Rotacionar"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Scale"
-msgstr "Escala:"
+msgstr "Ferramenta Escalar"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform"
@@ -5282,23 +5176,20 @@ msgid "Insert Empty (After)"
msgstr "Inserir Vazio (Depois)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Move (Before)"
-msgstr "Remover Nó(s)"
+msgstr "Mover (Antes)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Move (After)"
-msgstr "Mover para Esquerda"
+msgstr "Mover (Depois)"
#: editor/plugins/style_box_editor_plugin.cpp
msgid "StyleBox Preview:"
msgstr "Pré-Visualização do StyleBox:"
#: editor/plugins/texture_region_editor_plugin.cpp
-#, fuzzy
msgid "Set Region Rect"
-msgstr "Definir region_rect"
+msgstr "Definir Retângulo de Região"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Snap Mode:"
@@ -5358,19 +5249,20 @@ msgid "Remove Item"
msgstr "Remover Item"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All Items"
-msgstr "Remover Itens de Classe"
+msgstr "Remover Todos os Itens"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
msgid "Remove All"
-msgstr "Remover"
+msgstr "Remover Tudo"
#: editor/plugins/theme_editor_plugin.cpp
-#, fuzzy
-msgid "Theme"
-msgstr "Salvar Tema"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
+msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
@@ -5394,7 +5286,7 @@ msgstr "Rádio Checkbox 1"
#: editor/plugins/theme_editor_plugin.cpp
msgid "CheckBox Radio2"
-msgstr "Rádio CheckBox 2"
+msgstr "Caixa de Seleção 2"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Item"
@@ -5462,7 +5354,6 @@ msgid "Color"
msgstr "Cor"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Erase Selection"
msgstr "Apagar Seleção"
@@ -5471,19 +5362,16 @@ msgid "Paint TileMap"
msgstr "Pintar TileMap"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Line Draw"
-msgstr "Linear"
+msgstr "Desenhar Linha"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Rectangle Paint"
msgstr "Pintura Retângular"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Bucket Fill"
-msgstr "Balde"
+msgstr "Preenchimento de Balde"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase TileMap"
@@ -5510,9 +5398,8 @@ msgid "Mirror Y"
msgstr "Espelhar Y"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Paint Tile"
-msgstr "Pintar TileMap"
+msgstr "Pintar Tile"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Pick Tile"
@@ -5563,29 +5450,26 @@ msgid "Error"
msgstr "Erro"
#: editor/project_export.cpp
-#, fuzzy
msgid "Runnable"
-msgstr "Habilitar"
+msgstr "Executável"
#: editor/project_export.cpp
-#, fuzzy
msgid "Delete patch '"
-msgstr "Deletar Entrada"
+msgstr "Deletar alteração '"
#: editor/project_export.cpp
-#, fuzzy
msgid "Delete preset '%s'?"
-msgstr "Excluir os arquivos selecionados?"
+msgstr "Excluir definição '%s'?"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export templates for this platform are missing/corrupted: "
-msgstr "Modelos de exportação para esta plataforma não foram encontrados:"
+msgstr ""
+"Modelos de exportação para esta plataforma não foram encontrados/estão "
+"corrompidos: "
#: editor/project_export.cpp
-#, fuzzy
msgid "Presets"
-msgstr "Predefinição..."
+msgstr "Predefiniçoes"
#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
@@ -5596,68 +5480,58 @@ msgid "Resources"
msgstr "Recursos"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export all resources in the project"
-msgstr "Exportar todos os recursos no projeto."
+msgstr "Exportar todos os recursos do projeto"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export selected scenes (and dependencies)"
-msgstr "Exportar recursos selecionados (incluindo dependências)."
+msgstr "Exportar cenas selecionadas (incluindo dependências)"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export selected resources (and dependencies)"
-msgstr "Exportar recursos selecionados (incluindo dependências)."
+msgstr "Exportar recursos selecionados (incluindo dependências)"
#: editor/project_export.cpp
msgid "Export Mode:"
msgstr "Modo de Exportação:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Resources to export:"
-msgstr "Recursos a Exportar:"
+msgstr "Recursos para Exportar:"
#: editor/project_export.cpp
-#, fuzzy
msgid ""
"Filters to export non-resource files (comma separated, e.g: *.json, *.txt)"
msgstr ""
"Filtros para exportar arquivos que não sejam recursos (separados por "
-"vírgula, e.g.: *.json, *.txt):"
+"vírgula, e.g.: *.json, *.txt)"
#: editor/project_export.cpp
-#, fuzzy
msgid ""
"Filters to exclude files from project (comma separated, e.g: *.json, *.txt)"
msgstr ""
"Filtros para excluir da exportação (separados por vírgula, e.g.: *.json, *."
-"txt):"
+"txt)"
#: editor/project_export.cpp
-#, fuzzy
msgid "Patches"
-msgstr "Combinações:"
+msgstr "Alterações"
#: editor/project_export.cpp
-#, fuzzy
msgid "Make Patch"
-msgstr "Caminho Destino:"
+msgstr "Criar Alteração"
#: editor/project_export.cpp
-#, fuzzy
msgid "Features"
-msgstr "Textura"
+msgstr "Funcionalidades"
#: editor/project_export.cpp
msgid "Custom (comma-separated):"
msgstr "Personalizado (separado por vírgula):"
#: editor/project_export.cpp
-#, fuzzy
msgid "Feature List:"
-msgstr "Lista de Métodos:"
+msgstr "Lista de Funcionalidades:"
#: editor/project_export.cpp
msgid "Export PCK/Zip"
@@ -5668,34 +5542,35 @@ msgid "Export templates for this platform are missing:"
msgstr "Modelos de exportação para esta plataforma não foram encontrados:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export templates for this platform are missing/corrupted:"
-msgstr "Modelos de exportação para esta plataforma não foram encontrados:"
+msgstr ""
+"Modelos de exportação para esta plataforma não foram encontrados/estão "
+"corrompidos:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export With Debug"
-msgstr "Exportar Tile Set"
+msgstr "Exportar Com Depuração"
#: editor/project_manager.cpp
-#, fuzzy
-msgid "The path does not exists."
-msgstr "O arquivo não existe."
+msgid "The path does not exist."
+msgstr "O caminho não existe."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a 'project.godot' file."
-msgstr "Por favor export para fora da pasta do projeto!"
+msgstr "Por favor, escolha um arquivo 'project.godot'."
#: editor/project_manager.cpp
msgid ""
"Your project will be created in a non empty folder (you might want to create "
"a new folder)."
msgstr ""
+"Seu projeto será criado em uma pasta não vazia (você pode querer criar uma "
+"nova pasta)."
#: editor/project_manager.cpp
msgid "Please choose a folder that does not contain a 'project.godot' file."
msgstr ""
+"Por favor, escolha uma pasta que não contenha um arquivo 'project.godot'."
#: editor/project_manager.cpp
msgid "Imported Project"
@@ -5703,44 +5578,39 @@ msgstr "Projeto Importado"
#: editor/project_manager.cpp
msgid " "
-msgstr ""
+msgstr " "
#: editor/project_manager.cpp
msgid "It would be a good idea to name your project."
-msgstr ""
+msgstr "Seria uma boa ideia nomear o seu projeto."
#: editor/project_manager.cpp
msgid "Invalid project path (changed anything?)."
msgstr "Caminho de projeto inválido (mudou alguma coisa?)."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't get project.godot in project path."
-msgstr "Não se pôde criar engine.cfg no caminho do projeto."
+msgstr "Não foi possível encontrar project.godot no caminho do projeto."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't edit project.godot in project path."
-msgstr "Não se pôde criar engine.cfg no caminho do projeto."
+msgstr "Não foi possível editar project.godot no caminho do projeto."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't create project.godot in project path."
-msgstr "Não se pôde criar engine.cfg no caminho do projeto."
+msgstr "Não foi possível criar project.godot no caminho do projeto."
#: editor/project_manager.cpp
msgid "The following files failed extraction from package:"
msgstr "Os arquivos a seguir falharam ao serem extraídos do pacote:"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Rename Project"
-msgstr "Projeto Sem Nome"
+msgstr "Renomear Projeto"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't get project.godot in the project path."
-msgstr "Não se pôde criar engine.cfg no caminho do projeto."
+msgstr "Não foi possível encontrar project.godot no caminho do projeto."
#: editor/project_manager.cpp
msgid "New Game Project"
@@ -5763,7 +5633,6 @@ msgid "Project Name:"
msgstr "Nome do Projeto:"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Create folder"
msgstr "Criar Pasta"
@@ -5784,25 +5653,22 @@ msgid "Unnamed Project"
msgstr "Projeto Sem Nome"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Can't open project"
-msgstr "Não é possível conectar..."
+msgstr "Não é possível abrir o projeto"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Are you sure to open more than one project?"
msgstr "Tem certeza de que quer abrir mais de um projeto?"
#: editor/project_manager.cpp
-#, fuzzy
msgid ""
"Can't run project: no main scene defined.\n"
"Please edit the project and set the main scene in \"Project Settings\" under "
"the \"Application\" category."
msgstr ""
-"A cena principal não foi definida, selecionar uma?\n"
-"Você pode alterá-la mais tarde nas \"Configurações do Projeto\" na categoria "
-"\"application\"."
+"Não foi possível executar o projeto: cena principal não definida.\n"
+"Por favor, defina a cena principal nas Configurações do Projeto no menu "
+"Projeto."
#: editor/project_manager.cpp
msgid ""
@@ -5813,9 +5679,8 @@ msgstr ""
"Por favor, edite o projeto para iniciar a importação inicial."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Are you sure to run more than one project?"
-msgstr "Tem certeza de que quer rodar mais de um projeto?"
+msgstr "Tem certeza de que quer executar mais de um projeto?"
#: editor/project_manager.cpp
msgid "Remove project from the list? (Folder contents will not be modified)"
@@ -5823,6 +5688,12 @@ msgstr "Remover projeto da lista? (O conteúdo da pasta não será modificado)"
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5838,18 +5709,16 @@ msgid "Scan"
msgstr "Escanear"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Select a Folder to Scan"
-msgstr "Selecione uma Pasta para Scanear"
+msgstr "Selecione uma Pasta para Analisar"
#: editor/project_manager.cpp
msgid "New Project"
msgstr "Novo Projeto"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Templates"
-msgstr "Remover Item"
+msgstr "Modelos"
#: editor/project_manager.cpp
msgid "Exit"
@@ -5857,8 +5726,12 @@ msgstr "Sair"
#: editor/project_manager.cpp
#, fuzzy
+msgid "Restart Now"
+msgstr "Reinício (s):"
+
+#: editor/project_manager.cpp
msgid "Can't run project"
-msgstr "Não é possível conectar..."
+msgstr "Não é possível executar o projeto"
#: editor/project_settings_editor.cpp
msgid "Key "
@@ -5958,18 +5831,16 @@ msgid "Change"
msgstr "Alterar"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Joypad Axis Index:"
-msgstr "Eixo do Joystick:"
+msgstr "Ãndice de Eixo do Joypad:"
#: editor/project_settings_editor.cpp
msgid "Axis"
msgstr "Eixo"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Joypad Button Index:"
-msgstr "Botão do Joystick:"
+msgstr "Ãndice de Botão do Joypad:"
#: editor/project_settings_editor.cpp
msgid "Add Input Action"
@@ -5980,9 +5851,8 @@ msgid "Erase Input Action Event"
msgstr "Apagar Evento Ação de Entrada"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Add Event"
-msgstr "Adicionar Vazio"
+msgstr "Adicionar VEvento"
#: editor/project_settings_editor.cpp
msgid "Device"
@@ -6013,39 +5883,32 @@ msgid "Wheel Down."
msgstr "Roda para Baixo."
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Add Global Property"
-msgstr "Adicionar Getter de Propriedade"
+msgstr "Adicionar Propriedad Global"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Select a setting item first!"
msgstr "Selecione um item de configuração primeiro!"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "No property '"
-msgstr "Propriedade:"
+msgstr "Não existe a propriedade '"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Setting '"
-msgstr "Configurações"
+msgstr "Configuração '"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Delete Item"
-msgstr "Deletar Entrada"
+msgstr "Excluir Item"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Can't contain '/' or ':'"
-msgstr "Não foi possível conectar ao host:"
+msgstr "Não pode conter '/' ou ':'"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Already existing"
-msgstr "Alternar Persistência"
+msgstr "Já existe"
#: editor/project_settings_editor.cpp
msgid "Error saving settings."
@@ -6056,9 +5919,8 @@ msgid "Settings saved OK."
msgstr "Configurações Salvas."
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Override for Feature"
-msgstr "Sobrescrever para Feature"
+msgstr "Sobrescrever para Funcionalidade"
#: editor/project_settings_editor.cpp
msgid "Add Translation"
@@ -6090,8 +5952,16 @@ msgstr "Remover Opção de Remapeamento de Recurso"
#: editor/project_settings_editor.cpp
#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "Mudar Tempo de Mistura"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
-msgstr "Configurações do Projeto (engine.cfg)"
+msgstr "Configurações do Projeto (project.godot)"
#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
@@ -6150,13 +6020,36 @@ msgid "Locale"
msgstr "Localidade"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales Filter"
+msgstr "Filtrar Imagens:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Show all locales"
+msgstr "Mostrar Ossos"
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "Filtrar nós"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales:"
+msgstr "Localidade"
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "AutoLoad"
#: editor/property_editor.cpp
-#, fuzzy
msgid "Pick a Viewport"
-msgstr "1 Viewport"
+msgstr "Escolha uma Viewport"
#: editor/property_editor.cpp
msgid "Ease In"
@@ -6191,43 +6084,36 @@ msgid "Assign"
msgstr "Atribuir"
#: editor/property_editor.cpp
-#, fuzzy
msgid "Select Node"
-msgstr "Selecione um Nó"
+msgstr "Selecionar Nó"
#: editor/property_editor.cpp
-#, fuzzy
msgid "New Script"
-msgstr "Próximo Script"
+msgstr "Novo Script"
#: editor/property_editor.cpp
-#, fuzzy
msgid "Make Unique"
-msgstr "Fazer Ossos"
+msgstr "Tornar Único"
#: editor/property_editor.cpp
-#, fuzzy
msgid "Show in File System"
-msgstr "Arquivos"
+msgstr "Mostrar em Arquivos"
#: editor/property_editor.cpp
-#, fuzzy
msgid "Convert To %s"
-msgstr "Converter Para..."
+msgstr "Converter Para %s"
#: editor/property_editor.cpp
msgid "Error loading file: Not a resource!"
msgstr "Erro ao carregar arquivo: Não é um recurso!"
#: editor/property_editor.cpp
-#, fuzzy
msgid "Selected node is not a Viewport!"
-msgstr "Selecionar Nó(s) para Importar"
+msgstr "Nó selecionado não é uma Viewport!"
#: editor/property_editor.cpp
-#, fuzzy
msgid "Pick a Node"
-msgstr "Selecione um Nó"
+msgstr "Escolha um Nó"
#: editor/property_editor.cpp
msgid "Bit %d, val %d."
@@ -6250,19 +6136,16 @@ msgid "Sections:"
msgstr "Seções:"
#: editor/property_selector.cpp
-#, fuzzy
msgid "Select Property"
-msgstr "Selecionar Pontos"
+msgstr "Selecionar Propriedade"
#: editor/property_selector.cpp
-#, fuzzy
msgid "Select Virtual Method"
-msgstr "Modo de Seleção (Q)"
+msgstr "Selecionar Método Virtual"
#: editor/property_selector.cpp
-#, fuzzy
msgid "Select Method"
-msgstr "Modo de Seleção (Q)"
+msgstr "Selecionar Mtéodo"
#: editor/pvrtc_compress.cpp
msgid "Could not execute PVRTC tool:"
@@ -6314,9 +6197,8 @@ msgid "OK"
msgstr "OK"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "No parent to instance the scenes at."
-msgstr "Sem nó pai onde instanciar um filho."
+msgstr "Sem nó pai onde instanciar as cenas."
#: editor/scene_tree_dock.cpp
msgid "Error loading scene from %s"
@@ -6415,9 +6297,8 @@ msgid "Error duplicating scene to save it."
msgstr "Erro duplicando cena ao salvar."
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Sub-Resources:"
-msgstr "Recursos:"
+msgstr "Sub-Recursos:"
#: editor/scene_tree_dock.cpp
msgid "Clear Inheritance"
@@ -6444,14 +6325,12 @@ msgid "Change Type"
msgstr "Alterar Tipo"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Attach Script"
msgstr "Adicionar Script"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Clear Script"
-msgstr "Criar Script"
+msgstr "Remover Script"
#: editor/scene_tree_dock.cpp
msgid "Merge From Scene"
@@ -6462,9 +6341,8 @@ msgid "Save Branch as Scene"
msgstr "Salvar Ramo como Cena"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Copy Node Path"
-msgstr "Copiar Caminho"
+msgstr "Copiar Caminho do Nó"
#: editor/scene_tree_dock.cpp
msgid "Delete (No Confirm)"
@@ -6483,19 +6361,16 @@ msgstr ""
"existe um nó raiz."
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Filter nodes"
-msgstr "Filtros"
+msgstr "Filtrar nós"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Attach a new or existing script for the selected node."
-msgstr "Criar um script novo para o nó selecionado."
+msgstr "Adicionar um script novo ou existente para o nó selecionado."
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Clear a script for the selected node."
-msgstr "Criar um script novo para o nó selecionado."
+msgstr "Remove um script do nó selecionado."
#: editor/scene_tree_dock.cpp
msgid "Clear Inheritance? (No Undo!)"
@@ -6518,7 +6393,6 @@ msgid "Node configuration warning:"
msgstr "Aviso de configuração de nó:"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid ""
"Node has connection(s) and group(s)\n"
"Click to show signals dock."
@@ -6567,9 +6441,8 @@ msgstr ""
"Clique para fazê-los selecionáveis"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Toggle Visibility"
-msgstr "Alternar Spatial Visível"
+msgstr "Alternar Visiblidade"
#: editor/scene_tree_editor.cpp
msgid "Invalid node name, the following characters are not allowed:"
@@ -6592,19 +6465,16 @@ msgid "Select a Node"
msgstr "Selecione um Nó"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Error loading template '%s'"
-msgstr "Erro ao carregar imagem:"
+msgstr "Erro ao carregar modelo '%s'"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Error - Could not create script in filesystem."
-msgstr "Não foi possível criar o script no sistema de arquivos."
+msgstr "Erro - Não foi possível criar o script no sistema de arquivos."
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Error loading script from %s"
-msgstr "Erro ao carregar cena de %s"
+msgstr "Erro ao carregar script de %s"
#: editor/script_create_dialog.cpp
msgid "N/A"
@@ -6624,12 +6494,11 @@ msgstr "Caminho base inválido"
#: editor/script_create_dialog.cpp
msgid "Directory of the same name exists"
-msgstr ""
+msgstr "Um diretório de mesmo nome existe"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "File exists, will be reused"
-msgstr "O arquivo existe. Sobrescrever?"
+msgstr "O arquivo existe, será reaproveitado"
#: editor/script_create_dialog.cpp
msgid "Invalid extension"
@@ -6640,23 +6509,20 @@ msgid "Wrong extension chosen"
msgstr "Extensão errada escolhida"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Invalid Path"
-msgstr "Caminho inválido."
+msgstr "Caminho Inválido"
#: editor/script_create_dialog.cpp
msgid "Invalid class name"
msgstr "Nome de classe inválido"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Invalid inherited parent name or path"
-msgstr "Nome da propriedade de índice inválido."
+msgstr "Nome ou caminho de pai herdado invláido"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script valid"
-msgstr "Script"
+msgstr "Script válido"
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9 and _"
@@ -6667,43 +6533,36 @@ msgid "Built-in script (into scene file)"
msgstr "Script embutido (no arquivo da cena)"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Create new script file"
-msgstr "Criar Script"
+msgstr "Criar novo arquivo de script"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Load existing script file"
-msgstr "Próximo Script"
+msgstr "Carregar arquivo de script existente"
#: editor/script_create_dialog.cpp
msgid "Language"
msgstr "Idioma"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Inherits"
-msgstr "Herda de:"
+msgstr "Herda de"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Class Name"
-msgstr "Nome da Classe:"
+msgstr "Nome da Classe"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Template"
-msgstr "Remover Item"
+msgstr "Modelo"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Built-in Script"
msgstr "Script Embutido"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Attach Node Script"
-msgstr "Criar Script para Nó"
+msgstr "Adicionar Script ao Nó"
#: editor/script_editor_debugger.cpp
msgid "Bytes:"
@@ -6727,7 +6586,7 @@ msgstr "Função:"
#: editor/script_editor_debugger.cpp
msgid "Pick one or more items from the list to display the graph."
-msgstr ""
+msgstr "Escolhe um ou mais itens da lista para mostrar o gráfico."
#: editor/script_editor_debugger.cpp
msgid "Errors"
@@ -6791,7 +6650,7 @@ msgstr "Monitores"
#: editor/script_editor_debugger.cpp
msgid "List of Video Memory Usage by Resource:"
-msgstr "Listagem de Uso Memória de Vídeo por Recurso:"
+msgstr "Lista de Uso Memória de Vídeo por Recurso:"
#: editor/script_editor_debugger.cpp
msgid "Total:"
@@ -6886,27 +6745,24 @@ msgid "Change Particles AABB"
msgstr "Mudar o AABB das Partículas"
#: editor/spatial_editor_gizmos.cpp
-#, fuzzy
msgid "Change Probe Extents"
-msgstr "Alterar a Extensão do Notificador"
+msgstr "Alterar a Extensão da Sonda"
#: modules/gdnative/gd_native_library_editor.cpp
-#, fuzzy
msgid "Library"
-msgstr "MeshLibrary..."
+msgstr "Biblioteca"
#: modules/gdnative/gd_native_library_editor.cpp
-#, fuzzy
msgid "Status"
-msgstr "Status:"
+msgstr "Estado"
#: modules/gdnative/gd_native_library_editor.cpp
msgid "Libraries: "
-msgstr ""
+msgstr "Bibliotecas: "
#: modules/gdnative/register_types.cpp
msgid "GDNative"
-msgstr ""
+msgstr "GDNative"
#: modules/gdscript/gd_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -6957,42 +6813,34 @@ msgid "Object can't provide a length."
msgstr "Objeto não pôde fornecer um comprimento."
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "GridMap Delete Selection"
-msgstr "Excluir Selecionados"
+msgstr "Excluir Seleção do Gridap"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "GridMap Duplicate Selection"
-msgstr "Duplicar Seleção"
+msgstr "Duplicar Seleção do GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Snap View"
-msgstr "Visão Superior"
+msgstr "Ancorar Vista"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Prev Level (%sDown Wheel)"
msgstr "Nível anterior ("
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Next Level (%sUp Wheel)"
msgstr "Nível seguinte ("
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Clip Disabled"
-msgstr "Desabilitado"
+msgstr "Corte Desabilitado"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Clip Above"
msgstr "Cortar Acima"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Clip Below"
msgstr "Cortar Abaixo"
@@ -7009,103 +6857,87 @@ msgid "Edit Z Axis"
msgstr "Editar Eixo Z"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Cursor Rotate X"
-msgstr "Ctrl: Rotaciona"
+msgstr "Rotacionar Cursor em X"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Cursor Rotate Y"
-msgstr "Ctrl: Rotaciona"
+msgstr "Rotacionar Cursor em Y"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Cursor Rotate Z"
-msgstr "Ctrl: Rotaciona"
+msgstr "Rotacionar Cursor em Z"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Cursor Back Rotate X"
-msgstr "Rotacionar Cursor em X"
+msgstr "Contra-rotacionar Cursor em X"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Cursor Back Rotate Y"
msgstr "Rotacionar Cursor em Y"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Cursor Back Rotate Z"
-msgstr "Rotacionar Cursor em Z"
+msgstr "Contra-rotacionar Cursor em Z"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Cursor Clear Rotation"
msgstr "Limpar Rotação do Cursor"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Create Area"
-msgstr "Criar Novo"
+msgstr "Criar Ãrea"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Create Exterior Connector"
-msgstr "Criar Novo Projeto"
+msgstr "Criar Conector de Exterior"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Erase Area"
-msgstr "Apagar TileMap"
+msgstr "Apagar Ãrea"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Selection -> Duplicate"
-msgstr "Apenas na Seleção"
+msgstr "Seleção -> Duplicar"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Selection -> Clear"
-msgstr "Apenas na Seleção"
+msgstr "Seleção -> Limpar"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "GridMap Settings"
-msgstr "Configurações do Snap"
+msgstr "Configurações do GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Pick Distance:"
-msgstr "Instância:"
+msgstr "Escolha uma Distância:"
#: modules/mono/editor/mono_bottom_panel.cpp
msgid "Builds"
-msgstr ""
+msgstr "Compilações"
#: modules/visual_script/visual_script.cpp
-#, fuzzy
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
"properly!"
msgstr ""
-"Um nó yieldado sem memória corrente, por favor leia a documentação sobre "
-"como usar o yield corretamente!"
+"Um nó fez um yield sem memória de trabalho, por favor leia a documentação "
+"sobre como usar yield corretamente!"
#: modules/visual_script/visual_script.cpp
-#, fuzzy
msgid ""
"Node yielded, but did not return a function state in the first working "
"memory."
msgstr ""
-"Nó yieldado, mas não retornou um estado de função na primeira memória "
-"corrente."
+"Nó entrou em yield, mas não retornou um estado de função na primeira memória "
+"de trabalho."
#: modules/visual_script/visual_script.cpp
-#, fuzzy
msgid ""
"Return value must be assigned to first element of node working memory! Fix "
"your node please."
msgstr ""
-"Um alor de retorno deve ser atribuído ao primeiro elemento da memória "
+"Um valor de retorno deve ser atribuído ao primeiro elemento da memória "
"corrente do nó! Conserte seu node, por favor."
#: modules/visual_script/visual_script.cpp
@@ -7121,29 +6953,24 @@ msgid "Stack overflow with stack depth: "
msgstr "Sobrecarga da pilha com profundidade: "
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Signal Arguments"
-msgstr "Editar Argumentos do Sinal:"
+msgstr "Editar Argumentos do Sinal"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Argument Type"
-msgstr "Alterar Tipo de Valor do Vetor"
+msgstr "Alterar Tipo do Argumento"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Argument name"
-msgstr "Alterar Nome de Entrada"
+msgstr "Alterar Nome do Argumento"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Set Variable Default Value"
-msgstr "Alterar Valor Padrão"
+msgstr "Definir o Valor Padrão da Variável"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Set Variable Type"
-msgstr "Editar Variável:"
+msgstr "Definir o Tipo da Variável"
#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
@@ -7186,7 +7013,6 @@ msgid "Add Signal"
msgstr "Adicionar Sinal"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Expression"
msgstr "Alterar Expressão"
@@ -7195,14 +7021,12 @@ msgid "Add Node"
msgstr "Adicionar Nó"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Remove VisualScript Nodes"
-msgstr "Remover Chaves Invalidas"
+msgstr "Remover Nós VisualScript"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Duplicate VisualScript Nodes"
-msgstr "Duplicar Nó(s) de Grafo(s)"
+msgstr "Duplicar Nós VisualScript"
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Meta to drop a Getter. Hold Shift to drop a generic signature."
@@ -7249,24 +7073,20 @@ msgid "Add Setter Property"
msgstr "Adicionar Setter de Propriedade"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Base Type"
-msgstr "Alterar Tipo"
+msgstr "Mudar Tipo Base"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Move Node(s)"
-msgstr "Remover Nó(s)"
+msgstr "Mover Nó(s)"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Remove VisualScript Node"
-msgstr "Remover Nó de Shader Graph"
+msgstr "Remover Nó VisualScript"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Connect Nodes"
-msgstr "Conectar ao Nó:"
+msgstr "Conectar Nós"
#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
@@ -7277,9 +7097,8 @@ msgid "Sequence"
msgstr "Sequência"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Switch"
-msgstr "Mudar"
+msgstr "Trocar"
#: modules/visual_script/visual_script_editor.cpp
msgid "Iterator"
@@ -7298,51 +7117,44 @@ msgid "Call"
msgstr "Chamar"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Get"
msgstr "Obter"
#: modules/visual_script/visual_script_editor.cpp
msgid "Script already has function '%s'"
-msgstr ""
+msgstr "Script já tem uma função '%s'"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Change Input Value"
-msgstr "Alterar Nome de Entrada"
+msgstr "Alterar Valor de Entrada"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Can't copy the function node."
-msgstr "Não é possível operar em \"..\""
+msgstr "Não é possível copiar o nó de função."
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Clipboard is empty!"
-msgstr "Recurso da área de transferência está vazio!"
+msgstr "Ãrea de transferência vazia!"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Paste VisualScript Nodes"
-msgstr "Colar Nós"
+msgstr "Colar Nós VisualScript"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove Function"
msgstr "Remover Função"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Edit Variable"
-msgstr "Editar Variável:"
+msgstr "Editar Variável"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove Variable"
msgstr "Remover Variável"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Edit Signal"
-msgstr "Editando Sinal:"
+msgstr "Editar Sinal"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove Signal"
@@ -7417,19 +7229,16 @@ msgid "Base object is not a Node!"
msgstr "Objeto base não é um Node!"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Path does not lead Node!"
-msgstr "O caminho não é local"
+msgstr "O caminho não leva a um Node!"
#: modules/visual_script/visual_script_func_nodes.cpp
-#, fuzzy
msgid "Invalid index property name '%s' in node %s."
msgstr "Nome de propriedade '%s' inválido no nó %s."
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid ": Invalid argument of type: "
-msgstr "Nome de classe pai inválido"
+msgstr ": Argumento inválido do tipo: "
#: modules/visual_script/visual_script_nodes.cpp
msgid ": Invalid arguments: "
@@ -7444,7 +7253,6 @@ msgid "VariableSet not found in script: "
msgstr "VariableSet não encontrada no script: "
#: modules/visual_script/visual_script_nodes.cpp
-#, fuzzy
msgid "Custom node has no _step() method, can't process graph."
msgstr ""
"Nó customizado não tem um método _step(), não foi possível processar o "
@@ -7467,18 +7275,16 @@ msgid "Run exported HTML in the system's default browser."
msgstr "Rodar HTML exportado no navegador padrão do sistema."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not write file:\n"
-msgstr "Não se pôde achar tile:"
+msgstr "Não foi possível escrever o arquivo:\n"
#: platform/javascript/export/export.cpp
msgid "Could not read file:\n"
msgstr "Não foi possível ler o arquivo:\n"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not open template for export:\n"
-msgstr "Não foi possível criar a pasta."
+msgstr "Não foi possível abrir o modelo para exportar:\n"
#: scene/2d/animated_sprite.cpp
msgid ""
@@ -7703,10 +7509,10 @@ msgstr ""
"apenas fornece dados de navegação."
#: scene/3d/particles.cpp
-#, fuzzy
msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
-msgstr "Nada está visível porque as malhas não foram atribuídas a draw passes."
+msgstr ""
+"Nada está visível porque as malhas não foram atribuídas a passes de desenho."
#: scene/3d/physics_body.cpp
msgid ""
@@ -7719,9 +7525,8 @@ msgstr ""
"Ao invés disso, mude o tamanho nas formas de colisão filhas."
#: scene/3d/remote_transform.cpp
-#, fuzzy
msgid "Path property must point to a valid Spatial node to work."
-msgstr "A propriedade Caminho deve apontar a um nó Particles2D para funcionar."
+msgstr "A propriedade Caminho deve apontar para um nó Spatial para funcionar."
#: scene/3d/scenario_fx.cpp
msgid ""
@@ -7743,11 +7548,12 @@ msgid ""
"VehicleWheel serves to provide a wheel system to a VehicleBody. Please use "
"it as a child of a VehicleBody."
msgstr ""
+"VehiceWheel serve para fornecer um sistema de rodas para um VehicleBody. Por "
+"favor, use ele como um filho de um VehicleBody."
#: scene/gui/color_picker.cpp
-#, fuzzy
msgid "Raw Mode"
-msgstr "Modo Panorâmico"
+msgstr "Modo Bruto"
#: scene/gui/color_picker.cpp
msgid "Add current color as a preset"
@@ -7776,7 +7582,6 @@ msgstr ""
"ocultarão ao rodar a cena."
#: scene/gui/scroll_container.cpp
-#, fuzzy
msgid ""
"ScrollContainer is intended to work with a single child control.\n"
"Use a container as child (VBox,HBox,etc), or a Control and set the custom "
@@ -7787,13 +7592,12 @@ msgstr ""
"tamanho mínimo manualmente."
#: scene/main/scene_tree.cpp
-#, fuzzy
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
msgstr ""
"O Ambiente Padrão como especificado nas Configurações de Projeto "
-"(Renderização - Viewport -> Ambiente Padrão) não pode ser carregado."
+"(Renderização - Viewport -> Ambiente Padrão) não pôde ser carregado."
#: scene/main/viewport.cpp
msgid ""
@@ -7823,6 +7627,15 @@ msgstr "Erro ao carregar fonte."
msgid "Invalid font size."
msgstr "Tamanho de fonte inválido."
+#~ msgid "Filter:"
+#~ msgstr "Filtro:"
+
+#~ msgid "' parsing of config failed."
+#~ msgstr "' falha no processamento de configurações."
+
+#~ msgid "Theme"
+#~ msgstr "Tema"
+
#~ msgid "Method List For '%s':"
#~ msgstr "Lista de Métodos para \"%s\":"
@@ -8703,9 +8516,6 @@ msgstr "Tamanho de fonte inválido."
#~ msgid "Preview Atlas"
#~ msgstr "Prever Atlas"
-#~ msgid "Image Filter:"
-#~ msgstr "Filtrar Imagens:"
-
#~ msgid "Images:"
#~ msgstr "Imagens:"
diff --git a/editor/translations/pt_PT.po b/editor/translations/pt_PT.po
index ec701bebb4..4b4a98857c 100644
--- a/editor/translations/pt_PT.po
+++ b/editor/translations/pt_PT.po
@@ -1,22 +1,24 @@
# Portuguese (Portugal) translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# António Sarmento <antonio.luis.sarmento@gmail.com>, 2016.
# João Graça <jgraca95@gmail.com>, 2017.
+# Rueben Stevens <supercell03@gmail.com>, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2017-09-28 16:47+0000\n"
-"Last-Translator: João Graça <jgraca95@gmail.com>\n"
+"PO-Revision-Date: 2017-10-25 01:48+0000\n"
+"Last-Translator: Rueben Stevens <supercell03@gmail.com>\n"
"Language-Team: Portuguese (Portugal) <https://hosted.weblate.org/projects/"
"godot-engine/godot/pt_PT/>\n"
"Language: pt_PT\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 2.17-dev\n"
+"X-Generator: Weblate 2.17\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -24,7 +26,7 @@ msgstr "desativado"
#: editor/animation_editor.cpp
msgid "All Selection"
-msgstr ""
+msgstr "Toda a selecção"
#: editor/animation_editor.cpp
#, fuzzy
@@ -65,15 +67,15 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Remove Anim Track"
-msgstr ""
+msgstr "Remover a banda de animação"
#: editor/animation_editor.cpp
msgid "Set Transitions to:"
-msgstr ""
+msgstr "Definir transições para:"
#: editor/animation_editor.cpp
msgid "Anim Track Rename"
-msgstr ""
+msgstr "Renomear Banda de Anim"
#: editor/animation_editor.cpp
msgid "Anim Track Change Interpolation"
@@ -88,12 +90,13 @@ msgid "Anim Track Change Wrap Mode"
msgstr ""
#: editor/animation_editor.cpp
+#, fuzzy
msgid "Edit Node Curve"
-msgstr ""
+msgstr "Editar Curva de Node"
#: editor/animation_editor.cpp
msgid "Edit Selection Curve"
-msgstr ""
+msgstr "Editar Curva de Selecção"
#: editor/animation_editor.cpp
msgid "Anim Delete Keys"
@@ -101,7 +104,7 @@ msgstr ""
#: editor/animation_editor.cpp editor/plugins/tile_map_editor_plugin.cpp
msgid "Duplicate Selection"
-msgstr ""
+msgstr "Duplicar Selecção"
#: editor/animation_editor.cpp
msgid "Duplicate Transposed"
@@ -109,19 +112,19 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Remove Selection"
-msgstr ""
+msgstr "Remover Selecção"
#: editor/animation_editor.cpp
msgid "Continuous"
-msgstr ""
+msgstr "Contínuo"
#: editor/animation_editor.cpp
msgid "Discrete"
-msgstr ""
+msgstr "Discreto"
#: editor/animation_editor.cpp
msgid "Trigger"
-msgstr ""
+msgstr "Gatilho"
#: editor/animation_editor.cpp
msgid "Anim Add Key"
@@ -133,28 +136,28 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Scale Selection"
-msgstr ""
+msgstr "Escalar Selecção"
#: editor/animation_editor.cpp
msgid "Scale From Cursor"
-msgstr ""
+msgstr "Alterar escala a partir do cursor"
#: editor/animation_editor.cpp
msgid "Goto Next Step"
-msgstr ""
+msgstr "Ir para o próximo passo"
#: editor/animation_editor.cpp
msgid "Goto Prev Step"
-msgstr ""
+msgstr "Ir para passo anterior"
#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
#: editor/property_editor.cpp
msgid "Linear"
-msgstr ""
+msgstr "Linear"
#: editor/animation_editor.cpp editor/plugins/theme_editor_plugin.cpp
msgid "Constant"
-msgstr ""
+msgstr "Constante"
#: editor/animation_editor.cpp
msgid "In"
@@ -174,15 +177,15 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Transitions"
-msgstr ""
+msgstr "Transições"
#: editor/animation_editor.cpp
msgid "Optimize Animation"
-msgstr ""
+msgstr "Optimizar Animação"
#: editor/animation_editor.cpp
msgid "Clean-Up Animation"
-msgstr ""
+msgstr "Limpar Animação"
#: editor/animation_editor.cpp
msgid "Create NEW track for %s and insert key?"
@@ -199,7 +202,7 @@ msgstr ""
#: editor/plugins/particles_editor_plugin.cpp editor/project_manager.cpp
#: editor/script_create_dialog.cpp
msgid "Create"
-msgstr ""
+msgstr "Criar"
#: editor/animation_editor.cpp
msgid "Anim Create & Insert"
@@ -243,15 +246,15 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Length (s):"
-msgstr ""
+msgstr "Comprimento (s):"
#: editor/animation_editor.cpp
msgid "Animation length (in seconds)."
-msgstr ""
+msgstr "Duração da animação (em segundos)."
#: editor/animation_editor.cpp
msgid "Step (s):"
-msgstr ""
+msgstr "Passos (s):"
#: editor/animation_editor.cpp
msgid "Cursor step snap (in seconds)."
@@ -259,11 +262,11 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Enable/Disable looping in animation."
-msgstr ""
+msgstr "Habilitar/Desabilitar repetição na animação."
#: editor/animation_editor.cpp
msgid "Add new tracks."
-msgstr ""
+msgstr "Adicionar novas bandas."
#: editor/animation_editor.cpp
msgid "Move current track up."
@@ -275,7 +278,7 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Remove selected track."
-msgstr ""
+msgstr "Remover a banda seleccionada."
#: editor/animation_editor.cpp
msgid "Track tools"
@@ -283,7 +286,7 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Enable editing of individual keys by clicking them."
-msgstr ""
+msgstr "Habilitar a edição de chaves individuais ao clicar nelas."
#: editor/animation_editor.cpp
msgid "Anim. Optimizer"
@@ -1207,10 +1210,6 @@ msgid "File:"
msgstr ""
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr ""
@@ -1653,19 +1652,24 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+msgid "Unable to load addon script from path: '%s'."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2185,7 +2189,7 @@ msgid "Frame %"
msgstr ""
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+msgid "Physics Frame %"
msgstr ""
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3838,7 +3842,7 @@ msgid "Eroding walkable area..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4301,7 +4305,8 @@ msgstr ""
msgid "Break"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr ""
@@ -4395,7 +4400,8 @@ msgid "Cut"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr ""
@@ -5153,7 +5159,11 @@ msgid "Remove All"
msgstr "Remover Sinal"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
@@ -5436,7 +5446,7 @@ msgid "Export With Debug"
msgstr ""
#: editor/project_manager.cpp
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr ""
#: editor/project_manager.cpp
@@ -5565,6 +5575,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5595,6 +5611,10 @@ msgid "Exit"
msgstr ""
#: editor/project_manager.cpp
+msgid "Restart Now"
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Can't run project"
msgstr ""
@@ -5818,6 +5838,14 @@ msgid "Remove Resource Remap Option"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
@@ -5878,6 +5906,26 @@ msgid "Locale"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show all locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Filter mode:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Locales:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
diff --git a/editor/translations/ru.po b/editor/translations/ru.po
index 898098d02f..05c164c3ee 100644
--- a/editor/translations/ru.po
+++ b/editor/translations/ru.po
@@ -1,5 +1,6 @@
# Russian translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# B10nicMachine <shumik1337@gmail.com>, 2017.
@@ -13,8 +14,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2017-09-05 19:02+0000\n"
-"Last-Translator: B10nicMachine <shumik1337@gmail.com>\n"
+"PO-Revision-Date: 2017-10-26 14:49+0000\n"
+"Last-Translator: ijet <my-ijet@mail.ru>\n"
"Language-Team: Russian <https://hosted.weblate.org/projects/godot-engine/"
"godot/ru/>\n"
"Language: ru\n"
@@ -23,7 +24,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 2.17-dev\n"
+"X-Generator: Weblate 2.17\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -659,9 +660,8 @@ msgstr ""
"Ð’ÑÑ‘ равно удалить его? (ÐÐµÐ»ÑŒÐ·Ñ Ð¾Ñ‚Ð¼ÐµÐ½Ð¸Ñ‚ÑŒ!)"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid "Cannot remove:\n"
-msgstr "Ðе удаетÑÑ Ñ€Ð°Ð·Ñ€ÐµÑˆÐ¸Ñ‚ÑŒ."
+msgstr "Ðе удаетÑÑ ÑƒÐ´Ð°Ð»Ð¸Ñ‚ÑŒ:\n"
#: editor/dependency_editor.cpp
msgid "Error loading:"
@@ -748,32 +748,31 @@ msgstr "Ðвторы"
#: editor/editor_about.cpp
msgid "Platinum Sponsors"
-msgstr ""
+msgstr "Платиновые СпонÑоры"
#: editor/editor_about.cpp
msgid "Gold Sponsors"
-msgstr ""
+msgstr "Золотые СпонÑоры"
#: editor/editor_about.cpp
msgid "Mini Sponsors"
-msgstr ""
+msgstr "Мини СпонÑоры"
#: editor/editor_about.cpp
msgid "Gold Donors"
-msgstr ""
+msgstr "Золотые Доноры"
#: editor/editor_about.cpp
msgid "Silver Donors"
-msgstr ""
+msgstr "СеребрÑные Доноры"
#: editor/editor_about.cpp
-#, fuzzy
msgid "Bronze Donors"
-msgstr "Копировать вниз"
+msgstr "Бронзовые Доноры"
#: editor/editor_about.cpp
msgid "Donors"
-msgstr ""
+msgstr "Доноры"
#: editor/editor_about.cpp
msgid "License"
@@ -899,9 +898,8 @@ msgid "Duplicate"
msgstr "Дублировать"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Reset Volume"
-msgstr "СброÑить приближение"
+msgstr "СброÑить громкоÑть"
#: editor/editor_audio_buses.cpp
msgid "Delete Effect"
@@ -924,9 +922,8 @@ msgid "Duplicate Audio Bus"
msgstr "Дублировать аудио шину"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Reset Bus Volume"
-msgstr "СброÑить приближение"
+msgstr "СброÑить громкоÑть шины"
#: editor/editor_audio_buses.cpp
msgid "Move Audio Bus"
@@ -1215,9 +1212,8 @@ msgid "Move Favorite Down"
msgstr "ПеремеÑтить избранное вниз"
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Go to parent folder"
-msgstr "Ðевозможно Ñоздать папку."
+msgstr "Перейти к родительÑкой папке"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
@@ -1233,10 +1229,6 @@ msgid "File:"
msgstr "Файл:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "Фильтр:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "Ðужно иÑпользовать доÑтупное раÑширение."
@@ -1282,27 +1274,24 @@ msgid "Brief Description:"
msgstr "Краткое опиÑание:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Members"
-msgstr "УчаÑтники:"
+msgstr "УчаÑтники"
#: editor/editor_help.cpp modules/visual_script/visual_script_editor.cpp
msgid "Members:"
msgstr "УчаÑтники:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Public Methods"
-msgstr "СпиÑок методов:"
+msgstr "Публичные методы"
#: editor/editor_help.cpp
msgid "Public Methods:"
msgstr "СпиÑок методов:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "GUI Theme Items"
-msgstr "Тема Ñлементов GUI:"
+msgstr "Тема Ñлементов GUI"
#: editor/editor_help.cpp
msgid "GUI Theme Items:"
@@ -1313,9 +1302,8 @@ msgid "Signals:"
msgstr "Сигналы:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Enumerations"
-msgstr "ПеречиÑлениÑ:"
+msgstr "ПеречиÑлениÑ"
#: editor/editor_help.cpp
msgid "Enumerations:"
@@ -1326,23 +1314,20 @@ msgid "enum "
msgstr "перечиÑление "
#: editor/editor_help.cpp
-#, fuzzy
msgid "Constants"
-msgstr "КонÑтанты:"
+msgstr "КонÑтанты"
#: editor/editor_help.cpp
msgid "Constants:"
msgstr "КонÑтанты:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Description"
-msgstr "ОпиÑание:"
+msgstr "ОпиÑание"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Properties"
-msgstr "СвойÑтва:"
+msgstr "СвойÑтва"
#: editor/editor_help.cpp
msgid "Property Description:"
@@ -1353,11 +1338,12 @@ msgid ""
"There is currently no description for this property. Please help us by "
"[color=$color][url=$url]contributing one[/url][/color]!"
msgstr ""
+"Ð’ наÑтоÑщее Ð²Ñ€ÐµÐ¼Ñ Ð¾Ñ‚ÑутÑтвует опиÑание Ñтого ÑвойÑтва. ПожалуйÑта [color="
+"$color][url=$url]помогите нам[/url][/color]!"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Methods"
-msgstr "СпиÑок методов:"
+msgstr "Методы"
#: editor/editor_help.cpp
msgid "Method Description:"
@@ -1368,6 +1354,8 @@ msgid ""
"There is currently no description for this method. Please help us by [color="
"$color][url=$url]contributing one[/url][/color]!"
msgstr ""
+"Ð’ наÑтоÑщее Ð²Ñ€ÐµÐ¼Ñ Ð¾Ñ‚ÑутÑтвует опиÑание Ñтого метода. ПожалуйÑта [color="
+"$color][url=$url]помогите нам[/url][/color]!"
#: editor/editor_help.cpp
msgid "Search Text"
@@ -1409,28 +1397,24 @@ msgid "Error while saving."
msgstr "Ошибка при Ñохранении."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Can't open '%s'."
-msgstr "Ðевозможно работать Ñ '..'"
+msgstr "Ðе удаетÑÑ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚ÑŒ '%s'."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Error while parsing '%s'."
-msgstr "Ошибка при Ñохранении."
+msgstr "Ошибка при разборе '%s'."
#: editor/editor_node.cpp
msgid "Unexpected end of file '%s'."
-msgstr ""
+msgstr "Ðеожиданный конец файла '%s'."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Missing '%s' or its dependencies."
-msgstr "Сцена '%s' имеет иÑпорченные завиÑимоÑти:"
+msgstr "ОтÑутÑтвует '%s' или его завиÑимоÑти."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Error while loading '%s'."
-msgstr "Ошибка при Ñохранении."
+msgstr "Ошибка при загрузке '%s'."
#: editor/editor_node.cpp
msgid "Saving Scene"
@@ -1497,26 +1481,41 @@ msgid ""
"Please read the documentation relevant to importing scenes to better "
"understand this workflow."
msgstr ""
+"Этот реÑÑƒÑ€Ñ Ð¿Ñ€Ð¸Ð½Ð°Ð´Ð»ÐµÐ¶Ð¸Ñ‚ Ñцене, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ð±Ñ‹Ð»Ð° импортирована, поÑтому он не "
+"редактируетÑÑ.\n"
+"ПожалуйÑта, прочитайте документацию, имеющую отношение к импорту Ñцены, "
+"чтобы лучше понÑть Ñтот процеÑÑ."
#: editor/editor_node.cpp
+#, fuzzy
msgid ""
"This resource belongs to a scene that was instanced or inherited.\n"
"Changes to it will not be kept when saving the current scene."
msgstr ""
+"Этот реÑÑƒÑ€Ñ Ð¿Ñ€Ð¸Ð½Ð°Ð´Ð»ÐµÐ¶Ð¸Ñ‚ к Ñцене, инÑтанцированной или унаÑледованной.\n"
+"Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð½Ðµ будут Ñохранены при Ñохранении текущей Ñцены."
#: editor/editor_node.cpp
+#, fuzzy
msgid ""
"This resource was imported, so it's not editable. Change its settings in the "
"import panel and then re-import."
msgstr ""
+"Этот реÑÑƒÑ€Ñ Ð±Ñ‹Ð» импортирован, поÑтому он не редактируетÑÑ. Измени наÑтройки "
+"в панеле импорта, а затем повторно импортируйте."
#: editor/editor_node.cpp
+#, fuzzy
msgid ""
"This scene was imported, so changes to it will not be kept.\n"
"Instancing it or inheriting will allow making changes to it.\n"
"Please read the documentation relevant to importing scenes to better "
"understand this workflow."
msgstr ""
+"Эта Ñцена была импортирована, так что Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð½Ðµ будут Ñохранены.\n"
+"ИнÑтанÑинг или наÑледование позволит внеÑти Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð² неё.\n"
+"ПожалуйÑта, прочитайте документацию, имеющую отношение к импорту Ñцены, "
+"чтобы лучше понÑть Ñтот процеÑÑ."
#: editor/editor_node.cpp
msgid "Copy Params"
@@ -1694,25 +1693,37 @@ msgid ""
"This option is deprecated. Situations where refresh must be forced are now "
"considered a bug. Please report."
msgstr ""
+"Этот параметр уÑтаревший. Ситуации, в которых необходимо принудительное "
+"обновление ÑчитаютÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ¾Ð¹. ПроÑьба Ñообщить."
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
msgstr "Выберите главную Ñцену"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+#, fuzzy
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr "Ðе удаетÑÑ Ð²ÐºÐ»ÑŽÑ‡Ð¸Ñ‚ÑŒ плагин: '"
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
-msgstr "' анализ конфигурации не удалÑÑ."
+#, fuzzy
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
+msgstr "Ðе удаетÑÑ Ð½Ð°Ð¹Ñ‚Ð¸ поле script Ð´Ð»Ñ Ð¿Ð»Ð°Ð³Ð¸Ð½Ð°: ' res://addons/"
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
-msgstr "Ðе удаетÑÑ Ð½Ð°Ð¹Ñ‚Ð¸ поле script Ð´Ð»Ñ Ð¿Ð»Ð°Ð³Ð¸Ð½Ð°: ' res://addons/"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "Ðе удалоÑÑŒ загрузить Ñкрипт из иÑточника: '"
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+#, fuzzy
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
+msgstr "Ðе удалоÑÑŒ загрузить Ñкрипт из иÑточника: '"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr "Ðе удалоÑÑŒ загрузить Ñкрипт из иÑточника: '"
#: editor/editor_node.cpp
@@ -1743,9 +1754,8 @@ msgid "Scene '%s' has broken dependencies:"
msgstr "Сцена '%s' имеет иÑпорченные завиÑимоÑти:"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Clear Recent Scenes"
-msgstr "ОчиÑтить Ðедавние Файлы"
+msgstr "ОчиÑтить поÑледние Ñцены"
#: editor/editor_node.cpp
msgid "Save Layout"
@@ -1948,7 +1958,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Sync Scene Changes"
-msgstr "Ð¡Ð¸Ð½Ñ…Ñ€Ð¾Ð½Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ð¹ на Ñцене"
+msgstr "Ð¡Ð¸Ð½Ñ…Ñ€Ð¾Ð½Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ð¹ в Ñцене"
#: editor/editor_node.cpp
msgid ""
@@ -2119,9 +2129,8 @@ msgid "Object properties."
msgstr "СвойÑтва объекта."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Changes may be lost!"
-msgstr "Измените изображение группы"
+msgstr "Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¼Ð¾Ð³ÑƒÑ‚ быть потерÑны!"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
#: editor/project_manager.cpp
@@ -2205,9 +2214,8 @@ msgid "Open the previous Editor"
msgstr "Открыть предыдущий редактор"
#: editor/editor_plugin.cpp
-#, fuzzy
msgid "Creating Mesh Previews"
-msgstr "Создание библиотеки полиÑеток"
+msgstr "Создание предпроÑмотра"
#: editor/editor_plugin.cpp
msgid "Thumbnail.."
@@ -2259,7 +2267,8 @@ msgid "Frame %"
msgstr "Кадр %"
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+#, fuzzy
+msgid "Physics Frame %"
msgstr "ФикÑированный кадр %"
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -2426,17 +2435,20 @@ msgstr "Ðе удалоÑÑŒ перейти к '"
#: editor/filesystem_dock.cpp
msgid "View items as a grid of thumbnails"
-msgstr ""
+msgstr "ПроÑмотр Ñлементов в виде миниатюр"
#: editor/filesystem_dock.cpp
msgid "View items as a list"
-msgstr ""
+msgstr "ПроÑмотр Ñлементов в виде ÑпиÑка"
#: editor/filesystem_dock.cpp
msgid ""
"\n"
"Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
+"\n"
+"СтатуÑ: Импорт файла не удалÑÑ. ПожалуйÑта, иÑправьте файл и "
+"переимпортируйте вручную."
#: editor/filesystem_dock.cpp
msgid ""
@@ -2447,57 +2459,48 @@ msgstr ""
"ИÑточник: "
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Cannot move/rename resources root."
-msgstr "Ðе удалоÑÑŒ загрузить/иÑполнить иÑходный шрифт."
+msgstr "ÐÐµÐ»ÑŒÐ·Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÑтить/переименовать корень."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Cannot move a folder into itself.\n"
-msgstr "Ðевозможно импортировать файл поверх негоже:"
+msgstr "Ðевозможно перемеÑтить папку в ÑебÑ.\n"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Error moving:\n"
-msgstr "Ошибка Ð¿ÐµÑ€ÐµÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ð°:\n"
+msgstr "Ошибка перемещениÑ:\n"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Unable to update dependencies:\n"
-msgstr "Сцена '%s' имеет иÑпорченные завиÑимоÑти:"
+msgstr "Ðе удаетÑÑ Ð¾Ð±Ð½Ð¾Ð²Ð¸Ñ‚ÑŒ завиÑимоÑти:\n"
#: editor/filesystem_dock.cpp
msgid "No name provided"
-msgstr ""
+msgstr "Ðе указано имÑ"
#: editor/filesystem_dock.cpp
msgid "Provided name contains invalid characters"
-msgstr ""
+msgstr "Ð˜Ð¼Ñ Ñодержит недопуÑтимые Ñимволы"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "No name provided."
-msgstr "Переименовать или ПеремеÑтить.."
+msgstr "Ðе предоÑтавлено имÑ."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Name contains invalid characters."
-msgstr "ДопуÑтимые Ñимволы:"
+msgstr "Ð˜Ð¼Ñ Ñодержит недопуÑтимые Ñимволы."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "A file or folder with this name already exists."
-msgstr "Ðазвание группы уже ÑущеÑтвует!"
+msgstr "Файл или папка Ñ Ñ‚Ð°ÐºÐ¸Ð¼ именем уже ÑущеÑтвует."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Renaming file:"
-msgstr "Переименовать переменную"
+msgstr "Переименование файла:"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Renaming folder:"
-msgstr "Переименовать узел"
+msgstr "Переименование папки:"
#: editor/filesystem_dock.cpp
msgid "Expand all"
@@ -2512,18 +2515,16 @@ msgid "Copy Path"
msgstr "Копировать путь"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Rename.."
-msgstr "Переименовать"
+msgstr "Переименовать.."
#: editor/filesystem_dock.cpp
msgid "Move To.."
msgstr "ПеремеÑтить в.."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Folder.."
-msgstr "Создать папку"
+msgstr "ÐÐ¾Ð²Ð°Ñ Ð¿Ð°Ð¿ÐºÐ°.."
#: editor/filesystem_dock.cpp
msgid "Show In File Manager"
@@ -2591,9 +2592,8 @@ msgid "Import as Single Scene"
msgstr "Импорт в виде единой Ñцены"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Import with Separate Animations"
-msgstr "Импортировать Ñ Ð¾Ñ‚Ð´ÐµÐ»ÐµÐ½Ð½Ñ‹Ð¼Ð¸ материалами"
+msgstr "Импортировать Ñ Ð¾Ñ‚Ð´ÐµÐ»ÐµÐ½Ð½Ñ‹Ð¼Ð¸ анимациÑми"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Materials"
@@ -2608,19 +2608,16 @@ msgid "Import with Separate Objects+Materials"
msgstr "Импортировать Ñ Ñ€Ð°Ð·Ð´ÐµÐ»ÐµÐ½Ð½Ñ‹Ð¼Ð¸ объектами и материалами"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Import with Separate Objects+Animations"
-msgstr "Импортировать Ñ Ñ€Ð°Ð·Ð´ÐµÐ»ÐµÐ½Ð½Ñ‹Ð¼Ð¸ объектами и материалами"
+msgstr "Импортировать Ñ Ñ€Ð°Ð·Ð´ÐµÐ»ÐµÐ½Ð½Ñ‹Ð¼Ð¸ объектами и анимациÑми"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Import with Separate Materials+Animations"
-msgstr "Импортировать Ñ Ð¾Ñ‚Ð´ÐµÐ»ÐµÐ½Ð½Ñ‹Ð¼Ð¸ материалами"
+msgstr "Импортировать Ñ Ð¾Ñ‚Ð´ÐµÐ»ÐµÐ½Ð½Ñ‹Ð¼Ð¸ материалами и анимациÑми"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Import with Separate Objects+Materials+Animations"
-msgstr "Импортировать Ñ Ñ€Ð°Ð·Ð´ÐµÐ»ÐµÐ½Ð½Ñ‹Ð¼Ð¸ объектами и материалами"
+msgstr "Импортировать Ñ Ñ€Ð°Ð·Ð´ÐµÐ»ÐµÐ½Ð½Ñ‹Ð¼Ð¸ объектами, материалами и анимациÑми"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Multiple Scenes"
@@ -2707,9 +2704,8 @@ msgid "Edit Poly"
msgstr "Изменён полигон"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
msgid "Insert Point"
-msgstr "Ð’Ñтавка"
+msgstr "Ð’Ñтавить точку"
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/collision_polygon_editor_plugin.cpp
@@ -3275,14 +3271,12 @@ msgid "Edit CanvasItem"
msgstr "Редактировать CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Anchors only"
-msgstr "ПривÑзка"
+msgstr "Только ÑкорÑ"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Change Anchors and Margins"
-msgstr "Изменить привÑзку"
+msgstr "Изменить ÑÐºÐ¾Ñ€Ñ Ð¸ размеры"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Change Anchors"
@@ -3340,9 +3334,8 @@ msgid "Pan Mode"
msgstr "Режим оÑмотра"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Toggles snapping"
-msgstr "Точка оÑтановки"
+msgstr "Переключение прилипаниÑ"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -3350,23 +3343,20 @@ msgid "Use Snap"
msgstr "ИÑпользовать привÑзку"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snapping options"
-msgstr "Параметры анимации"
+msgstr "Параметры прилипаниÑ"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to grid"
-msgstr "Режим привÑзки:"
+msgstr "Прилипание к Ñетке"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Rotation Snap"
msgstr "ИÑпользовать привÑзку вращениÑ"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Configure Snap..."
-msgstr "ÐаÑтроить привÑзку.."
+msgstr "ÐаÑтроить прилипание.."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap Relative"
@@ -3378,24 +3368,23 @@ msgstr "ИÑпользовать попикÑельную привÑзку"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Smart snapping"
-msgstr ""
+msgstr "Ð˜Ð½Ñ‚ÐµÐ»Ð»ÐµÐºÑ‚ÑƒÐ°Ð»ÑŒÐ½Ð°Ñ Ð¿Ñ€Ð¸Ð²Ñзка"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Snap to parent"
-msgstr "РаÑÑ‚Ñнуть до размера родителей"
+msgstr "ПривÑзать к родителю"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to node anchor"
-msgstr ""
+msgstr "ПривÑзка к Ñкорю узла"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to node sides"
-msgstr ""
+msgstr "ПривÑзка к Ñторонам узла"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to other nodes"
-msgstr ""
+msgstr "ПривÑзка к другим узлам"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Lock the selected object in place (can't be moved)."
@@ -3444,14 +3433,12 @@ msgid "Show Grid"
msgstr "Показать Ñетку"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Show helpers"
-msgstr "Показать коÑти"
+msgstr "Показывать помощники"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Show rulers"
-msgstr "Показать коÑти"
+msgstr "Показывать линейки"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Center Selection"
@@ -3462,9 +3449,8 @@ msgid "Frame Selection"
msgstr "Кадрировать выбранное"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Layout"
-msgstr "Сохранить макет"
+msgstr "Макет"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Keys"
@@ -3488,20 +3474,19 @@ msgstr "ОчиÑтить позу"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Drag pivot from mouse position"
-msgstr ""
+msgstr "Перетащить точку Ð²Ñ€Ð°Ñ‰ÐµÐ½Ð¸Ñ Ð¸Ð· Ð¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð¼Ñ‹ÑˆÐ¸"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Set pivot at mouse position"
-msgstr "УÑтановить позицию выхода кривой"
+msgstr "УÑтановить точку Ð²Ñ€Ð°Ñ‰ÐµÐ½Ð¸Ñ Ð½Ð° меÑте ÑƒÐºÐ°Ð·Ð°Ñ‚ÐµÐ»Ñ Ð¼Ñ‹ÑˆÐ¸"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Multiply grid step by 2"
-msgstr ""
+msgstr "Умножить шаг Ñетки на 2"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Divide grid step by 2"
-msgstr ""
+msgstr "Разделить шаг Ñетки на 2"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Add %s"
@@ -3580,11 +3565,11 @@ msgstr "Обновить из Ñцены"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Flat0"
-msgstr ""
+msgstr "ПлоÑкий0"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Flat1"
-msgstr ""
+msgstr "ПлоÑкий1"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
@@ -3598,7 +3583,7 @@ msgstr "Переход ИЗ"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Smoothstep"
-msgstr ""
+msgstr "Сглаженный"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Modify Curve Point"
@@ -3926,73 +3911,66 @@ msgid "Bake!"
msgstr "Запечь!"
#: editor/plugins/navigation_mesh_editor_plugin.cpp
-#, fuzzy
msgid "Bake the navigation mesh.\n"
-msgstr "Создать полиÑетку навигации"
+msgstr "Создать полиÑетку навигации.\n"
#: editor/plugins/navigation_mesh_editor_plugin.cpp
-#, fuzzy
msgid "Clear the navigation mesh."
-msgstr "Создать полиÑетку навигации"
+msgstr "ОчиÑтить полиÑетку навигации."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Setting up Configuration..."
-msgstr ""
+msgstr "ÐаÑтройка конфигурации..."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Calculating grid size..."
-msgstr ""
+msgstr "РаÑчет размера Ñетки..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Creating heightfield..."
-msgstr "Создание октодерева Ñвета"
+msgstr "Создание карты выÑот..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Marking walkable triangles..."
-msgstr "Переводимые Ñтроки.."
+msgstr "Маркировка проходимых треугольников..."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Constructing compact heightfield..."
-msgstr ""
+msgstr "ПоÑтроение компактной карты выÑот..."
#: editor/plugins/navigation_mesh_generator.cpp
+#, fuzzy
msgid "Eroding walkable area..."
-msgstr ""
+msgstr "Размытие проходимого района..."
#: editor/plugins/navigation_mesh_generator.cpp
#, fuzzy
-msgid "Partioning..."
-msgstr "Предупреждение"
+msgid "Partitioning..."
+msgstr "Разметка..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Creating contours..."
-msgstr "Создание текÑтуры октодерева"
+msgstr "Создание контуров..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Creating polymesh..."
-msgstr "Создать полиÑетку обводки.."
+msgstr "Создание полиÑетки..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Converting to native navigation mesh..."
-msgstr "Создать полиÑетку навигации"
+msgstr "Преобразование в ÑобÑтвенную навигационную Ñетку..."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Navigation Mesh Generator Setup:"
-msgstr ""
+msgstr "ÐаÑтройка генератора навигационной Ñетки:"
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Parsing Geometry..."
-msgstr "ПарÑинг геометрии"
+msgstr "Ðнализ геометрии..."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Done!"
-msgstr ""
+msgstr "Сделано!"
#: editor/plugins/navigation_polygon_editor_plugin.cpp
msgid "Create Navigation Polygon"
@@ -4169,9 +4147,8 @@ msgid "Curve Point #"
msgstr "Точка Кривой #"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Set Curve Point Position"
-msgstr "УÑтановить позицию точки кривой"
+msgstr "УÑтановить положение точки кривой"
#: editor/plugins/path_editor_plugin.cpp
#, fuzzy
@@ -4430,7 +4407,8 @@ msgstr "Шаг в"
msgid "Break"
msgstr "Пауза"
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr "Продолжить"
@@ -4528,7 +4506,8 @@ msgid "Cut"
msgstr "Вырезать"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "Копировать"
@@ -5203,14 +5182,12 @@ msgid "Insert Empty (After)"
msgstr "Ð’Ñтавить пуÑтоту (ПоÑле)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Move (Before)"
-msgstr "ПеремеÑтить узел(Ñ‹)"
+msgstr "ПеремеÑтить (до)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Move (After)"
-msgstr "Двигать влево"
+msgstr "ПеремеÑтить (поÑле)"
#: editor/plugins/style_box_editor_plugin.cpp
msgid "StyleBox Preview:"
@@ -5286,8 +5263,12 @@ msgid "Remove All"
msgstr "Удалить вÑе"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
-msgstr "Тема"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
+msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
@@ -5423,9 +5404,8 @@ msgid "Mirror Y"
msgstr "Зеркально по Y"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Paint Tile"
-msgstr "РиÑовать карту тайлов"
+msgstr "РиÑовать тайл"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Pick Tile"
@@ -5488,9 +5468,8 @@ msgid "Delete preset '%s'?"
msgstr "Удалить '%s'?"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export templates for this platform are missing/corrupted: "
-msgstr "Шаблоны ÑкÑпорта Ð´Ð»Ñ Ñтой платформы отÑутÑтвуют:"
+msgstr "Шаблоны ÑкÑпорта Ð´Ð»Ñ Ñтой платформы отÑутÑтвуют/повреждены: "
#: editor/project_export.cpp
msgid "Presets"
@@ -5565,33 +5544,30 @@ msgid "Export templates for this platform are missing:"
msgstr "Шаблоны ÑкÑпорта Ð´Ð»Ñ Ñтой платформы отÑутÑтвуют:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export templates for this platform are missing/corrupted:"
-msgstr "Шаблоны ÑкÑпорта Ð´Ð»Ñ Ñтой платформы отÑутÑтвуют:"
+msgstr "Шаблоны ÑкÑпорта Ð´Ð»Ñ Ñтой платформы отÑутÑтвуют/повреждены:"
#: editor/project_export.cpp
msgid "Export With Debug"
msgstr "ЭкÑпорт в режиме отладки"
#: editor/project_manager.cpp
-#, fuzzy
-msgid "The path does not exists."
-msgstr "Файл не ÑущеÑтвует."
+msgid "The path does not exist."
+msgstr "Путь не ÑущеÑтвует."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a 'project.godot' file."
-msgstr "ПожалуйÑта ÑкÑпортируйте вне папки проекта!"
+msgstr "ПожалуйÑта, выберите 'project.godot' файл."
#: editor/project_manager.cpp
msgid ""
"Your project will be created in a non empty folder (you might want to create "
"a new folder)."
-msgstr ""
+msgstr "Ваш проект будет Ñоздан не в пуÑтой папке (лучше Ñоздать новую папку)."
#: editor/project_manager.cpp
msgid "Please choose a folder that does not contain a 'project.godot' file."
-msgstr ""
+msgstr "ПожалуйÑта, выберите папку, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ð½Ðµ Ñодержит файл 'project.godot'."
#: editor/project_manager.cpp
msgid "Imported Project"
@@ -5599,25 +5575,23 @@ msgstr "Импортированный проект"
#: editor/project_manager.cpp
msgid " "
-msgstr ""
+msgstr " "
#: editor/project_manager.cpp
msgid "It would be a good idea to name your project."
-msgstr ""
+msgstr "Было бы неплохо назвать ваш проект."
#: editor/project_manager.cpp
msgid "Invalid project path (changed anything?)."
msgstr "Ðеверный путь к проекту (Что-то изменили?)."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't get project.godot in project path."
-msgstr "Ðе удалоÑÑŒ Ñоздать project.godot в папке проекта."
+msgstr "ОтÑутÑтвует project.godot в папке проекта."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't edit project.godot in project path."
-msgstr "Ðе удалоÑÑŒ Ñоздать project.godot в папке проекта."
+msgstr "Ðе удалоÑÑŒ изменить project.godot в папке проекта."
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -5628,14 +5602,12 @@ msgid "The following files failed extraction from package:"
msgstr "Следующие файлы не удалоÑÑŒ Ð¸Ð·Ð²Ð»ÐµÑ‡ÐµÐ½Ð¸Ñ Ð¸Ð· пакета:"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Rename Project"
-msgstr "БезымÑнный проект"
+msgstr "Переименовать проект"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't get project.godot in the project path."
-msgstr "Ðе удалоÑÑŒ Ñоздать project.godot в папке проекта."
+msgstr "ОтÑутÑтвует project.godot в папке проекта."
#: editor/project_manager.cpp
msgid "New Game Project"
@@ -5658,7 +5630,6 @@ msgid "Project Name:"
msgstr "Ðазвание проекта:"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Create folder"
msgstr "Создать папку"
@@ -5679,9 +5650,8 @@ msgid "Unnamed Project"
msgstr "БезымÑнный проект"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Can't open project"
-msgstr "Ðе удаетÑÑ Ð·Ð°Ð¿ÑƒÑтить проект"
+msgstr "Ðе удаетÑÑ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚ÑŒ проект"
#: editor/project_manager.cpp
msgid "Are you sure to open more than one project?"
@@ -5715,6 +5685,12 @@ msgstr "Удалить проект из ÑпиÑка? (Содержимое пÐ
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5746,6 +5722,11 @@ msgid "Exit"
msgstr "Выход"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Restart Now"
+msgstr "ПерезапуÑк (Ñек.):"
+
+#: editor/project_manager.cpp
msgid "Can't run project"
msgstr "Ðе удаетÑÑ Ð·Ð°Ð¿ÑƒÑтить проект"
@@ -5903,7 +5884,6 @@ msgid "Add Global Property"
msgstr "Добавить глобальное ÑвойÑтво"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Select a setting item first!"
msgstr "Сначала выберите Ñлемент наÑтроек!"
@@ -5920,14 +5900,12 @@ msgid "Delete Item"
msgstr "Удалить Ñлемент"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Can't contain '/' or ':'"
-msgstr "Ðе удаетÑÑ Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡Ð¸Ñ‚ÑŒÑÑ Ðº хоÑту:"
+msgstr "Ðе может Ñодержать '/' или ':'"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Already existing"
-msgstr "Параметр изменён"
+msgstr "Уже ÑущеÑтвует"
#: editor/project_settings_editor.cpp
msgid "Error saving settings."
@@ -5970,6 +5948,15 @@ msgid "Remove Resource Remap Option"
msgstr "Удалён параметр реÑурÑа перенаправлениÑ"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "Изменено Ð²Ñ€ÐµÐ¼Ñ \"ÑмешиваниÑ\""
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr "ÐаÑтройки проекта (project.godot)"
@@ -6030,6 +6017,30 @@ msgid "Locale"
msgstr "Язык"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales Filter"
+msgstr "Фильтр:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Show all locales"
+msgstr "Показать коÑти"
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "Ð¤Ð¸Ð»ÑŒÑ‚Ñ€Ð°Ñ†Ð¸Ñ ÑƒÐ·Ð»Ð¾Ð²"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales:"
+msgstr "Язык"
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "Ðвтозагрузка"
@@ -6078,18 +6089,16 @@ msgid "New Script"
msgstr "Ðовый Ñкрипт"
#: editor/property_editor.cpp
-#, fuzzy
msgid "Make Unique"
-msgstr "Создать коÑти"
+msgstr "Сделать уникальным"
#: editor/property_editor.cpp
msgid "Show in File System"
msgstr "Показать в файловой ÑиÑтеме"
#: editor/property_editor.cpp
-#, fuzzy
msgid "Convert To %s"
-msgstr "Конвертировать в.."
+msgstr "Преобразовать в %s"
#: editor/property_editor.cpp
msgid "Error loading file: Not a resource!"
@@ -6128,9 +6137,8 @@ msgid "Select Property"
msgstr "Выбрать ÑвойÑтво"
#: editor/property_selector.cpp
-#, fuzzy
msgid "Select Virtual Method"
-msgstr "Выбрать метод"
+msgstr "Выбрать виртуальный метод"
#: editor/property_selector.cpp
msgid "Select Method"
@@ -6485,12 +6493,11 @@ msgstr "ÐедопуÑтимый базовый путь"
#: editor/script_create_dialog.cpp
msgid "Directory of the same name exists"
-msgstr ""
+msgstr "Каталог Ñ Ñ‚Ð°ÐºÐ¸Ð¼ же именем ÑущеÑтвует"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "File exists, will be reused"
-msgstr "Файл ÑущеÑтвует, перезапиÑать?"
+msgstr "Файл ÑущеÑтвует, будет иÑпользован повторно"
#: editor/script_create_dialog.cpp
msgid "Invalid extension"
@@ -6579,6 +6586,7 @@ msgstr "ФункциÑ:"
#: editor/script_editor_debugger.cpp
msgid "Pick one or more items from the list to display the graph."
msgstr ""
+"Выбрать один или неÑколько Ñлементов из ÑпиÑка, чтобы отобразить график."
#: editor/script_editor_debugger.cpp
msgid "Errors"
@@ -6741,22 +6749,21 @@ msgid "Change Probe Extents"
msgstr "Изменены Probe Extents"
#: modules/gdnative/gd_native_library_editor.cpp
-#, fuzzy
msgid "Library"
-msgstr "Библиотека полиÑеток.."
+msgstr "Библиотека"
#: modules/gdnative/gd_native_library_editor.cpp
-#, fuzzy
msgid "Status"
-msgstr "СтатуÑ:"
+msgstr "СтатуÑ"
#: modules/gdnative/gd_native_library_editor.cpp
msgid "Libraries: "
-msgstr ""
+msgstr "Библиотеки: "
#: modules/gdnative/register_types.cpp
+#, fuzzy
msgid "GDNative"
-msgstr ""
+msgstr "GDNative"
#: modules/gdscript/gd_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -6818,14 +6825,12 @@ msgid "Snap View"
msgstr "ПривÑзать вид"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Prev Level (%sDown Wheel)"
-msgstr "Пред уровень ("
+msgstr "Пред уровень (%sКолеÑико вниз)"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Next Level (%sUp Wheel)"
-msgstr "Следующий уровень ("
+msgstr "Следующий уровень (%sКолеÑико вверх)"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Clip Disabled"
@@ -6909,7 +6914,7 @@ msgstr "РаÑÑтоÑние выбора:"
#: modules/mono/editor/mono_bottom_panel.cpp
msgid "Builds"
-msgstr ""
+msgstr "Билды"
#: modules/visual_script/visual_script.cpp
msgid ""
@@ -7117,7 +7122,7 @@ msgstr "Получить"
#: modules/visual_script/visual_script_editor.cpp
msgid "Script already has function '%s'"
-msgstr ""
+msgstr "Скрипт уже имеет функцию '%s'"
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Input Value"
@@ -7537,10 +7542,13 @@ msgstr ""
"реÑÑƒÑ€Ñ SpriteFrames в параметре 'Frames'."
#: scene/3d/vehicle_body.cpp
+#, fuzzy
msgid ""
"VehicleWheel serves to provide a wheel system to a VehicleBody. Please use "
"it as a child of a VehicleBody."
msgstr ""
+"VehicleWheel Ñлужит колеÑом Ð´Ð»Ñ VehicleBody. ПожалуйÑта, иÑпользуйте его как "
+"ребенка VehicleBody."
#: scene/gui/color_picker.cpp
msgid "Raw Mode"
@@ -7620,6 +7628,15 @@ msgstr "Ошибка загрузки шрифта."
msgid "Invalid font size."
msgstr "ÐедопуÑтимый размер шрифта."
+#~ msgid "Filter:"
+#~ msgstr "Фильтр:"
+
+#~ msgid "' parsing of config failed."
+#~ msgstr "' анализ конфигурации не удалÑÑ."
+
+#~ msgid "Theme"
+#~ msgstr "Тема"
+
#~ msgid "Method List For '%s':"
#~ msgstr "СпиÑок методов Ð´Ð»Ñ '%s':"
@@ -8555,9 +8572,6 @@ msgstr "ÐедопуÑтимый размер шрифта."
#~ msgid "Preview Atlas"
#~ msgstr "ПредпроÑмотр атлаÑа"
-#~ msgid "Image Filter:"
-#~ msgstr "Фильтр:"
-
#~ msgid "Images:"
#~ msgstr "ИзображениÑ:"
diff --git a/editor/translations/sk.po b/editor/translations/sk.po
index 84709e1a4d..e5ec2ed8d0 100644
--- a/editor/translations/sk.po
+++ b/editor/translations/sk.po
@@ -1,5 +1,6 @@
# Slovak translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# J08nY <johnenter@gmail.com>, 2016.
@@ -1207,10 +1208,6 @@ msgid "File:"
msgstr "Súbor:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "Filter:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr ""
@@ -1657,19 +1654,24 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to load addon script from path: '%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2192,7 +2194,7 @@ msgid "Frame %"
msgstr ""
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+msgid "Physics Frame %"
msgstr ""
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3848,7 +3850,7 @@ msgid "Eroding walkable area..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4311,7 +4313,8 @@ msgstr ""
msgid "Break"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr ""
@@ -4405,7 +4408,8 @@ msgid "Cut"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "Kopírovať"
@@ -5165,7 +5169,11 @@ msgid "Remove All"
msgstr "Všetky vybrané"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
@@ -5449,7 +5457,7 @@ msgid "Export With Debug"
msgstr ""
#: editor/project_manager.cpp
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr ""
#: editor/project_manager.cpp
@@ -5579,6 +5587,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5609,6 +5623,10 @@ msgid "Exit"
msgstr ""
#: editor/project_manager.cpp
+msgid "Restart Now"
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Can't run project"
msgstr ""
@@ -5830,6 +5848,14 @@ msgid "Remove Resource Remap Option"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
@@ -5890,6 +5916,27 @@ msgid "Locale"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show all locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "Filter:"
+
+#: editor/project_settings_editor.cpp
+msgid "Locales:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -7395,6 +7442,9 @@ msgstr ""
msgid "Invalid font size."
msgstr ""
+#~ msgid "Filter:"
+#~ msgstr "Filter:"
+
#, fuzzy
#~ msgid "Tiles"
#~ msgstr "Súbor:"
diff --git a/editor/translations/sl.po b/editor/translations/sl.po
index 3878214ba0..4a82428565 100644
--- a/editor/translations/sl.po
+++ b/editor/translations/sl.po
@@ -1,5 +1,6 @@
# Slovenian translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# matevž lapajne <sivar.lapajne@gmail.com>, 2016.
@@ -1206,10 +1207,6 @@ msgid "File:"
msgstr ""
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr ""
@@ -1652,19 +1649,24 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+msgid "Unable to load addon script from path: '%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2184,7 +2186,7 @@ msgid "Frame %"
msgstr ""
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+msgid "Physics Frame %"
msgstr ""
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3837,7 +3839,7 @@ msgid "Eroding walkable area..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4300,7 +4302,8 @@ msgstr ""
msgid "Break"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr ""
@@ -4394,7 +4397,8 @@ msgid "Cut"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr ""
@@ -5152,7 +5156,11 @@ msgid "Remove All"
msgstr "Odstrani Signal"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
@@ -5435,7 +5443,7 @@ msgid "Export With Debug"
msgstr ""
#: editor/project_manager.cpp
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr ""
#: editor/project_manager.cpp
@@ -5564,6 +5572,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5594,6 +5608,10 @@ msgid "Exit"
msgstr ""
#: editor/project_manager.cpp
+msgid "Restart Now"
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Can't run project"
msgstr ""
@@ -5817,6 +5835,14 @@ msgid "Remove Resource Remap Option"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
@@ -5877,6 +5903,26 @@ msgid "Locale"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show all locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Filter mode:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Locales:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
diff --git a/editor/translations/th.po b/editor/translations/th.po
index 33d871e421..65bbafebb6 100644
--- a/editor/translations/th.po
+++ b/editor/translations/th.po
@@ -1,5 +1,6 @@
# Thai translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Kaveeta Vivatchai <goodytong@gmail.com>, 2017.
@@ -8,7 +9,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2017-10-03 16:49+0000\n"
+"PO-Revision-Date: 2017-10-23 02:49+0000\n"
"Last-Translator: Poommetee Ketson <poommetee@protonmail.com>\n"
"Language-Team: Thai <https://hosted.weblate.org/projects/godot-engine/godot/"
"th/>\n"
@@ -16,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 2.17-dev\n"
+"X-Generator: Weblate 2.17\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -651,9 +652,8 @@ msgstr ""
"ยืนยันจะลบหรือไม่? (ย้อนà¸à¸¥à¸±à¸šà¹„ม่ได้)"
#: editor/dependency_editor.cpp
-#, fuzzy
msgid "Cannot remove:\n"
-msgstr "ค้นหาไม่สำเร็จ"
+msgstr "ไม่สามารถลบ:\n"
#: editor/dependency_editor.cpp
msgid "Error loading:"
@@ -740,32 +740,31 @@ msgstr "ทีมงาน"
#: editor/editor_about.cpp
msgid "Platinum Sponsors"
-msgstr ""
+msgstr "ผู้สนับสนุนระดับทองคำขาว"
#: editor/editor_about.cpp
msgid "Gold Sponsors"
-msgstr ""
+msgstr "ผู้สนับสนุนระดับทอง"
#: editor/editor_about.cpp
msgid "Mini Sponsors"
-msgstr ""
+msgstr "ผู้สนับสนุน"
#: editor/editor_about.cpp
msgid "Gold Donors"
-msgstr ""
+msgstr "ผู้บริจาคระดับทอง"
#: editor/editor_about.cpp
msgid "Silver Donors"
-msgstr ""
+msgstr "ผู้บริจาคระดับเงิน"
#: editor/editor_about.cpp
-#, fuzzy
msgid "Bronze Donors"
-msgstr "คัดลอà¸à¸šà¸£à¸£à¸—ัดลงมา"
+msgstr "ผู้บริจาคระดับทองà¹à¸”ง"
#: editor/editor_about.cpp
msgid "Donors"
-msgstr ""
+msgstr "ผู้บริจาค"
#: editor/editor_about.cpp
msgid "License"
@@ -890,9 +889,8 @@ msgid "Duplicate"
msgstr "ทำซ้ำ"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Reset Volume"
-msgstr "รีเซ็ตซูม"
+msgstr "รีเซ็ตระดับเสียง"
#: editor/editor_audio_buses.cpp
msgid "Delete Effect"
@@ -915,9 +913,8 @@ msgid "Duplicate Audio Bus"
msgstr "ทำซ้ำ Audio Bus"
#: editor/editor_audio_buses.cpp
-#, fuzzy
msgid "Reset Bus Volume"
-msgstr "รีเซ็ตซูม"
+msgstr "รีเซ็ตระดับเสียงบัส"
#: editor/editor_audio_buses.cpp
msgid "Move Audio Bus"
@@ -1188,7 +1185,6 @@ msgid "Toggle Mode"
msgstr "สลับโหมด"
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Focus Path"
msgstr "à¹à¸à¹‰à¹„ขตำà¹à¸«à¸™à¹ˆà¸‡"
@@ -1201,9 +1197,8 @@ msgid "Move Favorite Down"
msgstr "เลื่อนโฟลเดอร์ที่ชอบลง"
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Go to parent folder"
-msgstr "ไม่สามารถสร้างโฟลเดอร์"
+msgstr "ไปยังโฟลเดอร์หลัà¸"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
@@ -1219,10 +1214,6 @@ msgid "File:"
msgstr "ไฟล์:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "ตัวà¸à¸£à¸­à¸‡:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "นามสà¸à¸¸à¸¥à¹„ฟล์ไม่ถูà¸à¸•้อง"
@@ -1268,27 +1259,24 @@ msgid "Brief Description:"
msgstr "รายละเอียด:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Members"
-msgstr "ตัวà¹à¸›à¸£:"
+msgstr "ตัวà¹à¸›à¸£"
#: editor/editor_help.cpp modules/visual_script/visual_script_editor.cpp
msgid "Members:"
msgstr "ตัวà¹à¸›à¸£:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Public Methods"
-msgstr "เมท็อด:"
+msgstr "เมท็อด"
#: editor/editor_help.cpp
msgid "Public Methods:"
msgstr "เมท็อด:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "GUI Theme Items"
-msgstr "ตัวà¹à¸›à¸£à¸˜à¸µà¸¡:"
+msgstr "ตัวà¹à¸›à¸£à¸˜à¸µà¸¡"
#: editor/editor_help.cpp
msgid "GUI Theme Items:"
@@ -1299,9 +1287,8 @@ msgid "Signals:"
msgstr "สัà¸à¸à¸²à¸“:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Enumerations"
-msgstr "ค่าคงที่:"
+msgstr "ค่าคงที่"
#: editor/editor_help.cpp
msgid "Enumerations:"
@@ -1309,26 +1296,23 @@ msgstr "ค่าคงที่:"
#: editor/editor_help.cpp
msgid "enum "
-msgstr "ค่าคงที่ "
+msgstr "à¸à¸¥à¸¸à¹ˆà¸¡à¸„่าคงที่ "
#: editor/editor_help.cpp
-#, fuzzy
msgid "Constants"
-msgstr "ค่าคงที่:"
+msgstr "ค่าคงที่"
#: editor/editor_help.cpp
msgid "Constants:"
msgstr "ค่าคงที่:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Description"
-msgstr "รายละเอียด:"
+msgstr "รายละเอียด"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Properties"
-msgstr "คุณสมบัติ:"
+msgstr "คุณสมบัติ"
#: editor/editor_help.cpp
msgid "Property Description:"
@@ -1338,12 +1322,11 @@ msgstr "รายละเอียดตัวà¹à¸›à¸£:"
msgid ""
"There is currently no description for this property. Please help us by "
"[color=$color][url=$url]contributing one[/url][/color]!"
-msgstr ""
+msgstr "คุณสมบัตินี้ยังไม่มีคำอธิบาย โปรดช่วย[color=$color][url=$url]à¹à¸à¹‰à¹„ข[/url][/color]!"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Methods"
-msgstr "รายชื่อเมท็อด:"
+msgstr "รายชื่อเมท็อด"
#: editor/editor_help.cpp
msgid "Method Description:"
@@ -1353,7 +1336,7 @@ msgstr "รายละเอียดเมท็อด:"
msgid ""
"There is currently no description for this method. Please help us by [color="
"$color][url=$url]contributing one[/url][/color]!"
-msgstr ""
+msgstr "เมท็อดนี้ยังไม่มีคำอธิบาย โปรดช่วย[color=$color][url=$url]à¹à¸à¹‰à¹„ข[/url][/color]!"
#: editor/editor_help.cpp
msgid "Search Text"
@@ -1395,28 +1378,24 @@ msgid "Error while saving."
msgstr "ผิดพลาดขณะบันทึà¸"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Can't open '%s'."
-msgstr "ทำงานใน '..' ไม่ได้"
+msgstr "เปิด '%s' ไม่ได้"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Error while parsing '%s'."
-msgstr "ผิดพลาดขณะบันทึà¸"
+msgstr "ผิดพลาดขณะอ่านไฟล์ '%s'"
#: editor/editor_node.cpp
msgid "Unexpected end of file '%s'."
msgstr ""
#: editor/editor_node.cpp
-#, fuzzy
msgid "Missing '%s' or its dependencies."
-msgstr "ฉาภ'%s' มีà¸à¸²à¸£à¸­à¹‰à¸²à¸‡à¸­à¸´à¸‡à¸ªà¸¹à¸à¸«à¸²à¸¢:"
+msgstr "ไฟล์ที่ '%s' ใช้สูà¸à¸«à¸²à¸¢"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Error while loading '%s'."
-msgstr "ผิดพลาดขณะบันทึà¸"
+msgstr "ผิดพลาดขณะโหลด '%s'"
#: editor/editor_node.cpp
msgid "Saving Scene"
@@ -1481,18 +1460,22 @@ msgid ""
"Please read the documentation relevant to importing scenes to better "
"understand this workflow."
msgstr ""
+"รีซอร์สนี้เป็นของฉาà¸à¸—ี่ถูà¸à¸™à¸³à¹€à¸‚้า จึงไม่สามารถà¹à¸à¹‰à¹„ขได้\n"
+"อ่านรายละเอียดเพิ่มเติมได้จาà¸à¸„ู่มือในส่วนของà¸à¸²à¸£à¸™à¸³à¹€à¸‚้าฉาà¸"
#: editor/editor_node.cpp
msgid ""
"This resource belongs to a scene that was instanced or inherited.\n"
"Changes to it will not be kept when saving the current scene."
msgstr ""
+"รีซอร์สนี้เป็นของฉาà¸à¸—ี่ถูà¸à¸­à¸´à¸™à¸ªà¹à¸•นซ์หรือสืบทอด\n"
+"à¸à¸²à¸£à¹à¸à¹‰à¹„ขจะไม่ถูà¸à¸šà¸±à¸™à¸—ึà¸"
#: editor/editor_node.cpp
msgid ""
"This resource was imported, so it's not editable. Change its settings in the "
"import panel and then re-import."
-msgstr ""
+msgstr "รีซอร์สนี้ถูà¸à¸™à¸³à¹€à¸‚้าจึงไม่สามารถà¹à¸à¹‰à¹„ขได้ ปรับตั้งค่าในà¹à¸œà¸‡à¸™à¸³à¹€à¸‚้าà¹à¸¥à¸°à¸™à¸³à¹€à¸‚้าใหม่"
#: editor/editor_node.cpp
msgid ""
@@ -1501,6 +1484,9 @@ msgid ""
"Please read the documentation relevant to importing scenes to better "
"understand this workflow."
msgstr ""
+"ฉาà¸à¸™à¸µà¹‰à¸–ูà¸à¸™à¸³à¹€à¸‚้า à¸à¸²à¸£à¹à¸à¹‰à¹„ขจะไม่ถูà¸à¸šà¸±à¸™à¸—ึà¸\n"
+"ต้องอินสà¹à¸•นซ์หรือสืบทอดà¸à¹ˆà¸­à¸™à¸ˆà¸¶à¸‡à¸ˆà¸°à¸ªà¸²à¸¡à¸²à¸£à¸–à¹à¸à¹‰à¹„ขได้\n"
+"อ่านรายละเอียดเพิ่มเติมได้จาà¸à¸„ู่มือในส่วนของà¸à¸²à¸£à¸™à¸³à¹€à¸‚้าฉาà¸"
#: editor/editor_node.cpp
msgid "Copy Params"
@@ -1523,9 +1509,8 @@ msgid "Make Built-In"
msgstr "à¸à¸±à¸‡"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Make Sub-Resources Unique"
-msgstr "ไม่ใช้รีซอร์สร่วมà¸à¸±à¸šà¸§à¸±à¸•ถุอื่น"
+msgstr "ไม่ให้ใช้รีซอร์สร่วมà¸à¸±à¸šà¸§à¸±à¸•ถุอื่น"
#: editor/editor_node.cpp
msgid "Open in Help"
@@ -1675,25 +1660,36 @@ msgid ""
"This option is deprecated. Situations where refresh must be forced are now "
"considered a bug. Please report."
msgstr ""
+"ตัวเลือà¸à¸™à¸µà¹‰à¸ˆà¸°à¸«à¸²à¸¢à¹„ปในรุ่นเสถียร สถานà¸à¸²à¸£à¸“์ที่จำเป็นต้องเปิดตัวเลือà¸à¸™à¸µà¹‰à¸ˆà¸°à¸–ือว่าเป็นบัค à¸à¸£à¸¸à¸“ารายงานบัค"
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
msgstr "เลือà¸à¸‰à¸²à¸à¹€à¸£à¸´à¹ˆà¸¡à¸•้น"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+#, fuzzy
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr "ไม่สามารถเปิดใช้งานปลั๊à¸à¸­à¸´à¸™: '"
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
-msgstr "' ผิดพลาดขณะอ่านไฟล์"
+#, fuzzy
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
+msgstr "ไม่พบชื่อสคริปต์ใน: 'res://addons/"
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
-msgstr "ไม่พบชื่อสคริปต์ใน: 'res://addons/"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "ไม่สามารถโหลดสคริปต์จาà¸: '"
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+#, fuzzy
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
+msgstr "ไม่สามารถโหลดสคริปต์จาà¸: '"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr "ไม่สามารถโหลดสคริปต์จาà¸: '"
#: editor/editor_node.cpp
@@ -1722,9 +1718,8 @@ msgid "Scene '%s' has broken dependencies:"
msgstr "ฉาภ'%s' มีà¸à¸²à¸£à¸­à¹‰à¸²à¸‡à¸­à¸´à¸‡à¸ªà¸¹à¸à¸«à¸²à¸¢:"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Clear Recent Scenes"
-msgstr "ล้างรายà¸à¸²à¸£à¹„ฟล์ล่าสุด"
+msgstr "ล้างรายà¸à¸²à¸£à¸‰à¸²à¸à¸¥à¹ˆà¸²à¸ªà¸¸à¸”"
#: editor/editor_node.cpp
msgid "Save Layout"
@@ -2086,9 +2081,8 @@ msgid "Object properties."
msgstr "คุณสมบัติวัตถุ"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Changes may be lost!"
-msgstr "à¹à¸à¹‰à¹„ขค่าคงที่เวà¸à¹€à¸•อร์"
+msgstr "à¸à¸²à¸£à¹à¸à¹‰à¹„ขจะไม่ถูà¸à¸šà¸±à¸™à¸—ึà¸!"
#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
#: editor/project_manager.cpp
@@ -2173,9 +2167,8 @@ msgid "Open the previous Editor"
msgstr "เปิดตัวà¹à¸à¹‰à¹„ขà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²"
#: editor/editor_plugin.cpp
-#, fuzzy
msgid "Creating Mesh Previews"
-msgstr "à¸à¸³à¸¥à¸±à¸‡à¸ªà¸£à¹‰à¸²à¸‡ Mesh Library"
+msgstr "à¸à¸³à¸¥à¸±à¸‡à¸ªà¸£à¹‰à¸²à¸‡à¸ à¸²à¸žà¸•ัวอย่าง Mesh"
#: editor/editor_plugin.cpp
msgid "Thumbnail.."
@@ -2227,7 +2220,8 @@ msgid "Frame %"
msgstr "เฟรม %"
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+#, fuzzy
+msgid "Physics Frame %"
msgstr "เฟรมคงที่ %"
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -2335,11 +2329,10 @@ msgid "Invalid version.txt format inside templates."
msgstr "รูปà¹à¸šà¸šà¸‚อง version.txt ในà¹à¸¡à¹ˆà¹à¸šà¸šà¹„ม่ถูà¸à¸•้อง"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid ""
"Invalid version.txt format inside templates. Revision is not a valid "
"identifier."
-msgstr "รูปà¹à¸šà¸šà¸‚อง version.txt ในà¹à¸¡à¹ˆà¹à¸šà¸šà¹„ม่ถูà¸à¸•้อง"
+msgstr "รูปà¹à¸šà¸šà¸‚อง version.txt ในà¹à¸¡à¹ˆà¹à¸šà¸šà¹„ม่ถูà¸à¸•้อง หมายเลขรุ่น revision ต้องใช้ระบุได้"
#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
@@ -2402,6 +2395,8 @@ msgid ""
"\n"
"Status: Import of file failed. Please fix file and reimport manually."
msgstr ""
+"\n"
+"สถานะ: นำเข้าไฟล์ล้มเหลว à¸à¸£à¸¸à¸“าà¹à¸à¹‰à¹„ขไฟล์à¹à¸¥à¸°à¸™à¸³à¹€à¸‚้าใหม่"
#: editor/filesystem_dock.cpp
#, fuzzy
@@ -2413,57 +2408,48 @@ msgstr ""
"ต้นฉบับ: "
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Cannot move/rename resources root."
-msgstr "ไม่สามารถโหลด/ประมวลผลฟอนต์ต้นฉบับ"
+msgstr "ไม่สามารถย้าย/เปลี่ยนชื่อโฟลเดอร์ราà¸"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Cannot move a folder into itself.\n"
-msgstr "นำเข้าไฟล์ทับตัวเองไม่ได้:"
+msgstr "ย้ายโฟลเดอร์มาข้างในตัวมันเองไม่ได้\n"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Error moving:\n"
-msgstr "ผิดพลาดขณะย้ายโฟลเดอร์:\n"
+msgstr "ผิดพลาดขณะย้าย:\n"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Unable to update dependencies:\n"
-msgstr "ฉาภ'%s' มีà¸à¸²à¸£à¸­à¹‰à¸²à¸‡à¸­à¸´à¸‡à¸ªà¸¹à¸à¸«à¸²à¸¢:"
+msgstr "ไม่สามารถอัพเดทà¸à¸²à¸£à¸­à¹‰à¸²à¸‡à¸­à¸´à¸‡:\n"
#: editor/filesystem_dock.cpp
msgid "No name provided"
-msgstr ""
+msgstr "ไม่ได้ระบุชื่อ"
#: editor/filesystem_dock.cpp
msgid "Provided name contains invalid characters"
-msgstr ""
+msgstr "ไม่สามารถใช้อัà¸à¸©à¸£à¸šà¸²à¸‡à¸•ัวในชื่อได้"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "No name provided."
-msgstr "เปลี่ยนชื่อหรือย้าย.."
+msgstr "ไม่ได้ระบุชื่อ"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Name contains invalid characters."
-msgstr "ตัวอัà¸à¸©à¸£à¸—ี่ใช้ได้:"
+msgstr "อัà¸à¸©à¸£à¸šà¸²à¸‡à¸•ัวใช้ไม่ได้"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "A file or folder with this name already exists."
-msgstr "มีชื่อà¸à¸¥à¸¸à¹ˆà¸¡à¸™à¸µà¹‰à¸­à¸¢à¸¹à¹ˆà¹à¸¥à¹‰à¸§!"
+msgstr "มีชื่อà¸à¸¥à¸¸à¹ˆà¸¡à¸™à¸µà¹‰à¸­à¸¢à¸¹à¹ˆà¹à¸¥à¹‰à¸§"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Renaming file:"
-msgstr "เปลี่ยนชื่อตัวà¹à¸›à¸£"
+msgstr "เปลี่ยนชื่อไฟล์:"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Renaming folder:"
-msgstr "เปลี่ยนชื่อโหนด"
+msgstr "เปลี่ยนชื่อโฟลเดอร์:"
#: editor/filesystem_dock.cpp
msgid "Expand all"
@@ -2478,18 +2464,16 @@ msgid "Copy Path"
msgstr "คัดลอà¸à¸•ำà¹à¸«à¸™à¹ˆà¸‡"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Rename.."
-msgstr "เปลี่ยนชื่อ"
+msgstr "เปลี่ยนชื่อ.."
#: editor/filesystem_dock.cpp
msgid "Move To.."
msgstr "ย้ายไป.."
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "New Folder.."
-msgstr "สร้างโฟลเดอร์"
+msgstr "สร้างโฟลเดอร์.."
#: editor/filesystem_dock.cpp
msgid "Show In File Manager"
@@ -2557,9 +2541,8 @@ msgid "Import as Single Scene"
msgstr "นำเข้าเป็นฉาà¸à¹€à¸”ียว"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Import with Separate Animations"
-msgstr "นำเข้าโดยà¹à¸¢à¸à¸§à¸±à¸ªà¸”ุ"
+msgstr "นำเข้าโดยà¹à¸¢à¸à¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
#: editor/import/resource_importer_scene.cpp
msgid "Import with Separate Materials"
@@ -2574,19 +2557,16 @@ msgid "Import with Separate Objects+Materials"
msgstr "นำเข้าโดยà¹à¸¢à¸à¸—ั้งวัตถุà¹à¸¥à¸°à¸§à¸±à¸ªà¸”ุ"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Import with Separate Objects+Animations"
-msgstr "นำเข้าโดยà¹à¸¢à¸à¸—ั้งวัตถุà¹à¸¥à¸°à¸§à¸±à¸ªà¸”ุ"
+msgstr "นำเข้าโดยà¹à¸¢à¸à¸§à¸±à¸•ถุà¹à¸¥à¸°à¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Import with Separate Materials+Animations"
-msgstr "นำเข้าโดยà¹à¸¢à¸à¸§à¸±à¸ªà¸”ุ"
+msgstr "นำเข้าโดยà¹à¸¢à¸à¸§à¸±à¸ªà¸”ุà¹à¸¥à¸°à¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
#: editor/import/resource_importer_scene.cpp
-#, fuzzy
msgid "Import with Separate Objects+Materials+Animations"
-msgstr "นำเข้าโดยà¹à¸¢à¸à¸—ั้งวัตถุà¹à¸¥à¸°à¸§à¸±à¸ªà¸”ุ"
+msgstr "นำเข้าโดยà¹à¸¢à¸à¸—ั้งวัตถุ วัสดุ à¹à¸¥à¸°à¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
#: editor/import/resource_importer_scene.cpp
msgid "Import as Multiple Scenes"
@@ -2673,9 +2653,8 @@ msgid "Edit Poly"
msgstr "à¹à¸à¹‰à¹„ขรูปหลายเหลี่ยม"
#: editor/plugins/abstract_polygon_2d_editor.cpp
-#, fuzzy
msgid "Insert Point"
-msgstr "à¹à¸—รà¸"
+msgstr "à¹à¸—รà¸à¸ˆà¸¸à¸”"
#: editor/plugins/abstract_polygon_2d_editor.cpp
#: editor/plugins/collision_polygon_editor_plugin.cpp
@@ -3244,9 +3223,8 @@ msgid "Anchors only"
msgstr "ตรึง"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Change Anchors and Margins"
-msgstr "à¹à¸à¹‰à¹„ขà¸à¸²à¸£à¸•รึง"
+msgstr "à¹à¸à¹‰à¹„ขà¸à¸²à¸£à¸•รึงà¹à¸¥à¸°à¸‚อบ"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Change Anchors"
@@ -3406,14 +3384,12 @@ msgid "Show Grid"
msgstr "à¹à¸ªà¸”งเส้นตาราง"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Show helpers"
-msgstr "à¹à¸ªà¸”งà¸à¸£à¸°à¸”ูà¸"
+msgstr "à¹à¸ªà¸”งตัวช่วย"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Show rulers"
-msgstr "à¹à¸ªà¸”งà¸à¸£à¸°à¸”ูà¸"
+msgstr "à¹à¸ªà¸”งไม้บรรทัด"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Center Selection"
@@ -3424,9 +3400,8 @@ msgid "Frame Selection"
msgstr "ให้สิ่งที่เลือà¸à¹€à¸•็มจอ"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Layout"
-msgstr "บันทึà¸à¹€à¸¥à¸¢à¹Œà¹€à¸­à¸²à¸•์"
+msgstr "เลย์เอาต์"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Keys"
@@ -3453,9 +3428,8 @@ msgid "Drag pivot from mouse position"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Set pivot at mouse position"
-msgstr "à¸à¸³à¸«à¸™à¸”เส้นโค้งขาออà¸"
+msgstr "à¸à¸³à¸«à¸™à¸”จุดหมุนที่ตำà¹à¸«à¸™à¹ˆà¸‡à¹€à¸¡à¸²à¸ªà¹Œ"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Multiply grid step by 2"
@@ -3542,25 +3516,23 @@ msgstr "อัพเดตจาà¸à¸‰à¸²à¸"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Flat0"
-msgstr ""
+msgstr "เรียบ 0"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Flat1"
-msgstr ""
+msgstr "เรียบ 1"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Ease in"
msgstr "เข้านุ่มนวล"
#: editor/plugins/curve_editor_plugin.cpp
-#, fuzzy
msgid "Ease out"
msgstr "ออà¸à¸™à¸¸à¹ˆà¸¡à¸™à¸§à¸¥"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Smoothstep"
-msgstr ""
+msgstr "นุ่มนวล"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Modify Curve Point"
@@ -3888,14 +3860,12 @@ msgid "Bake!"
msgstr ""
#: editor/plugins/navigation_mesh_editor_plugin.cpp
-#, fuzzy
msgid "Bake the navigation mesh.\n"
-msgstr "สร้าง Mesh นำทาง"
+msgstr "สร้าง Mesh นำทาง\n"
#: editor/plugins/navigation_mesh_editor_plugin.cpp
-#, fuzzy
msgid "Clear the navigation mesh."
-msgstr "สร้าง Mesh นำทาง"
+msgstr "ล้าง Mesh นำทาง"
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Setting up Configuration..."
@@ -3906,14 +3876,12 @@ msgid "Calculating grid size..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Creating heightfield..."
-msgstr "à¸à¸³à¸¥à¸±à¸‡à¸ªà¸£à¹‰à¸²à¸‡ Light Octree"
+msgstr "à¸à¸³à¸¥à¸±à¸‡à¸ªà¸£à¹‰à¸²à¸‡à¸ªà¸™à¸²à¸¡à¸„วามสูง..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Marking walkable triangles..."
-msgstr "สตริงหลายภาษา.."
+msgstr "à¸à¸³à¸¥à¸±à¸‡à¸à¸³à¸«à¸™à¸”พื้นผิวที่เดินผ่านได้..."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Constructing compact heightfield..."
@@ -3921,36 +3889,32 @@ msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Eroding walkable area..."
-msgstr ""
+msgstr "บีบà¹à¸„บส่วนที่เดินผ่านได้..."
#: editor/plugins/navigation_mesh_generator.cpp
#, fuzzy
-msgid "Partioning..."
-msgstr "คำเตือน"
+msgid "Partitioning..."
+msgstr "à¸à¸³à¸¥à¸±à¸‡à¹à¸šà¹ˆà¸‡à¸ªà¹ˆà¸§à¸™..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Creating contours..."
-msgstr "สร้าง Texture Octree"
+msgstr "à¸à¸³à¸¥à¸±à¸‡à¸ªà¸£à¹‰à¸²à¸‡à¸„อนทัวร์..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Creating polymesh..."
-msgstr "สร้างเส้นขอบ Mesh.."
+msgstr "à¸à¸³à¸¥à¸±à¸‡à¸ªà¸£à¹‰à¸²à¸‡ Polymesh..."
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Converting to native navigation mesh..."
-msgstr "สร้าง Mesh นำทาง"
+msgstr "à¸à¸³à¸¥à¸±à¸‡à¹à¸›à¸¥à¸‡à¸à¸¥à¸±à¸šà¹€à¸›à¹‡à¸™ Mesh นำทาง..."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Navigation Mesh Generator Setup:"
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-#, fuzzy
msgid "Parsing Geometry..."
-msgstr "วิเคราะห์ Geometry"
+msgstr "วิเคราะห์พื้นผิว..."
#: editor/plugins/navigation_mesh_generator.cpp
msgid "Done!"
@@ -4395,7 +4359,8 @@ msgstr "คำสั่งต่อไป"
msgid "Break"
msgstr "หยุดพัà¸"
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr "ทำต่อไป"
@@ -4491,7 +4456,8 @@ msgid "Cut"
msgstr "ตัด"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "คัดลอà¸"
@@ -5168,14 +5134,12 @@ msgid "Insert Empty (After)"
msgstr "เพิ่มà¹à¸šà¸šà¸§à¹ˆà¸²à¸‡à¹€à¸›à¸¥à¹ˆà¸² (หลัง)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Move (Before)"
-msgstr "ย้ายโหนด"
+msgstr "ย้าย (à¸à¹ˆà¸­à¸™)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Move (After)"
-msgstr "ย้ายไปซ้าย"
+msgstr "ย้าย (หลัง)"
#: editor/plugins/style_box_editor_plugin.cpp
msgid "StyleBox Preview:"
@@ -5252,8 +5216,12 @@ msgid "Remove All"
msgstr "ลบทั้งหมด"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
-msgstr "ธีม"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
+msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
@@ -5389,9 +5357,8 @@ msgid "Mirror Y"
msgstr "สะท้อนซ้ายขวา"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid "Paint Tile"
-msgstr "วาด TileMap"
+msgstr "วาด Tile"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Pick Tile"
@@ -5454,9 +5421,8 @@ msgid "Delete preset '%s'?"
msgstr "ลบ '%s'?"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export templates for this platform are missing/corrupted: "
-msgstr "ไม่พบà¹à¸¡à¹ˆà¹à¸šà¸šà¸ªà¹ˆà¸‡à¸­à¸­à¸à¸ªà¸³à¸«à¸£à¸±à¸šà¹à¸žà¸¥à¸•ฟอร์มนี้:"
+msgstr "à¹à¸¡à¹ˆà¹à¸šà¸šà¸ªà¹ˆà¸‡à¸­à¸­à¸à¸ªà¸³à¸«à¸£à¸±à¸šà¹à¸žà¸¥à¸•ฟอร์มนี้สูà¸à¸«à¸²à¸¢/เสียหาย: "
#: editor/project_export.cpp
msgid "Presets"
@@ -5517,7 +5483,6 @@ msgid "Custom (comma-separated):"
msgstr "à¸à¸³à¸«à¸™à¸”เอง (คั่นด้วยจุลภาค):"
#: editor/project_export.cpp
-#, fuzzy
msgid "Feature List:"
msgstr "รายชื่อฟีเจอร์:"
@@ -5530,9 +5495,8 @@ msgid "Export templates for this platform are missing:"
msgstr "ไม่พบà¹à¸¡à¹ˆà¹à¸šà¸šà¸ªà¹ˆà¸‡à¸­à¸­à¸à¸ªà¸³à¸«à¸£à¸±à¸šà¹à¸žà¸¥à¸•ฟอร์มนี้:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export templates for this platform are missing/corrupted:"
-msgstr "ไม่พบà¹à¸¡à¹ˆà¹à¸šà¸šà¸ªà¹ˆà¸‡à¸­à¸­à¸à¸ªà¸³à¸«à¸£à¸±à¸šà¹à¸žà¸¥à¸•ฟอร์มนี้:"
+msgstr "à¹à¸¡à¹ˆà¹à¸šà¸šà¸ªà¹ˆà¸‡à¸­à¸­à¸à¸ªà¸³à¸«à¸£à¸±à¸šà¹à¸žà¸¥à¸•ฟอร์มนี้สูà¸à¸«à¸²à¸¢/เสียหาย:"
#: editor/project_export.cpp
msgid "Export With Debug"
@@ -5540,13 +5504,12 @@ msgstr "ส่งออà¸à¸žà¸£à¹‰à¸­à¸¡à¸•ัวดีบัค"
#: editor/project_manager.cpp
#, fuzzy
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr "ไม่พบไฟล์"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Please choose a 'project.godot' file."
-msgstr "à¸à¸£à¸¸à¸“าส่งออà¸à¹„ปนอà¸à¹‚ฟลเดอร์โปรเจà¸à¸•์!"
+msgstr "à¸à¸£à¸¸à¸“าเลือà¸à¹„ฟล์ 'project.godot'"
#: editor/project_manager.cpp
msgid ""
@@ -5575,14 +5538,12 @@ msgid "Invalid project path (changed anything?)."
msgstr "ตำà¹à¸«à¸™à¹ˆà¸‡à¹‚ปรเจà¸à¸•์ผิดพลาด (ได้à¹à¸à¹‰à¹„ขอะไรไปหรือไม่?)"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't get project.godot in project path."
-msgstr "สร้างไฟล์ project.godot ไม่ได้"
+msgstr "ไม่พบไฟล์ project.godot"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't edit project.godot in project path."
-msgstr "สร้างไฟล์ project.godot ไม่ได้"
+msgstr "à¹à¸à¹‰à¹„ขไฟล์ project.godot ไม่ได้"
#: editor/project_manager.cpp
msgid "Couldn't create project.godot in project path."
@@ -5593,14 +5554,12 @@ msgid "The following files failed extraction from package:"
msgstr "ผิดพลาดขณะà¹à¸¢à¸à¹„ฟล์ต่อไปนี้จาà¸à¹à¸žà¸„เà¸à¸ˆ:"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Rename Project"
-msgstr "โปรเจà¸à¸•์ไม่มีชื่อ"
+msgstr "เปลี่ยนชื่อโปรเจà¸à¸•์"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't get project.godot in the project path."
-msgstr "สร้างไฟล์ project.godot ไม่ได้"
+msgstr "ไม่พบไฟล์ project.godot"
#: editor/project_manager.cpp
msgid "New Game Project"
@@ -5623,7 +5582,6 @@ msgid "Project Name:"
msgstr "ชื่อโปรเจà¸à¸•์:"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Create folder"
msgstr "สร้างโฟลเดอร์"
@@ -5644,9 +5602,8 @@ msgid "Unnamed Project"
msgstr "โปรเจà¸à¸•์ไม่มีชื่อ"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Can't open project"
-msgstr "ไม่สามารถรันโปรเจà¸à¸•์"
+msgstr "ไม่สามารถเปิดโปรเจà¸à¸•์"
#: editor/project_manager.cpp
msgid "Are you sure to open more than one project?"
@@ -5679,6 +5636,12 @@ msgstr "ลบโปรเจà¸à¸•์ออà¸à¸ˆà¸²à¸à¸£à¸²à¸¢à¸Šà¸·à¹ˆà¸­? (
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr "จะทำà¸à¸²à¸£à¸ªà¹à¸à¸™à¸«à¸²à¹‚ปรเจà¸à¸•์ใน %s โฟลเดอร์ ยืนยัน?"
@@ -5708,6 +5671,11 @@ msgid "Exit"
msgstr "ออà¸"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Restart Now"
+msgstr "หาโหนดà¹à¸¡à¹ˆà¹ƒà¸«à¸¡à¹ˆ"
+
+#: editor/project_manager.cpp
msgid "Can't run project"
msgstr "ไม่สามารถรันโปรเจà¸à¸•์"
@@ -5865,7 +5833,6 @@ msgid "Add Global Property"
msgstr "เพิ่มคุณสมบัติทั่วไป"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Select a setting item first!"
msgstr "à¸à¸£à¸¸à¸“าเลือà¸à¸•ัวเลือà¸à¸à¹ˆà¸­à¸™!"
@@ -5882,14 +5849,12 @@ msgid "Delete Item"
msgstr "ลบไอเทม"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Can't contain '/' or ':'"
-msgstr "ไม่สามารถเชื่อมต่อà¸à¸±à¸šà¹‚ฮสต์:"
+msgstr "ต้องไม่มี '/' หรือ ':'"
#: editor/project_settings_editor.cpp
-#, fuzzy
msgid "Already existing"
-msgstr "มีà¸à¸²à¸£à¸à¸£à¸°à¸—ำ '%s' อยู่à¹à¸¥à¹‰à¸§!"
+msgstr "มีอยู่à¸à¹ˆà¸­à¸™à¹à¸¥à¹‰à¸§"
#: editor/project_settings_editor.cpp
msgid "Error saving settings."
@@ -5932,6 +5897,15 @@ msgid "Remove Resource Remap Option"
msgstr "ลบà¸à¸²à¸£à¹à¸—นที่"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "ปรับขนาดà¸à¸¥à¹‰à¸­à¸‡"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr "ตัวเลือà¸à¹‚ปรเจà¸à¸•์ (project.godot)"
@@ -5992,6 +5966,30 @@ msgid "Locale"
msgstr "ท้องถิ่น"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales Filter"
+msgstr "ท้องถิ่น"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Show all locales"
+msgstr "à¹à¸ªà¸”งà¸à¸£à¸°à¸”ูà¸"
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "ตัวà¸à¸£à¸­à¸‡"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales:"
+msgstr "ท้องถิ่น"
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "ออโต้โหลด"
@@ -6040,18 +6038,16 @@ msgid "New Script"
msgstr "สคริปต์ใหม่"
#: editor/property_editor.cpp
-#, fuzzy
msgid "Make Unique"
-msgstr "สร้างà¸à¸£à¸°à¸”ูà¸"
+msgstr "ไม่ใช้ร่วมà¸à¸±à¸šà¸§à¸±à¸•ถุอื่น"
#: editor/property_editor.cpp
msgid "Show in File System"
msgstr "เปิดในตัวจัดà¸à¸²à¸£à¹„ฟล์"
#: editor/property_editor.cpp
-#, fuzzy
msgid "Convert To %s"
-msgstr "à¹à¸›à¸¥à¸‡à¹€à¸›à¹‡à¸™.."
+msgstr "à¹à¸›à¸¥à¸‡à¹€à¸›à¹‡à¸™ %s"
#: editor/property_editor.cpp
msgid "Error loading file: Not a resource!"
@@ -6090,7 +6086,6 @@ msgid "Select Property"
msgstr "เลือà¸à¸„ุณสมบัติ"
#: editor/property_selector.cpp
-#, fuzzy
msgid "Select Virtual Method"
msgstr "เลือà¸à¹€à¸¡à¸—็อด"
@@ -6442,9 +6437,8 @@ msgid "Directory of the same name exists"
msgstr ""
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "File exists, will be reused"
-msgstr "มีไฟล์นี้อยู่à¹à¸¥à¹‰à¸§ จะเขียนทับหรือไม่?"
+msgstr "มีไฟล์นี้อยู่à¹à¸¥à¹‰à¸§ จะนำมาใช้"
#: editor/script_create_dialog.cpp
msgid "Invalid extension"
@@ -6697,9 +6691,8 @@ msgid "Change Probe Extents"
msgstr "à¹à¸à¹‰à¹„ขขนาด Probe"
#: modules/gdnative/gd_native_library_editor.cpp
-#, fuzzy
msgid "Library"
-msgstr "MeshLibrary.."
+msgstr "ไลบรารี"
#: modules/gdnative/gd_native_library_editor.cpp
#, fuzzy
@@ -6761,29 +6754,24 @@ msgid "Object can't provide a length."
msgstr "ไม่สามารถบอà¸à¸„วามยาวของวัตถุได้"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "GridMap Delete Selection"
-msgstr "ลบสิ่งที่เลือà¸"
+msgstr "ลบที่เลือà¸à¹ƒà¸™ GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "GridMap Duplicate Selection"
-msgstr "ทำซ้ำในà¹à¸—ร็à¸à¹€à¸”ิม"
+msgstr "ทำซ้ำใน GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Snap View"
-msgstr "มุมบน"
+msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Prev Level (%sDown Wheel)"
-msgstr "ชั้นà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸² ("
+msgstr "ชั้นà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸² (%sล้อเมาส์ลง)"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Next Level (%sUp Wheel)"
-msgstr "ชั้นถัดไป ("
+msgstr "ชั้นถัดไป (%sล้อเมาส์ขึ้น)"
#: modules/gridmap/grid_map_editor_plugin.cpp
#, fuzzy
@@ -7527,6 +7515,15 @@ msgstr "ผิดพลาดขณะโหลดฟอนต์"
msgid "Invalid font size."
msgstr "ขนาดฟอนต์ผิดพลาด"
+#~ msgid "Filter:"
+#~ msgstr "ตัวà¸à¸£à¸­à¸‡:"
+
+#~ msgid "' parsing of config failed."
+#~ msgstr "' ผิดพลาดขณะอ่านไฟล์"
+
+#~ msgid "Theme"
+#~ msgstr "ธีม"
+
#~ msgid "Method List For '%s':"
#~ msgstr "รายชื่อเมท็อดของ '%s':"
diff --git a/editor/translations/tr.po b/editor/translations/tr.po
index 9d68331ae5..afb2c82be1 100644
--- a/editor/translations/tr.po
+++ b/editor/translations/tr.po
@@ -1,5 +1,6 @@
# Turkish translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Aprın Çor Tigin <kabusturk38@gmail.com>, 2016-2017.
@@ -1247,10 +1248,6 @@ msgid "File:"
msgstr "Dizeç:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "Süzgeç:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "Gecerli bir uzantı kullanılmalı."
@@ -1721,19 +1718,25 @@ msgid "Pick a Main Scene"
msgstr "Bir Ana Sahne Seç"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "Yazı tipi %s yüklerken sorun oluştu"
+
+#: editor/editor_node.cpp
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2290,7 +2293,8 @@ msgid "Frame %"
msgstr "Kare %"
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+#, fuzzy
+msgid "Physics Frame %"
msgstr "Sabit Kare %"
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -4015,7 +4019,7 @@ msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
#, fuzzy
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr "Uyarı"
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4498,7 +4502,8 @@ msgstr "İçeri Adımla"
msgid "Break"
msgstr "Ara Ver"
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr "Devam Et"
@@ -4600,7 +4605,8 @@ msgid "Cut"
msgstr "Kes"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "Tıpkıla"
@@ -5379,8 +5385,12 @@ msgid "Remove All"
msgstr "Kaldır"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
-msgstr "Kalıp"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
+msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
@@ -5686,7 +5696,7 @@ msgstr "Döşenti Dizi Dışa Aktar"
#: editor/project_manager.cpp
#, fuzzy
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr "Dizeç yok."
#: editor/project_manager.cpp
@@ -5827,6 +5837,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5860,6 +5876,11 @@ msgstr "Çık"
#: editor/project_manager.cpp
#, fuzzy
+msgid "Restart Now"
+msgstr "Yeniden BaÅŸlat (sn):"
+
+#: editor/project_manager.cpp
+#, fuzzy
msgid "Can't run project"
msgstr "Bağlanamadı."
@@ -6091,6 +6112,15 @@ msgstr "Kaynak Yeniden Eşle Seçeneğini Kaldır"
#: editor/project_settings_editor.cpp
#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "Karışım Süresini Değiştir"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "Tasarı Ayarları (engine.cfg)"
@@ -6151,6 +6181,30 @@ msgid "Locale"
msgstr "Yerel"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales Filter"
+msgstr "Bediz Süzgeci:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Show all locales"
+msgstr "Kemikleri Göster"
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "Süzgeçler"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales:"
+msgstr "Yerel"
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "KendindenYükle"
@@ -7765,6 +7819,12 @@ msgstr "Yazı türü yüklerken sorun oluştu."
msgid "Invalid font size."
msgstr "Geçersiz yazı türü boyutu."
+#~ msgid "Filter:"
+#~ msgstr "Süzgeç:"
+
+#~ msgid "Theme"
+#~ msgstr "Kalıp"
+
#~ msgid "Method List For '%s':"
#~ msgstr "'%s' İçin Yöntem Dizelgesi:"
@@ -8685,9 +8745,6 @@ msgstr "Geçersiz yazı türü boyutu."
#~ msgid "Preview Atlas"
#~ msgstr "Atlası Önizle"
-#~ msgid "Image Filter:"
-#~ msgstr "Bediz Süzgeci:"
-
#~ msgid "Images:"
#~ msgstr "Bedizler:"
diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po
index 3623a4394c..3b624f4c8c 100644
--- a/editor/translations/ur_PK.po
+++ b/editor/translations/ur_PK.po
@@ -1,5 +1,6 @@
# Urdu (Pakistan) translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Muhammad Ali <ali@codeonion.com>, 2016.
@@ -1209,10 +1210,6 @@ msgid "File:"
msgstr ""
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr ""
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr ""
@@ -1655,19 +1652,24 @@ msgid "Pick a Main Scene"
msgstr "ایک مینو منظر چنیں"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+msgid "Unable to load addon script from path: '%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2187,7 +2189,7 @@ msgid "Frame %"
msgstr ""
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+msgid "Physics Frame %"
msgstr ""
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3838,7 +3840,7 @@ msgid "Eroding walkable area..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4301,7 +4303,8 @@ msgstr ""
msgid "Break"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr ""
@@ -4395,7 +4398,8 @@ msgid "Cut"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr ""
@@ -5155,7 +5159,11 @@ msgid "Remove All"
msgstr ".تمام کا انتخاب"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
@@ -5439,7 +5447,7 @@ msgid "Export With Debug"
msgstr ""
#: editor/project_manager.cpp
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr ""
#: editor/project_manager.cpp
@@ -5568,6 +5576,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5598,6 +5612,10 @@ msgid "Exit"
msgstr ""
#: editor/project_manager.cpp
+msgid "Restart Now"
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Can't run project"
msgstr ""
@@ -5819,6 +5837,14 @@ msgid "Remove Resource Remap Option"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
@@ -5879,6 +5905,26 @@ msgid "Locale"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show all locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Filter mode:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Locales:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po
index 9dff317a28..3a67defced 100644
--- a/editor/translations/zh_CN.po
+++ b/editor/translations/zh_CN.po
@@ -1,5 +1,6 @@
# Chinese (China) translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# 纯æ´çš„å蛋 <tqj.zyy@gmail.com>, 2016.
@@ -1221,10 +1222,6 @@ msgid "File:"
msgstr "文件:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "筛选:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "å¿…é¡»ä½¿ç”¨åˆæ³•的拓展å。"
@@ -1682,19 +1679,29 @@ msgid "Pick a Main Scene"
msgstr "选择主场景"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+#, fuzzy
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr "无法å¯ç”¨æ’ä»¶: '"
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
-msgstr "' è§£æžé…置失败。"
+#, fuzzy
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
+msgstr "在æ’件目录中没有找到脚本: 'res://addons/"
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
-msgstr "在æ’件目录中没有找到脚本: 'res://addons/"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "无法从路径加载æ’件脚本: '"
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+#, fuzzy
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
+msgstr "无法从路径加载æ’件脚本: '"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr "无法从路径加载æ’件脚本: '"
#: editor/editor_node.cpp
@@ -2228,7 +2235,8 @@ msgid "Frame %"
msgstr "渲染速度"
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+#, fuzzy
+msgid "Physics Frame %"
msgstr "固定帧速率 %"
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3921,7 +3929,7 @@ msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
#, fuzzy
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr "警告"
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4388,7 +4396,8 @@ msgstr "啿­¥è¿›å…¥"
msgid "Break"
msgstr "跳过"
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr "ç»§ç»­"
@@ -4484,7 +4493,8 @@ msgid "Cut"
msgstr "剪切"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "å¤åˆ¶"
@@ -5242,8 +5252,12 @@ msgid "Remove All"
msgstr "移除全部"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
-msgstr "主题"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
+msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
@@ -5529,7 +5543,7 @@ msgstr "导出为调试"
#: editor/project_manager.cpp
#, fuzzy
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr "文件ä¸å­˜åœ¨ã€‚"
#: editor/project_manager.cpp
@@ -5668,6 +5682,12 @@ msgstr "移除此项目(项目的文件ä¸å—å½±å“)"
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr "æ‚¨ç¡®è®¤è¦æ‰«æ%s目录下现有的Godot项目å—?"
@@ -5697,6 +5717,11 @@ msgid "Exit"
msgstr "退出"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Restart Now"
+msgstr "釿–°å¼€å§‹ï¼ˆç§’):"
+
+#: editor/project_manager.cpp
msgid "Can't run project"
msgstr "无法è¿è¡Œé¡¹ç›®"
@@ -5921,6 +5946,15 @@ msgid "Remove Resource Remap Option"
msgstr "移除资æºé‡å®šå‘选项"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "æ›´æ”¹æ··åˆæ—¶é—´"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr "项目设置(project.godot)"
@@ -5981,6 +6015,30 @@ msgid "Locale"
msgstr "地区"
#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales Filter"
+msgstr "纹ç†è¿‡æ»¤:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Show all locales"
+msgstr "显示骨骼"
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "筛选节点"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Locales:"
+msgstr "地区"
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "自动加载(AutoLoad)"
@@ -7514,6 +7572,15 @@ msgstr "加载字体出错。"
msgid "Invalid font size."
msgstr "字体大å°éžæ³•。"
+#~ msgid "Filter:"
+#~ msgstr "筛选:"
+
+#~ msgid "' parsing of config failed."
+#~ msgstr "' è§£æžé…置失败。"
+
+#~ msgid "Theme"
+#~ msgstr "主题"
+
#~ msgid "Method List For '%s':"
#~ msgstr "'%s'的方法列表:"
@@ -8439,9 +8506,6 @@ msgstr "字体大å°éžæ³•。"
#~ msgid "Preview Atlas"
#~ msgstr "ç²¾çµé›†é¢„览"
-#~ msgid "Image Filter:"
-#~ msgstr "纹ç†è¿‡æ»¤:"
-
#~ msgid "Images:"
#~ msgstr "图片:"
diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po
index e4f565f0c3..3828ea059c 100644
--- a/editor/translations/zh_HK.po
+++ b/editor/translations/zh_HK.po
@@ -1,5 +1,6 @@
# Chinese (Hong Kong) translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Wesley (zx-wt) <ZX_WT@ymail.com>, 2016-2017.
@@ -1239,10 +1240,6 @@ msgid "File:"
msgstr "檔案:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "篩é¸:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr "請用有效的副檔å"
@@ -1703,19 +1700,25 @@ msgid "Pick a Main Scene"
msgstr "鏿“‡ä¸»å ´æ™¯"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+#, fuzzy
+msgid "Unable to load addon script from path: '%s'."
+msgstr "載入字形出ç¾éŒ¯èª¤"
+
+#: editor/editor_node.cpp
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2243,7 +2246,7 @@ msgid "Frame %"
msgstr ""
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+msgid "Physics Frame %"
msgstr ""
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3913,7 +3916,7 @@ msgid "Eroding walkable area..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4377,7 +4380,8 @@ msgstr ""
msgid "Break"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr ""
@@ -4474,7 +4478,8 @@ msgid "Cut"
msgstr "剪下"
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr "複製"
@@ -5242,7 +5247,11 @@ msgid "Remove All"
msgstr "移除"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
@@ -5534,7 +5543,7 @@ msgstr ""
#: editor/project_manager.cpp
#, fuzzy
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr "檔案ä¸å­˜åœ¨."
#: editor/project_manager.cpp
@@ -5665,6 +5674,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5695,6 +5710,10 @@ msgid "Exit"
msgstr "離開"
#: editor/project_manager.cpp
+msgid "Restart Now"
+msgstr ""
+
+#: editor/project_manager.cpp
#, fuzzy
msgid "Can't run project"
msgstr "ä¸èƒ½é€£æŽ¥ã€‚"
@@ -5922,6 +5941,14 @@ msgid "Remove Resource Remap Option"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
@@ -5982,6 +6009,27 @@ msgid "Locale"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show all locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "篩é¸:"
+
+#: editor/project_settings_editor.cpp
+msgid "Locales:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -7510,6 +7558,9 @@ msgstr "載入字形出ç¾éŒ¯èª¤"
msgid "Invalid font size."
msgstr "無效字型"
+#~ msgid "Filter:"
+#~ msgstr "篩é¸:"
+
#~ msgid "Added:"
#~ msgstr "已加入:"
diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po
index 44b6b730d5..7a392613d2 100644
--- a/editor/translations/zh_TW.po
+++ b/editor/translations/zh_TW.po
@@ -1,5 +1,6 @@
# Chinese (Taiwan) translation of the Godot Engine editor
-# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
+# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
+# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Allen H <w84miracle@gmail.com>, 2017.
@@ -1221,10 +1222,6 @@ msgid "File:"
msgstr "檔案:"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
-msgid "Filter:"
-msgstr "éŽæ¿¾å™¨:"
-
-#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Must use a valid extension."
msgstr ""
@@ -1672,19 +1669,24 @@ msgid "Pick a Main Scene"
msgstr "挑一個主è¦å ´æ™¯"
#: editor/editor_node.cpp
-msgid "Unable to enable addon plugin at: '"
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "' parsing of config failed."
+msgid "Unable to load addon script from path: '%s'."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to find script field for addon plugin at: 'res://addons/"
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
msgstr ""
#: editor/editor_node.cpp
-msgid "Unable to load addon script from path: '"
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
msgstr ""
#: editor/editor_node.cpp
@@ -2207,7 +2209,7 @@ msgid "Frame %"
msgstr ""
#: editor/editor_profiler.cpp
-msgid "Fixed Frame %"
+msgid "Physics Frame %"
msgstr ""
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
@@ -3868,7 +3870,7 @@ msgid "Eroding walkable area..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
-msgid "Partioning..."
+msgid "Partitioning..."
msgstr ""
#: editor/plugins/navigation_mesh_generator.cpp
@@ -4329,7 +4331,8 @@ msgstr ""
msgid "Break"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
msgid "Continue"
msgstr ""
@@ -4425,7 +4428,8 @@ msgid "Cut"
msgstr ""
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/property_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
msgid "Copy"
msgstr ""
@@ -5187,7 +5191,11 @@ msgid "Remove All"
msgstr "移除"
#: editor/plugins/theme_editor_plugin.cpp
-msgid "Theme"
+msgid "Edit theme.."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
@@ -5475,7 +5483,7 @@ msgstr ""
#: editor/project_manager.cpp
#, fuzzy
-msgid "The path does not exists."
+msgid "The path does not exist."
msgstr "檔案ä¸å­˜åœ¨"
#: editor/project_manager.cpp
@@ -5606,6 +5614,12 @@ msgstr ""
#: editor/project_manager.cpp
msgid ""
+"Language changed.\n"
+"The UI will update next time the editor or project manager starts."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
"You are about the scan %s folders for existing Godot projects. Do you "
"confirm?"
msgstr ""
@@ -5635,6 +5649,10 @@ msgid "Exit"
msgstr ""
#: editor/project_manager.cpp
+msgid "Restart Now"
+msgstr ""
+
+#: editor/project_manager.cpp
#, fuzzy
msgid "Can't run project"
msgstr "連接..."
@@ -5859,6 +5877,15 @@ msgstr ""
#: editor/project_settings_editor.cpp
#, fuzzy
+msgid "Changed Locale Filter"
+msgstr "變更é¡é ­å°ºå¯¸"
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "專案設定"
@@ -5919,6 +5946,27 @@ msgid "Locale"
msgstr ""
#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show all locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Show only selected locales"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Filter mode:"
+msgstr "éŽæ¿¾æª”案.."
+
+#: editor/project_settings_editor.cpp
+msgid "Locales:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -7429,6 +7477,9 @@ msgstr ""
msgid "Invalid font size."
msgstr ""
+#~ msgid "Filter:"
+#~ msgstr "éŽæ¿¾å™¨:"
+
#~ msgid "Arguments:"
#~ msgstr "è¼¸å…¥åƒæ•¸"
diff --git a/main/performance.cpp b/main/performance.cpp
index c4b62559c7..39b42e803c 100644
--- a/main/performance.cpp
+++ b/main/performance.cpp
@@ -153,6 +153,44 @@ float Performance::get_monitor(Monitor p_monitor) const {
return 0;
}
+Performance::MonitorType Performance::get_monitor_type(Monitor p_monitor) const {
+ ERR_FAIL_INDEX_V(p_monitor, MONITOR_MAX, MONITOR_TYPE_QUANTITY);
+ // ugly
+ static const MonitorType types[MONITOR_MAX] = {
+
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_TIME,
+ MONITOR_TYPE_TIME,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+
+ };
+
+ return types[p_monitor];
+}
+
void Performance::set_process_time(float p_pt) {
_process_time = p_pt;
diff --git a/main/performance.h b/main/performance.h
index 900e6434b7..21fbd7a1d2 100644
--- a/main/performance.h
+++ b/main/performance.h
@@ -79,9 +79,17 @@ public:
MONITOR_MAX
};
+ enum MonitorType {
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_TIME
+ };
+
float get_monitor(Monitor p_monitor) const;
String get_monitor_name(Monitor p_monitor) const;
+ MonitorType get_monitor_type(Monitor p_monitor) const;
+
void set_process_time(float p_pt);
void set_physics_process_time(float p_pt);
diff --git a/methods.py b/methods.py
index b56a0364b5..b62dfc6544 100644
--- a/methods.py
+++ b/methods.py
@@ -1710,9 +1710,13 @@ def generate_vs_project(env, num_jobs):
env.AddToVSProject(env.servers_sources)
env.AddToVSProject(env.editor_sources)
- env['MSVSBUILDCOM'] = build_commandline('scons --directory=$(ProjectDir) platform=windows target=$(Configuration) tools=!tools! -j' + str(num_jobs))
- env['MSVSREBUILDCOM'] = build_commandline('scons --directory=$(ProjectDir) platform=windows target=$(Configuration) tools=!tools! vsproj=yes -j' + str(num_jobs))
- env['MSVSCLEANCOM'] = build_commandline('scons --directory=$(ProjectDir) --clean platform=windows target=$(Configuration) tools=!tools! -j' + str(num_jobs))
+ # windows allows us to have spaces in paths, so we need
+ # to double quote off the directory. However, the path ends
+ # in a backslash, so we need to remove this, lest it escape the
+ # last double quote off, confusing MSBuild
+ env['MSVSBUILDCOM'] = build_commandline('scons --directory="$(ProjectDir.TrimEnd(\'\\\'))" platform=windows target=$(Configuration) tools=!tools! -j' + str(num_jobs))
+ env['MSVSREBUILDCOM'] = build_commandline('scons --directory="$(ProjectDir.TrimEnd(\'\\\'))" platform=windows target=$(Configuration) tools=!tools! vsproj=yes -j' + str(num_jobs))
+ env['MSVSCLEANCOM'] = build_commandline('scons --directory="$(ProjectDir.TrimEnd(\'\\\'))" --clean platform=windows target=$(Configuration) tools=!tools! -j' + str(num_jobs))
# This version information (Win32, x64, Debug, Release, Release_Debug seems to be
# required for Visual Studio to understand that it needs to generate an NMAKE
diff --git a/modules/gdnative/include/pluginscript/godot_pluginscript.h b/modules/gdnative/include/pluginscript/godot_pluginscript.h
index ec109bac83..d1c210529c 100644
--- a/modules/gdnative/include/pluginscript/godot_pluginscript.h
+++ b/modules/gdnative/include/pluginscript/godot_pluginscript.h
@@ -129,6 +129,7 @@ typedef struct {
const char **comment_delimiters; // NULL terminated array
const char **string_delimiters; // NULL terminated array
godot_bool has_named_classes;
+ godot_bool supports_builtin_mode;
godot_string (*get_template_source_code)(godot_pluginscript_language_data *p_data, const godot_string *p_class_name, const godot_string *p_base_class_name);
godot_bool (*validate)(godot_pluginscript_language_data *p_data, const godot_string *p_script, int *r_line_error, int *r_col_error, godot_string *r_test_error, const godot_string *p_path, godot_pool_string_array *r_functions);
diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp
index aa1fdc32da..c1df7def2e 100644
--- a/modules/gdnative/nativescript/nativescript.cpp
+++ b/modules/gdnative/nativescript/nativescript.cpp
@@ -270,10 +270,6 @@ bool NativeScript::is_tool() const {
return false;
}
-String NativeScript::get_node_type() const {
- return ""; // NOTE(karroffel): uhm?
-}
-
ScriptLanguage *NativeScript::get_language() const {
return NativeScriptLanguage::get_singleton();
}
@@ -908,6 +904,9 @@ Script *NativeScriptLanguage::create_script() const {
bool NativeScriptLanguage::has_named_classes() const {
return true;
}
+bool NativeScriptLanguage::supports_builtin_mode() const {
+ return true;
+}
int NativeScriptLanguage::find_function(const String &p_function, const String &p_code) const {
return -1;
}
diff --git a/modules/gdnative/nativescript/nativescript.h b/modules/gdnative/nativescript/nativescript.h
index b5db641179..e8fc9e6880 100644
--- a/modules/gdnative/nativescript/nativescript.h
+++ b/modules/gdnative/nativescript/nativescript.h
@@ -142,8 +142,6 @@ public:
virtual bool is_tool() const;
- virtual String get_node_type() const;
-
virtual ScriptLanguage *get_language() const;
virtual bool has_script_signal(const StringName &p_signal) const;
@@ -271,6 +269,7 @@ public:
virtual bool validate(const String &p_script, int &r_line_error, int &r_col_error, String &r_test_error, const String &p_path, List<String> *r_functions) const;
virtual Script *create_script() const;
virtual bool has_named_classes() const;
+ virtual bool supports_builtin_mode() const;
virtual int find_function(const String &p_function, const String &p_code) const;
virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const;
virtual void auto_indent_code(String &p_code, int p_from_line, int p_to_line) const;
diff --git a/modules/gdnative/pluginscript/pluginscript_language.cpp b/modules/gdnative/pluginscript/pluginscript_language.cpp
index d4b86ae5b4..40feb5ae43 100644
--- a/modules/gdnative/pluginscript/pluginscript_language.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_language.cpp
@@ -133,6 +133,10 @@ bool PluginScriptLanguage::has_named_classes() const {
return _desc.has_named_classes;
}
+bool PluginScriptLanguage::supports_builtin_mode() const {
+ return _desc.supports_builtin_mode;
+}
+
int PluginScriptLanguage::find_function(const String &p_function, const String &p_code) const {
if (_desc.find_function) {
return _desc.find_function(_data, (godot_string *)&p_function, (godot_string *)&p_code);
diff --git a/modules/gdnative/pluginscript/pluginscript_language.h b/modules/gdnative/pluginscript/pluginscript_language.h
index a48dde97ce..79b95ff4e6 100644
--- a/modules/gdnative/pluginscript/pluginscript_language.h
+++ b/modules/gdnative/pluginscript/pluginscript_language.h
@@ -77,6 +77,7 @@ public:
virtual bool validate(const String &p_script, int &r_line_error, int &r_col_error, String &r_test_error, const String &p_path = "", List<String> *r_functions = NULL) const;
virtual Script *create_script() const;
virtual bool has_named_classes() const;
+ virtual bool supports_builtin_mode() const;
virtual bool can_inherit_from_file() { return true; }
virtual int find_function(const String &p_function, const String &p_code) const;
virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const;
diff --git a/modules/gdnative/pluginscript/pluginscript_script.cpp b/modules/gdnative/pluginscript/pluginscript_script.cpp
index 7dd10a8bdf..4169b07f63 100644
--- a/modules/gdnative/pluginscript/pluginscript_script.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_script.cpp
@@ -346,11 +346,6 @@ bool PluginScript::get_property_default_value(const StringName &p_property, Vari
return false;
}
-String PluginScript::get_node_type() const {
- // Even GDscript doesn't know what to put here !
- return ""; // ?
-}
-
ScriptLanguage *PluginScript::get_language() const {
return _language;
}
diff --git a/modules/gdnative/pluginscript/pluginscript_script.h b/modules/gdnative/pluginscript/pluginscript_script.h
index e6b8643cd9..5600bca5ef 100644
--- a/modules/gdnative/pluginscript/pluginscript_script.h
+++ b/modules/gdnative/pluginscript/pluginscript_script.h
@@ -103,8 +103,6 @@ public:
bool is_tool() const { return _tool; }
- virtual String get_node_type() const;
-
virtual ScriptLanguage *get_language() const;
virtual bool has_script_signal(const StringName &p_signal) const;
diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp
index b0408917a4..d9b10ff3fa 100644
--- a/modules/gdscript/gd_editor.cpp
+++ b/modules/gdscript/gd_editor.cpp
@@ -61,7 +61,11 @@ Ref<Script> GDScriptLanguage::get_template(const String &p_class_name, const Str
"func _ready():\n" +
"%TS%# Called every time the node is added to the scene.\n" +
"%TS%# Initialization here\n" +
- "%TS%pass\n";
+ "%TS%pass\n\n" +
+ "#func _process(delta):\n" +
+ "#%TS%# Called every frame. Delta is time since last frame.\n" +
+ "#%TS%# Update game logic here.\n" +
+ "#%TS%pass\n";
_template = _template.replace("%BASE%", p_base_class_name);
_template = _template.replace("%TS%", _get_indentation());
@@ -127,6 +131,11 @@ bool GDScriptLanguage::has_named_classes() const {
return false;
}
+bool GDScriptLanguage::supports_builtin_mode() const {
+
+ return true;
+}
+
int GDScriptLanguage::find_function(const String &p_function, const String &p_code) const {
GDTokenizerText tokenizer;
@@ -2102,9 +2111,9 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base
for (List<String>::Element *E = opts.front(); E; E = E->next()) {
String opt = E->get().strip_edges();
- if (opt.begins_with("\"") && opt.ends_with("\"")) {
+ if (opt.is_quoted()) {
r_forced = true;
- String idopt = opt.substr(1, opt.length() - 2);
+ String idopt = opt.unquote();
if (idopt.replace("/", "_").is_valid_identifier()) {
options.insert(idopt);
} else {
diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp
index 36aaa1f807..94385dc0d0 100644
--- a/modules/gdscript/gd_parser.cpp
+++ b/modules/gdscript/gd_parser.cpp
@@ -1906,7 +1906,8 @@ GDParser::PatternNode *GDParser::_parse_pattern(bool p_static) {
// all the constants like strings and numbers
default: {
Node *value = _parse_and_reduce_expression(pattern, p_static);
- if (error_set) {
+ if (!value) {
+ _set_error("Expect constant expression or variables in a pattern");
return NULL;
}
diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp
index cf6529d5ae..3f3818ffb9 100644
--- a/modules/gdscript/gd_script.cpp
+++ b/modules/gdscript/gd_script.cpp
@@ -609,11 +609,6 @@ Error GDScript::reload(bool p_keep_state) {
return OK;
}
-String GDScript::get_node_type() const {
-
- return ""; // ?
-}
-
ScriptLanguage *GDScript::get_language() const {
return GDScriptLanguage::get_singleton();
diff --git a/modules/gdscript/gd_script.h b/modules/gdscript/gd_script.h
index 5e1a8b19ac..e0d142014a 100644
--- a/modules/gdscript/gd_script.h
+++ b/modules/gdscript/gd_script.h
@@ -172,7 +172,6 @@ public:
virtual Error reload(bool p_keep_state = false);
- virtual String get_node_type() const;
void set_script_path(const String &p_path) { path = p_path; } //because subclasses need a path too...
Error load_source_code(const String &p_path);
Error load_byte_code(const String &p_path);
@@ -386,6 +385,7 @@ public:
virtual bool validate(const String &p_script, int &r_line_error, int &r_col_error, String &r_test_error, const String &p_path = "", List<String> *r_functions = NULL) const;
virtual Script *create_script() const;
virtual bool has_named_classes() const;
+ virtual bool supports_builtin_mode() const;
virtual bool can_inherit_from_file() { return true; }
virtual int find_function(const String &p_function, const String &p_code) const;
virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const;
diff --git a/modules/mono/SCsub b/modules/mono/SCsub
index caf4fdb3ca..27e60c4623 100644
--- a/modules/mono/SCsub
+++ b/modules/mono/SCsub
@@ -53,68 +53,151 @@ if env['tools']:
vars = Variables()
vars.Add(BoolVariable('mono_glue', 'Build with the mono glue sources', True))
+vars.Add(BoolVariable('xbuild_fallback', 'If MSBuild is not found, fallback to xbuild', False))
vars.Update(env)
# Glue sources
if env['mono_glue']:
env.add_source_files(env.modules_sources, 'glue/*.cpp')
else:
- env.Append(CPPDEFINES = [ 'MONO_GLUE_DISABLED' ])
+ env.Append(CPPDEFINES=['MONO_GLUE_DISABLED'])
if ARGUMENTS.get('yolo_copy', False):
- env.Append(CPPDEFINES = [ 'YOLO_COPY' ])
+ env.Append(CPPDEFINES=['YOLO_COPY'])
+
# Build GodotSharpTools solution
+
import os
-import subprocess
-import mono_reg_utils as monoreg
+
+
+def find_msbuild_unix(filename):
+ import os.path
+ import sys
+
+ hint_dirs = ['/opt/novell/mono/bin']
+ if sys.platform == "darwin":
+ hint_dirs = ['/Library/Frameworks/Mono.framework/Versions/Current/bin'] + hint_dirs
+
+ for hint_dir in hint_dirs:
+ hint_path = os.path.join(hint_dir, filename)
+ if os.path.isfile(hint_path):
+ return hint_path
+
+ for hint_dir in os.environ["PATH"].split(os.pathsep):
+ hint_dir = hint_dir.strip('"')
+ hint_path = os.path.join(hint_dir, filename)
+ if os.path.isfile(hint_path) and os.access(hint_path, os.X_OK):
+ return hint_path
+
+ return None
+
+
+def find_msbuild_windows():
+ import mono_reg_utils as monoreg
+
+ bits = env['bits']
+
+ if bits == '32':
+ if os.getenv('MONO32_PREFIX'):
+ mono_root = os.getenv('MONO32_PREFIX')
+ else:
+ mono_root = monoreg.find_mono_root_dir(bits)
+ else:
+ if os.getenv('MONO64_PREFIX'):
+ mono_root = os.getenv('MONO64_PREFIX')
+ else:
+ mono_root = monoreg.find_mono_root_dir(bits)
+
+ if not mono_root:
+ raise RuntimeError('Cannot find mono root directory')
+
+ msbuild_tools_path = monoreg.find_msbuild_tools_path_reg()
+
+ if msbuild_tools_path:
+ return (os.path.join(msbuild_tools_path, 'MSBuild.exe'), os.path.join(mono_root, 'lib', 'mono', '4.5'))
+ else:
+ msbuild_mono = os.path.join(mono_root, 'bin', 'msbuild.bat')
+
+ if os.path.isfile(msbuild_mono):
+ return (msbuild_mono, '')
+
+ return None
def mono_build_solution(source, target, env):
+ import subprocess
+ import mono_reg_utils as monoreg
+ from shutil import copyfile
+
+ framework_path_override = ''
+
if os.name == 'nt':
- msbuild_tools_path = monoreg.find_msbuild_tools_path_reg()
- if not msbuild_tools_path:
- raise RuntimeError('Cannot find MSBuild Tools Path in the registry')
- msbuild_path = os.path.join(msbuild_tools_path, 'MSBuild.exe')
+ msbuild_info = find_msbuild_windows()
+ if msbuild_info is None:
+ raise RuntimeError('Cannot find MSBuild executable')
+ msbuild_path = msbuild_info[0]
+ framework_path_override = msbuild_info[1]
else:
- msbuild_path = 'msbuild'
+ msbuild_path = find_msbuild_unix('msbuild')
+ if msbuild_path is None:
+ xbuild_fallback = env['xbuild_fallback']
+
+ if xbuild_fallback and os.name == 'nt':
+ print("Option 'xbuild_fallback' not supported on Windows")
+ xbuild_fallback = False
+
+ if xbuild_fallback:
+ print('Cannot find MSBuild executable, trying with xbuild')
+ print('Warning: xbuild is deprecated')
+
+ msbuild_path = find_msbuild_unix('xbuild')
+
+ if msbuild_path is None:
+ raise RuntimeError('Cannot find xbuild executable')
+ else:
+ raise RuntimeError('Cannot find MSBuild executable')
+
+ print('MSBuild path: ' + msbuild_path)
- output_path = os.path.abspath(os.path.join(str(target[0]), os.pardir))
+ build_config = 'Release'
msbuild_args = [
msbuild_path,
os.path.abspath(str(source[0])),
- '/p:Configuration=Release',
- '/p:OutputPath=' + output_path
+ '/p:Configuration=' + build_config,
]
+ if framework_path_override:
+ msbuild_args += ['/p:FrameworkPathOverride=' + framework_path_override]
+
msbuild_env = os.environ.copy()
# Needed when running from Developer Command Prompt for VS
if 'PLATFORM' in msbuild_env:
del msbuild_env['PLATFORM']
- msbuild_alt_paths = [ 'xbuild' ]
-
- while True:
- try:
- subprocess.check_call(msbuild_args, env = msbuild_env)
- break
- except subprocess.CalledProcessError:
- raise RuntimeError('GodotSharpTools build failed')
- except OSError:
- if os.name != 'nt':
- if not msbuild_alt_paths:
- raise RuntimeError('Could not find commands msbuild or xbuild')
- # Try xbuild
- msbuild_args[0] = msbuild_alt_paths.pop(0)
- else:
- raise RuntimeError('Could not find command MSBuild.exe')
+ try:
+ subprocess.check_call(msbuild_args, env=msbuild_env)
+ except subprocess.CalledProcessError:
+ raise RuntimeError('GodotSharpTools build failed')
+
+ src_dir = os.path.abspath(os.path.join(str(source[0]), os.pardir, 'bin', build_config))
+ dst_dir = os.path.abspath(os.path.join(str(target[0]), os.pardir))
+
+ if not os.path.isdir(dst_dir):
+ if os.path.exists(dst_dir):
+ raise RuntimeError('Target directory is a file')
+ os.makedirs(dst_dir)
+
+ asm_file = 'GodotSharpTools.dll'
+
+ copyfile(os.path.join(src_dir, asm_file), os.path.join(dst_dir, asm_file))
mono_sln_builder = Builder(action = mono_build_solution)
-env.Append(BUILDERS = { 'MonoBuildSolution' : mono_sln_builder })
+env.Append(BUILDERS={'MonoBuildSolution': mono_sln_builder})
env.MonoBuildSolution(
os.path.join(Dir('#bin').abspath, 'GodotSharpTools.dll'),
'editor/GodotSharpTools/GodotSharpTools.sln'
diff --git a/modules/mono/config.py b/modules/mono/config.py
index 0833d30ce1..44eef45f76 100644
--- a/modules/mono/config.py
+++ b/modules/mono/config.py
@@ -2,7 +2,6 @@
import imp
import os
import sys
-from shutil import copyfile
from SCons.Script import BoolVariable, Environment, Variables
@@ -16,8 +15,7 @@ def find_file_in_dir(directory, files, prefix='', extension=''):
for curfile in files:
if os.path.isfile(os.path.join(directory, prefix + curfile + extension)):
return curfile
-
- return None
+ return ''
def can_build(platform):
@@ -31,6 +29,22 @@ def is_enabled():
return False
+def copy_file_no_replace(src_dir, dst_dir, name):
+ from shutil import copyfile
+
+ src_path = os.path.join(src_dir, name)
+ dst_path = os.path.join(dst_dir, name)
+ need_copy = True
+
+ if not os.path.isdir(dst_dir):
+ os.mkdir(dst_dir)
+ elif os.path.exists(dst_path):
+ need_copy = False
+
+ if need_copy:
+ copyfile(src_path, dst_path)
+
+
def configure(env):
env.use_ptrcall = True
@@ -38,6 +52,8 @@ def configure(env):
envvars.Add(BoolVariable('mono_static', 'Statically link mono', False))
envvars.Update(env)
+ bits = env['bits']
+
mono_static = env['mono_static']
mono_lib_names = ['mono-2.0-sgen', 'monosgen-2.0']
@@ -46,18 +62,18 @@ def configure(env):
if mono_static:
raise RuntimeError('mono-static: Not supported on Windows')
- if env['bits'] == '32':
+ if bits == '32':
if os.getenv('MONO32_PREFIX'):
mono_root = os.getenv('MONO32_PREFIX')
elif os.name == 'nt':
- mono_root = monoreg.find_mono_root_dir()
+ mono_root = monoreg.find_mono_root_dir(bits)
else:
if os.getenv('MONO64_PREFIX'):
mono_root = os.getenv('MONO64_PREFIX')
elif os.name == 'nt':
- mono_root = monoreg.find_mono_root_dir()
+ mono_root = monoreg.find_mono_root_dir(bits)
- if mono_root is None:
+ if not mono_root:
raise RuntimeError('Mono installation directory not found')
mono_lib_path = os.path.join(mono_root, 'lib')
@@ -67,7 +83,7 @@ def configure(env):
mono_lib_name = find_file_in_dir(mono_lib_path, mono_lib_names, extension='.lib')
- if mono_lib_name is None:
+ if not mono_lib_name:
raise RuntimeError('Could not find mono library in: ' + mono_lib_path)
if os.getenv('VCINSTALLDIR'):
@@ -79,28 +95,23 @@ def configure(env):
mono_dll_name = find_file_in_dir(mono_bin_path, mono_lib_names, extension='.dll')
- mono_dll_src = os.path.join(mono_bin_path, mono_dll_name + '.dll')
- mono_dll_dst = os.path.join('bin', mono_dll_name + '.dll')
- copy_mono_dll = True
-
- if not os.path.isdir('bin'):
- os.mkdir('bin')
- elif os.path.exists(mono_dll_dst):
- copy_mono_dll = False
+ if not mono_dll_name:
+ raise RuntimeError('Could not find mono shared library in: ' + mono_bin_path)
- if copy_mono_dll:
- copyfile(mono_dll_src, mono_dll_dst)
+ copy_file_no_replace(mono_bin_path, 'bin', mono_dll_name + '.dll')
else:
- mono_root = None
+ sharedlib_ext = '.dylib' if sys.platform == 'darwin' else '.so'
- if env['bits'] == '32':
+ mono_root = ''
+
+ if bits == '32':
if os.getenv('MONO32_PREFIX'):
mono_root = os.getenv('MONO32_PREFIX')
else:
if os.getenv('MONO64_PREFIX'):
mono_root = os.getenv('MONO64_PREFIX')
- if mono_root is not None:
+ if mono_root:
mono_lib_path = os.path.join(mono_root, 'lib')
env.Append(LIBPATH=mono_lib_path)
@@ -108,7 +119,7 @@ def configure(env):
mono_lib = find_file_in_dir(mono_lib_path, mono_lib_names, prefix='lib', extension='.a')
- if mono_lib is None:
+ if not mono_lib:
raise RuntimeError('Could not find mono library in: ' + mono_lib_path)
env.Append(CPPFLAGS=['-D_REENTRANT'])
@@ -130,12 +141,37 @@ def configure(env):
elif sys.platform == "linux" or sys.platform == "linux2":
env.Append(LIBS=['m', 'rt', 'dl', 'pthread'])
+ if not mono_static:
+ mono_so_name = find_file_in_dir(mono_lib_path, mono_lib_names, prefix='lib', extension=sharedlib_ext)
+
+ if not mono_so_name:
+ raise RuntimeError('Could not find mono shared library in: ' + mono_lib_path)
+
+ copy_file_no_replace(mono_lib_path, 'bin', 'lib' + mono_so_name + sharedlib_ext)
else:
if mono_static:
raise RuntimeError('mono-static: Not supported with pkg-config. Specify a mono prefix manually')
env.ParseConfig('pkg-config monosgen-2 --cflags --libs')
+ mono_lib_path = ''
+ mono_so_name = ''
+
+ tmpenv = Environment()
+ tmpenv.ParseConfig('pkg-config monosgen-2 --libs-only-L')
+
+ for hint_dir in tmpenv['LIBPATH']:
+ name_found = find_file_in_dir(hint_dir, mono_lib_names, prefix='lib', extension=sharedlib_ext)
+ if name_found:
+ mono_lib_path = hint_dir
+ mono_so_name = name_found
+ break
+
+ if not mono_so_name:
+ raise RuntimeError('Could not find mono shared library in: ' + str(tmpenv['LIBPATH']))
+
+ copy_file_no_replace(mono_lib_path, 'bin', 'lib' + mono_so_name + sharedlib_ext)
+
env.Append(LINKFLAGS='-rdynamic')
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index ba8c7df9cc..3d91a6de6c 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -277,13 +277,22 @@ Ref<Script> CSharpLanguage::get_template(const String &p_class_name, const Strin
" // Initialization here\n"
" \n"
" }\n"
+ "\n"
+ "// public override void _Process(float delta)\n"
+ "// {\n"
+ "// // Called every frame. Delta is time since last frame.\n"
+ "// // Update game logic here.\n"
+ "// \n"
+ "// }\n"
"}\n";
- script_template = script_template.replace("%BASE_CLASS_NAME%", p_base_class_name).replace("%CLASS_NAME%", p_class_name);
+ script_template = script_template.replace("%BASE_CLASS_NAME%", p_base_class_name)
+ .replace("%CLASS_NAME%", p_class_name);
Ref<CSharpScript> script;
script.instance();
script->set_source_code(script_template);
+ script->set_name(p_class_name);
return script;
}
@@ -295,7 +304,12 @@ Script *CSharpLanguage::create_script() const {
bool CSharpLanguage::has_named_classes() const {
- return true;
+ return false;
+}
+
+bool CSharpLanguage::supports_builtin_mode() const {
+
+ return false;
}
static String variant_type_to_managed_name(const String &p_var_type_name) {
@@ -463,6 +477,7 @@ void CSharpLanguage::reload_tool_script(const Ref<Script> &p_script, bool p_soft
(void)p_script; // UNUSED
#ifdef TOOLS_ENABLED
+ MonoReloadNode::get_singleton()->restart_reload_timer();
reload_assemblies_if_needed(p_soft_reload);
#endif
}
@@ -474,13 +489,17 @@ void CSharpLanguage::reload_assemblies_if_needed(bool p_soft_reload) {
GDMonoAssembly *proj_assembly = gdmono->get_project_assembly();
+ String name = ProjectSettings::get_singleton()->get("application/config/name");
+ if (name.empty()) {
+ name = "UnnamedProject";
+ }
+
if (proj_assembly) {
String proj_asm_path = proj_assembly->get_path();
if (!FileAccess::exists(proj_assembly->get_path())) {
// Maybe it wasn't loaded from the default path, so check this as well
- String proj_asm_name = ProjectSettings::get_singleton()->get("application/config/name");
- proj_asm_path = GodotSharpDirs::get_res_temp_assemblies_dir().plus_file(proj_asm_name);
+ proj_asm_path = GodotSharpDirs::get_res_temp_assemblies_dir().plus_file(name);
if (!FileAccess::exists(proj_asm_path))
return; // No assembly to load
}
@@ -488,8 +507,7 @@ void CSharpLanguage::reload_assemblies_if_needed(bool p_soft_reload) {
if (FileAccess::get_modified_time(proj_asm_path) <= proj_assembly->get_modified_time())
return; // Already up to date
} else {
- String proj_asm_name = ProjectSettings::get_singleton()->get("application/config/name");
- if (!FileAccess::exists(GodotSharpDirs::get_res_temp_assemblies_dir().plus_file(proj_asm_name)))
+ if (!FileAccess::exists(GodotSharpDirs::get_res_temp_assemblies_dir().plus_file(name)))
return; // No assembly to load
}
}
@@ -607,6 +625,9 @@ void CSharpLanguage::reload_assemblies_if_needed(bool p_soft_reload) {
//if instance states were saved, set them!
}
+
+ if (Engine::get_singleton()->is_editor_hint())
+ EditorNode::get_singleton()->get_property_editor()->update_tree();
}
#endif
@@ -1706,11 +1727,6 @@ Error CSharpScript::reload(bool p_keep_state) {
return ERR_FILE_MISSING_DEPENDENCIES;
}
-String CSharpScript::get_node_type() const {
-
- return ""; // ?
-}
-
ScriptLanguage *CSharpScript::get_language() const {
return CSharpLanguage::get_singleton();
diff --git a/modules/mono/csharp_script.h b/modules/mono/csharp_script.h
index 6b8475fb61..65a6450da5 100644
--- a/modules/mono/csharp_script.h
+++ b/modules/mono/csharp_script.h
@@ -138,7 +138,6 @@ public:
virtual bool is_tool() const { return tool; }
virtual Ref<Script> get_base_script() const;
- virtual String get_node_type() const;
virtual ScriptLanguage *get_language() const;
/* TODO */ virtual void get_script_method_list(List<MethodInfo> *p_list) const {}
@@ -270,6 +269,7 @@ public:
/* TODO */ virtual bool validate(const String &p_script, int &r_line_error, int &r_col_error, String &r_test_error, const String &p_path, List<String> *r_functions) const { return true; }
virtual Script *create_script() const;
virtual bool has_named_classes() const;
+ virtual bool supports_builtin_mode() const;
/* TODO? */ virtual int find_function(const String &p_function, const String &p_code) const { return -1; }
virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const;
/* TODO? */ Error complete_code(const String &p_code, const String &p_base_path, Object *p_owner, List<String> *r_options, String &r_call_hint) { return ERR_UNAVAILABLE; }
diff --git a/modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs b/modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs
index 5544233eb7..04da0600cc 100644
--- a/modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs
+++ b/modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs
@@ -4,6 +4,7 @@ using System.Collections.Specialized;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
using System.Security;
using Microsoft.Build.Framework;
@@ -12,22 +13,27 @@ namespace GodotSharpTools.Build
public class BuildInstance : IDisposable
{
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static void godot_icall_BuildInstance_ExitCallback(string solution, string config, int exitCode);
+ private extern static void godot_icall_BuildInstance_ExitCallback(string solution, string config, int exitCode);
[MethodImpl(MethodImplOptions.InternalCall)]
- internal extern static string godot_icall_BuildInstance_get_MSBuildPath();
+ private extern static void godot_icall_BuildInstance_get_MSBuildInfo(ref string msbuildPath, ref string frameworkPath);
- private static string MSBuildPath
+ private struct MSBuildInfo
{
- get
- {
- string ret = godot_icall_BuildInstance_get_MSBuildPath();
+ public string path;
+ public string frameworkPathOverride;
+ }
- if (ret == null)
- throw new FileNotFoundException("Cannot find the MSBuild executable.");
+ private static MSBuildInfo GetMSBuildInfo()
+ {
+ MSBuildInfo msbuildInfo = new MSBuildInfo();
- return ret;
- }
+ godot_icall_BuildInstance_get_MSBuildInfo(ref msbuildInfo.path, ref msbuildInfo.frameworkPathOverride);
+
+ if (msbuildInfo.path == null)
+ throw new FileNotFoundException("Cannot find the MSBuild executable.");
+
+ return msbuildInfo;
}
private string solution;
@@ -48,9 +54,19 @@ namespace GodotSharpTools.Build
public bool Build(string loggerAssemblyPath, string loggerOutputDir, string[] customProperties = null)
{
- string compilerArgs = BuildArguments(loggerAssemblyPath, loggerOutputDir, customProperties);
+ MSBuildInfo msbuildInfo = GetMSBuildInfo();
+
+ List<string> customPropertiesList = new List<string>();
+
+ if (customProperties != null)
+ customPropertiesList.AddRange(customProperties);
+
+ if (msbuildInfo.frameworkPathOverride != null)
+ customPropertiesList.Add("FrameworkPathOverride=" + msbuildInfo.frameworkPathOverride);
- ProcessStartInfo startInfo = new ProcessStartInfo(MSBuildPath, compilerArgs);
+ string compilerArgs = BuildArguments(loggerAssemblyPath, loggerOutputDir, customPropertiesList);
+
+ ProcessStartInfo startInfo = new ProcessStartInfo(msbuildInfo.path, compilerArgs);
// No console output, thanks
startInfo.RedirectStandardOutput = true;
@@ -82,9 +98,19 @@ namespace GodotSharpTools.Build
if (process != null)
throw new InvalidOperationException("Already in use");
- string compilerArgs = BuildArguments(loggerAssemblyPath, loggerOutputDir, customProperties);
+ MSBuildInfo msbuildInfo = GetMSBuildInfo();
+
+ List<string> customPropertiesList = new List<string>();
+
+ if (customProperties != null)
+ customPropertiesList.AddRange(customProperties);
+
+ if (msbuildInfo.frameworkPathOverride.Length > 0)
+ customPropertiesList.Add("FrameworkPathOverride=" + msbuildInfo.frameworkPathOverride);
- ProcessStartInfo startInfo = new ProcessStartInfo("msbuild", compilerArgs);
+ string compilerArgs = BuildArguments(loggerAssemblyPath, loggerOutputDir, customPropertiesList);
+
+ ProcessStartInfo startInfo = new ProcessStartInfo(msbuildInfo.path, compilerArgs);
// No console output, thanks
startInfo.RedirectStandardOutput = true;
@@ -101,10 +127,13 @@ namespace GodotSharpTools.Build
process.Start();
+ process.BeginOutputReadLine();
+ process.BeginErrorReadLine();
+
return true;
}
- private string BuildArguments(string loggerAssemblyPath, string loggerOutputDir, string[] customProperties)
+ private string BuildArguments(string loggerAssemblyPath, string loggerOutputDir, List<string> customProperties)
{
string arguments = string.Format(@"""{0}"" /v:normal /t:Build ""/p:{1}"" ""/l:{2},{3};{4}""",
solution,
@@ -114,12 +143,9 @@ namespace GodotSharpTools.Build
loggerOutputDir
);
- if (customProperties != null)
+ foreach (string customProperty in customProperties)
{
- foreach (string customProperty in customProperties)
- {
- arguments += " /p:" + customProperty;
- }
+ arguments += " \"/p:" + customProperty + "\"";
}
return arguments;
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp
index 95e75f9103..eb504ec021 100644
--- a/modules/mono/editor/bindings_generator.cpp
+++ b/modules/mono/editor/bindings_generator.cpp
@@ -438,6 +438,9 @@ Error BindingsGenerator::generate_cs_core_project(const String &p_output_dir, bo
return sln_error;
}
+ if (verbose_output)
+ OS::get_singleton()->print("The solution and C# project for the Core API was generated successfully\n");
+
return OK;
}
@@ -530,6 +533,9 @@ Error BindingsGenerator::generate_cs_editor_project(const String &p_output_dir,
return sln_error;
}
+ if (verbose_output)
+ OS::get_singleton()->print("The solution and C# project for the Editor API was generated successfully\n");
+
return OK;
}
@@ -537,8 +543,6 @@ Error BindingsGenerator::generate_cs_editor_project(const String &p_output_dir,
// e.g.: warning CS0108: 'SpriteBase3D.FLAG_MAX' hides inherited member 'GeometryInstance.FLAG_MAX'. Use the new keyword if hiding was intended.
Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const String &p_output_file) {
- int method_bind_count = 0;
-
bool is_derived_type = itype.base_name.length();
List<InternalCall> &custom_icalls = itype.api_type == ClassDB::API_EDITOR ? editor_custom_icalls : core_custom_icalls;
@@ -548,51 +552,51 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
String ctor_method(ICALL_PREFIX + itype.proxy_name + "_Ctor");
- List<String> cs_file;
+ List<String> output;
- cs_file.push_back("using System;\n"); // IntPtr
+ output.push_back("using System;\n"); // IntPtr
if (itype.requires_collections)
- cs_file.push_back("using System.Collections.Generic;\n"); // Dictionary
+ output.push_back("using System.Collections.Generic;\n"); // Dictionary
- cs_file.push_back("\nnamespace " BINDINGS_NAMESPACE "\n" OPEN_BLOCK);
+ output.push_back("\nnamespace " BINDINGS_NAMESPACE "\n" OPEN_BLOCK);
const DocData::ClassDoc *class_doc = itype.class_doc;
if (class_doc && class_doc->description.size()) {
- cs_file.push_back(INDENT1 "/// <summary>\n");
+ output.push_back(INDENT1 "/// <summary>\n");
Vector<String> description_lines = class_doc->description.split("\n");
for (int i = 0; i < description_lines.size(); i++) {
if (description_lines[i].size()) {
- cs_file.push_back(INDENT1 "/// ");
- cs_file.push_back(description_lines[i].strip_edges().xml_escape());
- cs_file.push_back("\n");
+ output.push_back(INDENT1 "/// ");
+ output.push_back(description_lines[i].strip_edges().xml_escape());
+ output.push_back("\n");
}
}
- cs_file.push_back(INDENT1 "/// </summary>\n");
+ output.push_back(INDENT1 "/// </summary>\n");
}
- cs_file.push_back(INDENT1 "public ");
- cs_file.push_back(itype.is_singleton ? "static class " : "class ");
- cs_file.push_back(itype.proxy_name);
+ output.push_back(INDENT1 "public ");
+ output.push_back(itype.is_singleton ? "static class " : "class ");
+ output.push_back(itype.proxy_name);
if (itype.is_singleton || !itype.is_object_type) {
- cs_file.push_back("\n");
+ output.push_back("\n");
} else if (!is_derived_type) {
- cs_file.push_back(" : IDisposable\n");
+ output.push_back(" : IDisposable\n");
} else if (obj_types.has(itype.base_name)) {
- cs_file.push_back(" : ");
- cs_file.push_back(obj_types[itype.base_name].proxy_name);
- cs_file.push_back("\n");
+ output.push_back(" : ");
+ output.push_back(obj_types[itype.base_name].proxy_name);
+ output.push_back("\n");
} else {
- ERR_PRINTS("Base type ' " + itype.base_name + "' does not exist");
+ ERR_PRINTS("Base type '" + itype.base_name + "' does not exist, for class " + itype.name);
return ERR_INVALID_DATA;
}
- cs_file.push_back(INDENT1 "{");
+ output.push_back(INDENT1 "{");
if (class_doc) {
@@ -602,270 +606,165 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
const DocData::ConstantDoc &const_doc = class_doc->constants[i];
if (const_doc.description.size()) {
- cs_file.push_back(MEMBER_BEGIN "/// <summary>\n");
+ output.push_back(MEMBER_BEGIN "/// <summary>\n");
Vector<String> description_lines = const_doc.description.split("\n");
for (int i = 0; i < description_lines.size(); i++) {
if (description_lines[i].size()) {
- cs_file.push_back(INDENT2 "/// ");
- cs_file.push_back(description_lines[i].strip_edges().xml_escape());
- cs_file.push_back("\n");
+ output.push_back(INDENT2 "/// ");
+ output.push_back(description_lines[i].strip_edges().xml_escape());
+ output.push_back("\n");
}
}
- cs_file.push_back(INDENT2 "/// </summary>");
+ output.push_back(INDENT2 "/// </summary>");
}
- cs_file.push_back(MEMBER_BEGIN "public const int ");
- cs_file.push_back(const_doc.name);
- cs_file.push_back(" = ");
- cs_file.push_back(const_doc.value);
- cs_file.push_back(";");
+ output.push_back(MEMBER_BEGIN "public const int ");
+ output.push_back(const_doc.name);
+ output.push_back(" = ");
+ output.push_back(const_doc.value);
+ output.push_back(";");
}
if (class_doc->constants.size())
- cs_file.push_back("\n");
+ output.push_back("\n");
// Add properties
- const Vector<DocData::PropertyDoc> &properties = itype.class_doc->properties;
+ const Vector<DocData::PropertyDoc> &properties = class_doc->properties;
for (int i = 0; i < properties.size(); i++) {
const DocData::PropertyDoc &prop_doc = properties[i];
-
- const MethodInterface *setter = itype.find_method_by_name(prop_doc.setter);
-
- // Search it in base types too
- const TypeInterface *current_type = &itype;
- while (!setter && current_type->base_name.length()) {
- Map<String, TypeInterface>::Element *base_match = obj_types.find(current_type->base_name);
- ERR_FAIL_NULL_V(base_match, ERR_BUG);
- current_type = &base_match->get();
- setter = current_type->find_method_by_name(prop_doc.setter);
- }
-
- const MethodInterface *getter = itype.find_method_by_name(prop_doc.getter);
-
- // Search it in base types too
- current_type = &itype;
- while (!getter && current_type->base_name.length()) {
- Map<String, TypeInterface>::Element *base_match = obj_types.find(current_type->base_name);
- ERR_FAIL_NULL_V(base_match, ERR_BUG);
- current_type = &base_match->get();
- getter = current_type->find_method_by_name(prop_doc.getter);
- }
-
- ERR_FAIL_COND_V(!setter && !getter, ERR_BUG);
-
- bool is_valid = false;
- int prop_index = ClassDB::get_property_index(itype.name, prop_doc.name, &is_valid);
- ERR_FAIL_COND_V(!is_valid, ERR_BUG);
-
- if (setter) {
- int setter_argc = prop_index != -1 ? 2 : 1;
- ERR_FAIL_COND_V(setter->arguments.size() != setter_argc, ERR_BUG);
- }
-
- if (getter) {
- int getter_argc = prop_index != -1 ? 1 : 0;
- ERR_FAIL_COND_V(getter->arguments.size() != getter_argc, ERR_BUG);
- }
-
- if (getter && setter) {
- ERR_FAIL_COND_V(getter->return_type != setter->arguments.back()->get().type, ERR_BUG);
- }
-
- // Let's not trust PropertyDoc::type
- String proptype_name = getter ? getter->return_type : setter->arguments.back()->get().type;
-
- const TypeInterface *prop_itype = _get_type_by_name_or_null(proptype_name);
- if (!prop_itype) {
- // Try with underscore prefix
- prop_itype = _get_type_by_name_or_null("_" + proptype_name);
- }
-
- ERR_FAIL_NULL_V(prop_itype, ERR_BUG);
-
- String prop_proxy_name = escape_csharp_keyword(snake_to_pascal_case(prop_doc.name));
-
- // Prevent property and enclosing type from sharing the same name
- if (prop_proxy_name == itype.proxy_name) {
- if (verbose_output) {
- WARN_PRINTS("Name of property `" + prop_proxy_name + "` is ambiguous with the name of its class `" +
- itype.proxy_name + "`. Renaming property to `" + prop_proxy_name + "_`");
- }
-
- prop_proxy_name += "_";
- }
-
- if (prop_doc.description.size()) {
- cs_file.push_back(MEMBER_BEGIN "/// <summary>\n");
-
- Vector<String> description_lines = prop_doc.description.split("\n");
-
- for (int i = 0; i < description_lines.size(); i++) {
- if (description_lines[i].size()) {
- cs_file.push_back(INDENT2 "/// ");
- cs_file.push_back(description_lines[i].strip_edges().xml_escape());
- cs_file.push_back("\n");
- }
- }
-
- cs_file.push_back(INDENT2 "/// </summary>");
- }
-
- cs_file.push_back(MEMBER_BEGIN "public ");
-
- if (itype.is_singleton)
- cs_file.push_back("static ");
-
- cs_file.push_back(prop_itype->cs_type);
- cs_file.push_back(" ");
- cs_file.push_back(prop_proxy_name.replace("/", "__"));
- cs_file.push_back("\n" INDENT2 OPEN_BLOCK);
-
- if (getter) {
- cs_file.push_back(INDENT3 "get\n" OPEN_BLOCK_L3);
- cs_file.push_back("return ");
- cs_file.push_back(getter->proxy_name + "(");
- if (prop_index != -1)
- cs_file.push_back(itos(prop_index));
- cs_file.push_back(");\n" CLOSE_BLOCK_L3);
- }
-
- if (setter) {
- cs_file.push_back(INDENT3 "set\n" OPEN_BLOCK_L3);
- cs_file.push_back(setter->proxy_name + "(");
- if (prop_index != -1)
- cs_file.push_back(itos(prop_index) + ", ");
- cs_file.push_back("value);\n" CLOSE_BLOCK_L3);
+ Error prop_err = _generate_cs_property(itype, prop_doc, output);
+ if (prop_err != OK) {
+ ERR_EXPLAIN("Failed to generate property '" + prop_doc.name + "' for class '" + itype.name + "'");
+ ERR_FAIL_V(prop_err);
}
-
- cs_file.push_back(CLOSE_BLOCK_L2);
}
if (class_doc->properties.size())
- cs_file.push_back("\n");
+ output.push_back("\n");
}
if (!itype.is_object_type) {
- cs_file.push_back(MEMBER_BEGIN "private const string " BINDINGS_NATIVE_NAME_FIELD " = \"" + itype.name + "\";\n");
- cs_file.push_back(MEMBER_BEGIN "private bool disposed = false;\n");
- cs_file.push_back(MEMBER_BEGIN "internal IntPtr " BINDINGS_PTR_FIELD ";\n");
+ output.push_back(MEMBER_BEGIN "private const string " BINDINGS_NATIVE_NAME_FIELD " = \"" + itype.name + "\";\n");
+ output.push_back(MEMBER_BEGIN "private bool disposed = false;\n");
+ output.push_back(MEMBER_BEGIN "internal IntPtr " BINDINGS_PTR_FIELD ";\n");
- cs_file.push_back(MEMBER_BEGIN "internal static IntPtr " CS_SMETHOD_GETINSTANCE "(");
- cs_file.push_back(itype.proxy_name);
- cs_file.push_back(" instance)\n" OPEN_BLOCK_L2 "return instance == null ? IntPtr.Zero : instance." BINDINGS_PTR_FIELD ";\n" CLOSE_BLOCK_L2);
+ output.push_back(MEMBER_BEGIN "internal static IntPtr " CS_SMETHOD_GETINSTANCE "(");
+ output.push_back(itype.proxy_name);
+ output.push_back(" instance)\n" OPEN_BLOCK_L2 "return instance == null ? IntPtr.Zero : instance." BINDINGS_PTR_FIELD ";\n" CLOSE_BLOCK_L2);
// Add Destructor
- cs_file.push_back(MEMBER_BEGIN "~");
- cs_file.push_back(itype.proxy_name);
- cs_file.push_back("()\n" OPEN_BLOCK_L2 "Dispose(false);\n" CLOSE_BLOCK_L2);
+ output.push_back(MEMBER_BEGIN "~");
+ output.push_back(itype.proxy_name);
+ output.push_back("()\n" OPEN_BLOCK_L2 "Dispose(false);\n" CLOSE_BLOCK_L2);
// Add the Dispose from IDisposable
- cs_file.push_back(MEMBER_BEGIN "public void Dispose()\n" OPEN_BLOCK_L2 "Dispose(true);\n" INDENT3 "GC.SuppressFinalize(this);\n" CLOSE_BLOCK_L2);
+ output.push_back(MEMBER_BEGIN "public void Dispose()\n" OPEN_BLOCK_L2 "Dispose(true);\n" INDENT3 "GC.SuppressFinalize(this);\n" CLOSE_BLOCK_L2);
// Add the virtual Dispose
- cs_file.push_back(MEMBER_BEGIN "public virtual void Dispose(bool disposing)\n" OPEN_BLOCK_L2
- "if (disposed) return;\n" INDENT3
- "if (" BINDINGS_PTR_FIELD " != IntPtr.Zero)\n" OPEN_BLOCK_L3 "NativeCalls.godot_icall_");
- cs_file.push_back(itype.proxy_name);
- cs_file.push_back("_Dtor(" BINDINGS_PTR_FIELD ");\n" INDENT5 BINDINGS_PTR_FIELD " = IntPtr.Zero;\n" CLOSE_BLOCK_L3 INDENT3
- "GC.SuppressFinalize(this);\n" INDENT3 "disposed = true;\n" CLOSE_BLOCK_L2);
-
- cs_file.push_back(MEMBER_BEGIN "internal ");
- cs_file.push_back(itype.proxy_name);
- cs_file.push_back("(IntPtr " BINDINGS_PTR_FIELD ")\n" OPEN_BLOCK_L2 "this." BINDINGS_PTR_FIELD " = " BINDINGS_PTR_FIELD ";\n" CLOSE_BLOCK_L2);
-
- cs_file.push_back(MEMBER_BEGIN "public bool HasValidHandle()\n" OPEN_BLOCK_L2
- "return " BINDINGS_PTR_FIELD " == IntPtr.Zero;\n" CLOSE_BLOCK_L2);
+ output.push_back(MEMBER_BEGIN "public virtual void Dispose(bool disposing)\n" OPEN_BLOCK_L2
+ "if (disposed) return;\n" INDENT3
+ "if (" BINDINGS_PTR_FIELD " != IntPtr.Zero)\n" OPEN_BLOCK_L3 "NativeCalls.godot_icall_");
+ output.push_back(itype.proxy_name);
+ output.push_back("_Dtor(" BINDINGS_PTR_FIELD ");\n" INDENT5 BINDINGS_PTR_FIELD " = IntPtr.Zero;\n" CLOSE_BLOCK_L3 INDENT3
+ "GC.SuppressFinalize(this);\n" INDENT3 "disposed = true;\n" CLOSE_BLOCK_L2);
+
+ output.push_back(MEMBER_BEGIN "internal ");
+ output.push_back(itype.proxy_name);
+ output.push_back("(IntPtr " BINDINGS_PTR_FIELD ")\n" OPEN_BLOCK_L2 "this." BINDINGS_PTR_FIELD " = " BINDINGS_PTR_FIELD ";\n" CLOSE_BLOCK_L2);
+
+ output.push_back(MEMBER_BEGIN "public IntPtr NativeInstance\n" OPEN_BLOCK_L2
+ "get { return " BINDINGS_PTR_FIELD "; }\n" CLOSE_BLOCK_L2);
} else if (itype.is_singleton) {
// Add the type name and the singleton pointer as static fields
- cs_file.push_back(MEMBER_BEGIN "private const string " BINDINGS_NATIVE_NAME_FIELD " = \"");
- cs_file.push_back(itype.name);
- cs_file.push_back("\";\n");
+ output.push_back(MEMBER_BEGIN "private const string " BINDINGS_NATIVE_NAME_FIELD " = \"");
+ output.push_back(itype.name);
+ output.push_back("\";\n");
- cs_file.push_back(INDENT2 "internal static IntPtr " BINDINGS_PTR_FIELD " = ");
- cs_file.push_back(itype.api_type == ClassDB::API_EDITOR ? CS_CLASS_NATIVECALLS_EDITOR : CS_CLASS_NATIVECALLS);
- cs_file.push_back("." ICALL_PREFIX);
- cs_file.push_back(itype.name);
- cs_file.push_back(SINGLETON_ICALL_SUFFIX "();\n");
+ output.push_back(INDENT2 "internal static IntPtr " BINDINGS_PTR_FIELD " = ");
+ output.push_back(itype.api_type == ClassDB::API_EDITOR ? CS_CLASS_NATIVECALLS_EDITOR : CS_CLASS_NATIVECALLS);
+ output.push_back("." ICALL_PREFIX);
+ output.push_back(itype.name);
+ output.push_back(SINGLETON_ICALL_SUFFIX "();\n");
} else {
// Add member fields
- cs_file.push_back(MEMBER_BEGIN "private const string " BINDINGS_NATIVE_NAME_FIELD " = \"");
- cs_file.push_back(itype.name);
- cs_file.push_back("\";\n");
+ output.push_back(MEMBER_BEGIN "private const string " BINDINGS_NATIVE_NAME_FIELD " = \"");
+ output.push_back(itype.name);
+ output.push_back("\";\n");
// Only the base class stores the pointer to the native object
// This pointer is expected to be and must be of type Object*
if (!is_derived_type) {
- cs_file.push_back(MEMBER_BEGIN "private bool disposed = false;\n");
- cs_file.push_back(INDENT2 "internal IntPtr " BINDINGS_PTR_FIELD ";\n");
- cs_file.push_back(INDENT2 "internal bool " CS_FIELD_MEMORYOWN ";\n");
+ output.push_back(MEMBER_BEGIN "private bool disposed = false;\n");
+ output.push_back(INDENT2 "internal IntPtr " BINDINGS_PTR_FIELD ";\n");
+ output.push_back(INDENT2 "internal bool " CS_FIELD_MEMORYOWN ";\n");
}
// Add default constructor
if (itype.is_instantiable) {
- cs_file.push_back(MEMBER_BEGIN "public ");
- cs_file.push_back(itype.proxy_name);
- cs_file.push_back("() : this(");
- cs_file.push_back(itype.memory_own ? "true" : "false");
+ output.push_back(MEMBER_BEGIN "public ");
+ output.push_back(itype.proxy_name);
+ output.push_back("() : this(");
+ output.push_back(itype.memory_own ? "true" : "false");
// The default constructor may also be called by the engine when instancing existing native objects
// The engine will initialize the pointer field of the managed side before calling the constructor
// This is why we only allocate a new native object from the constructor if the pointer field is not set
- cs_file.push_back(")\n" OPEN_BLOCK_L2 "if (" BINDINGS_PTR_FIELD " == IntPtr.Zero)\n" INDENT4 BINDINGS_PTR_FIELD " = ");
- cs_file.push_back(itype.api_type == ClassDB::API_EDITOR ? CS_CLASS_NATIVECALLS_EDITOR : CS_CLASS_NATIVECALLS);
- cs_file.push_back("." + ctor_method);
- cs_file.push_back("(this);\n" CLOSE_BLOCK_L2);
+ output.push_back(")\n" OPEN_BLOCK_L2 "if (" BINDINGS_PTR_FIELD " == IntPtr.Zero)\n" INDENT4 BINDINGS_PTR_FIELD " = ");
+ output.push_back(itype.api_type == ClassDB::API_EDITOR ? CS_CLASS_NATIVECALLS_EDITOR : CS_CLASS_NATIVECALLS);
+ output.push_back("." + ctor_method);
+ output.push_back("(this);\n" CLOSE_BLOCK_L2);
} else {
// Hide the constructor
- cs_file.push_back(MEMBER_BEGIN "internal ");
- cs_file.push_back(itype.proxy_name);
- cs_file.push_back("() {}\n");
+ output.push_back(MEMBER_BEGIN "internal ");
+ output.push_back(itype.proxy_name);
+ output.push_back("() {}\n");
}
// Add.. em.. trick constructor. Sort of.
- cs_file.push_back(MEMBER_BEGIN "internal ");
- cs_file.push_back(itype.proxy_name);
+ output.push_back(MEMBER_BEGIN "internal ");
+ output.push_back(itype.proxy_name);
if (is_derived_type) {
- cs_file.push_back("(bool " CS_FIELD_MEMORYOWN ") : base(" CS_FIELD_MEMORYOWN ") {}\n");
+ output.push_back("(bool " CS_FIELD_MEMORYOWN ") : base(" CS_FIELD_MEMORYOWN ") {}\n");
} else {
- cs_file.push_back("(bool " CS_FIELD_MEMORYOWN ")\n" OPEN_BLOCK_L2
- "this." CS_FIELD_MEMORYOWN " = " CS_FIELD_MEMORYOWN ";\n" CLOSE_BLOCK_L2);
+ output.push_back("(bool " CS_FIELD_MEMORYOWN ")\n" OPEN_BLOCK_L2
+ "this." CS_FIELD_MEMORYOWN " = " CS_FIELD_MEMORYOWN ";\n" CLOSE_BLOCK_L2);
}
// Add methods
if (!is_derived_type) {
- cs_file.push_back(MEMBER_BEGIN "public bool HasValidHandle()\n" OPEN_BLOCK_L2
- "return " BINDINGS_PTR_FIELD " == IntPtr.Zero;\n" CLOSE_BLOCK_L2);
+ output.push_back(MEMBER_BEGIN "public IntPtr NativeInstance\n" OPEN_BLOCK_L2
+ "get { return " BINDINGS_PTR_FIELD "; }\n" CLOSE_BLOCK_L2);
- cs_file.push_back(MEMBER_BEGIN "internal static IntPtr " CS_SMETHOD_GETINSTANCE "(Object instance)\n" OPEN_BLOCK_L2
- "return instance == null ? IntPtr.Zero : instance." BINDINGS_PTR_FIELD ";\n" CLOSE_BLOCK_L2);
+ output.push_back(MEMBER_BEGIN "internal static IntPtr " CS_SMETHOD_GETINSTANCE "(Object instance)\n" OPEN_BLOCK_L2
+ "return instance == null ? IntPtr.Zero : instance." BINDINGS_PTR_FIELD ";\n" CLOSE_BLOCK_L2);
}
if (!is_derived_type) {
// Add destructor
- cs_file.push_back(MEMBER_BEGIN "~");
- cs_file.push_back(itype.proxy_name);
- cs_file.push_back("()\n" OPEN_BLOCK_L2 "Dispose(false);\n" CLOSE_BLOCK_L2);
+ output.push_back(MEMBER_BEGIN "~");
+ output.push_back(itype.proxy_name);
+ output.push_back("()\n" OPEN_BLOCK_L2 "Dispose(false);\n" CLOSE_BLOCK_L2);
// Add the Dispose from IDisposable
- cs_file.push_back(MEMBER_BEGIN "public void Dispose()\n" OPEN_BLOCK_L2 "Dispose(true);\n" INDENT3 "GC.SuppressFinalize(this);\n" CLOSE_BLOCK_L2);
+ output.push_back(MEMBER_BEGIN "public void Dispose()\n" OPEN_BLOCK_L2 "Dispose(true);\n" INDENT3 "GC.SuppressFinalize(this);\n" CLOSE_BLOCK_L2);
// Add the virtual Dispose
- cs_file.push_back(MEMBER_BEGIN "public virtual void Dispose(bool disposing)\n" OPEN_BLOCK_L2
- "if (disposed) return;\n" INDENT3
- "if (" BINDINGS_PTR_FIELD " != IntPtr.Zero)\n" OPEN_BLOCK_L3
- "if (" CS_FIELD_MEMORYOWN ")\n" OPEN_BLOCK_L4 CS_FIELD_MEMORYOWN
- " = false;\n" INDENT5 CS_CLASS_NATIVECALLS "." ICALL_OBJECT_DTOR
- "(" BINDINGS_PTR_FIELD ");\n" INDENT5 BINDINGS_PTR_FIELD
- " = IntPtr.Zero;\n" CLOSE_BLOCK_L4 CLOSE_BLOCK_L3 INDENT3
- "GC.SuppressFinalize(this);\n" INDENT3 "disposed = true;\n" CLOSE_BLOCK_L2);
+ output.push_back(MEMBER_BEGIN "public virtual void Dispose(bool disposing)\n" OPEN_BLOCK_L2
+ "if (disposed) return;\n" INDENT3
+ "if (" BINDINGS_PTR_FIELD " != IntPtr.Zero)\n" OPEN_BLOCK_L3
+ "if (" CS_FIELD_MEMORYOWN ")\n" OPEN_BLOCK_L4 CS_FIELD_MEMORYOWN
+ " = false;\n" INDENT5 CS_CLASS_NATIVECALLS "." ICALL_OBJECT_DTOR
+ "(" BINDINGS_PTR_FIELD ");\n" INDENT5 BINDINGS_PTR_FIELD
+ " = IntPtr.Zero;\n" CLOSE_BLOCK_L4 CLOSE_BLOCK_L3 INDENT3
+ "GC.SuppressFinalize(this);\n" INDENT3 "disposed = true;\n" CLOSE_BLOCK_L2);
Map<String, TypeInterface>::Element *array_itype = builtin_types.find("Array");
@@ -877,409 +776,387 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
Map<String, TypeInterface>::Element *object_itype = obj_types.find("Object");
if (!object_itype) {
- ERR_PRINT("BUG: Array type interface not found!");
+ ERR_PRINT("BUG: Object type interface not found!");
return ERR_BUG;
}
- cs_file.push_back(MEMBER_BEGIN "public " CS_CLASS_SIGNALAWAITER " ToSignal(");
- cs_file.push_back(object_itype->get().cs_type);
- cs_file.push_back(" source, string signal)\n" OPEN_BLOCK_L2
- "return new " CS_CLASS_SIGNALAWAITER "(source, signal, this);\n" CLOSE_BLOCK_L2);
+ output.push_back(MEMBER_BEGIN "public " CS_CLASS_SIGNALAWAITER " ToSignal(");
+ output.push_back(object_itype->get().cs_type);
+ output.push_back(" source, string signal)\n" OPEN_BLOCK_L2
+ "return new " CS_CLASS_SIGNALAWAITER "(source, signal, this);\n" CLOSE_BLOCK_L2);
}
}
Map<String, String>::Element *extra_member = extra_members.find(itype.name);
if (extra_member)
- cs_file.push_back(extra_member->get());
+ output.push_back(extra_member->get());
+ int method_bind_count = 0;
for (const List<MethodInterface>::Element *E = itype.methods.front(); E; E = E->next()) {
const MethodInterface &imethod = E->get();
+ Error method_err = _generate_cs_method(itype, imethod, method_bind_count, output);
+ if (method_err != OK) {
+ ERR_EXPLAIN("Failed to generate method '" + imethod.name + "' for class '" + itype.name + "'");
+ ERR_FAIL_V(method_err);
+ }
+ }
- const TypeInterface *return_type = _get_type_by_name_or_placeholder(imethod.return_type);
+ if (itype.is_singleton) {
+ InternalCall singleton_icall = InternalCall(itype.api_type, ICALL_PREFIX + itype.name + SINGLETON_ICALL_SUFFIX, "IntPtr");
- String method_bind_field = "method_bind_" + itos(method_bind_count);
+ if (!find_icall_by_name(singleton_icall.name, custom_icalls))
+ custom_icalls.push_back(singleton_icall);
+ }
- String icall_params = method_bind_field + ", " + sformat(itype.cs_in, "this");
- String arguments_sig;
- String cs_in_statements;
+ if (itype.is_instantiable) {
+ InternalCall ctor_icall = InternalCall(itype.api_type, ctor_method, "IntPtr", itype.proxy_name + " obj");
- List<String> default_args_doc;
+ if (!find_icall_by_name(ctor_icall.name, custom_icalls))
+ custom_icalls.push_back(ctor_icall);
+ }
- // Retrieve information from the arguments
- for (const List<ArgumentInterface>::Element *F = imethod.arguments.front(); F; F = F->next()) {
- const ArgumentInterface &iarg = F->get();
- const TypeInterface *arg_type = _get_type_by_name_or_placeholder(iarg.type);
+ output.push_back(INDENT1 CLOSE_BLOCK CLOSE_BLOCK);
- // Add the current arguments to the signature
- // If the argument has a default value which is not a constant, we will make it Nullable
- {
- if (F != imethod.arguments.front())
- arguments_sig += ", ";
+ return _save_file(p_output_file, output);
+}
- if (iarg.def_param_mode == ArgumentInterface::NULLABLE_VAL)
- arguments_sig += "Nullable<";
+Error BindingsGenerator::_generate_cs_property(const BindingsGenerator::TypeInterface &p_itype, const DocData::PropertyDoc &p_prop_doc, List<String> &p_output) {
- arguments_sig += arg_type->cs_type;
+ const MethodInterface *setter = p_itype.find_method_by_name(p_prop_doc.setter);
- if (iarg.def_param_mode == ArgumentInterface::NULLABLE_VAL)
- arguments_sig += "> ";
- else
- arguments_sig += " ";
+ // Search it in base types too
+ const TypeInterface *current_type = &p_itype;
+ while (!setter && current_type->base_name.length()) {
+ Map<String, TypeInterface>::Element *base_match = obj_types.find(current_type->base_name);
+ ERR_FAIL_NULL_V(base_match, ERR_BUG);
+ current_type = &base_match->get();
+ setter = current_type->find_method_by_name(p_prop_doc.setter);
+ }
- arguments_sig += iarg.name;
+ const MethodInterface *getter = p_itype.find_method_by_name(p_prop_doc.getter);
- if (iarg.default_argument.size()) {
- if (iarg.def_param_mode != ArgumentInterface::CONSTANT)
- arguments_sig += " = null";
- else
- arguments_sig += " = " + sformat(iarg.default_argument, arg_type->cs_type);
- }
- }
+ // Search it in base types too
+ current_type = &p_itype;
+ while (!getter && current_type->base_name.length()) {
+ Map<String, TypeInterface>::Element *base_match = obj_types.find(current_type->base_name);
+ ERR_FAIL_NULL_V(base_match, ERR_BUG);
+ current_type = &base_match->get();
+ getter = current_type->find_method_by_name(p_prop_doc.getter);
+ }
- icall_params += ", ";
+ ERR_FAIL_COND_V(!setter && !getter, ERR_BUG);
- if (iarg.default_argument.size() && iarg.def_param_mode != ArgumentInterface::CONSTANT) {
- // The default value of an argument must be constant. Otherwise we make it Nullable and do the following:
- // Type arg_in = arg.HasValue ? arg.Value : <non-const default value>;
- String arg_in = iarg.name;
- arg_in += "_in";
+ bool is_valid = false;
+ int prop_index = ClassDB::get_property_index(p_itype.name, p_prop_doc.name, &is_valid);
+ ERR_FAIL_COND_V(!is_valid, ERR_BUG);
- cs_in_statements += arg_type->cs_type;
- cs_in_statements += " ";
- cs_in_statements += arg_in;
- cs_in_statements += " = ";
- cs_in_statements += iarg.name;
+ if (setter) {
+ int setter_argc = prop_index != -1 ? 2 : 1;
+ ERR_FAIL_COND_V(setter->arguments.size() != setter_argc, ERR_BUG);
+ }
- if (iarg.def_param_mode == ArgumentInterface::NULLABLE_VAL)
- cs_in_statements += ".HasValue ? ";
- else
- cs_in_statements += " != null ? ";
+ if (getter) {
+ int getter_argc = prop_index != -1 ? 1 : 0;
+ ERR_FAIL_COND_V(getter->arguments.size() != getter_argc, ERR_BUG);
+ }
- cs_in_statements += iarg.name;
+ if (getter && setter) {
+ ERR_FAIL_COND_V(getter->return_type != setter->arguments.back()->get().type, ERR_BUG);
+ }
- if (iarg.def_param_mode == ArgumentInterface::NULLABLE_VAL)
- cs_in_statements += ".Value : ";
- else
- cs_in_statements += " : ";
+ // Let's not trust PropertyDoc::type
+ String proptype_name = getter ? getter->return_type : setter->arguments.back()->get().type;
- String def_arg = sformat(iarg.default_argument, arg_type->cs_type);
+ const TypeInterface *prop_itype = _get_type_by_name_or_null(proptype_name);
+ if (!prop_itype) {
+ // Try with underscore prefix
+ prop_itype = _get_type_by_name_or_null("_" + proptype_name);
+ }
- cs_in_statements += def_arg;
- cs_in_statements += ";\n" INDENT3;
+ ERR_FAIL_NULL_V(prop_itype, ERR_BUG);
- icall_params += arg_type->cs_in.empty() ? arg_in : sformat(arg_type->cs_in, arg_in);
+ String prop_proxy_name = escape_csharp_keyword(snake_to_pascal_case(p_prop_doc.name));
- default_args_doc.push_back(INDENT2 "/// <param name=\"" + iarg.name + "\">If the param is null, then the default value is " + def_arg + "</param>\n");
- } else {
- icall_params += arg_type->cs_in.empty() ? iarg.name : sformat(arg_type->cs_in, iarg.name);
- }
+ // Prevent property and enclosing type from sharing the same name
+ if (prop_proxy_name == p_itype.proxy_name) {
+ if (verbose_output) {
+ WARN_PRINTS("Name of property `" + prop_proxy_name + "` is ambiguous with the name of its class `" +
+ p_itype.proxy_name + "`. Renaming property to `" + prop_proxy_name + "_`");
}
- // Generate method
- {
- if (!imethod.is_virtual && !imethod.requires_object_call) {
- cs_file.push_back(MEMBER_BEGIN "private ");
- cs_file.push_back(itype.is_singleton ? "static IntPtr " : "IntPtr ");
- cs_file.push_back(method_bind_field + " = " CS_CLASS_NATIVECALLS "." ICALL_GET_METHODBIND "(" BINDINGS_NATIVE_NAME_FIELD ", \"");
- cs_file.push_back(imethod.name);
- cs_file.push_back("\");\n");
- }
+ prop_proxy_name += "_";
+ }
- if (imethod.method_doc && imethod.method_doc->description.size()) {
- cs_file.push_back(MEMBER_BEGIN "/// <summary>\n");
+ if (p_prop_doc.description.size()) {
+ p_output.push_back(MEMBER_BEGIN "/// <summary>\n");
- Vector<String> description_lines = imethod.method_doc->description.split("\n");
+ Vector<String> description_lines = p_prop_doc.description.split("\n");
- for (int i = 0; i < description_lines.size(); i++) {
- if (description_lines[i].size()) {
- cs_file.push_back(INDENT2 "/// ");
- cs_file.push_back(description_lines[i].strip_edges().xml_escape());
- cs_file.push_back("\n");
- }
- }
+ for (int i = 0; i < description_lines.size(); i++) {
+ if (description_lines[i].size()) {
+ p_output.push_back(INDENT2 "/// ");
+ p_output.push_back(description_lines[i].strip_edges().xml_escape());
+ p_output.push_back("\n");
+ }
+ }
- for (List<String>::Element *E = default_args_doc.front(); E; E = E->next()) {
- cs_file.push_back(E->get().xml_escape());
- }
+ p_output.push_back(INDENT2 "/// </summary>");
+ }
- cs_file.push_back(INDENT2 "/// </summary>");
- }
+ p_output.push_back(MEMBER_BEGIN "public ");
- if (!imethod.is_internal) {
- cs_file.push_back(MEMBER_BEGIN "[GodotMethod(\"");
- cs_file.push_back(imethod.name);
- cs_file.push_back("\")]");
- }
+ if (p_itype.is_singleton)
+ p_output.push_back("static ");
- cs_file.push_back(MEMBER_BEGIN);
- cs_file.push_back(imethod.is_internal ? "internal " : "public ");
+ p_output.push_back(prop_itype->cs_type);
+ p_output.push_back(" ");
+ p_output.push_back(prop_proxy_name.replace("/", "__"));
+ p_output.push_back("\n" INDENT2 OPEN_BLOCK);
- if (itype.is_singleton) {
- cs_file.push_back("static ");
- } else if (imethod.is_virtual) {
- cs_file.push_back("virtual ");
- }
+ if (getter) {
+ p_output.push_back(INDENT3 "get\n" OPEN_BLOCK_L3);
+ p_output.push_back("return ");
+ p_output.push_back(getter->proxy_name + "(");
+ if (prop_index != -1)
+ p_output.push_back(itos(prop_index));
+ p_output.push_back(");\n" CLOSE_BLOCK_L3);
+ }
- cs_file.push_back(return_type->cs_type + " ");
- cs_file.push_back(imethod.proxy_name + "(");
- cs_file.push_back(arguments_sig + ")\n" OPEN_BLOCK_L2);
+ if (setter) {
+ p_output.push_back(INDENT3 "set\n" OPEN_BLOCK_L3);
+ p_output.push_back(setter->proxy_name + "(");
+ if (prop_index != -1)
+ p_output.push_back(itos(prop_index) + ", ");
+ p_output.push_back("value);\n" CLOSE_BLOCK_L3);
+ }
- if (imethod.is_virtual) {
- // Godot virtual method must be overridden, therefore we return a default value by default.
+ p_output.push_back(CLOSE_BLOCK_L2);
- if (return_type->name == "void") {
- cs_file.push_back("return;\n" CLOSE_BLOCK_L2);
- } else {
- cs_file.push_back("return default(");
- cs_file.push_back(return_type->cs_type);
- cs_file.push_back(");\n" CLOSE_BLOCK_L2);
- }
+ return OK;
+}
- continue;
- }
+Error BindingsGenerator::_generate_cs_method(const BindingsGenerator::TypeInterface &p_itype, const BindingsGenerator::MethodInterface &p_imethod, int &p_method_bind_count, List<String> &p_output) {
- if (imethod.requires_object_call) {
- // Fallback to Godot's object.Call(string, params)
+ const TypeInterface *return_type = _get_type_by_name_or_placeholder(p_imethod.return_type);
- cs_file.push_back(CS_METHOD_CALL "(\"");
- cs_file.push_back(imethod.name);
- cs_file.push_back("\"");
+ String method_bind_field = "method_bind_" + itos(p_method_bind_count);
- for (const List<ArgumentInterface>::Element *F = imethod.arguments.front(); F; F = F->next()) {
- cs_file.push_back(", ");
- cs_file.push_back(F->get().name);
- }
+ String icall_params = method_bind_field + ", " + sformat(p_itype.cs_in, "this");
+ String arguments_sig;
+ String cs_in_statements;
- cs_file.push_back(");\n" CLOSE_BLOCK_L2);
+ List<String> default_args_doc;
- continue;
- }
+ // Retrieve information from the arguments
+ for (const List<ArgumentInterface>::Element *F = p_imethod.arguments.front(); F; F = F->next()) {
+ const ArgumentInterface &iarg = F->get();
+ const TypeInterface *arg_type = _get_type_by_name_or_placeholder(iarg.type);
- const Map<const MethodInterface *, const InternalCall *>::Element *match = method_icalls_map.find(&E->get());
- ERR_FAIL_NULL_V(match, ERR_BUG);
+ // Add the current arguments to the signature
+ // If the argument has a default value which is not a constant, we will make it Nullable
+ {
+ if (F != p_imethod.arguments.front())
+ arguments_sig += ", ";
- const InternalCall *im_icall = match->value();
+ if (iarg.def_param_mode == ArgumentInterface::NULLABLE_VAL)
+ arguments_sig += "Nullable<";
- String im_call = im_icall->editor_only ? CS_CLASS_NATIVECALLS_EDITOR : CS_CLASS_NATIVECALLS;
- im_call += "." + im_icall->name + "(" + icall_params + ");\n";
+ arguments_sig += arg_type->cs_type;
- if (imethod.arguments.size())
- cs_file.push_back(cs_in_statements);
+ if (iarg.def_param_mode == ArgumentInterface::NULLABLE_VAL)
+ arguments_sig += "> ";
+ else
+ arguments_sig += " ";
- if (return_type->name == "void") {
- cs_file.push_back(im_call);
- } else if (return_type->cs_out.empty()) {
- cs_file.push_back("return " + im_call);
- } else {
- cs_file.push_back(return_type->im_type_out);
- cs_file.push_back(" " LOCAL_RET " = ");
- cs_file.push_back(im_call);
- cs_file.push_back(INDENT3);
- cs_file.push_back(sformat(return_type->cs_out, LOCAL_RET) + "\n");
- }
+ arguments_sig += iarg.name;
- cs_file.push_back(CLOSE_BLOCK_L2);
+ if (iarg.default_argument.size()) {
+ if (iarg.def_param_mode != ArgumentInterface::CONSTANT)
+ arguments_sig += " = null";
+ else
+ arguments_sig += " = " + sformat(iarg.default_argument, arg_type->cs_type);
+ }
}
- method_bind_count++;
- }
+ icall_params += ", ";
- if (itype.is_singleton) {
- InternalCall singleton_icall = InternalCall(itype.api_type, ICALL_PREFIX + itype.name + SINGLETON_ICALL_SUFFIX, "IntPtr");
+ if (iarg.default_argument.size() && iarg.def_param_mode != ArgumentInterface::CONSTANT) {
+ // The default value of an argument must be constant. Otherwise we make it Nullable and do the following:
+ // Type arg_in = arg.HasValue ? arg.Value : <non-const default value>;
+ String arg_in = iarg.name;
+ arg_in += "_in";
- if (!find_icall_by_name(singleton_icall.name, custom_icalls))
- custom_icalls.push_back(singleton_icall);
- }
+ cs_in_statements += arg_type->cs_type;
+ cs_in_statements += " ";
+ cs_in_statements += arg_in;
+ cs_in_statements += " = ";
+ cs_in_statements += iarg.name;
- if (itype.is_instantiable) {
- InternalCall ctor_icall = InternalCall(itype.api_type, ctor_method, "IntPtr", itype.proxy_name + " obj");
+ if (iarg.def_param_mode == ArgumentInterface::NULLABLE_VAL)
+ cs_in_statements += ".HasValue ? ";
+ else
+ cs_in_statements += " != null ? ";
- if (!find_icall_by_name(ctor_icall.name, custom_icalls))
- custom_icalls.push_back(ctor_icall);
- }
+ cs_in_statements += iarg.name;
- cs_file.push_back(INDENT1 CLOSE_BLOCK CLOSE_BLOCK);
+ if (iarg.def_param_mode == ArgumentInterface::NULLABLE_VAL)
+ cs_in_statements += ".Value : ";
+ else
+ cs_in_statements += " : ";
- return _save_file(p_output_file, cs_file);
-}
+ String def_arg = sformat(iarg.default_argument, arg_type->cs_type);
-Error BindingsGenerator::generate_glue(const String &p_output_dir) {
+ cs_in_statements += def_arg;
+ cs_in_statements += ";\n" INDENT3;
- verbose_output = true;
+ icall_params += arg_type->cs_in.empty() ? arg_in : sformat(arg_type->cs_in, arg_in);
- bool dir_exists = DirAccess::exists(p_output_dir);
- ERR_EXPLAIN("The output directory does not exist.");
- ERR_FAIL_COND_V(!dir_exists, ERR_FILE_BAD_PATH);
+ default_args_doc.push_back(INDENT2 "/// <param name=\"" + iarg.name + "\">If the param is null, then the default value is " + def_arg + "</param>\n");
+ } else {
+ icall_params += arg_type->cs_in.empty() ? iarg.name : sformat(arg_type->cs_in, iarg.name);
+ }
+ }
- List<String> cpp_file;
+ // Generate method
+ {
+ if (!p_imethod.is_virtual && !p_imethod.requires_object_call) {
+ p_output.push_back(MEMBER_BEGIN "private ");
+ p_output.push_back(p_itype.is_singleton ? "static IntPtr " : "IntPtr ");
+ p_output.push_back(method_bind_field + " = " CS_CLASS_NATIVECALLS "." ICALL_GET_METHODBIND "(" BINDINGS_NATIVE_NAME_FIELD ", \"");
+ p_output.push_back(p_imethod.name);
+ p_output.push_back("\");\n");
+ }
- cpp_file.push_back("#include \"" GLUE_HEADER_FILE "\"\n"
- "\n");
+ if (p_imethod.method_doc && p_imethod.method_doc->description.size()) {
+ p_output.push_back(MEMBER_BEGIN "/// <summary>\n");
- List<const InternalCall *> generated_icall_funcs;
+ Vector<String> description_lines = p_imethod.method_doc->description.split("\n");
- for (Map<String, TypeInterface>::Element *type_elem = obj_types.front(); type_elem; type_elem = type_elem->next()) {
- const TypeInterface &itype = type_elem->get();
+ for (int i = 0; i < description_lines.size(); i++) {
+ if (description_lines[i].size()) {
+ p_output.push_back(INDENT2 "/// ");
+ p_output.push_back(description_lines[i].strip_edges().xml_escape());
+ p_output.push_back("\n");
+ }
+ }
- List<InternalCall> &custom_icalls = itype.api_type == ClassDB::API_EDITOR ? editor_custom_icalls : core_custom_icalls;
+ for (List<String>::Element *E = default_args_doc.front(); E; E = E->next()) {
+ p_output.push_back(E->get().xml_escape());
+ }
- OS::get_singleton()->print(String("Generating " + itype.name + "...\n").utf8());
+ p_output.push_back(INDENT2 "/// </summary>");
+ }
- String ctor_method(ICALL_PREFIX + itype.proxy_name + "_Ctor");
+ if (!p_imethod.is_internal) {
+ p_output.push_back(MEMBER_BEGIN "[GodotMethod(\"");
+ p_output.push_back(p_imethod.name);
+ p_output.push_back("\")]");
+ }
- for (const List<MethodInterface>::Element *E = itype.methods.front(); E; E = E->next()) {
- const MethodInterface &imethod = E->get();
+ p_output.push_back(MEMBER_BEGIN);
+ p_output.push_back(p_imethod.is_internal ? "internal " : "public ");
- if (imethod.is_virtual)
- continue;
+ if (p_itype.is_singleton) {
+ p_output.push_back("static ");
+ } else if (p_imethod.is_virtual) {
+ p_output.push_back("virtual ");
+ }
- bool ret_void = imethod.return_type == "void";
+ p_output.push_back(return_type->cs_type + " ");
+ p_output.push_back(p_imethod.proxy_name + "(");
+ p_output.push_back(arguments_sig + ")\n" OPEN_BLOCK_L2);
- const TypeInterface *return_type = _get_type_by_name_or_placeholder(imethod.return_type);
+ if (p_imethod.is_virtual) {
+ // Godot virtual method must be overridden, therefore we return a default value by default.
- String argc_str = itos(imethod.arguments.size());
+ if (return_type->name == "void") {
+ p_output.push_back("return;\n" CLOSE_BLOCK_L2);
+ } else {
+ p_output.push_back("return default(");
+ p_output.push_back(return_type->cs_type);
+ p_output.push_back(");\n" CLOSE_BLOCK_L2);
+ }
- String c_func_sig = "MethodBind* " CS_PARAM_METHODBIND ", " + itype.c_type_in + " " CS_PARAM_INSTANCE;
- String c_in_statements;
- String c_args_var_content;
+ return OK; // Won't increment method bind count
+ }
- // Get arguments information
- int i = 0;
- for (const List<ArgumentInterface>::Element *F = imethod.arguments.front(); F; F = F->next()) {
- const ArgumentInterface &iarg = F->get();
- const TypeInterface *arg_type = _get_type_by_name_or_placeholder(iarg.type);
+ if (p_imethod.requires_object_call) {
+ // Fallback to Godot's object.Call(string, params)
- String c_param_name = "arg" + itos(i + 1);
+ p_output.push_back(CS_METHOD_CALL "(\"");
+ p_output.push_back(p_imethod.name);
+ p_output.push_back("\"");
- if (imethod.is_vararg) {
- if (i < imethod.arguments.size() - 1) {
- c_in_statements += sformat(arg_type->c_in.size() ? arg_type->c_in : TypeInterface::DEFAULT_VARARG_C_IN, "Variant", c_param_name);
- c_in_statements += "\t" C_LOCAL_PTRCALL_ARGS ".set(0, ";
- c_in_statements += sformat("&%s_in", c_param_name);
- c_in_statements += ");\n";
- }
- } else {
- if (i > 0)
- c_args_var_content += ", ";
- if (arg_type->c_in.size())
- c_in_statements += sformat(arg_type->c_in, arg_type->c_type, c_param_name);
- c_args_var_content += sformat(arg_type->c_arg_in, c_param_name);
- }
+ for (const List<ArgumentInterface>::Element *F = p_imethod.arguments.front(); F; F = F->next()) {
+ p_output.push_back(", ");
+ p_output.push_back(F->get().name);
+ }
- c_func_sig += ", ";
- c_func_sig += arg_type->c_type_in;
- c_func_sig += " ";
- c_func_sig += c_param_name;
+ p_output.push_back(");\n" CLOSE_BLOCK_L2);
- i++;
- }
+ return OK; // Won't increment method bind count
+ }
- const Map<const MethodInterface *, const InternalCall *>::Element *match = method_icalls_map.find(&E->get());
- ERR_FAIL_NULL_V(match, ERR_BUG);
+ const Map<const MethodInterface *, const InternalCall *>::Element *match = method_icalls_map.find(&p_imethod);
+ ERR_FAIL_NULL_V(match, ERR_BUG);
- const InternalCall *im_icall = match->value();
- String icall_method = im_icall->name;
+ const InternalCall *im_icall = match->value();
- if (!generated_icall_funcs.find(im_icall)) {
- generated_icall_funcs.push_back(im_icall);
+ String im_call = im_icall->editor_only ? CS_CLASS_NATIVECALLS_EDITOR : CS_CLASS_NATIVECALLS;
+ im_call += "." + im_icall->name + "(" + icall_params + ");\n";
- if (im_icall->editor_only)
- cpp_file.push_back("#ifdef TOOLS_ENABLED\n");
+ if (p_imethod.arguments.size())
+ p_output.push_back(cs_in_statements);
- // Generate icall function
+ if (return_type->name == "void") {
+ p_output.push_back(im_call);
+ } else if (return_type->cs_out.empty()) {
+ p_output.push_back("return " + im_call);
+ } else {
+ p_output.push_back(return_type->im_type_out);
+ p_output.push_back(" " LOCAL_RET " = ");
+ p_output.push_back(im_call);
+ p_output.push_back(INDENT3);
+ p_output.push_back(sformat(return_type->cs_out, LOCAL_RET) + "\n");
+ }
- cpp_file.push_back(ret_void ? "void " : return_type->c_type_out + " ");
- cpp_file.push_back(icall_method);
- cpp_file.push_back("(");
- cpp_file.push_back(c_func_sig);
- cpp_file.push_back(") " OPEN_BLOCK);
+ p_output.push_back(CLOSE_BLOCK_L2);
+ }
- String fail_ret = ret_void ? "" : ", " + (return_type->c_type_out.ends_with("*") ? "NULL" : return_type->c_type_out + "()");
+ p_method_bind_count++;
+ return OK;
+}
- if (!ret_void) {
- String ptrcall_return_type;
- String initialization;
+Error BindingsGenerator::generate_glue(const String &p_output_dir) {
- if (return_type->is_object_type) {
- ptrcall_return_type = return_type->is_reference ? "Ref<Reference>" : return_type->c_type;
- initialization = return_type->is_reference ? "" : " = NULL";
- } else {
- ptrcall_return_type = return_type->c_type;
- }
+ verbose_output = true;
- cpp_file.push_back("\t" + ptrcall_return_type);
- cpp_file.push_back(" " LOCAL_RET);
- cpp_file.push_back(initialization + ";\n");
- cpp_file.push_back("\tERR_FAIL_NULL_V(" CS_PARAM_INSTANCE);
- cpp_file.push_back(fail_ret);
- cpp_file.push_back(");\n");
- } else {
- cpp_file.push_back("\tERR_FAIL_NULL(" CS_PARAM_INSTANCE ");\n");
- }
+ bool dir_exists = DirAccess::exists(p_output_dir);
+ ERR_EXPLAIN("The output directory does not exist.");
+ ERR_FAIL_COND_V(!dir_exists, ERR_FILE_BAD_PATH);
- if (imethod.arguments.size()) {
- if (imethod.is_vararg) {
- String err_fail_macro = ret_void ? "ERR_FAIL_COND" : "ERR_FAIL_COND_V";
- String vararg_arg = "arg" + argc_str;
- String real_argc_str = itos(imethod.arguments.size() - 1); // Arguments count without vararg
-
- cpp_file.push_back("\tVector<Variant> varargs;\n"
- "\tint vararg_length = mono_array_length(");
- cpp_file.push_back(vararg_arg);
- cpp_file.push_back(");\n\tint total_length = ");
- cpp_file.push_back(real_argc_str);
- cpp_file.push_back(" + vararg_length;\n\t");
- cpp_file.push_back(err_fail_macro);
- cpp_file.push_back("(varargs.resize(vararg_length) != OK");
- cpp_file.push_back(fail_ret);
- cpp_file.push_back(");\n\tVector<Variant*> " C_LOCAL_PTRCALL_ARGS ";\n\t");
- cpp_file.push_back(err_fail_macro);
- cpp_file.push_back("(call_args.resize(total_length) != OK");
- cpp_file.push_back(fail_ret);
- cpp_file.push_back(");\n");
- cpp_file.push_back(c_in_statements);
- cpp_file.push_back("\tfor (int i = 0; i < vararg_length; i++) " OPEN_BLOCK
- "\t\tMonoObject* elem = mono_array_get(");
- cpp_file.push_back(vararg_arg);
- cpp_file.push_back(", MonoObject*, i);\n"
- "\t\tvarargs.set(i, GDMonoMarshal::mono_object_to_variant(elem));\n"
- "\t\t" C_LOCAL_PTRCALL_ARGS ".set(");
- cpp_file.push_back(real_argc_str);
- cpp_file.push_back(" + i, &varargs[i]);\n\t" CLOSE_BLOCK);
- } else {
- cpp_file.push_back(c_in_statements);
- cpp_file.push_back("\tconst void* " C_LOCAL_PTRCALL_ARGS "[");
- cpp_file.push_back(argc_str + "] = { ");
- cpp_file.push_back(c_args_var_content + " };\n");
- }
- }
+ List<String> output;
- if (imethod.is_vararg) {
- cpp_file.push_back("\tVariant::CallError vcall_error;\n\t");
+ output.push_back("#include \"" GLUE_HEADER_FILE "\"\n"
+ "\n");
- if (!ret_void)
- cpp_file.push_back(LOCAL_RET " = ");
+ generated_icall_funcs.clear();
- cpp_file.push_back(CS_PARAM_METHODBIND "->call(" CS_PARAM_INSTANCE ", ");
- cpp_file.push_back(imethod.arguments.size() ? "(const Variant**)" C_LOCAL_PTRCALL_ARGS ".ptr()" : "NULL");
- cpp_file.push_back(", total_length, vcall_error);\n");
- } else {
- cpp_file.push_back("\t" CS_PARAM_METHODBIND "->ptrcall(" CS_PARAM_INSTANCE ", ");
- cpp_file.push_back(imethod.arguments.size() ? C_LOCAL_PTRCALL_ARGS ", " : "NULL, ");
- cpp_file.push_back(!ret_void ? "&" LOCAL_RET ");\n" : "NULL);\n");
- }
+ for (Map<String, TypeInterface>::Element *type_elem = obj_types.front(); type_elem; type_elem = type_elem->next()) {
+ const TypeInterface &itype = type_elem->get();
- if (!ret_void) {
- if (return_type->c_out.empty())
- cpp_file.push_back("\treturn " LOCAL_RET ";\n");
- else
- cpp_file.push_back(sformat(return_type->c_out, return_type->c_type_out, LOCAL_RET, return_type->name));
- }
+ List<InternalCall> &custom_icalls = itype.api_type == ClassDB::API_EDITOR ? editor_custom_icalls : core_custom_icalls;
- cpp_file.push_back(CLOSE_BLOCK "\n");
+ OS::get_singleton()->print(String("Generating " + itype.name + "...\n").utf8());
- if (im_icall->editor_only)
- cpp_file.push_back("#endif // TOOLS_ENABLED\n");
+ String ctor_method(ICALL_PREFIX + itype.proxy_name + "_Ctor");
+
+ for (const List<MethodInterface>::Element *E = itype.methods.front(); E; E = E->next()) {
+ const MethodInterface &imethod = E->get();
+ Error method_err = _generate_glue_method(itype, imethod, output);
+ if (method_err != OK) {
+ ERR_EXPLAIN("Failed to generate method '" + imethod.name + "' for class '" + itype.name + "'");
+ ERR_FAIL_V(method_err);
}
}
@@ -1290,11 +1167,11 @@ Error BindingsGenerator::generate_glue(const String &p_output_dir) {
if (!find_icall_by_name(singleton_icall.name, custom_icalls))
custom_icalls.push_back(singleton_icall);
- cpp_file.push_back("Object* ");
- cpp_file.push_back(singleton_icall_name);
- cpp_file.push_back("() " OPEN_BLOCK "\treturn ProjectSettings::get_singleton()->get_singleton_object(\"");
- cpp_file.push_back(itype.proxy_name);
- cpp_file.push_back("\");\n" CLOSE_BLOCK "\n");
+ output.push_back("Object* ");
+ output.push_back(singleton_icall_name);
+ output.push_back("() " OPEN_BLOCK "\treturn ProjectSettings::get_singleton()->get_singleton_object(\"");
+ output.push_back(itype.proxy_name);
+ output.push_back("\");\n" CLOSE_BLOCK "\n");
}
if (itype.is_instantiable) {
@@ -1303,36 +1180,36 @@ Error BindingsGenerator::generate_glue(const String &p_output_dir) {
if (!find_icall_by_name(ctor_icall.name, custom_icalls))
custom_icalls.push_back(ctor_icall);
- cpp_file.push_back("Object* ");
- cpp_file.push_back(ctor_method);
- cpp_file.push_back("(MonoObject* obj) " OPEN_BLOCK
- "\t" C_MACRO_OBJECT_CONSTRUCT "(instance, \"");
- cpp_file.push_back(itype.name);
- cpp_file.push_back("\");\n"
- "\t" C_METHOD_TIE_MANAGED_TO_UNMANAGED "(obj, instance);\n"
- "\treturn instance;\n" CLOSE_BLOCK "\n");
+ output.push_back("Object* ");
+ output.push_back(ctor_method);
+ output.push_back("(MonoObject* obj) " OPEN_BLOCK
+ "\t" C_MACRO_OBJECT_CONSTRUCT "(instance, \"");
+ output.push_back(itype.name);
+ output.push_back("\");\n"
+ "\t" C_METHOD_TIE_MANAGED_TO_UNMANAGED "(obj, instance);\n"
+ "\treturn instance;\n" CLOSE_BLOCK "\n");
}
}
- cpp_file.push_back("namespace GodotSharpBindings\n" OPEN_BLOCK);
- cpp_file.push_back("uint64_t get_core_api_hash() { return ");
- cpp_file.push_back(itos(GDMono::get_singleton()->get_api_core_hash()) + "; }\n");
- cpp_file.push_back("#ifdef TOOLS_ENABLED\n"
- "uint64_t get_editor_api_hash() { return ");
- cpp_file.push_back(itos(GDMono::get_singleton()->get_api_editor_hash()) +
- "; }\n#endif // TOOLS_ENABLED\n");
- cpp_file.push_back("void register_generated_icalls() " OPEN_BLOCK);
-
-#define ADD_INTERNAL_CALL_REGISTRATION(m_icall) \
- { \
- cpp_file.push_back("\tmono_add_internal_call("); \
- cpp_file.push_back("\"" BINDINGS_NAMESPACE "."); \
- cpp_file.push_back(m_icall.editor_only ? CS_CLASS_NATIVECALLS_EDITOR : CS_CLASS_NATIVECALLS); \
- cpp_file.push_back("::"); \
- cpp_file.push_back(m_icall.name); \
- cpp_file.push_back("\", (void*)"); \
- cpp_file.push_back(m_icall.name); \
- cpp_file.push_back(");\n"); \
+ output.push_back("namespace GodotSharpBindings\n" OPEN_BLOCK);
+ output.push_back("uint64_t get_core_api_hash() { return ");
+ output.push_back(itos(GDMono::get_singleton()->get_api_core_hash()) + "; }\n");
+ output.push_back("#ifdef TOOLS_ENABLED\n"
+ "uint64_t get_editor_api_hash() { return ");
+ output.push_back(itos(GDMono::get_singleton()->get_api_editor_hash()) +
+ "; }\n#endif // TOOLS_ENABLED\n");
+ output.push_back("void register_generated_icalls() " OPEN_BLOCK);
+
+#define ADD_INTERNAL_CALL_REGISTRATION(m_icall) \
+ { \
+ output.push_back("\tmono_add_internal_call("); \
+ output.push_back("\"" BINDINGS_NAMESPACE "."); \
+ output.push_back(m_icall.editor_only ? CS_CLASS_NATIVECALLS_EDITOR : CS_CLASS_NATIVECALLS); \
+ output.push_back("::"); \
+ output.push_back(m_icall.name); \
+ output.push_back("\", (void*)"); \
+ output.push_back(m_icall.name); \
+ output.push_back(");\n"); \
}
bool tools_sequence = false;
@@ -1341,11 +1218,11 @@ Error BindingsGenerator::generate_glue(const String &p_output_dir) {
if (tools_sequence) {
if (!E->get().editor_only) {
tools_sequence = false;
- cpp_file.push_back("#endif\n");
+ output.push_back("#endif\n");
}
} else {
if (E->get().editor_only) {
- cpp_file.push_back("#ifdef TOOLS_ENABLED\n");
+ output.push_back("#ifdef TOOLS_ENABLED\n");
tools_sequence = true;
}
}
@@ -1355,24 +1232,23 @@ Error BindingsGenerator::generate_glue(const String &p_output_dir) {
if (tools_sequence) {
tools_sequence = false;
- cpp_file.push_back("#endif\n");
+ output.push_back("#endif\n");
}
- cpp_file.push_back("#ifdef TOOLS_ENABLED\n");
+ output.push_back("#ifdef TOOLS_ENABLED\n");
for (const List<InternalCall>::Element *E = editor_custom_icalls.front(); E; E = E->next())
ADD_INTERNAL_CALL_REGISTRATION(E->get());
- cpp_file.push_back("#endif // TOOLS_ENABLED\n");
+ output.push_back("#endif // TOOLS_ENABLED\n");
for (const List<InternalCall>::Element *E = method_icalls.front(); E; E = E->next()) {
-
if (tools_sequence) {
if (!E->get().editor_only) {
tools_sequence = false;
- cpp_file.push_back("#endif\n");
+ output.push_back("#endif\n");
}
} else {
if (E->get().editor_only) {
- cpp_file.push_back("#ifdef TOOLS_ENABLED\n");
+ output.push_back("#ifdef TOOLS_ENABLED\n");
tools_sequence = true;
}
}
@@ -1382,20 +1258,27 @@ Error BindingsGenerator::generate_glue(const String &p_output_dir) {
if (tools_sequence) {
tools_sequence = false;
- cpp_file.push_back("#endif\n");
+ output.push_back("#endif\n");
}
#undef ADD_INTERNAL_CALL_REGISTRATION
- cpp_file.push_back(CLOSE_BLOCK "}\n");
+ output.push_back(CLOSE_BLOCK "}\n");
+
+ Error save_err = _save_file(path_join(p_output_dir, "mono_glue.gen.cpp"), output);
+ if (save_err != OK)
+ return save_err;
- return _save_file(path_join(p_output_dir, "mono_glue.gen.cpp"), cpp_file);
+ OS::get_singleton()->print("Mono glue generated successfully\n");
+
+ return OK;
}
Error BindingsGenerator::_save_file(const String &p_path, const List<String> &p_content) {
FileAccessRef file = FileAccess::open(p_path, FileAccess::WRITE);
+ ERR_EXPLAIN("Cannot open file: " + p_path);
ERR_FAIL_COND_V(!file, ERR_FILE_CANT_WRITE);
for (const List<String>::Element *E = p_content.front(); E; E = E->next()) {
@@ -1407,6 +1290,163 @@ Error BindingsGenerator::_save_file(const String &p_path, const List<String> &p_
return OK;
}
+Error BindingsGenerator::_generate_glue_method(const BindingsGenerator::TypeInterface &p_itype, const BindingsGenerator::MethodInterface &p_imethod, List<String> &p_output) {
+
+ if (p_imethod.is_virtual)
+ return OK; // Ignore
+
+ bool ret_void = p_imethod.return_type == "void";
+
+ const TypeInterface *return_type = _get_type_by_name_or_placeholder(p_imethod.return_type);
+
+ String argc_str = itos(p_imethod.arguments.size());
+
+ String c_func_sig = "MethodBind* " CS_PARAM_METHODBIND ", " + p_itype.c_type_in + " " CS_PARAM_INSTANCE;
+ String c_in_statements;
+ String c_args_var_content;
+
+ // Get arguments information
+ int i = 0;
+ for (const List<ArgumentInterface>::Element *F = p_imethod.arguments.front(); F; F = F->next()) {
+ const ArgumentInterface &iarg = F->get();
+ const TypeInterface *arg_type = _get_type_by_name_or_placeholder(iarg.type);
+
+ String c_param_name = "arg" + itos(i + 1);
+
+ if (p_imethod.is_vararg) {
+ if (i < p_imethod.arguments.size() - 1) {
+ c_in_statements += sformat(arg_type->c_in.size() ? arg_type->c_in : TypeInterface::DEFAULT_VARARG_C_IN, "Variant", c_param_name);
+ c_in_statements += "\t" C_LOCAL_PTRCALL_ARGS ".set(0, ";
+ c_in_statements += sformat("&%s_in", c_param_name);
+ c_in_statements += ");\n";
+ }
+ } else {
+ if (i > 0)
+ c_args_var_content += ", ";
+ if (arg_type->c_in.size())
+ c_in_statements += sformat(arg_type->c_in, arg_type->c_type, c_param_name);
+ c_args_var_content += sformat(arg_type->c_arg_in, c_param_name);
+ }
+
+ c_func_sig += ", ";
+ c_func_sig += arg_type->c_type_in;
+ c_func_sig += " ";
+ c_func_sig += c_param_name;
+
+ i++;
+ }
+
+ const Map<const MethodInterface *, const InternalCall *>::Element *match = method_icalls_map.find(&p_imethod);
+ ERR_FAIL_NULL_V(match, ERR_BUG);
+
+ const InternalCall *im_icall = match->value();
+ String icall_method = im_icall->name;
+
+ if (!generated_icall_funcs.find(im_icall)) {
+ generated_icall_funcs.push_back(im_icall);
+
+ if (im_icall->editor_only)
+ p_output.push_back("#ifdef TOOLS_ENABLED\n");
+
+ // Generate icall function
+
+ p_output.push_back(ret_void ? "void " : return_type->c_type_out + " ");
+ p_output.push_back(icall_method);
+ p_output.push_back("(");
+ p_output.push_back(c_func_sig);
+ p_output.push_back(") " OPEN_BLOCK);
+
+ String fail_ret = ret_void ? "" : ", " + (return_type->c_type_out.ends_with("*") ? "NULL" : return_type->c_type_out + "()");
+
+ if (!ret_void) {
+ String ptrcall_return_type;
+ String initialization;
+
+ if (return_type->is_object_type) {
+ ptrcall_return_type = return_type->is_reference ? "Ref<Reference>" : return_type->c_type;
+ initialization = return_type->is_reference ? "" : " = NULL";
+ } else {
+ ptrcall_return_type = return_type->c_type;
+ }
+
+ p_output.push_back("\t" + ptrcall_return_type);
+ p_output.push_back(" " LOCAL_RET);
+ p_output.push_back(initialization + ";\n");
+ p_output.push_back("\tERR_FAIL_NULL_V(" CS_PARAM_INSTANCE);
+ p_output.push_back(fail_ret);
+ p_output.push_back(");\n");
+ } else {
+ p_output.push_back("\tERR_FAIL_NULL(" CS_PARAM_INSTANCE ");\n");
+ }
+
+ if (p_imethod.arguments.size()) {
+ if (p_imethod.is_vararg) {
+ String err_fail_macro = ret_void ? "ERR_FAIL_COND" : "ERR_FAIL_COND_V";
+ String vararg_arg = "arg" + argc_str;
+ String real_argc_str = itos(p_imethod.arguments.size() - 1); // Arguments count without vararg
+
+ p_output.push_back("\tVector<Variant> varargs;\n"
+ "\tint vararg_length = mono_array_length(");
+ p_output.push_back(vararg_arg);
+ p_output.push_back(");\n\tint total_length = ");
+ p_output.push_back(real_argc_str);
+ p_output.push_back(" + vararg_length;\n\t");
+ p_output.push_back(err_fail_macro);
+ p_output.push_back("(varargs.resize(vararg_length) != OK");
+ p_output.push_back(fail_ret);
+ p_output.push_back(");\n\tVector<Variant*> " C_LOCAL_PTRCALL_ARGS ";\n\t");
+ p_output.push_back(err_fail_macro);
+ p_output.push_back("(call_args.resize(total_length) != OK");
+ p_output.push_back(fail_ret);
+ p_output.push_back(");\n");
+ p_output.push_back(c_in_statements);
+ p_output.push_back("\tfor (int i = 0; i < vararg_length; i++) " OPEN_BLOCK
+ "\t\tMonoObject* elem = mono_array_get(");
+ p_output.push_back(vararg_arg);
+ p_output.push_back(", MonoObject*, i);\n"
+ "\t\tvarargs.set(i, GDMonoMarshal::mono_object_to_variant(elem));\n"
+ "\t\t" C_LOCAL_PTRCALL_ARGS ".set(");
+ p_output.push_back(real_argc_str);
+ p_output.push_back(" + i, &varargs[i]);\n\t" CLOSE_BLOCK);
+ } else {
+ p_output.push_back(c_in_statements);
+ p_output.push_back("\tconst void* " C_LOCAL_PTRCALL_ARGS "[");
+ p_output.push_back(argc_str + "] = { ");
+ p_output.push_back(c_args_var_content + " };\n");
+ }
+ }
+
+ if (p_imethod.is_vararg) {
+ p_output.push_back("\tVariant::CallError vcall_error;\n\t");
+
+ if (!ret_void)
+ p_output.push_back(LOCAL_RET " = ");
+
+ p_output.push_back(CS_PARAM_METHODBIND "->call(" CS_PARAM_INSTANCE ", ");
+ p_output.push_back(p_imethod.arguments.size() ? "(const Variant**)" C_LOCAL_PTRCALL_ARGS ".ptr()" : "NULL");
+ p_output.push_back(", total_length, vcall_error);\n");
+ } else {
+ p_output.push_back("\t" CS_PARAM_METHODBIND "->ptrcall(" CS_PARAM_INSTANCE ", ");
+ p_output.push_back(p_imethod.arguments.size() ? C_LOCAL_PTRCALL_ARGS ", " : "NULL, ");
+ p_output.push_back(!ret_void ? "&" LOCAL_RET ");\n" : "NULL);\n");
+ }
+
+ if (!ret_void) {
+ if (return_type->c_out.empty())
+ p_output.push_back("\treturn " LOCAL_RET ";\n");
+ else
+ p_output.push_back(sformat(return_type->c_out, return_type->c_type_out, LOCAL_RET, return_type->name));
+ }
+
+ p_output.push_back(CLOSE_BLOCK "\n");
+
+ if (im_icall->editor_only)
+ p_output.push_back("#endif // TOOLS_ENABLED\n");
+ }
+
+ return OK;
+}
+
const BindingsGenerator::TypeInterface *BindingsGenerator::_get_type_by_name_or_null(const String &p_name) {
const Map<String, TypeInterface>::Element *match = builtin_types.find(p_name);
@@ -1471,7 +1511,8 @@ void BindingsGenerator::_populate_object_type_interfaces() {
itype.memory_own = itype.is_reference;
if (!ClassDB::is_class_exposed(type_cname)) {
- WARN_PRINTS("Ignoring type " + String(type_cname) + " because it's not exposed");
+ if (verbose_output)
+ WARN_PRINTS("Ignoring type " + String(type_cname) + " because it's not exposed");
class_list.pop_front();
continue;
}
@@ -1535,9 +1576,11 @@ void BindingsGenerator::_populate_object_type_interfaces() {
// which could actually will return something differnet.
// Let's put this to notify us if that ever happens.
if (itype.name != "Object" || imethod.name != "free") {
- WARN_PRINTS("Notification: New unexpected virtual non-overridable method found.\n"
- "We only expected Object.free, but found " +
- itype.name + "." + imethod.name);
+ if (verbose_output) {
+ WARN_PRINTS("Notification: New unexpected virtual non-overridable method found.\n"
+ "We only expected Object.free, but found " +
+ itype.name + "." + imethod.name);
+ }
}
} else {
ERR_PRINTS("Missing MethodBind for non-virtual method: " + itype.name + "." + imethod.name);
@@ -2043,7 +2086,8 @@ BindingsGenerator::BindingsGenerator() {
void BindingsGenerator::handle_cmdline_args(const List<String> &p_cmdline_args) {
- int options_count = 3;
+ const int NUM_OPTIONS = 3;
+ int options_left = NUM_OPTIONS;
String mono_glue_option = "--generate-mono-glue";
String cs_core_api_option = "--generate-cs-core-api";
@@ -2053,33 +2097,35 @@ void BindingsGenerator::handle_cmdline_args(const List<String> &p_cmdline_args)
const List<String>::Element *elem = p_cmdline_args.front();
- while (elem && options_count) {
+ while (elem && options_left) {
if (elem->get() == mono_glue_option) {
const List<String>::Element *path_elem = elem->next();
if (path_elem) {
- get_singleton().generate_glue(path_elem->get());
+ if (get_singleton().generate_glue(path_elem->get()) != OK)
+ ERR_PRINT("Mono glue generation failed");
elem = elem->next();
} else {
ERR_PRINTS("--generate-mono-glue: No output directory specified");
}
- --options_count;
+ --options_left;
} else if (elem->get() == cs_core_api_option) {
const List<String>::Element *path_elem = elem->next();
if (path_elem) {
- get_singleton().generate_cs_core_project(path_elem->get());
+ if (get_singleton().generate_cs_core_project(path_elem->get()) != OK)
+ ERR_PRINT("Generation of solution and C# project for the Core API failed");
elem = elem->next();
} else {
ERR_PRINTS(cs_core_api_option + ": No output directory specified");
}
- --options_count;
+ --options_left;
} else if (elem->get() == cs_editor_api_option) {
@@ -2087,7 +2133,8 @@ void BindingsGenerator::handle_cmdline_args(const List<String> &p_cmdline_args)
if (path_elem) {
if (path_elem->next()) {
- get_singleton().generate_cs_editor_project(path_elem->get(), path_elem->next()->get());
+ if (get_singleton().generate_cs_editor_project(path_elem->get(), path_elem->next()->get()) != OK)
+ ERR_PRINT("Generation of solution and C# project for the Editor API failed");
elem = path_elem->next();
} else {
ERR_PRINTS(cs_editor_api_option + ": No hint path for the Core API dll specified");
@@ -2096,13 +2143,16 @@ void BindingsGenerator::handle_cmdline_args(const List<String> &p_cmdline_args)
ERR_PRINTS(cs_editor_api_option + ": No output directory specified");
}
- --options_count;
+ --options_left;
}
elem = elem->next();
}
verbose_output = false;
+
+ if (options_left != NUM_OPTIONS)
+ exit(0);
}
#endif
diff --git a/modules/mono/editor/bindings_generator.h b/modules/mono/editor/bindings_generator.h
index 437a566556..dfa3aa9911 100644
--- a/modules/mono/editor/bindings_generator.h
+++ b/modules/mono/editor/bindings_generator.h
@@ -368,6 +368,8 @@ class BindingsGenerator {
List<InternalCall> method_icalls;
Map<const MethodInterface *, const InternalCall *> method_icalls_map;
+ List<const InternalCall *> generated_icall_funcs;
+
List<InternalCall> core_custom_icalls;
List<InternalCall> editor_custom_icalls;
@@ -404,6 +406,11 @@ class BindingsGenerator {
Error _generate_cs_type(const TypeInterface &itype, const String &p_output_file);
+ Error _generate_cs_property(const TypeInterface &p_itype, const DocData::PropertyDoc &p_prop_doc, List<String> &p_output);
+ Error _generate_cs_method(const TypeInterface &p_itype, const MethodInterface &p_imethod, int &p_method_bind_count, List<String> &p_output);
+
+ Error _generate_glue_method(const TypeInterface &p_itype, const MethodInterface &p_imethod, List<String> &p_output);
+
Error _save_file(const String &path, const List<String> &content);
BindingsGenerator();
diff --git a/modules/mono/editor/godotsharp_builds.cpp b/modules/mono/editor/godotsharp_builds.cpp
index 1bad8a3f85..83d2bb1471 100644
--- a/modules/mono/editor/godotsharp_builds.cpp
+++ b/modules/mono/editor/godotsharp_builds.cpp
@@ -32,6 +32,7 @@
#include "main/main.h"
#include "../godotsharp_dirs.h"
+#include "../mono_gd/gd_mono.h"
#include "../mono_gd/gd_mono_class.h"
#include "../mono_gd/gd_mono_marshal.h"
#include "../utils/path_utils.h"
@@ -71,7 +72,7 @@ String _find_build_engine_on_unix(const String &p_name) {
}
#endif
-MonoString *godot_icall_BuildInstance_get_MSBuildPath() {
+void godot_icall_BuildInstance_get_MSBuildInfo(MonoString **r_msbuild_path, MonoString **r_framework_path) {
GodotSharpBuilds::BuildTool build_tool = GodotSharpBuilds::BuildTool(int(EditorSettings::get_singleton()->get("mono/builds/build_tool")));
@@ -84,11 +85,23 @@ MonoString *godot_icall_BuildInstance_get_MSBuildPath() {
if (!msbuild_tools_path.ends_with("\\"))
msbuild_tools_path += "\\";
- return GDMonoMarshal::mono_string_from_godot(msbuild_tools_path + "MSBuild.exe");
+ // FrameworkPathOverride
+ const MonoRegInfo &mono_reg_info = GDMono::get_singleton()->get_mono_reg_info();
+ if (mono_reg_info.assembly_dir.length()) {
+ *r_msbuild_path = GDMonoMarshal::mono_string_from_godot(msbuild_tools_path + "MSBuild.exe");
+
+ String framework_path = path_join(mono_reg_info.assembly_dir, "mono", "4.5");
+ *r_framework_path = GDMonoMarshal::mono_string_from_godot(framework_path);
+ } else {
+ ERR_PRINT("Cannot find Mono's assemblies directory in the registry");
+ }
+
+ return;
}
- OS::get_singleton()->print("Cannot find System's MSBuild. Trying with Mono's...\n");
- }
+ if (OS::get_singleton()->is_stdout_verbose())
+ OS::get_singleton()->print("Cannot find System's MSBuild. Trying with Mono's...\n");
+ } // fall through
case GodotSharpBuilds::MSBUILD_MONO: {
String msbuild_path = GDMono::get_singleton()->get_mono_reg_info().bin_dir.plus_file("msbuild.bat");
@@ -96,17 +109,10 @@ MonoString *godot_icall_BuildInstance_get_MSBuildPath() {
WARN_PRINTS("Cannot find msbuild ('mono/builds/build_tool'). Tried with path: " + msbuild_path);
}
- return GDMonoMarshal::mono_string_from_godot(msbuild_path);
- }
- case GodotSharpBuilds::XBUILD: {
- String xbuild_path = GDMono::get_singleton()->get_mono_reg_info().bin_dir.plus_file("xbuild.bat");
+ *r_msbuild_path = GDMonoMarshal::mono_string_from_godot(msbuild_path);
- if (!FileAccess::exists(xbuild_path)) {
- WARN_PRINTS("Cannot find xbuild ('mono/builds/build_tool'). Tried with path: " + xbuild_path);
- }
-
- return GDMonoMarshal::mono_string_from_godot(xbuild_path);
- }
+ return;
+ } break;
default:
ERR_EXPLAIN("You don't deserve to live");
CRASH_NOW();
@@ -118,25 +124,28 @@ MonoString *godot_icall_BuildInstance_get_MSBuildPath() {
if (build_tool != GodotSharpBuilds::XBUILD) {
if (msbuild_path.empty()) {
WARN_PRINT("Cannot find msbuild ('mono/builds/build_tool').");
- return NULL;
+ return;
}
} else {
if (xbuild_path.empty()) {
WARN_PRINT("Cannot find xbuild ('mono/builds/build_tool').");
- return NULL;
+ return;
}
}
- return GDMonoMarshal::mono_string_from_godot(build_tool != GodotSharpBuilds::XBUILD ? msbuild_path : xbuild_path);
+ *r_msbuild_path = GDMonoMarshal::mono_string_from_godot(build_tool != GodotSharpBuilds::XBUILD ? msbuild_path : xbuild_path);
+
+ return;
#else
- return NULL;
+ ERR_PRINT("Not implemented on this platform");
+ return;
#endif
}
void GodotSharpBuilds::_register_internal_calls() {
mono_add_internal_call("GodotSharpTools.Build.BuildSystem::godot_icall_BuildInstance_ExitCallback", (void *)godot_icall_BuildInstance_ExitCallback);
- mono_add_internal_call("GodotSharpTools.Build.BuildInstance::godot_icall_BuildInstance_get_MSBuildPath", (void *)godot_icall_BuildInstance_get_MSBuildPath);
+ mono_add_internal_call("GodotSharpTools.Build.BuildInstance::godot_icall_BuildInstance_get_MSBuildInfo", (void *)godot_icall_BuildInstance_get_MSBuildInfo);
}
void GodotSharpBuilds::show_build_error_dialog(const String &p_message) {
@@ -269,7 +278,7 @@ bool GodotSharpBuilds::make_api_sln(GodotSharpBuilds::APIType p_api_type) {
return true;
}
-bool godotsharp_build_callback() {
+bool GodotSharpBuilds::build_project_blocking() {
if (!FileAccess::exists(GodotSharpDirs::get_project_sln_path()))
return true; // No solution to build
@@ -348,14 +357,27 @@ GodotSharpBuilds::GodotSharpBuilds() {
singleton = this;
- EditorNode::get_singleton()->add_build_callback(&godotsharp_build_callback);
+ EditorNode::get_singleton()->add_build_callback(&GodotSharpBuilds::build_project_blocking);
// Build tool settings
EditorSettings *ed_settings = EditorSettings::get_singleton();
if (!ed_settings->has_setting("mono/builds/build_tool")) {
- ed_settings->set_setting("mono/builds/build_tool", MSBUILD);
+ ed_settings->set_setting("mono/builds/build_tool",
+#ifdef WINDOWS_ENABLED
+ // TODO: Default to MSBUILD_MONO if its csc.exe issue is fixed in the installed mono version
+ MSBUILD
+#else
+ MSBUILD_MONO
+#endif
+ );
}
- ed_settings->add_property_hint(PropertyInfo(Variant::INT, "mono/builds/build_tool", PROPERTY_HINT_ENUM, "MSBuild (System),MSBuild (Mono),xbuild"));
+ ed_settings->add_property_hint(PropertyInfo(Variant::INT, "mono/builds/build_tool", PROPERTY_HINT_ENUM,
+#ifdef WINDOWS_ENABLED
+ "MSBuild (Mono),MSBuild (System)"
+#else
+ "MSBuild (Mono),xbuild (Deprecated)"
+#endif
+ ));
}
GodotSharpBuilds::~GodotSharpBuilds() {
@@ -395,10 +417,11 @@ void GodotSharpBuilds::BuildProcess::start(bool p_blocking) {
}
if (!exited) {
- ERR_PRINT("BuildProcess::start called, but process still running");
exited = true;
- build_tab->on_build_exec_failed("!exited");
- return;
+ String message = "Tried to start build process, but it is already running";
+ build_tab->on_build_exec_failed(message);
+ ERR_EXPLAIN(message);
+ ERR_FAIL();
}
exited = false;
@@ -410,10 +433,12 @@ void GodotSharpBuilds::BuildProcess::start(bool p_blocking) {
if (d->file_exists(issues_file)) {
Error err = d->remove(issues_file);
if (err != OK) {
- ERR_PRINTS("Cannot remove file: " + logs_dir.plus_file(issues_file));
exited = true;
- build_tab->on_build_exec_failed("Cannot remove file: " + issues_file);
- return;
+ String file_path = ProjectSettings::get_singleton()->localize_path(logs_dir).plus_file(issues_file);
+ String message = "Cannot remove issues file: " + file_path;
+ build_tab->on_build_exec_failed(message);
+ ERR_EXPLAIN(message);
+ ERR_FAIL();
}
}
@@ -434,7 +459,9 @@ void GodotSharpBuilds::BuildProcess::start(bool p_blocking) {
if (ex) {
exited = true;
- build_tab->on_build_exec_failed("The build constructor threw an exception.\n" + GDMonoUtils::get_exception_name_and_message(ex));
+ String message = "The build constructor threw an exception.\n" + GDMonoUtils::get_exception_name_and_message(ex);
+ build_tab->on_build_exec_failed(message);
+ ERR_EXPLAIN(message);
ERR_FAIL();
}
@@ -452,7 +479,9 @@ void GodotSharpBuilds::BuildProcess::start(bool p_blocking) {
if (ex) {
exited = true;
- build_tab->on_build_exec_failed("The build method threw an exception.\n" + GDMonoUtils::get_exception_name_and_message(ex));
+ String message = "The build method threw an exception.\n" + GDMonoUtils::get_exception_name_and_message(ex);
+ build_tab->on_build_exec_failed(message);
+ ERR_EXPLAIN(message);
ERR_FAIL();
}
diff --git a/modules/mono/editor/godotsharp_builds.h b/modules/mono/editor/godotsharp_builds.h
index 6d5fa3b44a..7d2f38a774 100644
--- a/modules/mono/editor/godotsharp_builds.h
+++ b/modules/mono/editor/godotsharp_builds.h
@@ -67,9 +67,12 @@ public:
};
enum BuildTool {
- MSBUILD,
MSBUILD_MONO,
- XBUILD
+#ifdef WINDOWS_ENABLED
+ MSBUILD
+#else
+ XBUILD // Deprecated
+#endif
};
_FORCE_INLINE_ static GodotSharpBuilds *get_singleton() { return singleton; }
@@ -89,6 +92,8 @@ public:
static bool make_api_sln(APIType p_api_type);
+ static bool build_project_blocking();
+
GodotSharpBuilds();
~GodotSharpBuilds();
};
diff --git a/modules/mono/editor/godotsharp_editor.cpp b/modules/mono/editor/godotsharp_editor.cpp
index 30e7653256..39c57ee0be 100644
--- a/modules/mono/editor/godotsharp_editor.cpp
+++ b/modules/mono/editor/godotsharp_editor.cpp
@@ -46,21 +46,6 @@
#include "../utils/mono_reg_utils.h"
#endif
-class MonoReloadNode : public Node {
- GDCLASS(MonoReloadNode, Node)
-
-protected:
- void _notification(int p_what) {
- switch (p_what) {
- case MainLoop::NOTIFICATION_WM_FOCUS_IN: {
- CSharpLanguage::get_singleton()->reload_assemblies_if_needed(true);
- } break;
- default: {
- } break;
- };
- }
-};
-
GodotSharpEditor *GodotSharpEditor::singleton = NULL;
bool GodotSharpEditor::_create_project_solution() {
@@ -71,6 +56,10 @@ bool GodotSharpEditor::_create_project_solution() {
String path = OS::get_singleton()->get_resource_dir();
String name = ProjectSettings::get_singleton()->get("application/config/name");
+ if (name.empty()) {
+ name = "UnnamedProject";
+ }
+
String guid = CSharpProject::generate_game_project(path, name);
if (guid.length()) {
@@ -254,3 +243,49 @@ GodotSharpEditor::~GodotSharpEditor() {
monodevel_instance = NULL;
}
}
+
+MonoReloadNode *MonoReloadNode::singleton = NULL;
+
+void MonoReloadNode::_reload_timer_timeout() {
+
+ CSharpLanguage::get_singleton()->reload_assemblies_if_needed(false);
+}
+
+void MonoReloadNode::restart_reload_timer() {
+
+ reload_timer->stop();
+ reload_timer->start();
+}
+
+void MonoReloadNode::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("_reload_timer_timeout"), &MonoReloadNode::_reload_timer_timeout);
+}
+
+void MonoReloadNode::_notification(int p_what) {
+ switch (p_what) {
+ case MainLoop::NOTIFICATION_WM_FOCUS_IN: {
+ restart_reload_timer();
+ CSharpLanguage::get_singleton()->reload_assemblies_if_needed(true);
+ } break;
+ default: {
+ } break;
+ };
+}
+
+MonoReloadNode::MonoReloadNode() {
+
+ singleton = this;
+
+ reload_timer = memnew(Timer);
+ add_child(reload_timer);
+ reload_timer->set_one_shot(false);
+ reload_timer->set_wait_time(EDITOR_DEF("mono/assembly_watch_interval_sec", 0.5));
+ reload_timer->connect("timeout", this, "_reload_timer_timeout");
+ reload_timer->start();
+}
+
+MonoReloadNode::~MonoReloadNode() {
+
+ singleton = NULL;
+}
diff --git a/modules/mono/editor/godotsharp_editor.h b/modules/mono/editor/godotsharp_editor.h
index 1ecb8c7a94..7b4b50b172 100644
--- a/modules/mono/editor/godotsharp_editor.h
+++ b/modules/mono/editor/godotsharp_editor.h
@@ -84,4 +84,27 @@ public:
~GodotSharpEditor();
};
+class MonoReloadNode : public Node {
+ GDCLASS(MonoReloadNode, Node)
+
+ Timer *reload_timer;
+
+ void _reload_timer_timeout();
+
+ static MonoReloadNode *singleton;
+
+protected:
+ static void _bind_methods();
+
+ void _notification(int p_what);
+
+public:
+ _FORCE_INLINE_ static MonoReloadNode *get_singleton() { return singleton; }
+
+ void restart_reload_timer();
+
+ MonoReloadNode();
+ ~MonoReloadNode();
+};
+
#endif // GODOTSHARP_EDITOR_H
diff --git a/modules/mono/editor/mono_bottom_panel.cpp b/modules/mono/editor/mono_bottom_panel.cpp
index 07109eaac7..31dc09856a 100644
--- a/modules/mono/editor/mono_bottom_panel.cpp
+++ b/modules/mono/editor/mono_bottom_panel.cpp
@@ -139,6 +139,14 @@ void MonoBottomPanel::_errors_toggled(bool p_pressed) {
build_tab->_update_issues_list();
}
+void MonoBottomPanel::_build_project_pressed() {
+
+ GodotSharpBuilds::get_singleton()->build_project_blocking();
+
+ MonoReloadNode::get_singleton()->restart_reload_timer();
+ CSharpLanguage::get_singleton()->reload_assemblies_if_needed(true);
+}
+
void MonoBottomPanel::_notification(int p_what) {
switch (p_what) {
@@ -153,6 +161,7 @@ void MonoBottomPanel::_notification(int p_what) {
void MonoBottomPanel::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("_build_project_pressed"), &MonoBottomPanel::_build_project_pressed);
ClassDB::bind_method(D_METHOD("_warnings_toggled", "pressed"), &MonoBottomPanel::_warnings_toggled);
ClassDB::bind_method(D_METHOD("_errors_toggled", "pressed"), &MonoBottomPanel::_errors_toggled);
ClassDB::bind_method(D_METHOD("_build_tab_item_selected", "idx"), &MonoBottomPanel::_build_tab_item_selected);
@@ -187,6 +196,12 @@ MonoBottomPanel::MonoBottomPanel(EditorNode *p_editor) {
toolbar_hbc->set_h_size_flags(SIZE_EXPAND_FILL);
panel_builds_tab->add_child(toolbar_hbc);
+ ToolButton *build_project_btn = memnew(ToolButton);
+ build_project_btn->set_text("Build Project");
+ build_project_btn->set_focus_mode(FOCUS_NONE);
+ build_project_btn->connect("pressed", this, "_build_project_pressed");
+ toolbar_hbc->add_child(build_project_btn);
+
toolbar_hbc->add_spacer();
warnings_btn = memnew(ToolButton);
@@ -280,7 +295,11 @@ void MonoBuildTab::_update_issues_list() {
String tooltip;
tooltip += String("Message: ") + issue.message;
- tooltip += String("\nCode: ") + issue.code;
+
+ if (issue.code.length()) {
+ tooltip += String("\nCode: ") + issue.code;
+ }
+
tooltip += String("\nType: ") + (issue.warning ? "warning" : "error");
String text;
@@ -356,23 +375,21 @@ void MonoBuildTab::on_build_exit(BuildResult result) {
MonoBottomPanel::get_singleton()->raise_build_tab(this);
}
-void MonoBuildTab::on_build_exec_failed(const String &p_cause, const String &p_detailed) {
+void MonoBuildTab::on_build_exec_failed(const String &p_cause) {
build_exited = true;
build_result = RESULT_ERROR;
issues_list->clear();
- String tooltip;
+ BuildIssue issue;
+ issue.message = p_cause;
+ issue.warning = false;
- tooltip += "Message: " + (p_detailed.length() ? p_detailed : p_cause);
- tooltip += "\nType: error";
+ error_count += 1;
+ issues.push_back(issue);
- int line_break_idx = p_cause.find("\n");
- issues_list->add_item(line_break_idx == -1 ? p_cause : p_cause.substr(0, line_break_idx),
- get_icon("Error", "EditorIcons"));
- int index = issues_list->get_item_count() - 1;
- issues_list->set_item_tooltip(index, tooltip);
+ _update_issues_list();
MonoBottomPanel::get_singleton()->raise_build_tab(this);
}
diff --git a/modules/mono/editor/mono_bottom_panel.h b/modules/mono/editor/mono_bottom_panel.h
index 909fa4b385..5cc4aa3240 100644
--- a/modules/mono/editor/mono_bottom_panel.h
+++ b/modules/mono/editor/mono_bottom_panel.h
@@ -61,6 +61,8 @@ class MonoBottomPanel : public VBoxContainer {
void _warnings_toggled(bool p_pressed);
void _errors_toggled(bool p_pressed);
+ void _build_project_pressed();
+
static MonoBottomPanel *singleton;
protected:
@@ -134,7 +136,7 @@ public:
void on_build_start();
void on_build_exit(BuildResult result);
- void on_build_exec_failed(const String &p_cause, const String &p_detailed = String());
+ void on_build_exec_failed(const String &p_cause);
void restart_build();
void stop_build();
diff --git a/modules/mono/godotsharp_dirs.cpp b/modules/mono/godotsharp_dirs.cpp
index 6bcf0e2355..7cc2168b70 100644
--- a/modules/mono/godotsharp_dirs.cpp
+++ b/modules/mono/godotsharp_dirs.cpp
@@ -122,7 +122,14 @@ private:
#ifdef TOOLS_ENABLED
mono_solutions_dir = mono_user_dir.plus_file("solutions");
build_logs_dir = mono_user_dir.plus_file("build_logs");
- String base_path = String("res://") + ProjectSettings::get_singleton()->get("application/config/name");
+
+ String name = ProjectSettings::get_singleton()->get("application/config/name");
+ if (name.empty()) {
+ name = "UnnamedProject";
+ }
+
+ String base_path = String("res://") + name;
+
sln_filepath = ProjectSettings::get_singleton()->globalize_path(base_path + ".sln");
csproj_filepath = ProjectSettings::get_singleton()->globalize_path(base_path + ".csproj");
#endif
diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp
index d7aedbbcf0..904a8ae2c7 100644
--- a/modules/mono/mono_gd/gd_mono.cpp
+++ b/modules/mono/mono_gd/gd_mono.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "gd_mono.h"
+#include <mono/metadata/exception.h>
#include <mono/metadata/mono-config.h>
#include <mono/metadata/mono-debug.h>
#include <mono/metadata/mono-gc.h>
@@ -47,6 +48,15 @@
#include "../editor/godotsharp_editor.h"
#endif
+void gdmono_unhandled_exception_hook(MonoObject *exc, void *user_data) {
+
+ (void)user_data; // UNUSED
+
+ ERR_PRINT(GDMonoUtils::get_exception_name_and_message(exc).utf8());
+ mono_print_unhandled_exception(exc);
+ abort();
+}
+
#ifdef MONO_PRINT_HANDLER_ENABLED
void gdmono_MonoPrintCallback(const char *string, mono_bool is_stdout) {
@@ -214,6 +224,8 @@ void GDMono::initialize() {
// The following assemblies are not required at initialization
_load_all_script_assemblies();
+ mono_install_unhandled_exception_hook(gdmono_unhandled_exception_hook, NULL);
+
OS::get_singleton()->print("Mono: ALL IS GOOD\n");
}
@@ -357,9 +369,12 @@ bool GDMono::_load_project_assembly() {
if (project_assembly)
return true;
- String project_assembly_name = ProjectSettings::get_singleton()->get("application/config/name");
+ String name = ProjectSettings::get_singleton()->get("application/config/name");
+ if (name.empty()) {
+ name = "UnnamedProject";
+ }
- bool success = _load_assembly(project_assembly_name, &project_assembly);
+ bool success = _load_assembly(name, &project_assembly);
if (success)
mono_assembly_set_main(project_assembly->get_assembly());
@@ -610,6 +625,8 @@ GDMono::~GDMono() {
if (gdmono_log)
memdelete(gdmono_log);
+
+ singleton = NULL;
}
_GodotSharp *_GodotSharp::singleton = NULL;
diff --git a/modules/mono/mono_gd/gd_mono_assembly.cpp b/modules/mono/mono_gd/gd_mono_assembly.cpp
index 4b370295f3..7dc7043eec 100644
--- a/modules/mono/mono_gd/gd_mono_assembly.cpp
+++ b/modules/mono/mono_gd/gd_mono_assembly.cpp
@@ -95,7 +95,9 @@ MonoAssembly *GDMonoAssembly::_preload_hook(MonoAssemblyName *aname, char **asse
(void)user_data; // UNUSED
if (search_dirs.empty()) {
+#ifdef TOOLS_DOMAIN
search_dirs.push_back(GodotSharpDirs::get_res_temp_assemblies_dir());
+#endif
search_dirs.push_back(GodotSharpDirs::get_res_assemblies_dir());
search_dirs.push_back(OS::get_singleton()->get_resource_dir());
search_dirs.push_back(OS::get_singleton()->get_executable_path().get_base_dir());
@@ -105,10 +107,11 @@ MonoAssembly *GDMonoAssembly::_preload_hook(MonoAssemblyName *aname, char **asse
search_dirs.push_back(String(rootdir).plus_file("mono").plus_file("4.5"));
}
- while (assemblies_path) {
- if (*assemblies_path)
+ if (assemblies_path) {
+ while (*assemblies_path) {
search_dirs.push_back(*assemblies_path);
- ++assemblies_path;
+ ++assemblies_path;
+ }
}
}
diff --git a/modules/mono/mono_gd/gd_mono_field.cpp b/modules/mono/mono_gd/gd_mono_field.cpp
index 81315ee87a..1643f8cfc5 100644
--- a/modules/mono/mono_gd/gd_mono_field.cpp
+++ b/modules/mono/mono_gd/gd_mono_field.cpp
@@ -183,19 +183,19 @@ void GDMonoField::set_value(MonoObject *p_object, const Variant &p_value) {
// GodotObject
if (CACHED_CLASS(GodotObject)->is_assignable_from(type_class)) {
MonoObject *managed = GDMonoUtils::unmanaged_get_managed(p_value.operator Object *());
- mono_field_set_value(p_object, mono_field, &managed);
+ mono_field_set_value(p_object, mono_field, managed);
break;
}
if (CACHED_CLASS(NodePath) == type_class) {
MonoObject *managed = GDMonoUtils::create_managed_from(p_value.operator NodePath());
- mono_field_set_value(p_object, mono_field, &managed);
+ mono_field_set_value(p_object, mono_field, managed);
break;
}
if (CACHED_CLASS(RID) == type_class) {
MonoObject *managed = GDMonoUtils::create_managed_from(p_value.operator RID());
- mono_field_set_value(p_object, mono_field, &managed);
+ mono_field_set_value(p_object, mono_field, managed);
break;
}
@@ -204,8 +204,6 @@ void GDMonoField::set_value(MonoObject *p_object, const Variant &p_value) {
} break;
case MONO_TYPE_OBJECT: {
- GDMonoClass *type_class = type.type_class;
-
// Variant
switch (p_value.get_type()) {
case Variant::BOOL: {
@@ -237,11 +235,11 @@ void GDMonoField::set_value(MonoObject *p_object, const Variant &p_value) {
case Variant::COLOR: SET_FROM_STRUCT_AND_BREAK(Color);
case Variant::NODE_PATH: {
MonoObject *managed = GDMonoUtils::create_managed_from(p_value.operator NodePath());
- mono_field_set_value(p_object, mono_field, &managed);
+ mono_field_set_value(p_object, mono_field, managed);
} break;
case Variant::_RID: {
MonoObject *managed = GDMonoUtils::create_managed_from(p_value.operator RID());
- mono_field_set_value(p_object, mono_field, &managed);
+ mono_field_set_value(p_object, mono_field, managed);
} break;
case Variant::OBJECT: {
MonoObject *managed = GDMonoUtils::unmanaged_get_managed(p_value.operator Object *());
@@ -250,7 +248,7 @@ void GDMonoField::set_value(MonoObject *p_object, const Variant &p_value) {
}
case Variant::DICTIONARY: {
MonoObject *managed = GDMonoMarshal::Dictionary_to_mono_object(p_value.operator Dictionary());
- mono_field_set_value(p_object, mono_field, &managed);
+ mono_field_set_value(p_object, mono_field, managed);
} break;
case Variant::ARRAY: SET_FROM_ARRAY_AND_BREAK(Array);
case Variant::POOL_BYTE_ARRAY: SET_FROM_ARRAY_AND_BREAK(PoolByteArray);
@@ -268,7 +266,7 @@ void GDMonoField::set_value(MonoObject *p_object, const Variant &p_value) {
case MONO_TYPE_GENERICINST: {
if (CACHED_RAW_MONO_CLASS(Dictionary) == type.type_class->get_raw()) {
MonoObject *managed = GDMonoMarshal::Dictionary_to_mono_object(p_value.operator Dictionary());
- mono_field_set_value(p_object, mono_field, &managed);
+ mono_field_set_value(p_object, mono_field, managed);
break;
}
} break;
diff --git a/modules/mono/mono_gd/gd_mono_method.cpp b/modules/mono/mono_gd/gd_mono_method.cpp
index 6468e0d3d9..eb97d62900 100644
--- a/modules/mono/mono_gd/gd_mono_method.cpp
+++ b/modules/mono/mono_gd/gd_mono_method.cpp
@@ -83,9 +83,32 @@ MonoObject *GDMonoMethod::invoke(MonoObject *p_object, const Variant **p_params,
mono_array_set(params, MonoObject *, i, boxed_param);
}
- return mono_runtime_invoke_array(mono_method, p_object, params, r_exc);
+ MonoObject *exc = NULL;
+ MonoObject *ret = mono_runtime_invoke_array(mono_method, p_object, params, &exc);
+
+ if (exc) {
+ if (r_exc) {
+ *r_exc = exc;
+ } else {
+ ERR_PRINT(GDMonoUtils::get_exception_name_and_message(exc).utf8());
+ mono_print_unhandled_exception(exc);
+ }
+ }
+
+ return ret;
} else {
- mono_runtime_invoke(mono_method, p_object, NULL, r_exc);
+ MonoObject *exc = NULL;
+ mono_runtime_invoke(mono_method, p_object, NULL, &exc);
+
+ if (exc) {
+ if (r_exc) {
+ *r_exc = exc;
+ } else {
+ ERR_PRINT(GDMonoUtils::get_exception_name_and_message(exc).utf8());
+ mono_print_unhandled_exception(exc);
+ }
+ }
+
return NULL;
}
}
@@ -96,7 +119,19 @@ MonoObject *GDMonoMethod::invoke(MonoObject *p_object, MonoObject **r_exc) {
}
MonoObject *GDMonoMethod::invoke_raw(MonoObject *p_object, void **p_params, MonoObject **r_exc) {
- return mono_runtime_invoke(mono_method, p_object, p_params, r_exc);
+ MonoObject *exc = NULL;
+ MonoObject *ret = mono_runtime_invoke(mono_method, p_object, p_params, &exc);
+
+ if (exc) {
+ if (r_exc) {
+ *r_exc = exc;
+ } else {
+ ERR_PRINT(GDMonoUtils::get_exception_name_and_message(exc).utf8());
+ mono_print_unhandled_exception(exc);
+ }
+ }
+
+ return ret;
}
bool GDMonoMethod::has_attribute(GDMonoClass *p_attr_class) {
diff --git a/modules/mono/mono_reg_utils.py b/modules/mono/mono_reg_utils.py
index e9988625f5..8ddddb3a24 100644
--- a/modules/mono/mono_reg_utils.py
+++ b/modules/mono/mono_reg_utils.py
@@ -1,4 +1,7 @@
import os
+import platform
+
+from compat import decode_utf8
if os.name == 'nt':
import sys
@@ -11,8 +14,7 @@ if os.name == 'nt':
def _reg_open_key(key, subkey):
try:
return winreg.OpenKey(key, subkey)
- except (WindowsError, EnvironmentError) as e:
- import platform
+ except (WindowsError, OSError):
if platform.architecture()[0] == '32bit':
bitness_sam = winreg.KEY_WOW64_64KEY
else:
@@ -20,39 +22,93 @@ def _reg_open_key(key, subkey):
return winreg.OpenKey(key, subkey, 0, winreg.KEY_READ | bitness_sam)
-def _find_mono_in_reg(subkey):
+def _reg_open_key_bits(key, subkey, bits):
+ sam = winreg.KEY_READ
+
+ if platform.architecture()[0] == '32bit':
+ if bits == '64':
+ # Force 32bit process to search in 64bit registry
+ sam |= winreg.KEY_WOW64_64KEY
+ else:
+ if bits == '32':
+ # Force 64bit process to search in 32bit registry
+ sam |= winreg.KEY_WOW64_32KEY
+
+ return winreg.OpenKey(key, subkey, 0, sam)
+
+
+def _find_mono_in_reg(subkey, bits):
try:
- with _reg_open_key(winreg.HKEY_LOCAL_MACHINE, subkey) as hKey:
+ with _reg_open_key_bits(winreg.HKEY_LOCAL_MACHINE, subkey, bits) as hKey:
value, regtype = winreg.QueryValueEx(hKey, 'SdkInstallRoot')
return value
- except (WindowsError, EnvironmentError) as e:
+ except (WindowsError, OSError):
return None
-def _find_mono_in_reg_old(subkey):
+
+def _find_mono_in_reg_old(subkey, bits):
try:
- with _reg_open_key(winreg.HKEY_LOCAL_MACHINE, subkey) as hKey:
+ with _reg_open_key_bits(winreg.HKEY_LOCAL_MACHINE, subkey, bits) as hKey:
default_clr, regtype = winreg.QueryValueEx(hKey, 'DefaultCLR')
if default_clr:
- return _find_mono_in_reg(subkey + '\\' + default_clr)
+ return _find_mono_in_reg(subkey + '\\' + default_clr, bits)
return None
except (WindowsError, EnvironmentError):
return None
-def find_mono_root_dir():
- dir = _find_mono_in_reg(r'SOFTWARE\Mono')
- if dir:
- return dir
- dir = _find_mono_in_reg_old(r'SOFTWARE\Novell\Mono')
- if dir:
- return dir
- return None
+def find_mono_root_dir(bits):
+ root_dir = _find_mono_in_reg(r'SOFTWARE\Mono', bits)
+ if root_dir is not None:
+ return root_dir
+ root_dir = _find_mono_in_reg_old(r'SOFTWARE\Novell\Mono', bits)
+ if root_dir is not None:
+ return root_dir
+ return ''
def find_msbuild_tools_path_reg():
+ import subprocess
+
+ vswhere = os.getenv('PROGRAMFILES(X86)')
+ if not vswhere:
+ vswhere = os.getenv('PROGRAMFILES')
+ vswhere += r'\Microsoft Visual Studio\Installer\vswhere.exe'
+
+ vswhere_args = ['-latest', '-requires', 'Microsoft.Component.MSBuild']
+
try:
- with _reg_open_key(winreg.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0') as hKey:
+ lines = subprocess.check_output([vswhere] + vswhere_args).splitlines()
+
+ for line in lines:
+ parts = decode_utf8(line).split(':', 1)
+
+ if len(parts) < 2 or parts[0] != 'installationPath':
+ continue
+
+ val = parts[1].strip()
+
+ if not val:
+ raise ValueError('Value of `installationPath` entry is empty')
+
+ return os.path.join(val, "MSBuild\\15.0\\Bin")
+
+ raise ValueError('Cannot find `installationPath` entry')
+ except ValueError as e:
+ print('Error reading output from vswhere: ' + e.message)
+ except WindowsError:
+ pass # Fine, vswhere not found
+ except (subprocess.CalledProcessError, OSError):
+ pass
+
+ # Try to find 14.0 in the Registry
+
+ try:
+ subkey = r'SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0'
+ with _reg_open_key(winreg.HKEY_LOCAL_MACHINE, subkey) as hKey:
value, regtype = winreg.QueryValueEx(hKey, 'MSBuildToolsPath')
return value
- except (WindowsError, EnvironmentError) as e:
- return None
+ except (WindowsError, OSError):
+ return ''
+
+ return ''
diff --git a/modules/mono/utils/path_utils.cpp b/modules/mono/utils/path_utils.cpp
index c8581f6122..105c2c981e 100644
--- a/modules/mono/utils/path_utils.cpp
+++ b/modules/mono/utils/path_utils.cpp
@@ -56,9 +56,6 @@ String path_which(const String &p_name) {
for (int i = 0; i < env_path.size(); i++) {
String p = path_join(env_path[i], p_name);
- if (FileAccess::exists(p))
- return p;
-
#ifdef WINDOWS_ENABLED
for (int j = 0; j < exts.size(); j++) {
String p2 = p + exts[j];
@@ -66,6 +63,9 @@ String path_which(const String &p_name) {
if (FileAccess::exists(p2))
return p2;
}
+#else
+ if (FileAccess::exists(p))
+ return p;
#endif
}
diff --git a/modules/opus/audio_stream_opus.cpp b/modules/opus/audio_stream_opus.cpp
index c7748b9b21..06eab4c94d 100644
--- a/modules/opus/audio_stream_opus.cpp
+++ b/modules/opus/audio_stream_opus.cpp
@@ -267,7 +267,7 @@ void AudioStreamPlaybackOpus::seek(float p_time) {
frames_mixed = osrate * p_time;
}
-int AudioStreamPlaybackOpus::mix(int16_t *p_bufer, int p_frames) {
+int AudioStreamPlaybackOpus::mix(int16_t *p_buffer, int p_frames) {
if (!playing)
return 0;
@@ -281,7 +281,7 @@ int AudioStreamPlaybackOpus::mix(int16_t *p_bufer, int p_frames) {
break;
}
- int ret = op_read(opus_file, (opus_int16 *)p_bufer, todo * stream_channels, &current_section);
+ int ret = op_read(opus_file, (opus_int16 *)p_buffer, todo * stream_channels, &current_section);
if (ret < 0) {
playing = false;
ERR_EXPLAIN("Error reading Opus File: " + file);
@@ -325,7 +325,7 @@ int AudioStreamPlaybackOpus::mix(int16_t *p_bufer, int p_frames) {
frames_mixed += ret;
- p_bufer += ret * stream_channels;
+ p_buffer += ret * stream_channels;
p_frames -= ret;
}
diff --git a/modules/opus/audio_stream_opus.h b/modules/opus/audio_stream_opus.h
index 7b7740a804..f8d8f585cf 100644
--- a/modules/opus/audio_stream_opus.h
+++ b/modules/opus/audio_stream_opus.h
@@ -107,7 +107,7 @@ public:
virtual int get_minimum_buffer_size() const;
- virtual int mix(int16_t *p_bufer, int p_frames);
+ virtual int mix(int16_t *p_buffer, int p_frames);
AudioStreamPlaybackOpus();
~AudioStreamPlaybackOpus();
diff --git a/modules/regex/SCsub b/modules/regex/SCsub
index 2bab144a28..18b4051afe 100644
--- a/modules/regex/SCsub
+++ b/modules/regex/SCsub
@@ -8,7 +8,7 @@ env_regex.Append(CPPFLAGS=["-DPCRE2_CODE_UNIT_WIDTH=0"])
env_regex.add_source_files(env.modules_sources, "*.cpp")
if env['builtin_pcre2']:
- jit_blacklist = ['javascript']
+ jit_blacklist = ['javascript', 'uwp']
thirdparty_dir = '#thirdparty/pcre2/src/'
thirdparty_flags = ['-DPCRE2_STATIC', '-DHAVE_CONFIG_H']
if 'platform' in env and env['platform'] not in jit_blacklist:
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index 48145495e4..765fe4c2f2 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -974,11 +974,6 @@ bool VisualScript::is_tool() const {
return false;
}
-String VisualScript::get_node_type() const {
-
- return String();
-}
-
ScriptLanguage *VisualScript::get_language() const {
return VisualScriptLanguage::singleton;
@@ -2412,6 +2407,10 @@ bool VisualScriptLanguage::has_named_classes() const {
return false;
}
+bool VisualScriptLanguage::supports_builtin_mode() const {
+
+ return true;
+}
int VisualScriptLanguage::find_function(const String &p_function, const String &p_code) const {
return -1;
diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h
index 4ae50ee829..0f60b103c9 100644
--- a/modules/visual_script/visual_script.h
+++ b/modules/visual_script/visual_script.h
@@ -339,8 +339,6 @@ public:
virtual bool is_tool() const;
- virtual String get_node_type() const;
-
virtual ScriptLanguage *get_language() const;
virtual bool has_script_signal(const StringName &p_signal) const;
@@ -569,6 +567,7 @@ public:
virtual bool validate(const String &p_script, int &r_line_error, int &r_col_error, String &r_test_error, const String &p_path = "", List<String> *r_functions = NULL) const;
virtual Script *create_script() const;
virtual bool has_named_classes() const;
+ virtual bool supports_builtin_mode() const;
virtual int find_function(const String &p_function, const String &p_code) const;
virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const;
virtual void auto_indent_code(String &p_code, int p_from_line, int p_to_line) const;
diff --git a/modules/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp
index 0afb889199..6235799fc2 100644
--- a/modules/vorbis/audio_stream_ogg_vorbis.cpp
+++ b/modules/vorbis/audio_stream_ogg_vorbis.cpp
@@ -92,7 +92,7 @@ long AudioStreamPlaybackOGGVorbis::_ov_tell_func(void *_f) {
return fa->get_position();
}
-int AudioStreamPlaybackOGGVorbis::mix(int16_t *p_bufer, int p_frames) {
+int AudioStreamPlaybackOGGVorbis::mix(int16_t *p_buffer, int p_frames) {
if (!playing)
return 0;
@@ -109,9 +109,9 @@ int AudioStreamPlaybackOGGVorbis::mix(int16_t *p_bufer, int p_frames) {
//printf("to mix %i - mix me %i bytes\n",to_mix,to_mix*stream_channels*sizeof(int16_t));
#ifdef BIG_ENDIAN_ENABLED
- long ret = ov_read(&vf, (char *)p_bufer, todo * stream_channels * sizeof(int16_t), 1, 2, 1, &current_section);
+ long ret = ov_read(&vf, (char *)p_buffer, todo * stream_channels * sizeof(int16_t), 1, 2, 1, &current_section);
#else
- long ret = ov_read(&vf, (char *)p_bufer, todo * stream_channels * sizeof(int16_t), 0, 2, 1, &current_section);
+ long ret = ov_read(&vf, (char *)p_buffer, todo * stream_channels * sizeof(int16_t), 0, 2, 1, &current_section);
#endif
if (ret < 0) {
@@ -162,7 +162,7 @@ int AudioStreamPlaybackOGGVorbis::mix(int16_t *p_bufer, int p_frames) {
frames_mixed += ret;
- p_bufer += ret * stream_channels;
+ p_buffer += ret * stream_channels;
p_frames -= ret;
}
diff --git a/modules/vorbis/audio_stream_ogg_vorbis.h b/modules/vorbis/audio_stream_ogg_vorbis.h
index 929b2651e9..79eadec56e 100644
--- a/modules/vorbis/audio_stream_ogg_vorbis.h
+++ b/modules/vorbis/audio_stream_ogg_vorbis.h
@@ -103,7 +103,7 @@ public:
virtual int get_mix_rate() const { return stream_srate; }
virtual int get_minimum_buffer_size() const { return 0; }
- virtual int mix(int16_t *p_bufer, int p_frames);
+ virtual int mix(int16_t *p_buffer, int p_frames);
AudioStreamPlaybackOGGVorbis();
~AudioStreamPlaybackOGGVorbis();
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index 473a093077..45df312cae 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -123,7 +123,9 @@ void OS_Android::initialize_core() {
void OS_Android::initialize_logger() {
Vector<Logger *> loggers;
loggers.push_back(memnew(AndroidLogger));
- loggers.push_back(memnew(RotatedFileLogger("user://logs/log.txt")));
+ // FIXME: Reenable once we figure out how to get this properly in user://
+ // instead of littering the user's working dirs (res:// + pwd) with log files (GH-12277)
+ //loggers.push_back(memnew(RotatedFileLogger("user://logs/log.txt")));
_set_logger(memnew(CompositeLogger(loggers)));
}
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index 08792b8631..0efe22c1af 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -104,7 +104,9 @@ void OSIPhone::initialize_core() {
void OSIPhone::initialize_logger() {
Vector<Logger *> loggers;
loggers.push_back(memnew(SyslogLogger));
- loggers.push_back(memnew(RotatedFileLogger("user://logs/log.txt")));
+ // FIXME: Reenable once we figure out how to get this properly in user://
+ // instead of littering the user's working dirs (res:// + pwd) with log files (GH-12277)
+ //loggers.push_back(memnew(RotatedFileLogger("user://logs/log.txt")));
_set_logger(memnew(CompositeLogger(loggers)));
}
diff --git a/platform/javascript/audio_driver_javascript.cpp b/platform/javascript/audio_driver_javascript.cpp
index 4c0e5fd966..cd3974669f 100644
--- a/platform/javascript/audio_driver_javascript.cpp
+++ b/platform/javascript/audio_driver_javascript.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "audio_driver_javascript.h"
+#include <emscripten.h>
#include <string.h>
#define MAX_NUMBER_INTERFACES 3
@@ -38,22 +39,91 @@
//AudioDriverJavaScript* AudioDriverJavaScript::s_ad=NULL;
+AudioDriverJavaScript *AudioDriverJavaScript::singleton_js = NULL;
const char *AudioDriverJavaScript::get_name() const {
return "JavaScript";
}
+extern "C" {
+
+void js_audio_driver_mix_function(int p_frames) {
+
+ //print_line("MIXI! "+itos(p_frames));
+ AudioDriverJavaScript::singleton_js->mix_to_js(p_frames);
+}
+}
+
+void AudioDriverJavaScript::mix_to_js(int p_frames) {
+
+ int todo = p_frames;
+ int offset = 0;
+
+ while (todo) {
+
+ int tomix = MIN(todo, INTERNAL_BUFFER_SIZE);
+
+ audio_server_process(p_frames, stream_buffer);
+ for (int i = 0; i < tomix * internal_buffer_channels; i++) {
+ internal_buffer[i] = float(stream_buffer[i] >> 16) * 32768.0;
+ }
+
+ /* clang-format off */
+ EM_ASM_({
+ var data = HEAPF32.subarray($0 / 4, $0 / 4 + $2 * 2);
+
+ for (var channel = 0; channel < _as_output_buffer.numberOfChannels; channel++) {
+ var outputData = _as_output_buffer.getChannelData(channel);
+ // Loop through samples
+ for (var sample = 0; sample < $2; sample++) {
+ // make output equal to the same as the input
+ outputData[sample + $1] = data[sample * 2 + channel];
+ }
+ }
+ }, internal_buffer, offset, tomix);
+ /* clang-format on */
+
+ todo -= tomix;
+ offset += tomix;
+ }
+}
+
Error AudioDriverJavaScript::init() {
return OK;
}
void AudioDriverJavaScript::start() {
+
+ internal_buffer_channels = 2;
+ internal_buffer = memnew_arr(float, INTERNAL_BUFFER_SIZE *internal_buffer_channels);
+ stream_buffer = memnew_arr(int32_t, INTERNAL_BUFFER_SIZE * 4); //max 4 channels
+
+ /* clang-format off */
+ EM_ASM(
+ _as_audioctx = new (window.AudioContext || window.webkitAudioContext)();
+
+ audio_server_mix_function = Module.cwrap('js_audio_driver_mix_function', 'void', ['number']);
+ );
+
+ int buffer_latency = 16384;
+ EM_ASM_( {
+ _as_script_node = _as_audioctx.createScriptProcessor($0, 0, 2);
+ _as_script_node.connect(_as_audioctx.destination);
+ console.log(_as_script_node.bufferSize);
+
+ _as_script_node.onaudioprocess = function(audioProcessingEvent) {
+ // The output buffer contains the samples that will be modified and played
+ _as_output_buffer = audioProcessingEvent.outputBuffer;
+ audio_server_mix_function(_as_output_buffer.getChannelData(0).length);
+ }
+ }, buffer_latency);
+ /* clang-format on */
}
int AudioDriverJavaScript::get_mix_rate() const {
- return 44100;
+ return mix_rate;
}
AudioDriver::SpeakerMode AudioDriverJavaScript::get_speaker_mode() const {
@@ -63,7 +133,7 @@ AudioDriver::SpeakerMode AudioDriverJavaScript::get_speaker_mode() const {
void AudioDriverJavaScript::lock() {
- /*
+ /*no locking, as threads are not supported
if (active && mutex)
mutex->lock();
*/
@@ -71,7 +141,7 @@ void AudioDriverJavaScript::lock() {
void AudioDriverJavaScript::unlock() {
- /*
+ /*no locking, as threads are not supported
if (active && mutex)
mutex->unlock();
*/
@@ -81,4 +151,7 @@ void AudioDriverJavaScript::finish() {
}
AudioDriverJavaScript::AudioDriverJavaScript() {
+
+ mix_rate = 44100;
+ singleton_js = this;
}
diff --git a/platform/javascript/audio_driver_javascript.h b/platform/javascript/audio_driver_javascript.h
index c5cebe800f..c3adeca07b 100644
--- a/platform/javascript/audio_driver_javascript.h
+++ b/platform/javascript/audio_driver_javascript.h
@@ -35,7 +35,23 @@
#include "os/mutex.h"
class AudioDriverJavaScript : public AudioDriver {
+
+ enum {
+ INTERNAL_BUFFER_SIZE = 4096,
+ STREAM_SCALE_BITS = 12
+
+ };
+
+ int mix_rate;
+ float *internal_buffer;
+ int internal_buffer_channels;
+ int internal_buffer_size;
+ int32_t *stream_buffer;
+
public:
+ void mix_to_js(int p_frames);
+ static AudioDriverJavaScript *singleton_js;
+
virtual const char *get_name() const;
virtual Error init();
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py
index cc29ad8956..a2988d9c60 100644
--- a/platform/javascript/detect.py
+++ b/platform/javascript/detect.py
@@ -13,7 +13,7 @@ def get_name():
def can_build():
- return ("EMSCRIPTEN_ROOT" in os.environ)
+ return ("EMSCRIPTEN_ROOT" in os.environ or "EMSCRIPTEN" in os.environ)
def get_opts():
@@ -66,7 +66,10 @@ def configure(env):
## Compiler configuration
env['ENV'] = os.environ
- env.PrependENVPath('PATH', os.environ['EMSCRIPTEN_ROOT'])
+ if ("EMSCRIPTEN_ROOT" in os.environ):
+ env.PrependENVPath('PATH', os.environ['EMSCRIPTEN_ROOT'])
+ elif ("EMSCRIPTEN" in os.environ):
+ env.PrependENVPath('PATH', os.environ['EMSCRIPTEN'])
env['CC'] = 'emcc'
env['CXX'] = 'em++'
env['LINK'] = 'emcc'
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index 05adfeb0f5..420bb50af9 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -219,6 +219,9 @@ public:
virtual bool _check_internal_feature_support(const String &p_feature);
+ virtual void set_use_vsync(bool p_enable);
+ virtual bool is_vsync_enabled() const;
+
void run();
void set_mouse_mode(MouseMode p_mode);
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index 2c81a02014..33586086dc 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -1206,7 +1206,9 @@ typedef UnixTerminalLogger OSXTerminalLogger;
void OS_OSX::initialize_logger() {
Vector<Logger *> loggers;
loggers.push_back(memnew(OSXTerminalLogger));
- loggers.push_back(memnew(RotatedFileLogger("user://logs/log.txt")));
+ // FIXME: Reenable once we figure out how to get this properly in user://
+ // instead of littering the user's working dirs (res:// + pwd) with log files (GH-12277)
+ //loggers.push_back(memnew(RotatedFileLogger("user://logs/log.txt")));
_set_logger(memnew(CompositeLogger(loggers)));
}
@@ -1832,6 +1834,8 @@ OS::LatinKeyboardVariant OS_OSX::get_latin_keyboard_variant() const {
layout = LATIN_KEYBOARD_DVORAK;
} else if ([test isEqualToString:@"xvlcwk"]) {
layout = LATIN_KEYBOARD_NEO;
+ } else if ([test isEqualToString:@"qwfpgj"]) {
+ layout = LATIN_KEYBOARD_COLEMAK;
}
[test release];
@@ -1954,6 +1958,23 @@ Error OS_OSX::move_to_trash(const String &p_path) {
return OK;
}
+void OS_OSX::set_use_vsync(bool p_enable) {
+ CGLContextObj ctx = CGLGetCurrentContext();
+ if (ctx) {
+ GLint swapInterval = p_enable ? 1 : 0;
+ CGLSetParameter(ctx, kCGLCPSwapInterval, &swapInterval);
+ }
+}
+
+bool OS_OSX::is_vsync_enabled() const {
+ GLint swapInterval = 0;
+ CGLContextObj ctx = CGLGetCurrentContext();
+ if (ctx) {
+ CGLGetParameter(ctx, kCGLCPSwapInterval, &swapInterval);
+ }
+ return swapInterval ? true : false;
+}
+
OS_OSX *OS_OSX::singleton = NULL;
OS_OSX::OS_OSX() {
diff --git a/platform/uwp/SCsub b/platform/uwp/SCsub
index 7ee5aa2ac3..bbd329a7e5 100644
--- a/platform/uwp/SCsub
+++ b/platform/uwp/SCsub
@@ -8,6 +8,7 @@ files = [
'#platform/windows/packet_peer_udp_winsock.cpp',
'#platform/windows/stream_peer_winsock.cpp',
'#platform/windows/key_mapping_win.cpp',
+ '#platform/windows/windows_terminal_logger.cpp',
'joypad_uwp.cpp',
'power_uwp.cpp',
'gl_context_egl.cpp',
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp
index ff5a935229..c67e5bae05 100644
--- a/platform/uwp/os_uwp.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -186,7 +186,9 @@ void OSUWP::initialize_core() {
void OSUWP::initialize_logger() {
Vector<Logger *> loggers;
loggers.push_back(memnew(WindowsTerminalLogger));
- loggers.push_back(memnew(RotatedFileLogger("user://logs/log.txt")));
+ // FIXME: Reenable once we figure out how to get this properly in user://
+ // instead of littering the user's working dirs (res:// + pwd) with log files (GH-12277)
+ //loggers.push_back(memnew(RotatedFileLogger("user://logs/log.txt")));
_set_logger(memnew(CompositeLogger(loggers)));
}
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index cd4230acd4..bac5df5668 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -264,10 +264,7 @@ def configure(env):
if env['use_lto']:
env.Append(CCFLAGS=['-flto'])
- if not env['use_llvm'] and env.GetOption("num_jobs") > 1:
- env.Append(LINKFLAGS=['-flto=' + str(env.GetOption("num_jobs"))])
- else:
- env.Append(LINKFLAGS=['-flto'])
+ env.Append(LINKFLAGS=['-flto=' + str(env.GetOption("num_jobs"))])
## Compile flags
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index c27e7c0d2b..ac78dddf0c 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -209,7 +209,9 @@ void OS_Windows::initialize_core() {
void OS_Windows::initialize_logger() {
Vector<Logger *> loggers;
loggers.push_back(memnew(WindowsTerminalLogger));
- loggers.push_back(memnew(RotatedFileLogger("user://logs/log.txt")));
+ // FIXME: Reenable once we figure out how to get this properly in user://
+ // instead of littering the user's working dirs (res:// + pwd) with log files (GH-12277)
+ //loggers.push_back(memnew(RotatedFileLogger("user://logs/log.txt")));
_set_logger(memnew(CompositeLogger(loggers)));
}
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 8c68c9ffd1..56bc1d4c59 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -101,6 +101,10 @@ def configure(env):
## Compiler configuration
+ if 'CXX' in env and 'clang' in env['CXX']:
+ # Convenience check to enforce the use_llvm overrides when CXX is clang(++)
+ env['use_llvm'] = True
+
if env['use_llvm']:
if ('clang++' not in env['CXX']):
env["CC"] = "clang"
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 48e2d8f81e..09193e0a2b 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -2253,6 +2253,38 @@ Error OS_X11::move_to_trash(const String &p_path) {
return err;
}
+OS::LatinKeyboardVariant OS_X11::get_latin_keyboard_variant() const {
+
+ XkbDescRec *xkbdesc = XkbAllocKeyboard();
+ ERR_FAIL_COND_V(!xkbdesc, LATIN_KEYBOARD_QWERTY);
+
+ XkbGetNames(x11_display, XkbSymbolsNameMask, xkbdesc);
+ ERR_FAIL_COND_V(!xkbdesc->names, LATIN_KEYBOARD_QWERTY);
+ ERR_FAIL_COND_V(!xkbdesc->names->symbols, LATIN_KEYBOARD_QWERTY);
+
+ char *layout = XGetAtomName(x11_display, xkbdesc->names->symbols);
+ ERR_FAIL_COND_V(!layout, LATIN_KEYBOARD_QWERTY);
+
+ Vector<String> info = String(layout).split("+");
+ ERR_FAIL_INDEX_V(1, info.size(), LATIN_KEYBOARD_QWERTY);
+
+ if (info[1].find("colemak") != -1) {
+ return LATIN_KEYBOARD_COLEMAK;
+ } else if (info[1].find("qwertz") != -1) {
+ return LATIN_KEYBOARD_QWERTZ;
+ } else if (info[1].find("azerty") != -1) {
+ return LATIN_KEYBOARD_AZERTY;
+ } else if (info[1].find("qzerty") != -1) {
+ return LATIN_KEYBOARD_QZERTY;
+ } else if (info[1].find("dvorak") != -1) {
+ return LATIN_KEYBOARD_DVORAK;
+ } else if (info[1].find("neo") != -1) {
+ return LATIN_KEYBOARD_NEO;
+ }
+
+ return LATIN_KEYBOARD_QWERTY;
+}
+
OS_X11::OS_X11() {
#ifdef PULSEAUDIO_ENABLED
diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h
index 36355f11bc..b71b456d49 100644
--- a/platform/x11/os_x11.h
+++ b/platform/x11/os_x11.h
@@ -275,6 +275,8 @@ public:
virtual Error move_to_trash(const String &p_path);
+ virtual LatinKeyboardVariant get_latin_keyboard_variant() const;
+
OS_X11();
};
diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp
index 35f94bff59..c53241e985 100644
--- a/scene/2d/navigation_polygon.cpp
+++ b/scene/2d/navigation_polygon.cpp
@@ -452,7 +452,7 @@ String NavigationPolygonInstance::get_configuration_warning() const {
return String();
}
- c = Object::cast_to<Node2D>(get_parent());
+ c = Object::cast_to<Node2D>(c->get_parent());
}
return TTR("NavigationPolygonInstance must be a child or grandchild to a Navigation2D node. It only provides navigation data.");
diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp
index fa656bdcd3..ff23b3183b 100644
--- a/scene/2d/ray_cast_2d.cpp
+++ b/scene/2d/ray_cast_2d.cpp
@@ -61,6 +61,21 @@ void RayCast2D::set_type_mask(uint32_t p_mask) {
type_mask = p_mask;
}
+void RayCast2D::set_collision_mask_bit(int p_bit, bool p_value) {
+
+ uint32_t mask = get_collision_mask();
+ if (p_value)
+ mask |= 1 << p_bit;
+ else
+ mask &= ~(1 << p_bit);
+ set_collision_mask(mask);
+}
+
+bool RayCast2D::get_collision_mask_bit(int p_bit) const {
+
+ return get_collision_mask() & (1 << p_bit);
+}
+
uint32_t RayCast2D::get_type_mask() const {
return type_mask;
@@ -279,6 +294,9 @@ void RayCast2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_collision_mask", "mask"), &RayCast2D::set_collision_mask);
ClassDB::bind_method(D_METHOD("get_collision_mask"), &RayCast2D::get_collision_mask);
+ ClassDB::bind_method(D_METHOD("set_collision_mask_bit", "bit", "value"), &RayCast2D::set_collision_mask_bit);
+ ClassDB::bind_method(D_METHOD("get_collision_mask_bit", "bit"), &RayCast2D::get_collision_mask_bit);
+
ClassDB::bind_method(D_METHOD("set_type_mask", "mask"), &RayCast2D::set_type_mask);
ClassDB::bind_method(D_METHOD("get_type_mask"), &RayCast2D::get_type_mask);
diff --git a/scene/2d/ray_cast_2d.h b/scene/2d/ray_cast_2d.h
index da1be84307..c13ddfdc58 100644
--- a/scene/2d/ray_cast_2d.h
+++ b/scene/2d/ray_cast_2d.h
@@ -64,6 +64,9 @@ public:
void set_collision_mask(uint32_t p_mask);
uint32_t get_collision_mask() const;
+ void set_collision_mask_bit(int p_bit, bool p_value);
+ bool get_collision_mask_bit(int p_bit) const;
+
void set_type_mask(uint32_t p_mask);
uint32_t get_type_mask() const;
diff --git a/scene/3d/SCsub b/scene/3d/SCsub
index 72739b527e..4008f4f196 100644
--- a/scene/3d/SCsub
+++ b/scene/3d/SCsub
@@ -7,6 +7,9 @@ if env['disable_3d']:
env.scene_sources.append("3d/spatial.cpp")
env.scene_sources.append("3d/skeleton.cpp")
+ env.scene_sources.append("3d/particles.cpp")
+ env.scene_sources.append("3d/visual_instance.cpp")
+ env.scene_sources.append("3d/scenario_fx.cpp")
else:
env.add_source_files(env.scene_sources, "*.cpp")
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp
index d5a030b35c..c0ca358717 100644
--- a/scene/3d/gi_probe.cpp
+++ b/scene/3d/gi_probe.cpp
@@ -1134,6 +1134,10 @@ void GIProbe::_find_meshes(Node *p_at_node, Baker *p_baker) {
}
}
+GIProbe::BakeBeginFunc GIProbe::bake_begin_function = NULL;
+GIProbe::BakeStepFunc GIProbe::bake_step_function = NULL;
+GIProbe::BakeEndFunc GIProbe::bake_end_function = NULL;
+
void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug) {
Baker baker;
@@ -1177,14 +1181,25 @@ void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug) {
_find_meshes(p_from_node ? p_from_node : get_parent(), &baker);
+ if (bake_begin_function) {
+ bake_begin_function(baker.mesh_list.size() + 1);
+ }
+
int pmc = 0;
for (List<Baker::PlotMesh>::Element *E = baker.mesh_list.front(); E; E = E->next()) {
- print_line("plotting mesh " + itos(pmc++) + "/" + itos(baker.mesh_list.size()));
+ if (bake_step_function) {
+ bake_step_function(pmc, RTR("Plotting Meshes") + " " + itos(pmc) + "/" + itos(baker.mesh_list.size()));
+ }
+
+ pmc++;
_plot_mesh(E->get().local_xform, E->get().mesh, &baker, E->get().instance_materials, E->get().override_material);
}
+ if (bake_step_function) {
+ bake_step_function(pmc++, RTR("Finishing Plot"));
+ }
_fixup_plot(0, 0, 0, 0, 0, &baker);
@@ -1282,6 +1297,10 @@ void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug) {
set_probe_data(probe_data);
}
+
+ if (bake_end_function) {
+ bake_end_function();
+ }
}
void GIProbe::_debug_mesh(int p_idx, int p_level, const Rect3 &p_aabb, Ref<MultiMesh> &p_multimesh, int &idx, Baker *p_baker) {
diff --git a/scene/3d/gi_probe.h b/scene/3d/gi_probe.h
index 5a06984a47..50d0c33d4f 100644
--- a/scene/3d/gi_probe.h
+++ b/scene/3d/gi_probe.h
@@ -95,6 +95,10 @@ public:
};
+ typedef void (*BakeBeginFunc)(int);
+ typedef void (*BakeStepFunc)(int, const String &);
+ typedef void (*BakeEndFunc)();
+
private:
//stuff used for bake
struct Baker {
@@ -190,6 +194,10 @@ protected:
static void _bind_methods();
public:
+ static BakeBeginFunc bake_begin_function;
+ static BakeStepFunc bake_step_function;
+ static BakeEndFunc bake_end_function;
+
void set_probe_data(const Ref<GIProbeData> &p_data);
Ref<GIProbeData> get_probe_data() const;
diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp
index e994f4c79e..02d10523e7 100644
--- a/scene/3d/light.cpp
+++ b/scene/3d/light.cpp
@@ -369,12 +369,6 @@ DirectionalLight::DirectionalLight()
set_shadow_depth_range(SHADOW_DEPTH_RANGE_STABLE);
blend_splits = false;
-
-#ifdef TOOLS_ENABLED
- if (Engine::get_singleton()->is_editor_hint())
- // Create light with a default natural "sun" orientation in editor, instead of looking horizontally on X
- set_rotation_in_degrees(Vector3(-50, 25, 30));
-#endif
}
void OmniLight::set_shadow_mode(ShadowMode p_mode) {
diff --git a/scene/3d/ray_cast.cpp b/scene/3d/ray_cast.cpp
index 296bddf0a3..9f61cc64ea 100644
--- a/scene/3d/ray_cast.cpp
+++ b/scene/3d/ray_cast.cpp
@@ -63,6 +63,21 @@ void RayCast::set_type_mask(uint32_t p_mask) {
type_mask = p_mask;
}
+void RayCast::set_collision_mask_bit(int p_bit, bool p_value) {
+
+ uint32_t mask = get_collision_mask();
+ if (p_value)
+ mask |= 1 << p_bit;
+ else
+ mask &= ~(1 << p_bit);
+ set_collision_mask(mask);
+}
+
+bool RayCast::get_collision_mask_bit(int p_bit) const {
+
+ return get_collision_mask() & (1 << p_bit);
+}
+
uint32_t RayCast::get_type_mask() const {
return type_mask;
@@ -248,6 +263,9 @@ void RayCast::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_collision_mask", "mask"), &RayCast::set_collision_mask);
ClassDB::bind_method(D_METHOD("get_collision_mask"), &RayCast::get_collision_mask);
+ ClassDB::bind_method(D_METHOD("set_collision_mask_bit", "bit", "value"), &RayCast::set_collision_mask_bit);
+ ClassDB::bind_method(D_METHOD("get_collision_mask_bit", "bit"), &RayCast::get_collision_mask_bit);
+
ClassDB::bind_method(D_METHOD("set_type_mask", "mask"), &RayCast::set_type_mask);
ClassDB::bind_method(D_METHOD("get_type_mask"), &RayCast::get_type_mask);
diff --git a/scene/3d/ray_cast.h b/scene/3d/ray_cast.h
index cd3cf3c913..cac1596264 100644
--- a/scene/3d/ray_cast.h
+++ b/scene/3d/ray_cast.h
@@ -72,6 +72,9 @@ public:
void set_collision_mask(uint32_t p_mask);
uint32_t get_collision_mask() const;
+ void set_collision_mask_bit(int p_bit, bool p_value);
+ bool get_collision_mask_bit(int p_bit) const;
+
void set_type_mask(uint32_t p_mask);
uint32_t get_type_mask() const;
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index d8ff048dfb..6ade4fcc38 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -759,38 +759,42 @@ FileDialog::FileDialog() {
mode = MODE_SAVE_FILE;
set_title(RTR("Save a File"));
+ HBoxContainer *hbc = memnew(HBoxContainer);
+ hbc->add_child(memnew(Label(RTR("Path:"))));
dir = memnew(LineEdit);
- HBoxContainer *pathhb = memnew(HBoxContainer);
- pathhb->add_child(dir);
+ hbc->add_child(dir);
dir->set_h_size_flags(SIZE_EXPAND_FILL);
refresh = memnew(ToolButton);
refresh->connect("pressed", this, "_update_file_list");
- pathhb->add_child(refresh);
+ hbc->add_child(refresh);
drives = memnew(OptionButton);
- pathhb->add_child(drives);
+ hbc->add_child(drives);
drives->connect("item_selected", this, "_select_drive");
makedir = memnew(Button);
makedir->set_text(RTR("Create Folder"));
makedir->connect("pressed", this, "_make_dir");
- pathhb->add_child(makedir);
-
- vbc->add_margin_child(RTR("Path:"), pathhb);
+ hbc->add_child(makedir);
+ vbc->add_child(hbc);
tree = memnew(Tree);
tree->set_hide_root(true);
vbc->add_margin_child(RTR("Directories & Files:"), tree, true);
+ hbc = memnew(HBoxContainer);
+ hbc->add_child(memnew(Label(RTR("File:"))));
file = memnew(LineEdit);
- //add_child(file);
- vbc->add_margin_child(RTR("File:"), file);
-
+ file->set_stretch_ratio(4);
+ file->set_h_size_flags(SIZE_EXPAND_FILL);
+ hbc->add_child(file);
filter = memnew(OptionButton);
- //add_child(filter);
- vbc->add_margin_child(RTR("Filter:"), filter);
+ filter->set_stretch_ratio(3);
+ filter->set_h_size_flags(SIZE_EXPAND_FILL);
filter->set_clip_text(true); //too many extensions overflow it
+ hbc->add_child(filter);
+ vbc->add_child(hbc);
dir_access = DirAccess::create(DirAccess::ACCESS_RESOURCES);
access = ACCESS_RESOURCES;
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 623a110263..3203b38d40 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -781,9 +781,7 @@ void ItemList::_notification(int p_what) {
}
if (has_focus()) {
- VisualServer::get_singleton()->canvas_item_add_clip_ignore(get_canvas_item(), true);
draw_style_box(get_stylebox("bg_focus"), Rect2(Point2(), size));
- VisualServer::get_singleton()->canvas_item_add_clip_ignore(get_canvas_item(), false);
}
if (shape_changed) {
@@ -1429,7 +1427,6 @@ ItemList::ItemList() {
allow_rmb_select = false;
icon_scale = 1.0f;
- set_clip_contents(true);
}
ItemList::~ItemList() {
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index ed8eff436c..40e2dba6c2 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -161,13 +161,14 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
} break;
- case (KEY_Z): { // Simple One level undo
-
+ case (KEY_Z): { // undo / redo
if (editable) {
-
- undo();
+ if (k->get_shift()) {
+ redo();
+ } else {
+ undo();
+ }
}
-
} break;
case (KEY_U): { // Delete from start to cursor
@@ -175,7 +176,6 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
if (editable) {
selection_clear();
- undo_text = text;
text = text.substr(cursor_pos, text.length() - cursor_pos);
Ref<Font> font = get_font("font");
@@ -205,7 +205,6 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
if (editable) {
selection_clear();
- undo_text = text;
text = text.substr(0, cursor_pos);
_text_changed();
}
@@ -245,7 +244,6 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
break;
if (selection.enabled) {
- undo_text = text;
selection_delete();
break;
}
@@ -276,7 +274,6 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
set_cursor_position(cc);
} else {
- undo_text = text;
delete_char();
}
@@ -382,7 +379,6 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
}
if (selection.enabled) {
- undo_text = text;
selection_delete();
break;
}
@@ -417,7 +413,6 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
delete_text(cursor_pos, cc);
} else {
- undo_text = text;
set_cursor_position(cursor_pos + 1);
delete_char();
}
@@ -778,7 +773,6 @@ void LineEdit::copy_text() {
void LineEdit::cut_text() {
if (selection.enabled) {
- undo_text = text;
OS::get_singleton()->set_clipboard(text.substr(selection.begin, selection.end - selection.begin));
selection_delete();
}
@@ -798,23 +792,33 @@ void LineEdit::paste_text() {
}
void LineEdit::undo() {
-
- int old_cursor_pos = cursor_pos;
- text = undo_text;
-
- Ref<Font> font = get_font("font");
-
- cached_width = 0;
- for (int i = 0; i < text.length(); i++)
- cached_width += font->get_char_size(text[i]).width;
-
- if (old_cursor_pos > text.length()) {
- set_cursor_position(text.length());
- } else {
- set_cursor_position(old_cursor_pos);
+ if (undo_stack_pos == NULL) {
+ if (undo_stack.size() <= 1) {
+ return;
+ }
+ undo_stack_pos = undo_stack.back();
+ } else if (undo_stack_pos == undo_stack.front()) {
+ return;
}
+ undo_stack_pos = undo_stack_pos->prev();
+ TextOperation op = undo_stack_pos->get();
+ text = op.text;
+ set_cursor_position(op.cursor_pos);
+ _emit_text_change();
+}
- _text_changed();
+void LineEdit::redo() {
+ if (undo_stack_pos == NULL) {
+ return;
+ }
+ if (undo_stack_pos == undo_stack.back()) {
+ return;
+ }
+ undo_stack_pos = undo_stack_pos->next();
+ TextOperation op = undo_stack_pos->get();
+ text = op.text;
+ set_cursor_position(op.cursor_pos);
+ _emit_text_change();
}
void LineEdit::shift_selection_check_pre(bool p_shift) {
@@ -947,8 +951,6 @@ void LineEdit::delete_char() {
void LineEdit::delete_text(int p_from_column, int p_to_column) {
- undo_text = text;
-
if (text.size() > 0) {
Ref<Font> font = get_font("font");
if (font != NULL) {
@@ -1036,9 +1038,11 @@ void LineEdit::set_cursor_position(int p_pos) {
Ref<StyleBox> style = get_stylebox("normal");
Ref<Font> font = get_font("font");
- if (cursor_pos < window_pos) {
+ if (cursor_pos <= window_pos) {
/* Adjust window if cursor goes too much to the left */
- set_window_pos(cursor_pos);
+ if (window_pos > 0)
+ set_window_pos(window_pos - 1);
+
} else if (cursor_pos > window_pos) {
/* Adjust window if cursor goes too much to the right */
int window_width = get_size().width - style->get_minimum_size().width;
@@ -1086,8 +1090,6 @@ void LineEdit::append_at_cursor(String p_text) {
if ((max_length <= 0) || (text.length() + p_text.length() <= max_length)) {
- undo_text = text;
-
Ref<Font> font = get_font("font");
if (font != NULL) {
for (int i = 0; i < p_text.length(); i++)
@@ -1105,6 +1107,7 @@ void LineEdit::append_at_cursor(String p_text) {
void LineEdit::clear_internal() {
+ _clear_undo_stack();
cached_width = 0;
cursor_pos = 0;
window_pos = 0;
@@ -1275,6 +1278,11 @@ void LineEdit::menu_option(int p_option) {
undo();
}
} break;
+ case MENU_REDO: {
+ if (editable) {
+ redo();
+ }
+ }
}
}
@@ -1312,10 +1320,43 @@ void LineEdit::_text_changed() {
if (expand_to_text_length)
minimum_size_changed();
+ _emit_text_change();
+ _clear_redo();
+}
+
+void LineEdit::_emit_text_change() {
emit_signal("text_changed", text);
_change_notify("text");
}
+void LineEdit::_clear_redo() {
+ _create_undo_state();
+ if (undo_stack_pos == NULL) {
+ return;
+ }
+
+ undo_stack_pos = undo_stack_pos->next();
+ while (undo_stack_pos) {
+ List<TextOperation>::Element *elem = undo_stack_pos;
+ undo_stack_pos = undo_stack_pos->next();
+ undo_stack.erase(elem);
+ }
+ _create_undo_state();
+}
+
+void LineEdit::_clear_undo_stack() {
+ undo_stack.clear();
+ undo_stack_pos = NULL;
+ _create_undo_state();
+}
+
+void LineEdit::_create_undo_state() {
+ TextOperation op;
+ op.text = text;
+ op.cursor_pos = cursor_pos;
+ undo_stack.push_back(op);
+}
+
void LineEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("_toggle_draw_caret"), &LineEdit::_toggle_draw_caret);
@@ -1369,6 +1410,7 @@ void LineEdit::_bind_methods() {
BIND_ENUM_CONSTANT(MENU_CLEAR);
BIND_ENUM_CONSTANT(MENU_SELECT_ALL);
BIND_ENUM_CONSTANT(MENU_UNDO);
+ BIND_ENUM_CONSTANT(MENU_REDO);
BIND_ENUM_CONSTANT(MENU_MAX);
ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "text"), "set_text", "get_text");
@@ -1388,6 +1430,8 @@ void LineEdit::_bind_methods() {
LineEdit::LineEdit() {
+ undo_stack_pos = NULL;
+ _create_undo_state();
align = ALIGN_LEFT;
cached_width = 0;
cursor_pos = 0;
@@ -1421,6 +1465,7 @@ LineEdit::LineEdit() {
menu->add_item(TTR("Clear"), MENU_CLEAR);
menu->add_separator();
menu->add_item(TTR("Undo"), MENU_UNDO, KEY_MASK_CMD | KEY_Z);
+ menu->add_item(TTR("Redo"), MENU_REDO, KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_Z);
menu->connect("id_pressed", this, "menu_option");
expand_to_text_length = false;
}
diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h
index 661f9b60b9..bece29a37d 100644
--- a/scene/gui/line_edit.h
+++ b/scene/gui/line_edit.h
@@ -56,6 +56,7 @@ public:
MENU_CLEAR,
MENU_SELECT_ALL,
MENU_UNDO,
+ MENU_REDO,
MENU_MAX
};
@@ -92,10 +93,22 @@ private:
bool drag_attempt;
} selection;
+ struct TextOperation {
+ int cursor_pos;
+ String text;
+ };
+ List<TextOperation> undo_stack;
+ List<TextOperation>::Element *undo_stack_pos;
+
+ void _clear_undo_stack();
+ void _clear_redo();
+ void _create_undo_state();
+
Timer *caret_blink_timer;
static void _ime_text_callback(void *p_self, String p_text, Point2 p_selection);
void _text_changed();
+ void _emit_text_change();
bool expand_to_text_length;
bool caret_blink_enabled;
@@ -166,6 +179,7 @@ public:
void cut_text();
void paste_text();
void undo();
+ void redo();
void set_editable(bool p_editable);
bool is_editable() const;
diff --git a/scene/gui/patch_9_rect.cpp b/scene/gui/nine_patch_rect.cpp
index 92c34dd3f9..c02d80bba8 100644
--- a/scene/gui/patch_9_rect.cpp
+++ b/scene/gui/nine_patch_rect.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* patch_9_rect.cpp */
+/* nine_patch_rect.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -27,7 +27,7 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "patch_9_rect.h"
+#include "nine_patch_rect.h"
#include "servers/visual_server.h"
diff --git a/scene/gui/patch_9_rect.h b/scene/gui/nine_patch_rect.h
index 808b7a1f5d..809daf9db3 100644
--- a/scene/gui/patch_9_rect.h
+++ b/scene/gui/nine_patch_rect.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* patch_9_rect.h */
+/* nine_patch_rect.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -27,8 +27,8 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef PATCH_9_FRAME_H
-#define PATCH_9_FRAME_H
+#ifndef NINE_PATCH_RECT_H
+#define NINE_PATCH_RECT_H
#include "scene/gui/control.h"
/**
@@ -81,4 +81,4 @@ public:
};
VARIANT_ENUM_CAST(NinePatchRect::AxisStretchMode)
-#endif // PATCH_9_FRAME_H
+#endif // NINE_PATCH_RECT_H
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp
index cfe924ecd4..581034ddee 100644
--- a/scene/gui/tab_container.cpp
+++ b/scene/gui/tab_container.cpp
@@ -90,6 +90,10 @@ void TabContainer::_gui_input(const Ref<InputEvent> &p_event) {
return;
}
+ // Do not activate tabs when tabs is empty
+ if (get_tab_count() == 0)
+ return;
+
Vector<Control *> tabs = _get_tabs();
// Handle navigation buttons.
@@ -298,6 +302,8 @@ void TabContainer::_notification(int p_what) {
}
int TabContainer::_get_tab_width(int p_index) const {
+
+ ERR_FAIL_INDEX_V(p_index, get_tab_count(), 0);
Control *control = Object::cast_to<Control>(_get_tabs()[p_index]);
if (!control || control->is_set_as_toplevel())
return 0;
@@ -669,6 +675,7 @@ void TabContainer::_bind_methods() {
TabContainer::TabContainer() {
first_tab_cache = 0;
+ last_tab_cache = 0;
buttons_visible_cache = false;
tabs_ofs_cache = 0;
current = 0;
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 977ba2da7c..2d55c077f1 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -734,7 +734,7 @@ void TextEdit::_notification(int p_what) {
if (str.length() == 0) {
// draw line background if empty as we won't loop at at all
- if (line == cursor.line) {
+ if (line == cursor.line && highlight_current_line) {
VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(0, ofs_y, xmargin_end, get_row_height()), cache.current_line_color);
}
@@ -965,7 +965,7 @@ void TextEdit::_notification(int p_what) {
//current line highlighting
bool in_selection = (selection.active && line >= selection.from_line && line <= selection.to_line && (line > selection.from_line || j >= selection.from_column) && (line < selection.to_line || j < selection.to_column));
- if (line == cursor.line) {
+ if (line == cursor.line && highlight_current_line) {
// if its the first char draw behind line numbers
if (j == 0) {
VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(0, ofs_y, (char_ofs + char_margin), get_row_height()), cache.current_line_color);
@@ -4489,7 +4489,13 @@ void TextEdit::_update_completion_candidates() {
completion_index = 0;
completion_base = s;
Vector<float> sim_cache;
+ bool single_quote = s.begins_with("'");
+
for (int i = 0; i < completion_strings.size(); i++) {
+ if (single_quote && completion_strings[i].is_quoted()) {
+ completion_strings[i] = completion_strings[i].unquote().quote("'");
+ }
+
if (s == completion_strings[i]) {
// A perfect match, stop completion
_cancel_completion();
@@ -4732,6 +4738,15 @@ int TextEdit::get_breakpoint_gutter_width() const {
return cache.breakpoint_gutter_width;
}
+void TextEdit::set_highlight_current_line(bool p_enabled) {
+ highlight_current_line = p_enabled;
+ update();
+}
+
+bool TextEdit::is_highlight_current_line_enabled() const {
+ return highlight_current_line;
+}
+
bool TextEdit::is_text_field() const {
return true;
@@ -4859,6 +4874,9 @@ void TextEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_syntax_coloring", "enable"), &TextEdit::set_syntax_coloring);
ClassDB::bind_method(D_METHOD("is_syntax_coloring_enabled"), &TextEdit::is_syntax_coloring_enabled);
+ ClassDB::bind_method(D_METHOD("set_highlight_current_line", "enabled"), &TextEdit::set_highlight_current_line);
+ ClassDB::bind_method(D_METHOD("is_highlight_current_line_enabled"), &TextEdit::is_highlight_current_line_enabled);
+
ClassDB::bind_method(D_METHOD("set_smooth_scroll_enable", "enable"), &TextEdit::set_smooth_scroll_enabled);
ClassDB::bind_method(D_METHOD("is_smooth_scroll_enabled"), &TextEdit::is_smooth_scroll_enabled);
ClassDB::bind_method(D_METHOD("set_v_scroll_speed", "speed"), &TextEdit::set_v_scroll_speed);
@@ -4870,6 +4888,7 @@ void TextEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("menu_option", "option"), &TextEdit::menu_option);
ClassDB::bind_method(D_METHOD("get_menu"), &TextEdit::get_menu);
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "highlight_current_line"), "set_highlight_current_line", "is_highlight_current_line_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "syntax_highlighting"), "set_syntax_coloring", "is_syntax_coloring_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_line_numbers"), "set_show_line_numbers", "is_show_line_numbers_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "highlight_all_occurrences"), "set_highlight_all_occurrences", "is_highlight_all_occurrences_enabled");
@@ -4991,6 +5010,7 @@ TextEdit::TextEdit() {
auto_brace_completion_enabled = false;
brace_matching_enabled = false;
highlight_all_occurrences = false;
+ highlight_current_line = false;
indent_using_spaces = false;
space_indent = " ";
auto_indent = false;
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index 03f412729d..b4b14d0139 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -253,6 +253,7 @@ class TextEdit : public Control {
bool scroll_past_end_of_file_enabled;
bool auto_brace_completion_enabled;
bool brace_matching_enabled;
+ bool highlight_current_line;
bool auto_indent;
bool cut_copy_line;
bool insert_mode;
@@ -514,6 +515,9 @@ public:
void set_show_line_numbers(bool p_show);
bool is_show_line_numbers_enabled() const;
+ void set_highlight_current_line(bool p_enabled);
+ bool is_highlight_current_line_enabled() const;
+
void set_line_numbers_zero_padded(bool p_zero_padded);
void set_show_line_length_guideline(bool p_show);
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 931dcfed91..5c6f2b0d01 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -1126,7 +1126,7 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
if (p_item->cells[i].selected && select_mode != SELECT_ROW) {
- Rect2i r(item_rect.position, item_rect.size);
+ Rect2i r(cell_rect.position, cell_rect.size);
if (p_item->cells[i].text.size() > 0) {
float icon_width = p_item->cells[i].get_icon_size().width;
r.position.x += icon_width;
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index 75268aad1f..eaa16069cf 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -86,7 +86,7 @@
#include "scene/gui/option_button.h"
#include "scene/gui/panel.h"
#include "scene/gui/panel_container.h"
-#include "scene/gui/patch_9_rect.h"
+#include "scene/gui/nine_patch_rect.h"
#include "scene/gui/popup_menu.h"
#include "scene/gui/progress_bar.h"
#include "scene/gui/reference_rect.h"
@@ -152,6 +152,10 @@
#include "scene/resources/world_2d.h"
#include "scene/scene_string_names.h"
+#include "scene/3d/particles.h"
+#include "scene/3d/scenario_fx.h"
+#include "scene/3d/spatial.h"
+
#ifndef _3D_DISABLED
#include "scene/3d/area.h"
#include "scene/3d/arvr_nodes.h"
@@ -169,7 +173,6 @@
#include "scene/3d/multimesh_instance.h"
#include "scene/3d/navigation.h"
#include "scene/3d/navigation_mesh.h"
-#include "scene/3d/particles.h"
#include "scene/3d/path.h"
#include "scene/3d/physics_body.h"
#include "scene/3d/physics_joint.h"
@@ -180,9 +183,7 @@
#include "scene/3d/reflection_probe.h"
#include "scene/3d/remote_transform.h"
#include "scene/3d/room_instance.h"
-#include "scene/3d/scenario_fx.h"
#include "scene/3d/skeleton.h"
-#include "scene/3d/spatial.h"
#include "scene/3d/sprite_3d.h"
#include "scene/3d/vehicle_body.h"
#include "scene/3d/visibility_notifier.h"
@@ -541,6 +542,7 @@ void register_scene_types() {
ClassDB::register_class<StyleBoxEmpty>();
ClassDB::register_class<StyleBoxTexture>();
ClassDB::register_class<StyleBoxFlat>();
+ ClassDB::register_class<StyleBoxLine>();
ClassDB::register_class<Theme>();
ClassDB::register_class<PolygonPathFinder>();
@@ -551,7 +553,9 @@ void register_scene_types() {
ClassDB::register_class<AudioStreamPlayer>();
ClassDB::register_class<AudioStreamPlayer2D>();
+#ifndef _3D_DISABLED
ClassDB::register_class<AudioStreamPlayer3D>();
+#endif
ClassDB::register_virtual_class<VideoStream>();
ClassDB::register_class<AudioStreamSample>();
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index 4c6fa7c8a1..232f690074 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -377,7 +377,7 @@ bool Environment::is_ssr_rough() const {
void Environment::set_ssao_enabled(bool p_enable) {
ssao_enabled = p_enable;
- VS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_radius2, ssao_intensity2, ssao_bias, ssao_direct_light_affect, ssao_color, ssao_blur);
+ VS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_radius2, ssao_intensity2, ssao_bias, ssao_direct_light_affect, ssao_color, VS::EnvironmentSSAOQuality(ssao_quality), VS::EnvironmentSSAOBlur(ssao_blur), ssao_edge_sharpness);
_change_notify();
}
@@ -389,7 +389,7 @@ bool Environment::is_ssao_enabled() const {
void Environment::set_ssao_radius(float p_radius) {
ssao_radius = p_radius;
- VS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_radius2, ssao_intensity2, ssao_bias, ssao_direct_light_affect, ssao_color, ssao_blur);
+ VS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_radius2, ssao_intensity2, ssao_bias, ssao_direct_light_affect, ssao_color, VS::EnvironmentSSAOQuality(ssao_quality), VS::EnvironmentSSAOBlur(ssao_blur), ssao_edge_sharpness);
}
float Environment::get_ssao_radius() const {
@@ -399,7 +399,7 @@ float Environment::get_ssao_radius() const {
void Environment::set_ssao_intensity(float p_intensity) {
ssao_intensity = p_intensity;
- VS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_radius2, ssao_intensity2, ssao_bias, ssao_direct_light_affect, ssao_color, ssao_blur);
+ VS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_radius2, ssao_intensity2, ssao_bias, ssao_direct_light_affect, ssao_color, VS::EnvironmentSSAOQuality(ssao_quality), VS::EnvironmentSSAOBlur(ssao_blur), ssao_edge_sharpness);
}
float Environment::get_ssao_intensity() const {
@@ -410,7 +410,7 @@ float Environment::get_ssao_intensity() const {
void Environment::set_ssao_radius2(float p_radius) {
ssao_radius2 = p_radius;
- VS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_radius2, ssao_intensity2, ssao_bias, ssao_direct_light_affect, ssao_color, ssao_blur);
+ VS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_radius2, ssao_intensity2, ssao_bias, ssao_direct_light_affect, ssao_color, VS::EnvironmentSSAOQuality(ssao_quality), VS::EnvironmentSSAOBlur(ssao_blur), ssao_edge_sharpness);
}
float Environment::get_ssao_radius2() const {
@@ -420,7 +420,7 @@ float Environment::get_ssao_radius2() const {
void Environment::set_ssao_intensity2(float p_intensity) {
ssao_intensity2 = p_intensity;
- VS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_radius2, ssao_intensity2, ssao_bias, ssao_direct_light_affect, ssao_color, ssao_blur);
+ VS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_radius2, ssao_intensity2, ssao_bias, ssao_direct_light_affect, ssao_color, VS::EnvironmentSSAOQuality(ssao_quality), VS::EnvironmentSSAOBlur(ssao_blur), ssao_edge_sharpness);
}
float Environment::get_ssao_intensity2() const {
@@ -430,7 +430,7 @@ float Environment::get_ssao_intensity2() const {
void Environment::set_ssao_bias(float p_bias) {
ssao_bias = p_bias;
- VS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_radius2, ssao_intensity2, ssao_bias, ssao_direct_light_affect, ssao_color, ssao_blur);
+ VS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_radius2, ssao_intensity2, ssao_bias, ssao_direct_light_affect, ssao_color, VS::EnvironmentSSAOQuality(ssao_quality), VS::EnvironmentSSAOBlur(ssao_blur), ssao_edge_sharpness);
}
float Environment::get_ssao_bias() const {
@@ -440,7 +440,7 @@ float Environment::get_ssao_bias() const {
void Environment::set_ssao_direct_light_affect(float p_direct_light_affect) {
ssao_direct_light_affect = p_direct_light_affect;
- VS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_radius2, ssao_intensity2, ssao_bias, ssao_direct_light_affect, ssao_color, ssao_blur);
+ VS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_radius2, ssao_intensity2, ssao_bias, ssao_direct_light_affect, ssao_color, VS::EnvironmentSSAOQuality(ssao_quality), VS::EnvironmentSSAOBlur(ssao_blur), ssao_edge_sharpness);
}
float Environment::get_ssao_direct_light_affect() const {
@@ -450,7 +450,7 @@ float Environment::get_ssao_direct_light_affect() const {
void Environment::set_ssao_color(const Color &p_color) {
ssao_color = p_color;
- VS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_radius2, ssao_intensity2, ssao_bias, ssao_direct_light_affect, ssao_color, ssao_blur);
+ VS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_radius2, ssao_intensity2, ssao_bias, ssao_direct_light_affect, ssao_color, VS::EnvironmentSSAOQuality(ssao_quality), VS::EnvironmentSSAOBlur(ssao_blur), ssao_edge_sharpness);
}
Color Environment::get_ssao_color() const {
@@ -458,16 +458,38 @@ Color Environment::get_ssao_color() const {
return ssao_color;
}
-void Environment::set_ssao_blur(bool p_enable) {
+void Environment::set_ssao_blur(SSAOBlur p_blur) {
- ssao_blur = p_enable;
- VS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_radius2, ssao_intensity2, ssao_bias, ssao_direct_light_affect, ssao_color, ssao_blur);
+ ssao_blur = p_blur;
+ VS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_radius2, ssao_intensity2, ssao_bias, ssao_direct_light_affect, ssao_color, VS::EnvironmentSSAOQuality(ssao_quality), VS::EnvironmentSSAOBlur(ssao_blur), ssao_edge_sharpness);
}
-bool Environment::is_ssao_blur_enabled() const {
+Environment::SSAOBlur Environment::get_ssao_blur() const {
return ssao_blur;
}
+void Environment::set_ssao_quality(SSAOQuality p_quality) {
+
+ ssao_quality = p_quality;
+ VS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_radius2, ssao_intensity2, ssao_bias, ssao_direct_light_affect, ssao_color, VS::EnvironmentSSAOQuality(ssao_quality), VS::EnvironmentSSAOBlur(ssao_blur), ssao_edge_sharpness);
+}
+
+Environment::SSAOQuality Environment::get_ssao_quality() const {
+
+ return ssao_quality;
+}
+
+void Environment::set_ssao_edge_sharpness(float p_edge_sharpness) {
+
+ ssao_edge_sharpness = p_edge_sharpness;
+ VS::get_singleton()->environment_set_ssao(environment, ssao_enabled, ssao_radius, ssao_intensity, ssao_radius2, ssao_intensity2, ssao_bias, ssao_direct_light_affect, ssao_color, VS::EnvironmentSSAOQuality(ssao_quality), VS::EnvironmentSSAOBlur(ssao_blur), ssao_edge_sharpness);
+}
+
+float Environment::get_ssao_edge_sharpness() const {
+
+ return ssao_edge_sharpness;
+}
+
void Environment::set_glow_enabled(bool p_enabled) {
glow_enabled = p_enabled;
@@ -988,8 +1010,14 @@ void Environment::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_ssao_color", "color"), &Environment::set_ssao_color);
ClassDB::bind_method(D_METHOD("get_ssao_color"), &Environment::get_ssao_color);
- ClassDB::bind_method(D_METHOD("set_ssao_blur", "enabled"), &Environment::set_ssao_blur);
- ClassDB::bind_method(D_METHOD("is_ssao_blur_enabled"), &Environment::is_ssao_blur_enabled);
+ ClassDB::bind_method(D_METHOD("set_ssao_blur", "mode"), &Environment::set_ssao_blur);
+ ClassDB::bind_method(D_METHOD("get_ssao_blur"), &Environment::get_ssao_blur);
+
+ ClassDB::bind_method(D_METHOD("set_ssao_quality", "quality"), &Environment::set_ssao_quality);
+ ClassDB::bind_method(D_METHOD("get_ssao_quality"), &Environment::get_ssao_quality);
+
+ ClassDB::bind_method(D_METHOD("set_ssao_edge_sharpness", "edge_sharpness"), &Environment::set_ssao_edge_sharpness);
+ ClassDB::bind_method(D_METHOD("get_ssao_edge_sharpness"), &Environment::get_ssao_edge_sharpness);
ADD_GROUP("SSAO", "ssao_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ssao_enabled"), "set_ssao_enabled", "is_ssao_enabled");
@@ -1000,7 +1028,9 @@ void Environment::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_bias", PROPERTY_HINT_RANGE, "0.001,8,0.001"), "set_ssao_bias", "get_ssao_bias");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_light_affect", PROPERTY_HINT_RANGE, "0.00,1,0.01"), "set_ssao_direct_light_affect", "get_ssao_direct_light_affect");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ssao_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_ssao_color", "get_ssao_color");
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ssao_blur"), "set_ssao_blur", "is_ssao_blur_enabled");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "ssao_quality", PROPERTY_HINT_ENUM, "Low,Medium,High"), "set_ssao_quality", "get_ssao_quality");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "ssao_blur", PROPERTY_HINT_ENUM, "Disabled,1x1,2x2,3x3"), "set_ssao_blur", "get_ssao_blur");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_edge_sharpness", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_ssao_edge_sharpness", "get_ssao_edge_sharpness");
ClassDB::bind_method(D_METHOD("set_dof_blur_far_enabled", "enabled"), &Environment::set_dof_blur_far_enabled);
ClassDB::bind_method(D_METHOD("is_dof_blur_far_enabled"), &Environment::is_dof_blur_far_enabled);
@@ -1134,6 +1164,15 @@ void Environment::_bind_methods() {
BIND_ENUM_CONSTANT(DOF_BLUR_QUALITY_LOW);
BIND_ENUM_CONSTANT(DOF_BLUR_QUALITY_MEDIUM);
BIND_ENUM_CONSTANT(DOF_BLUR_QUALITY_HIGH);
+
+ BIND_ENUM_CONSTANT(SSAO_BLUR_DISABLED);
+ BIND_ENUM_CONSTANT(SSAO_BLUR_1x1);
+ BIND_ENUM_CONSTANT(SSAO_BLUR_2x2);
+ BIND_ENUM_CONSTANT(SSAO_BLUR_3x3);
+
+ BIND_ENUM_CONSTANT(SSAO_QUALITY_LOW);
+ BIND_ENUM_CONSTANT(SSAO_QUALITY_MEDIUM);
+ BIND_ENUM_CONSTANT(SSAO_QUALITY_HIGH);
}
Environment::Environment() {
@@ -1179,7 +1218,9 @@ Environment::Environment() {
ssao_intensity2 = 1;
ssao_bias = 0.01;
ssao_direct_light_affect = false;
- ssao_blur = true;
+ ssao_blur = SSAO_BLUR_3x3;
+ set_ssao_edge_sharpness(4);
+ set_ssao_quality(SSAO_QUALITY_LOW);
glow_enabled = false;
glow_levels = (1 << 2) | (1 << 4);
diff --git a/scene/resources/environment.h b/scene/resources/environment.h
index 5909846074..418949a6ad 100644
--- a/scene/resources/environment.h
+++ b/scene/resources/environment.h
@@ -71,6 +71,19 @@ public:
DOF_BLUR_QUALITY_HIGH,
};
+ enum SSAOBlur {
+ SSAO_BLUR_DISABLED,
+ SSAO_BLUR_1x1,
+ SSAO_BLUR_2x2,
+ SSAO_BLUR_3x3
+ };
+
+ enum SSAOQuality {
+ SSAO_QUALITY_LOW,
+ SSAO_QUALITY_MEDIUM,
+ SSAO_QUALITY_HIGH
+ };
+
private:
RID environment;
@@ -114,7 +127,9 @@ private:
float ssao_bias;
float ssao_direct_light_affect;
Color ssao_color;
- bool ssao_blur;
+ SSAOBlur ssao_blur;
+ float ssao_edge_sharpness;
+ SSAOQuality ssao_quality;
bool glow_enabled;
int glow_levels;
@@ -261,8 +276,14 @@ public:
void set_ssao_color(const Color &p_color);
Color get_ssao_color() const;
- void set_ssao_blur(bool p_enable);
- bool is_ssao_blur_enabled() const;
+ void set_ssao_blur(SSAOBlur p_blur);
+ SSAOBlur get_ssao_blur() const;
+
+ void set_ssao_quality(SSAOQuality p_quality);
+ SSAOQuality get_ssao_quality() const;
+
+ void set_ssao_edge_sharpness(float p_edge_sharpness);
+ float get_ssao_edge_sharpness() const;
void set_glow_enabled(bool p_enabled);
bool is_glow_enabled() const;
@@ -370,5 +391,7 @@ VARIANT_ENUM_CAST(Environment::BGMode)
VARIANT_ENUM_CAST(Environment::ToneMapper)
VARIANT_ENUM_CAST(Environment::GlowBlendMode)
VARIANT_ENUM_CAST(Environment::DOFBlurQuality)
+VARIANT_ENUM_CAST(Environment::SSAOQuality)
+VARIANT_ENUM_CAST(Environment::SSAOBlur)
#endif // ENVIRONMENT_H
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index 898a594498..12434b39fa 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -1278,7 +1278,7 @@ void SpatialMaterial::_validate_property(PropertyInfo &property) const {
property.usage = 0;
}
- if (property.name == "proximity_fade_distacne" && !proximity_fade_enabled) {
+ if (property.name == "proximity_fade_distance" && !proximity_fade_enabled) {
property.usage = 0;
}
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 4b78950e9f..467f059fd3 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -1333,7 +1333,6 @@ void CubeMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_lossy_storage_quality", "quality"), &CubeMap::set_lossy_storage_quality);
ClassDB::bind_method(D_METHOD("get_lossy_storage_quality"), &CubeMap::get_lossy_storage_quality);
- ADD_PROPERTY(PropertyInfo(Variant::INT, "flags", PROPERTY_HINT_ENUM, "Mipmaps,Repeat,Filter,Default"), "set_flags", "get_flags");
ADD_PROPERTY(PropertyInfo(Variant::INT, "storage_mode", PROPERTY_HINT_ENUM, "Raw,Lossy Compressed,Lossless Compressed"), "set_storage", "get_storage");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "lossy_storage_quality"), "set_lossy_storage_quality", "get_lossy_storage_quality");
diff --git a/scene/resources/video_stream.h b/scene/resources/video_stream.h
index 0f07233185..3f79858056 100644
--- a/scene/resources/video_stream.h
+++ b/scene/resources/video_stream.h
@@ -60,7 +60,7 @@ public:
virtual void set_audio_track(int p_idx) = 0;
- //virtual int mix(int16_t* p_bufer,int p_frames)=0;
+ //virtual int mix(int16_t* p_buffer,int p_frames)=0;
virtual Ref<Texture> get_texture() = 0;
virtual void update(float p_delta) = 0;
diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp
index 0e3d5824d9..d7b2c2c5e0 100644
--- a/servers/audio/audio_stream.cpp
+++ b/servers/audio/audio_stream.cpp
@@ -191,12 +191,12 @@ void AudioStreamPlaybackRandomPitch::seek(float p_time) {
}
}
-void AudioStreamPlaybackRandomPitch::mix(AudioFrame *p_bufer, float p_rate_scale, int p_frames) {
+void AudioStreamPlaybackRandomPitch::mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) {
if (playing.is_valid()) {
- playing->mix(p_bufer, p_rate_scale * pitch_scale, p_frames);
+ playing->mix(p_buffer, p_rate_scale * pitch_scale, p_frames);
} else {
for (int i = 0; i < p_frames; i++) {
- p_bufer[i] = AudioFrame(0, 0);
+ p_buffer[i] = AudioFrame(0, 0);
}
}
}
diff --git a/servers/audio/audio_stream.h b/servers/audio/audio_stream.h
index 3324597b41..dc931502b4 100644
--- a/servers/audio/audio_stream.h
+++ b/servers/audio/audio_stream.h
@@ -48,7 +48,7 @@ public:
virtual float get_playback_position() const = 0;
virtual void seek(float p_time) = 0;
- virtual void mix(AudioFrame *p_bufer, float p_rate_scale, int p_frames) = 0;
+ virtual void mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) = 0;
virtual float get_length() const = 0; //if supported, otherwise return 0
};
@@ -70,7 +70,7 @@ class AudioStreamPlaybackResampled : public AudioStreamPlayback {
protected:
void _begin_resample();
- virtual void _mix_internal(AudioFrame *p_bufer, int p_frames) = 0;
+ virtual void _mix_internal(AudioFrame *p_buffer, int p_frames) = 0;
virtual float get_stream_sampling_rate() = 0;
public:
@@ -136,7 +136,7 @@ public:
virtual float get_playback_position() const;
virtual void seek(float p_time);
- virtual void mix(AudioFrame *p_bufer, float p_rate_scale, int p_frames);
+ virtual void mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames);
virtual float get_length() const; //if supported, otherwise return 0
diff --git a/servers/audio/effects/audio_effect_filter.cpp b/servers/audio/effects/audio_effect_filter.cpp
index 019494c74a..95354230c6 100644
--- a/servers/audio/effects/audio_effect_filter.cpp
+++ b/servers/audio/effects/audio_effect_filter.cpp
@@ -158,7 +158,7 @@ void AudioEffectFilter::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "cutoff_hz", PROPERTY_HINT_RANGE, "1,40000,0.1"), "set_cutoff", "get_cutoff");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "resonance", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_resonance", "get_resonance");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "gain", PROPERTY_HINT_RANGE, "0,4,0.01"), "set_gain", "get_gain");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "dB", PROPERTY_HINT_ENUM, "6db,12db,18db,24db"), "set_db", "get_db");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "db", PROPERTY_HINT_ENUM, "6 dB,12 dB,18 dB,24 dB"), "set_db", "get_db");
BIND_ENUM_CONSTANT(FILTER_6DB);
BIND_ENUM_CONSTANT(FILTER_12DB);
diff --git a/servers/server_wrap_mt_common.h b/servers/server_wrap_mt_common.h
index 267e5c63b9..51e7f446ea 100644
--- a/servers/server_wrap_mt_common.h
+++ b/servers/server_wrap_mt_common.h
@@ -775,3 +775,12 @@
server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); \
} \
}
+
+#define FUNC12(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8, m_arg9, m_arg10, m_arg11, m_arg12) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8, m_arg9 p9, m_arg10 p10, m_arg11 p11, m_arg12 p12) { \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); \
+ } else { \
+ server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); \
+ } \
+ }
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index b3f6b243de..cd4b465d79 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -65,7 +65,7 @@ public:
virtual void environment_set_fog(RID p_env, bool p_enable, float p_begin, float p_end, RID p_gradient_texture) = 0;
virtual void environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance, bool p_roughness) = 0;
- virtual void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_radius2, float p_intensity2, float p_bias, float p_light_affect, const Color &p_color, bool p_blur) = 0;
+ virtual void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_radius2, float p_intensity2, float p_bias, float p_light_affect, const Color &p_color, VS::EnvironmentSSAOQuality p_quality, VS::EnvironmentSSAOBlur p_blur, float p_bilateral_sharpness) = 0;
virtual void environment_set_tonemap(RID p_env, VS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale) = 0;
diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h
index 888fb29f93..425381550e 100644
--- a/servers/visual/visual_server_raster.h
+++ b/servers/visual/visual_server_raster.h
@@ -281,7 +281,7 @@ class VisualServerRaster : public VisualServer {
Set<Instance*> owned_instances;
BakedLightSampler *sampler;
int resolution;
- Vector<Color> light_bufer;
+ Vector<Color> light_buffer;
RID sampled_light;
uint64_t last_pass;
Transform xform; // viewspace normal to lightspace, might not use one.
@@ -652,6 +652,8 @@ public:
void m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3, m_type4 arg4, m_type5 arg5, m_type6 arg6, m_type7 arg7, m_type8 arg8, m_type9 arg9, m_type10 arg10) { DISPLAY_CHANGED BINDBASE->m_name(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); }
#define BIND11(m_name, m_type1, m_type2, m_type3, m_type4, m_type5, m_type6, m_type7, m_type8, m_type9, m_type10, m_type11) \
void m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3, m_type4 arg4, m_type5 arg5, m_type6 arg6, m_type7 arg7, m_type8 arg8, m_type9 arg9, m_type10 arg10, m_type11 arg11) { DISPLAY_CHANGED BINDBASE->m_name(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11); }
+#define BIND12(m_name, m_type1, m_type2, m_type3, m_type4, m_type5, m_type6, m_type7, m_type8, m_type9, m_type10, m_type11, m_type12) \
+ void m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3, m_type4 arg4, m_type5 arg5, m_type6 arg6, m_type7 arg7, m_type8 arg8, m_type9 arg9, m_type10 arg10, m_type11 arg11, m_type12 arg12) { DISPLAY_CHANGED BINDBASE->m_name(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); }
//from now on, calls forwarded to this singleton
#define BINDBASE VSG::storage
@@ -974,7 +976,7 @@ public:
BIND2(environment_set_canvas_max_layer, RID, int)
BIND4(environment_set_ambient_light, RID, const Color &, float, float)
BIND7(environment_set_ssr, RID, bool, int, float, float, float, bool)
- BIND10(environment_set_ssao, RID, bool, float, float, float, float, float, float, const Color &, bool)
+ BIND12(environment_set_ssao, RID, bool, float, float, float, float, float, float, const Color &, EnvironmentSSAOQuality, EnvironmentSSAOBlur, float)
BIND6(environment_set_dof_blur_near, RID, bool, float, float, float, EnvironmentDOFBlurQuality)
BIND6(environment_set_dof_blur_far, RID, bool, float, float, float, EnvironmentDOFBlurQuality)
diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h
index caec890217..67d503dfca 100644
--- a/servers/visual/visual_server_wrap_mt.h
+++ b/servers/visual/visual_server_wrap_mt.h
@@ -387,7 +387,7 @@ public:
FUNC2(environment_set_canvas_max_layer, RID, int)
FUNC4(environment_set_ambient_light, RID, const Color &, float, float)
FUNC7(environment_set_ssr, RID, bool, int, float, float, float, bool)
- FUNC10(environment_set_ssao, RID, bool, float, float, float, float, float, float, const Color &, bool)
+ FUNC12(environment_set_ssao, RID, bool, float, float, float, float, float, float, const Color &, EnvironmentSSAOQuality, EnvironmentSSAOBlur, float)
FUNC6(environment_set_dof_blur_near, RID, bool, float, float, float, EnvironmentDOFBlurQuality)
FUNC6(environment_set_dof_blur_far, RID, bool, float, float, float, EnvironmentDOFBlurQuality)
diff --git a/servers/visual_server.h b/servers/visual_server.h
index 7b83bb929d..64ed540501 100644
--- a/servers/visual_server.h
+++ b/servers/visual_server.h
@@ -678,7 +678,21 @@ public:
virtual void environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, RID p_ramp) = 0;
virtual void environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_in, float p_fade_out, float p_depth_tolerance, bool p_roughness) = 0;
- virtual void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_radius2, float p_intensity2, float p_bias, float p_light_affect, const Color &p_color, bool p_blur) = 0;
+
+ enum EnvironmentSSAOQuality {
+ ENV_SSAO_QUALITY_LOW,
+ ENV_SSAO_QUALITY_MEDIUM,
+ ENV_SSAO_QUALITY_HIGH,
+ };
+
+ enum EnvironmentSSAOBlur {
+ ENV_SSAO_BLUR_DISABLED,
+ ENV_SSAO_BLUR_1x1,
+ ENV_SSAO_BLUR_2x2,
+ ENV_SSAO_BLUR_3x3,
+ };
+
+ virtual void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_radius2, float p_intensity2, float p_bias, float p_light_affect, const Color &p_color, EnvironmentSSAOQuality p_quality, EnvironmentSSAOBlur p_blur, float p_bilateral_sharpness) = 0;
virtual void environment_set_fog(RID p_env, bool p_enable, const Color &p_color, const Color &p_sun_color, float p_sun_amount) = 0;
virtual void environment_set_fog_depth(RID p_env, bool p_enable, float p_depth_begin, float p_depth_curve, bool p_transmit, float p_transmit_curve) = 0;
diff --git a/thirdparty/README.md b/thirdparty/README.md
index 335fcdd80b..05aface43b 100644
--- a/thirdparty/README.md
+++ b/thirdparty/README.md
@@ -121,7 +121,7 @@ Files extracted from upstream source:
## libpng
- Upstream: http://libpng.org/pub/png/libpng.html
-- Version: 1.6.33
+- Version: 1.6.34
- License: libpng/zlib
Files extracted from upstream source:
@@ -416,7 +416,7 @@ Files extracted from upstream source:
## zstd
- Upstream: https://github.com/facebook/zstd
-- Version: 1.3.1
+- Version: 1.3.2
- License: BSD-3-Clause
Files extracted from upstream source:
diff --git a/thirdparty/libpng/LICENSE b/thirdparty/libpng/LICENSE
index 57c366feea..4cda4fa0ad 100644
--- a/thirdparty/libpng/LICENSE
+++ b/thirdparty/libpng/LICENSE
@@ -10,7 +10,7 @@ this sentence.
This code is released under the libpng license.
-libpng versions 1.0.7, July 1, 2000 through 1.6.33, September 28, 2017 are
+libpng versions 1.0.7, July 1, 2000 through 1.6.34, September 29, 2017 are
Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
derived from libpng-1.0.6, and are distributed according to the same
disclaimer and license as libpng-1.0.6 with the following individuals
@@ -130,4 +130,4 @@ any encryption software. See the EAR, paragraphs 734.3(b)(3) and
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
-September 28, 2017
+September 29, 2017
diff --git a/thirdparty/libpng/png.c b/thirdparty/libpng/png.c
index 55134729c7..ff02c56518 100644
--- a/thirdparty/libpng/png.c
+++ b/thirdparty/libpng/png.c
@@ -14,7 +14,7 @@
#include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef png_libpng_version_1_6_33 Your_png_h_is_not_version_1_6_33;
+typedef png_libpng_version_1_6_34 Your_png_h_is_not_version_1_6_34;
#ifdef __GNUC__
/* The version tests may need to be added to, but the problem warning has
@@ -816,14 +816,14 @@ png_get_copyright(png_const_structrp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
- "libpng version 1.6.33 - September 28, 2017" PNG_STRING_NEWLINE \
+ "libpng version 1.6.34 - September 29, 2017" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson" \
PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE;
# else
- return "libpng version 1.6.33 - September 28, 2017\
+ return "libpng version 1.6.34 - September 29, 2017\
Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
diff --git a/thirdparty/libpng/png.h b/thirdparty/libpng/png.h
index a5f142b89c..4c873f5c22 100644
--- a/thirdparty/libpng/png.h
+++ b/thirdparty/libpng/png.h
@@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
- * libpng version 1.6.33, September 28, 2017
+ * libpng version 1.6.34, September 29, 2017
*
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -12,7 +12,7 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
- * libpng versions 0.97, January 1998, through 1.6.33, September 28, 2017:
+ * libpng versions 0.97, January 1998, through 1.6.34, September 29, 2017:
* Glenn Randers-Pehrson.
* See also "Contributing Authors", below.
*/
@@ -25,7 +25,7 @@
*
* This code is released under the libpng license.
*
- * libpng versions 1.0.7, July 1, 2000 through 1.6.33, September 28, 2017 are
+ * libpng versions 1.0.7, July 1, 2000 through 1.6.34, September 29, 2017 are
* Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
* derived from libpng-1.0.6, and are distributed according to the same
* disclaimer and license as libpng-1.0.6 with the following individuals
@@ -209,11 +209,11 @@
* ...
* 1.0.19 10 10019 10.so.0.19[.0]
* ...
- * 1.2.57 13 10257 12.so.0.57[.0]
+ * 1.2.59 13 10257 12.so.0.59[.0]
* ...
- * 1.5.28 15 10527 15.so.15.28[.0]
+ * 1.5.30 15 10527 15.so.15.30[.0]
* ...
- * 1.6.33 16 10633 16.so.16.33[.0]
+ * 1.6.34 16 10633 16.so.16.34[.0]
*
* Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be
@@ -241,13 +241,13 @@
* Y2K compliance in libpng:
* =========================
*
- * September 28, 2017
+ * September 29, 2017
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
- * upward through 1.6.33 are Y2K compliant. It is my belief that
+ * upward through 1.6.34 are Y2K compliant. It is my belief that
* earlier versions were also Y2K compliant.
*
* Libpng only has two year fields. One is a 2-byte unsigned integer
@@ -309,8 +309,8 @@
*/
/* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.6.33"
-#define PNG_HEADER_VERSION_STRING " libpng version 1.6.33 - September 28, 2017\n"
+#define PNG_LIBPNG_VER_STRING "1.6.34"
+#define PNG_HEADER_VERSION_STRING " libpng version 1.6.34 - September 29, 2017\n"
#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16
@@ -318,7 +318,7 @@
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 6
-#define PNG_LIBPNG_VER_RELEASE 33
+#define PNG_LIBPNG_VER_RELEASE 34
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
@@ -349,7 +349,7 @@
* version 1.0.0 was mis-numbered 100 instead of 10000). From
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
*/
-#define PNG_LIBPNG_VER 10633 /* 1.6.33 */
+#define PNG_LIBPNG_VER 10634 /* 1.6.34 */
/* Library configuration: these options cannot be changed after
* the library has been built.
@@ -459,7 +459,7 @@ extern "C" {
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
-typedef char* png_libpng_version_1_6_33;
+typedef char* png_libpng_version_1_6_34;
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
*
diff --git a/thirdparty/libpng/pngconf.h b/thirdparty/libpng/pngconf.h
index e99e827dda..d13b13e57a 100644
--- a/thirdparty/libpng/pngconf.h
+++ b/thirdparty/libpng/pngconf.h
@@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
- * libpng version 1.6.33, September 28, 2017
+ * libpng version 1.6.34, September 29, 2017
*
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/thirdparty/libpng/pnglibconf.h b/thirdparty/libpng/pnglibconf.h
index cbf715dd93..53b5e442c4 100644
--- a/thirdparty/libpng/pnglibconf.h
+++ b/thirdparty/libpng/pnglibconf.h
@@ -1,8 +1,8 @@
-/* libpng 1.6.33 STANDARD API DEFINITION */
+/* libpng 1.6.34 STANDARD API DEFINITION */
/* pnglibconf.h - library build configuration */
-/* Libpng version 1.6.33 - September 28, 2017 */
+/* Libpng version 1.6.34 - September 29, 2017 */
/* Copyright (c) 1998-2017 Glenn Randers-Pehrson */
diff --git a/thirdparty/zstd/SCsub b/thirdparty/zstd/SCsub
index e8be1aaf44..899a18e1cf 100644
--- a/thirdparty/zstd/SCsub
+++ b/thirdparty/zstd/SCsub
@@ -14,10 +14,16 @@ thirdparty_zstd_sources = [
"compress/fse_compress.c",
"compress/huf_compress.c",
"compress/zstd_compress.c",
+ "compress/zstd_double_fast.c",
+ "compress/zstd_fast.c",
+ "compress/zstd_lazy.c",
+ "compress/zstd_ldm.c",
"compress/zstdmt_compress.c",
+ "compress/zstd_opt.c",
"decompress/huf_decompress.c",
"decompress/zstd_decompress.c",
]
thirdparty_zstd_sources = [thirdparty_zstd_dir + file for file in thirdparty_zstd_sources]
env.add_source_files(env.core_sources, thirdparty_zstd_sources)
env.Append(CPPPATH=["#thirdparty/zstd", "#thirdparty/zstd/common"])
+env.Append(CCFLAGS="-DZSTD_STATIC_LINKING_ONLY")
diff --git a/thirdparty/zstd/common/bitstream.h b/thirdparty/zstd/common/bitstream.h
index 06121f21c5..2094823fe2 100644
--- a/thirdparty/zstd/common/bitstream.h
+++ b/thirdparty/zstd/common/bitstream.h
@@ -169,33 +169,39 @@ MEM_STATIC size_t BIT_readBitsFast(BIT_DStream_t* bitD, unsigned nbBits);
****************************************************************/
MEM_STATIC unsigned BIT_highbit32 (register U32 val)
{
+ assert(val != 0);
+ {
# if defined(_MSC_VER) /* Visual */
- unsigned long r=0;
- _BitScanReverse ( &r, val );
- return (unsigned) r;
+ unsigned long r=0;
+ _BitScanReverse ( &r, val );
+ return (unsigned) r;
# elif defined(__GNUC__) && (__GNUC__ >= 3) /* Use GCC Intrinsic */
- return 31 - __builtin_clz (val);
+ return 31 - __builtin_clz (val);
# else /* Software version */
- static const unsigned DeBruijnClz[32] = { 0, 9, 1, 10, 13, 21, 2, 29,
- 11, 14, 16, 18, 22, 25, 3, 30,
- 8, 12, 20, 28, 15, 17, 24, 7,
- 19, 27, 23, 6, 26, 5, 4, 31 };
- U32 v = val;
- v |= v >> 1;
- v |= v >> 2;
- v |= v >> 4;
- v |= v >> 8;
- v |= v >> 16;
- return DeBruijnClz[ (U32) (v * 0x07C4ACDDU) >> 27];
+ static const unsigned DeBruijnClz[32] = { 0, 9, 1, 10, 13, 21, 2, 29,
+ 11, 14, 16, 18, 22, 25, 3, 30,
+ 8, 12, 20, 28, 15, 17, 24, 7,
+ 19, 27, 23, 6, 26, 5, 4, 31 };
+ U32 v = val;
+ v |= v >> 1;
+ v |= v >> 2;
+ v |= v >> 4;
+ v |= v >> 8;
+ v |= v >> 16;
+ return DeBruijnClz[ (U32) (v * 0x07C4ACDDU) >> 27];
# endif
+ }
}
/*===== Local Constants =====*/
-static const unsigned BIT_mask[] = { 0, 1, 3, 7, 0xF, 0x1F, 0x3F, 0x7F,
- 0xFF, 0x1FF, 0x3FF, 0x7FF, 0xFFF, 0x1FFF, 0x3FFF, 0x7FFF,
- 0xFFFF, 0x1FFFF, 0x3FFFF, 0x7FFFF, 0xFFFFF, 0x1FFFFF, 0x3FFFFF, 0x7FFFFF,
- 0xFFFFFF, 0x1FFFFFF, 0x3FFFFFF }; /* up to 26 bits */
-
+static const unsigned BIT_mask[] = {
+ 0, 1, 3, 7, 0xF, 0x1F,
+ 0x3F, 0x7F, 0xFF, 0x1FF, 0x3FF, 0x7FF,
+ 0xFFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF, 0x1FFFF,
+ 0x3FFFF, 0x7FFFF, 0xFFFFF, 0x1FFFFF, 0x3FFFFF, 0x7FFFFF,
+ 0xFFFFFF, 0x1FFFFFF, 0x3FFFFFF, 0x7FFFFFF, 0xFFFFFFF, 0x1FFFFFFF,
+ 0x3FFFFFFF, 0x7FFFFFFF}; /* up to 31 bits */
+#define BIT_MASK_SIZE (sizeof(BIT_mask) / sizeof(BIT_mask[0]))
/*-**************************************************************
* bitStream encoding
@@ -217,11 +223,14 @@ MEM_STATIC size_t BIT_initCStream(BIT_CStream_t* bitC,
}
/*! BIT_addBits() :
- * can add up to 26 bits into `bitC`.
+ * can add up to 31 bits into `bitC`.
* Note : does not check for register overflow ! */
MEM_STATIC void BIT_addBits(BIT_CStream_t* bitC,
size_t value, unsigned nbBits)
{
+ MEM_STATIC_ASSERT(BIT_MASK_SIZE == 32);
+ assert(nbBits < BIT_MASK_SIZE);
+ assert(nbBits + bitC->bitPos < sizeof(bitC->bitContainer) * 8);
bitC->bitContainer |= (value & BIT_mask[nbBits]) << bitC->bitPos;
bitC->bitPos += nbBits;
}
@@ -232,6 +241,7 @@ MEM_STATIC void BIT_addBitsFast(BIT_CStream_t* bitC,
size_t value, unsigned nbBits)
{
assert((value>>nbBits) == 0);
+ assert(nbBits + bitC->bitPos < sizeof(bitC->bitContainer) * 8);
bitC->bitContainer |= value << bitC->bitPos;
bitC->bitPos += nbBits;
}
@@ -242,7 +252,7 @@ MEM_STATIC void BIT_addBitsFast(BIT_CStream_t* bitC,
MEM_STATIC void BIT_flushBitsFast(BIT_CStream_t* bitC)
{
size_t const nbBytes = bitC->bitPos >> 3;
- assert( bitC->bitPos <= (sizeof(bitC->bitContainer)*8) );
+ assert(bitC->bitPos < sizeof(bitC->bitContainer) * 8);
MEM_writeLEST(bitC->ptr, bitC->bitContainer);
bitC->ptr += nbBytes;
assert(bitC->ptr <= bitC->endPtr);
@@ -258,7 +268,7 @@ MEM_STATIC void BIT_flushBitsFast(BIT_CStream_t* bitC)
MEM_STATIC void BIT_flushBits(BIT_CStream_t* bitC)
{
size_t const nbBytes = bitC->bitPos >> 3;
- assert( bitC->bitPos <= (sizeof(bitC->bitContainer)*8) );
+ assert(bitC->bitPos < sizeof(bitC->bitContainer) * 8);
MEM_writeLEST(bitC->ptr, bitC->bitContainer);
bitC->ptr += nbBytes;
if (bitC->ptr > bitC->endPtr) bitC->ptr = bitC->endPtr;
@@ -350,12 +360,14 @@ MEM_STATIC size_t BIT_getMiddleBits(size_t bitContainer, U32 const start, U32 co
# endif
return _bextr_u32(bitContainer, start, nbBits);
#else
+ assert(nbBits < BIT_MASK_SIZE);
return (bitContainer >> start) & BIT_mask[nbBits];
#endif
}
MEM_STATIC size_t BIT_getLowerBits(size_t bitContainer, U32 const nbBits)
{
+ assert(nbBits < BIT_MASK_SIZE);
return bitContainer & BIT_mask[nbBits];
}
diff --git a/thirdparty/zstd/common/compiler.h b/thirdparty/zstd/common/compiler.h
index d7225c443e..3a7553c380 100644
--- a/thirdparty/zstd/common/compiler.h
+++ b/thirdparty/zstd/common/compiler.h
@@ -5,6 +5,7 @@
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
*/
#ifndef ZSTD_COMPILER_H
diff --git a/thirdparty/zstd/common/error_private.c b/thirdparty/zstd/common/error_private.c
index b5b14b509c..11f7cdab1c 100644
--- a/thirdparty/zstd/common/error_private.c
+++ b/thirdparty/zstd/common/error_private.c
@@ -5,6 +5,7 @@
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
*/
/* The purpose of this file is to have a single list of error strings embedded in binary */
@@ -29,14 +30,15 @@ const char* ERR_getErrorString(ERR_enum code)
case PREFIX(init_missing): return "Context should be init first";
case PREFIX(memory_allocation): return "Allocation error : not enough memory";
case PREFIX(stage_wrong): return "Operation not authorized at current processing stage";
- case PREFIX(dstSize_tooSmall): return "Destination buffer is too small";
- case PREFIX(srcSize_wrong): return "Src size is incorrect";
case PREFIX(tableLog_tooLarge): return "tableLog requires too much memory : unsupported";
case PREFIX(maxSymbolValue_tooLarge): return "Unsupported max Symbol Value : too large";
case PREFIX(maxSymbolValue_tooSmall): return "Specified maxSymbolValue is too small";
case PREFIX(dictionary_corrupted): return "Dictionary is corrupted";
case PREFIX(dictionary_wrong): return "Dictionary mismatch";
case PREFIX(dictionaryCreation_failed): return "Cannot create Dictionary from provided samples";
+ case PREFIX(dstSize_tooSmall): return "Destination buffer is too small";
+ case PREFIX(srcSize_wrong): return "Src size is incorrect";
+ /* following error codes are not stable and may be removed or changed in a future version */
case PREFIX(frameIndex_tooLarge): return "Frame index is too large";
case PREFIX(seekableIO): return "An I/O error occurred when reading/seeking";
case PREFIX(maxCode):
diff --git a/thirdparty/zstd/common/error_private.h b/thirdparty/zstd/common/error_private.h
index 9dd9a87cfa..0d2fa7e34b 100644
--- a/thirdparty/zstd/common/error_private.h
+++ b/thirdparty/zstd/common/error_private.h
@@ -5,6 +5,7 @@
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
*/
/* Note : this module is expected to remain private, do not expose it */
@@ -48,10 +49,9 @@ typedef ZSTD_ErrorCode ERR_enum;
/*-****************************************
* Error codes handling
******************************************/
-#ifdef ERROR
-# undef ERROR /* reported already defined on VS 2015 (Rich Geldreich) */
-#endif
-#define ERROR(name) ((size_t)-PREFIX(name))
+#undef ERROR /* reported already defined on VS 2015 (Rich Geldreich) */
+#define ERROR(name) ZSTD_ERROR(name)
+#define ZSTD_ERROR(name) ((size_t)-PREFIX(name))
ERR_STATIC unsigned ERR_isError(size_t code) { return (code > ERROR(maxCode)); }
diff --git a/thirdparty/zstd/common/fse.h b/thirdparty/zstd/common/fse.h
index 1c44f83750..afd7801963 100644
--- a/thirdparty/zstd/common/fse.h
+++ b/thirdparty/zstd/common/fse.h
@@ -184,7 +184,7 @@ FSE_PUBLIC_API size_t FSE_writeNCount (void* buffer, size_t bufferSize, const sh
/*! Constructor and Destructor of FSE_CTable.
Note that FSE_CTable size depends on 'tableLog' and 'maxSymbolValue' */
typedef unsigned FSE_CTable; /* don't allocate that. It's only meant to be more restrictive than void* */
-FSE_PUBLIC_API FSE_CTable* FSE_createCTable (unsigned tableLog, unsigned maxSymbolValue);
+FSE_PUBLIC_API FSE_CTable* FSE_createCTable (unsigned maxSymbolValue, unsigned tableLog);
FSE_PUBLIC_API void FSE_freeCTable (FSE_CTable* ct);
/*! FSE_buildCTable():
diff --git a/thirdparty/zstd/common/huf.h b/thirdparty/zstd/common/huf.h
index 2b3015a84c..522bf9b6c0 100644
--- a/thirdparty/zstd/common/huf.h
+++ b/thirdparty/zstd/common/huf.h
@@ -242,7 +242,7 @@ size_t HUF_readStats(BYTE* huffWeight, size_t hwSize, U32* rankStats,
/** HUF_readCTable() :
* Loading a CTable saved with HUF_writeCTable() */
-size_t HUF_readCTable (HUF_CElt* CTable, unsigned maxSymbolValue, const void* src, size_t srcSize);
+size_t HUF_readCTable (HUF_CElt* CTable, unsigned* maxSymbolValuePtr, const void* src, size_t srcSize);
/*
diff --git a/thirdparty/zstd/common/mem.h b/thirdparty/zstd/common/mem.h
index df85404fb8..23335c3146 100644
--- a/thirdparty/zstd/common/mem.h
+++ b/thirdparty/zstd/common/mem.h
@@ -5,6 +5,7 @@
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
*/
#ifndef MEM_H_MODULE
diff --git a/thirdparty/zstd/common/pool.c b/thirdparty/zstd/common/pool.c
index a227044f7f..1b0fe1035d 100644
--- a/thirdparty/zstd/common/pool.c
+++ b/thirdparty/zstd/common/pool.c
@@ -5,6 +5,7 @@
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
*/
@@ -25,13 +26,14 @@
/* A job is a function and an opaque argument */
typedef struct POOL_job_s {
- POOL_function function;
- void *opaque;
+ POOL_function function;
+ void *opaque;
} POOL_job;
struct POOL_ctx_s {
+ ZSTD_customMem customMem;
/* Keep track of the threads */
- pthread_t *threads;
+ ZSTD_pthread_t *threads;
size_t numThreads;
/* The queue is a circular buffer */
@@ -46,11 +48,11 @@ struct POOL_ctx_s {
int queueEmpty;
/* The mutex protects the queue */
- pthread_mutex_t queueMutex;
+ ZSTD_pthread_mutex_t queueMutex;
/* Condition variable for pushers to wait on when the queue is full */
- pthread_cond_t queuePushCond;
+ ZSTD_pthread_cond_t queuePushCond;
/* Condition variables for poppers to wait on when the queue is empty */
- pthread_cond_t queuePopCond;
+ ZSTD_pthread_cond_t queuePopCond;
/* Indicates if the queue is shutting down */
int shutdown;
};
@@ -65,14 +67,14 @@ static void* POOL_thread(void* opaque) {
if (!ctx) { return NULL; }
for (;;) {
/* Lock the mutex and wait for a non-empty queue or until shutdown */
- pthread_mutex_lock(&ctx->queueMutex);
+ ZSTD_pthread_mutex_lock(&ctx->queueMutex);
while (ctx->queueEmpty && !ctx->shutdown) {
- pthread_cond_wait(&ctx->queuePopCond, &ctx->queueMutex);
+ ZSTD_pthread_cond_wait(&ctx->queuePopCond, &ctx->queueMutex);
}
/* empty => shutting down: so stop */
if (ctx->queueEmpty) {
- pthread_mutex_unlock(&ctx->queueMutex);
+ ZSTD_pthread_mutex_unlock(&ctx->queueMutex);
return opaque;
}
/* Pop a job off the queue */
@@ -81,28 +83,32 @@ static void* POOL_thread(void* opaque) {
ctx->numThreadsBusy++;
ctx->queueEmpty = ctx->queueHead == ctx->queueTail;
/* Unlock the mutex, signal a pusher, and run the job */
- pthread_mutex_unlock(&ctx->queueMutex);
- pthread_cond_signal(&ctx->queuePushCond);
+ ZSTD_pthread_mutex_unlock(&ctx->queueMutex);
+ ZSTD_pthread_cond_signal(&ctx->queuePushCond);
job.function(job.opaque);
/* If the intended queue size was 0, signal after finishing job */
if (ctx->queueSize == 1) {
- pthread_mutex_lock(&ctx->queueMutex);
+ ZSTD_pthread_mutex_lock(&ctx->queueMutex);
ctx->numThreadsBusy--;
- pthread_mutex_unlock(&ctx->queueMutex);
- pthread_cond_signal(&ctx->queuePushCond);
+ ZSTD_pthread_mutex_unlock(&ctx->queueMutex);
+ ZSTD_pthread_cond_signal(&ctx->queuePushCond);
} }
} /* for (;;) */
/* Unreachable */
}
-POOL_ctx *POOL_create(size_t numThreads, size_t queueSize) {
- POOL_ctx *ctx;
+POOL_ctx* POOL_create(size_t numThreads, size_t queueSize) {
+ return POOL_create_advanced(numThreads, queueSize, ZSTD_defaultCMem);
+}
+
+POOL_ctx* POOL_create_advanced(size_t numThreads, size_t queueSize, ZSTD_customMem customMem) {
+ POOL_ctx* ctx;
/* Check the parameters */
if (!numThreads) { return NULL; }
/* Allocate the context and zero initialize */
- ctx = (POOL_ctx *)calloc(1, sizeof(POOL_ctx));
+ ctx = (POOL_ctx*)ZSTD_calloc(sizeof(POOL_ctx), customMem);
if (!ctx) { return NULL; }
/* Initialize the job queue.
* It needs one extra space since one space is wasted to differentiate empty
@@ -114,19 +120,20 @@ POOL_ctx *POOL_create(size_t numThreads, size_t queueSize) {
ctx->queueTail = 0;
ctx->numThreadsBusy = 0;
ctx->queueEmpty = 1;
- (void)pthread_mutex_init(&ctx->queueMutex, NULL);
- (void)pthread_cond_init(&ctx->queuePushCond, NULL);
- (void)pthread_cond_init(&ctx->queuePopCond, NULL);
+ (void)ZSTD_pthread_mutex_init(&ctx->queueMutex, NULL);
+ (void)ZSTD_pthread_cond_init(&ctx->queuePushCond, NULL);
+ (void)ZSTD_pthread_cond_init(&ctx->queuePopCond, NULL);
ctx->shutdown = 0;
/* Allocate space for the thread handles */
- ctx->threads = (pthread_t*)malloc(numThreads * sizeof(pthread_t));
+ ctx->threads = (ZSTD_pthread_t*)ZSTD_malloc(numThreads * sizeof(ZSTD_pthread_t), customMem);
ctx->numThreads = 0;
+ ctx->customMem = customMem;
/* Check for errors */
if (!ctx->threads || !ctx->queue) { POOL_free(ctx); return NULL; }
/* Initialize the threads */
{ size_t i;
for (i = 0; i < numThreads; ++i) {
- if (pthread_create(&ctx->threads[i], NULL, &POOL_thread, ctx)) {
+ if (ZSTD_pthread_create(&ctx->threads[i], NULL, &POOL_thread, ctx)) {
ctx->numThreads = i;
POOL_free(ctx);
return NULL;
@@ -139,37 +146,37 @@ POOL_ctx *POOL_create(size_t numThreads, size_t queueSize) {
/*! POOL_join() :
Shutdown the queue, wake any sleeping threads, and join all of the threads.
*/
-static void POOL_join(POOL_ctx *ctx) {
+static void POOL_join(POOL_ctx* ctx) {
/* Shut down the queue */
- pthread_mutex_lock(&ctx->queueMutex);
+ ZSTD_pthread_mutex_lock(&ctx->queueMutex);
ctx->shutdown = 1;
- pthread_mutex_unlock(&ctx->queueMutex);
+ ZSTD_pthread_mutex_unlock(&ctx->queueMutex);
/* Wake up sleeping threads */
- pthread_cond_broadcast(&ctx->queuePushCond);
- pthread_cond_broadcast(&ctx->queuePopCond);
+ ZSTD_pthread_cond_broadcast(&ctx->queuePushCond);
+ ZSTD_pthread_cond_broadcast(&ctx->queuePopCond);
/* Join all of the threads */
{ size_t i;
for (i = 0; i < ctx->numThreads; ++i) {
- pthread_join(ctx->threads[i], NULL);
+ ZSTD_pthread_join(ctx->threads[i], NULL);
} }
}
void POOL_free(POOL_ctx *ctx) {
if (!ctx) { return; }
POOL_join(ctx);
- pthread_mutex_destroy(&ctx->queueMutex);
- pthread_cond_destroy(&ctx->queuePushCond);
- pthread_cond_destroy(&ctx->queuePopCond);
- if (ctx->queue) free(ctx->queue);
- if (ctx->threads) free(ctx->threads);
- free(ctx);
+ ZSTD_pthread_mutex_destroy(&ctx->queueMutex);
+ ZSTD_pthread_cond_destroy(&ctx->queuePushCond);
+ ZSTD_pthread_cond_destroy(&ctx->queuePopCond);
+ ZSTD_free(ctx->queue, ctx->customMem);
+ ZSTD_free(ctx->threads, ctx->customMem);
+ ZSTD_free(ctx, ctx->customMem);
}
size_t POOL_sizeof(POOL_ctx *ctx) {
if (ctx==NULL) return 0; /* supports sizeof NULL */
return sizeof(*ctx)
+ ctx->queueSize * sizeof(POOL_job)
- + ctx->numThreads * sizeof(pthread_t);
+ + ctx->numThreads * sizeof(ZSTD_pthread_t);
}
/**
@@ -191,12 +198,12 @@ void POOL_add(void* ctxVoid, POOL_function function, void *opaque) {
POOL_ctx* const ctx = (POOL_ctx*)ctxVoid;
if (!ctx) { return; }
- pthread_mutex_lock(&ctx->queueMutex);
+ ZSTD_pthread_mutex_lock(&ctx->queueMutex);
{ POOL_job const job = {function, opaque};
/* Wait until there is space in the queue for the new job */
while (isQueueFull(ctx) && !ctx->shutdown) {
- pthread_cond_wait(&ctx->queuePushCond, &ctx->queueMutex);
+ ZSTD_pthread_cond_wait(&ctx->queuePushCond, &ctx->queueMutex);
}
/* The queue is still going => there is space */
if (!ctx->shutdown) {
@@ -205,8 +212,8 @@ void POOL_add(void* ctxVoid, POOL_function function, void *opaque) {
ctx->queueTail = (ctx->queueTail + 1) % ctx->queueSize;
}
}
- pthread_mutex_unlock(&ctx->queueMutex);
- pthread_cond_signal(&ctx->queuePopCond);
+ ZSTD_pthread_mutex_unlock(&ctx->queueMutex);
+ ZSTD_pthread_cond_signal(&ctx->queuePopCond);
}
#else /* ZSTD_MULTITHREAD not defined */
@@ -214,26 +221,34 @@ void POOL_add(void* ctxVoid, POOL_function function, void *opaque) {
/* We don't need any data, but if it is empty malloc() might return NULL. */
struct POOL_ctx_s {
- int data;
+ int dummy;
};
+static POOL_ctx g_ctx;
POOL_ctx* POOL_create(size_t numThreads, size_t queueSize) {
- (void)numThreads;
- (void)queueSize;
- return (POOL_ctx*)malloc(sizeof(POOL_ctx));
+ return POOL_create_advanced(numThreads, queueSize, ZSTD_defaultCMem);
+}
+
+POOL_ctx* POOL_create_advanced(size_t numThreads, size_t queueSize, ZSTD_customMem customMem) {
+ (void)numThreads;
+ (void)queueSize;
+ (void)customMem;
+ return &g_ctx;
}
void POOL_free(POOL_ctx* ctx) {
- free(ctx);
+ assert(!ctx || ctx == &g_ctx);
+ (void)ctx;
}
void POOL_add(void* ctx, POOL_function function, void* opaque) {
- (void)ctx;
- function(opaque);
+ (void)ctx;
+ function(opaque);
}
size_t POOL_sizeof(POOL_ctx* ctx) {
if (ctx==NULL) return 0; /* supports sizeof NULL */
+ assert(ctx == &g_ctx);
return sizeof(*ctx);
}
diff --git a/thirdparty/zstd/common/pool.h b/thirdparty/zstd/common/pool.h
index 264c5c9ca7..08c63715aa 100644
--- a/thirdparty/zstd/common/pool.h
+++ b/thirdparty/zstd/common/pool.h
@@ -5,6 +5,7 @@
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
*/
#ifndef POOL_H
@@ -16,6 +17,7 @@ extern "C" {
#include <stddef.h> /* size_t */
+#include "zstd_internal.h" /* ZSTD_customMem */
typedef struct POOL_ctx_s POOL_ctx;
@@ -27,6 +29,8 @@ typedef struct POOL_ctx_s POOL_ctx;
*/
POOL_ctx *POOL_create(size_t numThreads, size_t queueSize);
+POOL_ctx *POOL_create_advanced(size_t numThreads, size_t queueSize, ZSTD_customMem customMem);
+
/*! POOL_free() :
Free a thread pool returned by POOL_create().
*/
diff --git a/thirdparty/zstd/common/threading.c b/thirdparty/zstd/common/threading.c
index 141376c561..8be8c8da94 100644
--- a/thirdparty/zstd/common/threading.c
+++ b/thirdparty/zstd/common/threading.c
@@ -2,9 +2,9 @@
* Copyright (c) 2016 Tino Reichardt
* All rights reserved.
*
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
+ * This source code is licensed under both the BSD-style license (found in the
+ * LICENSE file in the root directory of this source tree) and the GPLv2 (found
+ * in the COPYING file in the root directory of this source tree).
*
* You can contact the author at:
* - zstdmt source repository: https://github.com/mcmilk/zstdmt
@@ -14,12 +14,8 @@
* This file will hold wrapper for systems, which do not support pthreads
*/
-/* When ZSTD_MULTITHREAD is not defined, this file would become an empty translation unit.
-* Include some ISO C header code to prevent this and portably avoid related warnings.
-* (Visual C++: C4206 / GCC: -Wpedantic / Clang: -Wempty-translation-unit)
-*/
-#include <stddef.h>
-
+/* create fake symbol to avoid empty trnaslation unit warning */
+int g_ZSTD_threading_useles_symbol;
#if defined(ZSTD_MULTITHREAD) && defined(_WIN32)
@@ -39,12 +35,12 @@
static unsigned __stdcall worker(void *arg)
{
- pthread_t* const thread = (pthread_t*) arg;
+ ZSTD_pthread_t* const thread = (ZSTD_pthread_t*) arg;
thread->arg = thread->start_routine(thread->arg);
return 0;
}
-int pthread_create(pthread_t* thread, const void* unused,
+int ZSTD_pthread_create(ZSTD_pthread_t* thread, const void* unused,
void* (*start_routine) (void*), void* arg)
{
(void)unused;
@@ -58,16 +54,16 @@ int pthread_create(pthread_t* thread, const void* unused,
return 0;
}
-int _pthread_join(pthread_t * thread, void **value_ptr)
+int ZSTD_pthread_join(ZSTD_pthread_t thread, void **value_ptr)
{
DWORD result;
- if (!thread->handle) return 0;
+ if (!thread.handle) return 0;
- result = WaitForSingleObject(thread->handle, INFINITE);
+ result = WaitForSingleObject(thread.handle, INFINITE);
switch (result) {
case WAIT_OBJECT_0:
- if (value_ptr) *value_ptr = thread->arg;
+ if (value_ptr) *value_ptr = thread.arg;
return 0;
case WAIT_ABANDONED:
return EINVAL;
diff --git a/thirdparty/zstd/common/threading.h b/thirdparty/zstd/common/threading.h
index ab09977a86..197770db27 100644
--- a/thirdparty/zstd/common/threading.h
+++ b/thirdparty/zstd/common/threading.h
@@ -2,9 +2,9 @@
* Copyright (c) 2016 Tino Reichardt
* All rights reserved.
*
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
+ * This source code is licensed under both the BSD-style license (found in the
+ * LICENSE file in the root directory of this source tree) and the GPLv2 (found
+ * in the COPYING file in the root directory of this source tree).
*
* You can contact the author at:
* - zstdmt source repository: https://github.com/mcmilk/zstdmt
@@ -37,35 +37,38 @@ extern "C" {
# define WIN32_LEAN_AND_MEAN
#endif
+#undef ERROR /* reported already defined on VS 2015 (Rich Geldreich) */
#include <windows.h>
+#undef ERROR
+#define ERROR(name) ZSTD_ERROR(name)
+
/* mutex */
-#define pthread_mutex_t CRITICAL_SECTION
-#define pthread_mutex_init(a,b) (InitializeCriticalSection((a)), 0)
-#define pthread_mutex_destroy(a) DeleteCriticalSection((a))
-#define pthread_mutex_lock(a) EnterCriticalSection((a))
-#define pthread_mutex_unlock(a) LeaveCriticalSection((a))
+#define ZSTD_pthread_mutex_t CRITICAL_SECTION
+#define ZSTD_pthread_mutex_init(a, b) (InitializeCriticalSection((a)), 0)
+#define ZSTD_pthread_mutex_destroy(a) DeleteCriticalSection((a))
+#define ZSTD_pthread_mutex_lock(a) EnterCriticalSection((a))
+#define ZSTD_pthread_mutex_unlock(a) LeaveCriticalSection((a))
/* condition variable */
-#define pthread_cond_t CONDITION_VARIABLE
-#define pthread_cond_init(a, b) (InitializeConditionVariable((a)), 0)
-#define pthread_cond_destroy(a) /* No delete */
-#define pthread_cond_wait(a, b) SleepConditionVariableCS((a), (b), INFINITE)
-#define pthread_cond_signal(a) WakeConditionVariable((a))
-#define pthread_cond_broadcast(a) WakeAllConditionVariable((a))
-
-/* pthread_create() and pthread_join() */
+#define ZSTD_pthread_cond_t CONDITION_VARIABLE
+#define ZSTD_pthread_cond_init(a, b) (InitializeConditionVariable((a)), 0)
+#define ZSTD_pthread_cond_destroy(a) /* No delete */
+#define ZSTD_pthread_cond_wait(a, b) SleepConditionVariableCS((a), (b), INFINITE)
+#define ZSTD_pthread_cond_signal(a) WakeConditionVariable((a))
+#define ZSTD_pthread_cond_broadcast(a) WakeAllConditionVariable((a))
+
+/* ZSTD_pthread_create() and ZSTD_pthread_join() */
typedef struct {
HANDLE handle;
void* (*start_routine)(void*);
void* arg;
-} pthread_t;
+} ZSTD_pthread_t;
-int pthread_create(pthread_t* thread, const void* unused,
+int ZSTD_pthread_create(ZSTD_pthread_t* thread, const void* unused,
void* (*start_routine) (void*), void* arg);
-#define pthread_join(a, b) _pthread_join(&(a), (b))
-int _pthread_join(pthread_t* thread, void** value_ptr);
+int ZSTD_pthread_join(ZSTD_pthread_t thread, void** value_ptr);
/**
* add here more wrappers as required
@@ -76,23 +79,40 @@ int _pthread_join(pthread_t* thread, void** value_ptr);
/* === POSIX Systems === */
# include <pthread.h>
+#define ZSTD_pthread_mutex_t pthread_mutex_t
+#define ZSTD_pthread_mutex_init(a, b) pthread_mutex_init((a), (b))
+#define ZSTD_pthread_mutex_destroy(a) pthread_mutex_destroy((a))
+#define ZSTD_pthread_mutex_lock(a) pthread_mutex_lock((a))
+#define ZSTD_pthread_mutex_unlock(a) pthread_mutex_unlock((a))
+
+#define ZSTD_pthread_cond_t pthread_cond_t
+#define ZSTD_pthread_cond_init(a, b) pthread_cond_init((a), (b))
+#define ZSTD_pthread_cond_destroy(a) pthread_cond_destroy((a))
+#define ZSTD_pthread_cond_wait(a, b) pthread_cond_wait((a), (b))
+#define ZSTD_pthread_cond_signal(a) pthread_cond_signal((a))
+#define ZSTD_pthread_cond_broadcast(a) pthread_cond_broadcast((a))
+
+#define ZSTD_pthread_t pthread_t
+#define ZSTD_pthread_create(a, b, c, d) pthread_create((a), (b), (c), (d))
+#define ZSTD_pthread_join(a, b) pthread_join((a),(b))
+
#else /* ZSTD_MULTITHREAD not defined */
/* No multithreading support */
-#define pthread_mutex_t int /* #define rather than typedef, because sometimes pthread support is implicit, resulting in duplicated symbols */
-#define pthread_mutex_init(a,b) ((void)a, 0)
-#define pthread_mutex_destroy(a)
-#define pthread_mutex_lock(a)
-#define pthread_mutex_unlock(a)
+typedef int ZSTD_pthread_mutex_t;
+#define ZSTD_pthread_mutex_init(a, b) ((void)a, 0)
+#define ZSTD_pthread_mutex_destroy(a)
+#define ZSTD_pthread_mutex_lock(a)
+#define ZSTD_pthread_mutex_unlock(a)
-#define pthread_cond_t int
-#define pthread_cond_init(a,b) ((void)a, 0)
-#define pthread_cond_destroy(a)
-#define pthread_cond_wait(a,b)
-#define pthread_cond_signal(a)
-#define pthread_cond_broadcast(a)
+typedef int ZSTD_pthread_cond_t;
+#define ZSTD_pthread_cond_init(a, b) ((void)a, 0)
+#define ZSTD_pthread_cond_destroy(a)
+#define ZSTD_pthread_cond_wait(a, b)
+#define ZSTD_pthread_cond_signal(a)
+#define ZSTD_pthread_cond_broadcast(a)
-/* do not use pthread_t */
+/* do not use ZSTD_pthread_t */
#endif /* ZSTD_MULTITHREAD */
diff --git a/thirdparty/zstd/common/zstd_common.c b/thirdparty/zstd/common/zstd_common.c
index 08384cabf5..c2041053be 100644
--- a/thirdparty/zstd/common/zstd_common.c
+++ b/thirdparty/zstd/common/zstd_common.c
@@ -5,6 +5,7 @@
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
*/
@@ -15,8 +16,7 @@
#include <stdlib.h> /* malloc, calloc, free */
#include <string.h> /* memset */
#include "error_private.h"
-#define ZSTD_STATIC_LINKING_ONLY
-#include "zstd.h"
+#include "zstd_internal.h"
/*-****************************************
diff --git a/thirdparty/zstd/common/zstd_errors.h b/thirdparty/zstd/common/zstd_errors.h
index a69387b714..4bcb7769fe 100644
--- a/thirdparty/zstd/common/zstd_errors.h
+++ b/thirdparty/zstd/common/zstd_errors.h
@@ -5,6 +5,7 @@
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
*/
#ifndef ZSTD_ERRORS_H_398273423
@@ -62,9 +63,10 @@ typedef enum {
ZSTD_error_memory_allocation = 64,
ZSTD_error_dstSize_tooSmall = 70,
ZSTD_error_srcSize_wrong = 72,
+ /* following error codes are not stable and may be removed or changed in a future version */
ZSTD_error_frameIndex_tooLarge = 100,
ZSTD_error_seekableIO = 102,
- ZSTD_error_maxCode = 120 /* never EVER use this value directly, it may change in future versions! Use ZSTD_isError() instead */
+ ZSTD_error_maxCode = 120 /* never EVER use this value directly, it can change in future versions! Use ZSTD_isError() instead */
} ZSTD_ErrorCode;
/*! ZSTD_getErrorCode() :
diff --git a/thirdparty/zstd/common/zstd_internal.h b/thirdparty/zstd/common/zstd_internal.h
index 2610528608..e91cd20baa 100644
--- a/thirdparty/zstd/common/zstd_internal.h
+++ b/thirdparty/zstd/common/zstd_internal.h
@@ -5,6 +5,7 @@
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
*/
#ifndef ZSTD_CCOMMON_H_MODULE
@@ -29,6 +30,11 @@
#include "xxhash.h" /* XXH_reset, update, digest */
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
+
/*-*************************************
* Debug
***************************************/
@@ -96,9 +102,13 @@ static const U32 repStartValue[ZSTD_REP_NUM] = { 1, 4, 8 };
#define BIT0 1
#define ZSTD_WINDOWLOG_ABSOLUTEMIN 10
+#define ZSTD_WINDOWLOG_DEFAULTMAX 27 /* Default maximum allowed window log */
static const size_t ZSTD_fcs_fieldSize[4] = { 0, 2, 4, 8 };
static const size_t ZSTD_did_fieldSize[4] = { 0, 1, 2, 4 };
+#define ZSTD_FRAMEIDSIZE 4
+static const size_t ZSTD_frameIdSize = ZSTD_FRAMEIDSIZE; /* magic number size */
+
#define ZSTD_BLOCKHEADERSIZE 3 /* C standard doesn't allow `static const` variable to be init using another `static const` variable */
static const size_t ZSTD_blockHeaderSize = ZSTD_BLOCKHEADERSIZE;
typedef enum { bt_raw, bt_rle, bt_compressed, bt_reserved } blockType_e;
@@ -117,7 +127,8 @@ typedef enum { set_basic, set_rle, set_compressed, set_repeat } symbolEncodingTy
#define MaxLit ((1<<Litbits) - 1)
#define MaxML 52
#define MaxLL 35
-#define MaxOff 28
+#define DefaultMaxOff 28
+#define MaxOff 31
#define MaxSeq MAX(MaxLL, MaxML) /* Assumption : MaxOff < MaxLL,MaxML */
#define MLFSELog 9
#define LLFSELog 9
@@ -143,8 +154,8 @@ static const S16 ML_defaultNorm[MaxML+1] = { 1, 4, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1,
#define ML_DEFAULTNORMLOG 6 /* for static allocation */
static const U32 ML_defaultNormLog = ML_DEFAULTNORMLOG;
-static const S16 OF_defaultNorm[MaxOff+1] = { 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,-1,-1,-1,-1,-1 };
+static const S16 OF_defaultNorm[DefaultMaxOff+1] = { 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,-1,-1,-1,-1,-1 };
#define OF_DEFAULTNORMLOG 5 /* for static allocation */
static const U32 OF_defaultNormLog = OF_DEFAULTNORMLOG;
@@ -244,6 +255,26 @@ typedef struct {
} optState_t;
typedef struct {
+ U32 offset;
+ U32 checksum;
+} ldmEntry_t;
+
+typedef struct {
+ ldmEntry_t* hashTable;
+ BYTE* bucketOffsets; /* Next position in bucket to insert entry */
+ U64 hashPower; /* Used to compute the rolling hash.
+ * Depends on ldmParams.minMatchLength */
+} ldmState_t;
+
+typedef struct {
+ U32 enableLdm; /* 1 if enable long distance matching */
+ U32 hashLog; /* Log size of hashTable */
+ U32 bucketSizeLog; /* Log bucket size for collision resolution, at most 8 */
+ U32 minMatchLength; /* Minimum match length */
+ U32 hashEveryLog; /* Log number of entries to skip */
+} ldmParams_t;
+
+typedef struct {
U32 hufCTable[HUF_CTABLE_SIZE_U32(255)];
FSE_CTable offcodeCTable[FSE_CTABLE_SIZE_U32(OffFSELog, MaxOff)];
FSE_CTable matchlengthCTable[FSE_CTABLE_SIZE_U32(MLFSELog, MaxML)];
@@ -255,6 +286,28 @@ typedef struct {
FSE_repeat litlength_repeatMode;
} ZSTD_entropyCTables_t;
+struct ZSTD_CCtx_params_s {
+ ZSTD_format_e format;
+ ZSTD_compressionParameters cParams;
+ ZSTD_frameParameters fParams;
+
+ int compressionLevel;
+ U32 forceWindow; /* force back-references to respect limit of
+ * 1<<wLog, even for dictionary */
+
+ /* Multithreading: used to pass parameters to mtctx */
+ U32 nbThreads;
+ unsigned jobSize;
+ unsigned overlapSizeLog;
+
+ /* Long distance matching parameters */
+ ldmParams_t ldmParams;
+
+ /* For use with createCCtxParams() and freeCCtxParams() only */
+ ZSTD_customMem customMem;
+
+}; /* typedef'd to ZSTD_CCtx_params within "zstd.h" */
+
const seqStore_t* ZSTD_getSeqStore(const ZSTD_CCtx* ctx);
void ZSTD_seqToCodes(const seqStore_t* seqStorePtr);
@@ -268,24 +321,27 @@ void ZSTD_free(void* ptr, ZSTD_customMem customMem);
MEM_STATIC U32 ZSTD_highbit32(U32 val)
{
+ assert(val != 0);
+ {
# if defined(_MSC_VER) /* Visual */
- unsigned long r=0;
- _BitScanReverse(&r, val);
- return (unsigned)r;
+ unsigned long r=0;
+ _BitScanReverse(&r, val);
+ return (unsigned)r;
# elif defined(__GNUC__) && (__GNUC__ >= 3) /* GCC Intrinsic */
- return 31 - __builtin_clz(val);
+ return 31 - __builtin_clz(val);
# else /* Software version */
- static const int DeBruijnClz[32] = { 0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30, 8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31 };
- U32 v = val;
- int r;
- v |= v >> 1;
- v |= v >> 2;
- v |= v >> 4;
- v |= v >> 8;
- v |= v >> 16;
- r = DeBruijnClz[(U32)(v * 0x07C4ACDDU) >> 27];
- return r;
+ static const int DeBruijnClz[32] = { 0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30, 8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31 };
+ U32 v = val;
+ int r;
+ v |= v >> 1;
+ v |= v >> 2;
+ v |= v >> 4;
+ v |= v >> 8;
+ v |= v >> 16;
+ r = DeBruijnClz[(U32)(v * 0x07C4ACDDU) >> 27];
+ return r;
# endif
+ }
}
@@ -306,7 +362,7 @@ void ZSTD_invalidateRepCodes(ZSTD_CCtx* cctx);
size_t ZSTD_initCStream_internal(ZSTD_CStream* zcs,
const void* dict, size_t dictSize,
const ZSTD_CDict* cdict,
- ZSTD_parameters params, unsigned long long pledgedSrcSize);
+ ZSTD_CCtx_params params, unsigned long long pledgedSrcSize);
/*! ZSTD_compressStream_generic() :
* Private use only. To be called from zstdmt_compress.c in single-thread mode. */
@@ -315,10 +371,25 @@ size_t ZSTD_compressStream_generic(ZSTD_CStream* zcs,
ZSTD_inBuffer* input,
ZSTD_EndDirective const flushMode);
-/*! ZSTD_getParamsFromCDict() :
+/*! ZSTD_getCParamsFromCDict() :
* as the name implies */
-ZSTD_parameters ZSTD_getParamsFromCDict(const ZSTD_CDict* cdict);
-
+ZSTD_compressionParameters ZSTD_getCParamsFromCDict(const ZSTD_CDict* cdict);
+
+/* ZSTD_compressBegin_advanced_internal() :
+ * Private use only. To be called from zstdmt_compress.c. */
+size_t ZSTD_compressBegin_advanced_internal(ZSTD_CCtx* cctx,
+ const void* dict, size_t dictSize,
+ ZSTD_dictMode_e dictMode,
+ ZSTD_CCtx_params params,
+ unsigned long long pledgedSrcSize);
+
+/* ZSTD_compress_advanced_internal() :
+ * Private use only. To be called from zstdmt_compress.c. */
+size_t ZSTD_compress_advanced_internal(ZSTD_CCtx* cctx,
+ void* dst, size_t dstCapacity,
+ const void* src, size_t srcSize,
+ const void* dict,size_t dictSize,
+ ZSTD_CCtx_params params);
typedef struct {
blockType_e blockType;
@@ -331,5 +402,8 @@ typedef struct {
size_t ZSTD_getcBlockSize(const void* src, size_t srcSize,
blockProperties_t* bpPtr);
+#if defined (__cplusplus)
+}
+#endif
#endif /* ZSTD_CCOMMON_H_MODULE */
diff --git a/thirdparty/zstd/compress/fse_compress.c b/thirdparty/zstd/compress/fse_compress.c
index cc9fa73514..549c115d42 100644
--- a/thirdparty/zstd/compress/fse_compress.c
+++ b/thirdparty/zstd/compress/fse_compress.c
@@ -461,6 +461,7 @@ static unsigned FSE_minTableLog(size_t srcSize, unsigned maxSymbolValue)
U32 minBitsSrc = BIT_highbit32((U32)(srcSize - 1)) + 1;
U32 minBitsSymbols = BIT_highbit32(maxSymbolValue) + 2;
U32 minBits = minBitsSrc < minBitsSymbols ? minBitsSrc : minBitsSymbols;
+ assert(srcSize > 1); /* Not supported, RLE should be used instead */
return minBits;
}
@@ -469,6 +470,7 @@ unsigned FSE_optimalTableLog_internal(unsigned maxTableLog, size_t srcSize, unsi
U32 maxBitsSrc = BIT_highbit32((U32)(srcSize - 1)) - minus;
U32 tableLog = maxTableLog;
U32 minBits = FSE_minTableLog(srcSize, maxSymbolValue);
+ assert(srcSize > 1); /* Not supported, RLE should be used instead */
if (tableLog==0) tableLog = FSE_DEFAULT_TABLELOG;
if (maxBitsSrc < tableLog) tableLog = maxBitsSrc; /* Accuracy can be reduced */
if (minBits > tableLog) tableLog = minBits; /* Need a minimum to safely represent all symbol values */
@@ -580,7 +582,7 @@ size_t FSE_normalizeCount (short* normalizedCounter, unsigned tableLog,
if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge); /* Unsupported size */
if (tableLog < FSE_minTableLog(total, maxSymbolValue)) return ERROR(GENERIC); /* Too small tableLog, compression potentially impossible */
- { U32 const rtbTable[] = { 0, 473195, 504333, 520860, 550000, 700000, 750000, 830000 };
+ { static U32 const rtbTable[] = { 0, 473195, 504333, 520860, 550000, 700000, 750000, 830000 };
U64 const scale = 62 - tableLog;
U64 const step = ((U64)1<<62) / total; /* <== here, one division ! */
U64 const vStep = 1ULL<<(scale-20);
diff --git a/thirdparty/zstd/compress/huf_compress.c b/thirdparty/zstd/compress/huf_compress.c
index 2a47c18205..5692d56e00 100644
--- a/thirdparty/zstd/compress/huf_compress.c
+++ b/thirdparty/zstd/compress/huf_compress.c
@@ -167,7 +167,7 @@ size_t HUF_writeCTable (void* dst, size_t maxDstSize,
}
-size_t HUF_readCTable (HUF_CElt* CTable, U32 maxSymbolValue, const void* src, size_t srcSize)
+size_t HUF_readCTable (HUF_CElt* CTable, U32* maxSymbolValuePtr, const void* src, size_t srcSize)
{
BYTE huffWeight[HUF_SYMBOLVALUE_MAX + 1]; /* init not required, even though some static analyzer may complain */
U32 rankVal[HUF_TABLELOG_ABSOLUTEMAX + 1]; /* large enough for values from 0 to 16 */
@@ -179,7 +179,7 @@ size_t HUF_readCTable (HUF_CElt* CTable, U32 maxSymbolValue, const void* src, si
/* check result */
if (tableLog > HUF_TABLELOG_MAX) return ERROR(tableLog_tooLarge);
- if (nbSymbols > maxSymbolValue+1) return ERROR(maxSymbolValue_tooSmall);
+ if (nbSymbols > *maxSymbolValuePtr+1) return ERROR(maxSymbolValue_tooSmall);
/* Prepare base value per rank */
{ U32 n, nextRankStart = 0;
@@ -208,9 +208,10 @@ size_t HUF_readCTable (HUF_CElt* CTable, U32 maxSymbolValue, const void* src, si
min >>= 1;
} }
/* assign value within rank, symbol order */
- { U32 n; for (n=0; n<=maxSymbolValue; n++) CTable[n].val = valPerRank[CTable[n].nbBits]++; }
+ { U32 n; for (n=0; n<nbSymbols; n++) CTable[n].val = valPerRank[CTable[n].nbBits]++; }
}
+ *maxSymbolValuePtr = nbSymbols - 1;
return readSize;
}
diff --git a/thirdparty/zstd/compress/zstd_compress.c b/thirdparty/zstd/compress/zstd_compress.c
index 0322c03eb3..2c46c79f1c 100644
--- a/thirdparty/zstd/compress/zstd_compress.c
+++ b/thirdparty/zstd/compress/zstd_compress.c
@@ -5,6 +5,7 @@
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
*/
@@ -25,25 +26,19 @@
#include "fse.h"
#define HUF_STATIC_LINKING_ONLY
#include "huf.h"
-#include "zstd_internal.h" /* includes zstd.h */
-#include "zstdmt_compress.h"
-
-
-/*-*************************************
-* Constants
-***************************************/
-static const U32 g_searchStrength = 8; /* control skip over incompressible data */
-#define HASH_READ_SIZE 8
-typedef enum { ZSTDcs_created=0, ZSTDcs_init, ZSTDcs_ongoing, ZSTDcs_ending } ZSTD_compressionStage_e;
+#include "zstd_compress.h"
+#include "zstd_fast.h"
+#include "zstd_double_fast.h"
+#include "zstd_lazy.h"
+#include "zstd_opt.h"
+#include "zstd_ldm.h"
/*-*************************************
* Helper functions
***************************************/
size_t ZSTD_compressBound(size_t srcSize) {
- size_t const lowLimit = 256 KB;
- size_t const margin = (srcSize < lowLimit) ? (lowLimit-srcSize) >> 12 : 0; /* from 64 to 0 */
- return srcSize + (srcSize >> 8) + margin;
+ return ZSTD_COMPRESSBOUND(srcSize);
}
@@ -61,8 +56,6 @@ static void ZSTD_resetSeqStore(seqStore_t* ssPtr)
/*-*************************************
* Context memory management
***************************************/
-typedef enum { zcss_init=0, zcss_load, zcss_flush } ZSTD_cStreamStage;
-
struct ZSTD_CDict_s {
void* dictBuffer;
const void* dictContent;
@@ -70,65 +63,6 @@ struct ZSTD_CDict_s {
ZSTD_CCtx* refContext;
}; /* typedef'd to ZSTD_CDict within "zstd.h" */
-struct ZSTD_CCtx_s {
- const BYTE* nextSrc; /* next block here to continue on current prefix */
- const BYTE* base; /* All regular indexes relative to this position */
- const BYTE* dictBase; /* extDict indexes relative to this position */
- U32 dictLimit; /* below that point, need extDict */
- U32 lowLimit; /* below that point, no more data */
- U32 nextToUpdate; /* index from which to continue dictionary update */
- U32 nextToUpdate3; /* index from which to continue dictionary update */
- U32 hashLog3; /* dispatch table : larger == faster, more memory */
- U32 loadedDictEnd; /* index of end of dictionary */
- U32 forceWindow; /* force back-references to respect limit of 1<<wLog, even for dictionary */
- ZSTD_compressionStage_e stage;
- U32 dictID;
- int compressionLevel;
- ZSTD_parameters requestedParams;
- ZSTD_parameters appliedParams;
- void* workSpace;
- size_t workSpaceSize;
- size_t blockSize;
- U64 pledgedSrcSizePlusOne; /* this way, 0 (default) == unknown */
- U64 consumedSrcSize;
- XXH64_state_t xxhState;
- ZSTD_customMem customMem;
- size_t staticSize;
-
- seqStore_t seqStore; /* sequences storage ptrs */
- optState_t optState;
- U32* hashTable;
- U32* hashTable3;
- U32* chainTable;
- ZSTD_entropyCTables_t* entropy;
-
- /* streaming */
- char* inBuff;
- size_t inBuffSize;
- size_t inToCompress;
- size_t inBuffPos;
- size_t inBuffTarget;
- char* outBuff;
- size_t outBuffSize;
- size_t outBuffContentSize;
- size_t outBuffFlushedSize;
- ZSTD_cStreamStage streamStage;
- U32 frameEnded;
-
- /* Dictionary */
- ZSTD_dictMode_e dictMode; /* select restricting dictionary to "rawContent" or "fullDict" only */
- U32 dictContentByRef;
- ZSTD_CDict* cdictLocal;
- const ZSTD_CDict* cdict;
- const void* prefix;
- size_t prefixSize;
-
- /* Multi-threading */
- U32 nbThreads;
- ZSTDMT_CCtx* mtctx;
-};
-
-
ZSTD_CCtx* ZSTD_createCCtx(void)
{
return ZSTD_createCCtx_advanced(ZSTD_defaultCMem);
@@ -143,7 +77,7 @@ ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem)
cctx = (ZSTD_CCtx*) ZSTD_calloc(sizeof(ZSTD_CCtx), customMem);
if (!cctx) return NULL;
cctx->customMem = customMem;
- cctx->compressionLevel = ZSTD_CLEVEL_DEFAULT;
+ cctx->requestedParams.compressionLevel = ZSTD_CLEVEL_DEFAULT;
ZSTD_STATIC_ASSERT(zcss_init==0);
ZSTD_STATIC_ASSERT(ZSTD_CONTENTSIZE_UNKNOWN==(0ULL - 1));
return cctx;
@@ -151,7 +85,7 @@ ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem)
ZSTD_CCtx* ZSTD_initStaticCCtx(void *workspace, size_t workspaceSize)
{
- ZSTD_CCtx* cctx = (ZSTD_CCtx*) workspace;
+ ZSTD_CCtx* const cctx = (ZSTD_CCtx*) workspace;
if (workspaceSize <= sizeof(ZSTD_CCtx)) return NULL; /* minimum size */
if ((size_t)workspace & 7) return NULL; /* must be 8-aligned */
memset(workspace, 0, workspaceSize); /* may be a bit generous, could memset be smaller ? */
@@ -161,7 +95,7 @@ ZSTD_CCtx* ZSTD_initStaticCCtx(void *workspace, size_t workspaceSize)
/* entropy space (never moves) */
if (cctx->workSpaceSize < sizeof(ZSTD_entropyCTables_t)) return NULL;
- assert(((size_t)cctx->workSpace & 7) == 0); /* ensure correct alignment */
+ assert(((size_t)cctx->workSpace & (sizeof(void*)-1)) == 0); /* ensure correct alignment */
cctx->entropy = (ZSTD_entropyCTables_t*)cctx->workSpace;
return cctx;
@@ -175,23 +109,36 @@ size_t ZSTD_freeCCtx(ZSTD_CCtx* cctx)
cctx->workSpace = NULL;
ZSTD_freeCDict(cctx->cdictLocal);
cctx->cdictLocal = NULL;
+#ifdef ZSTD_MULTITHREAD
ZSTDMT_freeCCtx(cctx->mtctx);
cctx->mtctx = NULL;
+#endif
ZSTD_free(cctx, cctx->customMem);
return 0; /* reserved as a potential error code in the future */
}
+
+static size_t ZSTD_sizeof_mtctx(const ZSTD_CCtx* cctx)
+{
+#ifdef ZSTD_MULTITHREAD
+ return ZSTDMT_sizeof_CCtx(cctx->mtctx);
+#else
+ (void) cctx;
+ return 0;
+#endif
+}
+
+
size_t ZSTD_sizeof_CCtx(const ZSTD_CCtx* cctx)
{
if (cctx==NULL) return 0; /* support sizeof on NULL */
- DEBUGLOG(5, "sizeof(*cctx) : %u", (U32)sizeof(*cctx));
- DEBUGLOG(5, "workSpaceSize : %u", (U32)cctx->workSpaceSize);
- DEBUGLOG(5, "streaming buffers : %u", (U32)(cctx->outBuffSize + cctx->inBuffSize));
- DEBUGLOG(5, "inner MTCTX : %u", (U32)ZSTDMT_sizeof_CCtx(cctx->mtctx));
+ DEBUGLOG(3, "sizeof(*cctx) : %u", (U32)sizeof(*cctx));
+ DEBUGLOG(3, "workSpaceSize (including streaming buffers): %u", (U32)cctx->workSpaceSize);
+ DEBUGLOG(3, "inner cdict : %u", (U32)ZSTD_sizeof_CDict(cctx->cdictLocal));
+ DEBUGLOG(3, "inner MTCTX : %u", (U32)ZSTD_sizeof_mtctx(cctx));
return sizeof(*cctx) + cctx->workSpaceSize
+ ZSTD_sizeof_CDict(cctx->cdictLocal)
- + cctx->outBuffSize + cctx->inBuffSize
- + ZSTDMT_sizeof_CCtx(cctx->mtctx);
+ + ZSTD_sizeof_mtctx(cctx);
}
size_t ZSTD_sizeof_CStream(const ZSTD_CStream* zcs)
@@ -202,29 +149,99 @@ size_t ZSTD_sizeof_CStream(const ZSTD_CStream* zcs)
/* private API call, for dictBuilder only */
const seqStore_t* ZSTD_getSeqStore(const ZSTD_CCtx* ctx) { return &(ctx->seqStore); }
-static ZSTD_parameters ZSTD_getParamsFromCCtx(const ZSTD_CCtx* cctx) { return cctx->appliedParams; }
+#define ZSTD_CLEVEL_CUSTOM 999
-/* older variant; will be deprecated */
-size_t ZSTD_setCCtxParameter(ZSTD_CCtx* cctx, ZSTD_CCtxParameter param, unsigned value)
+static ZSTD_compressionParameters ZSTD_getCParamsFromCCtxParams(
+ ZSTD_CCtx_params params, U64 srcSizeHint, size_t dictSize)
{
- switch(param)
- {
- case ZSTD_p_forceWindow : cctx->forceWindow = value>0; cctx->loadedDictEnd = 0; return 0;
- ZSTD_STATIC_ASSERT(ZSTD_dm_auto==0);
- ZSTD_STATIC_ASSERT(ZSTD_dm_rawContent==1);
- case ZSTD_p_forceRawDict : cctx->dictMode = (ZSTD_dictMode_e)(value>0); return 0;
- default: return ERROR(parameter_unsupported);
- }
+ return (params.compressionLevel == ZSTD_CLEVEL_CUSTOM ?
+ params.cParams :
+ ZSTD_getCParams(params.compressionLevel, srcSizeHint, dictSize));
}
+static void ZSTD_cLevelToCCtxParams_srcSize(ZSTD_CCtx_params* params, U64 srcSize)
+{
+ params->cParams = ZSTD_getCParamsFromCCtxParams(*params, srcSize, 0);
+ params->compressionLevel = ZSTD_CLEVEL_CUSTOM;
+}
-#define ZSTD_CLEVEL_CUSTOM 999
static void ZSTD_cLevelToCParams(ZSTD_CCtx* cctx)
{
- if (cctx->compressionLevel==ZSTD_CLEVEL_CUSTOM) return;
- cctx->requestedParams.cParams = ZSTD_getCParams(cctx->compressionLevel,
- cctx->pledgedSrcSizePlusOne-1, 0);
- cctx->compressionLevel = ZSTD_CLEVEL_CUSTOM;
+ ZSTD_cLevelToCCtxParams_srcSize(
+ &cctx->requestedParams, cctx->pledgedSrcSizePlusOne-1);
+}
+
+static void ZSTD_cLevelToCCtxParams(ZSTD_CCtx_params* params)
+{
+ ZSTD_cLevelToCCtxParams_srcSize(params, 0);
+}
+
+static ZSTD_CCtx_params ZSTD_makeCCtxParamsFromCParams(
+ ZSTD_compressionParameters cParams)
+{
+ ZSTD_CCtx_params cctxParams;
+ memset(&cctxParams, 0, sizeof(cctxParams));
+ cctxParams.cParams = cParams;
+ cctxParams.compressionLevel = ZSTD_CLEVEL_CUSTOM;
+ return cctxParams;
+}
+
+static ZSTD_CCtx_params* ZSTD_createCCtxParams_advanced(
+ ZSTD_customMem customMem)
+{
+ ZSTD_CCtx_params* params;
+ if (!customMem.customAlloc ^ !customMem.customFree) return NULL;
+ params = (ZSTD_CCtx_params*)ZSTD_calloc(
+ sizeof(ZSTD_CCtx_params), customMem);
+ if (!params) { return NULL; }
+ params->customMem = customMem;
+ params->compressionLevel = ZSTD_CLEVEL_DEFAULT;
+ return params;
+}
+
+ZSTD_CCtx_params* ZSTD_createCCtxParams(void)
+{
+ return ZSTD_createCCtxParams_advanced(ZSTD_defaultCMem);
+}
+
+size_t ZSTD_freeCCtxParams(ZSTD_CCtx_params* params)
+{
+ if (params == NULL) { return 0; }
+ ZSTD_free(params, params->customMem);
+ return 0;
+}
+
+size_t ZSTD_resetCCtxParams(ZSTD_CCtx_params* params)
+{
+ return ZSTD_initCCtxParams(params, ZSTD_CLEVEL_DEFAULT);
+}
+
+size_t ZSTD_initCCtxParams(ZSTD_CCtx_params* cctxParams, int compressionLevel) {
+ if (!cctxParams) { return ERROR(GENERIC); }
+ memset(cctxParams, 0, sizeof(*cctxParams));
+ cctxParams->compressionLevel = compressionLevel;
+ return 0;
+}
+
+size_t ZSTD_initCCtxParams_advanced(ZSTD_CCtx_params* cctxParams, ZSTD_parameters params)
+{
+ if (!cctxParams) { return ERROR(GENERIC); }
+ CHECK_F( ZSTD_checkCParams(params.cParams) );
+ memset(cctxParams, 0, sizeof(*cctxParams));
+ cctxParams->cParams = params.cParams;
+ cctxParams->fParams = params.fParams;
+ cctxParams->compressionLevel = ZSTD_CLEVEL_CUSTOM;
+ return 0;
+}
+
+static ZSTD_CCtx_params ZSTD_assignParamsToCCtxParams(
+ ZSTD_CCtx_params cctxParams, ZSTD_parameters params)
+{
+ ZSTD_CCtx_params ret = cctxParams;
+ ret.cParams = params.cParams;
+ ret.fParams = params.fParams;
+ ret.compressionLevel = ZSTD_CLEVEL_CUSTOM;
+ return ret;
}
#define CLAMPCHECK(val,min,max) { \
@@ -238,167 +255,285 @@ size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, unsigned v
switch(param)
{
- case ZSTD_p_compressionLevel :
- if ((int)value > ZSTD_maxCLevel()) value = ZSTD_maxCLevel(); /* cap max compression level */
+ case ZSTD_p_format :
+ return ZSTD_CCtxParam_setParameter(&cctx->requestedParams, param, value);
+
+ case ZSTD_p_compressionLevel:
if (value == 0) return 0; /* special value : 0 means "don't change anything" */
if (cctx->cdict) return ERROR(stage_wrong);
- cctx->compressionLevel = value;
- return 0;
+ return ZSTD_CCtxParam_setParameter(&cctx->requestedParams, param, value);
+
+ case ZSTD_p_windowLog:
+ case ZSTD_p_hashLog:
+ case ZSTD_p_chainLog:
+ case ZSTD_p_searchLog:
+ case ZSTD_p_minMatch:
+ case ZSTD_p_targetLength:
+ case ZSTD_p_compressionStrategy:
+ if (value == 0) return 0; /* special value : 0 means "don't change anything" */
+ if (cctx->cdict) return ERROR(stage_wrong);
+ ZSTD_cLevelToCParams(cctx); /* Can optimize if srcSize is known */
+ return ZSTD_CCtxParam_setParameter(&cctx->requestedParams, param, value);
- case ZSTD_p_windowLog :
- DEBUGLOG(5, "setting ZSTD_p_windowLog = %u (cdict:%u)",
- value, (cctx->cdict!=NULL));
+ case ZSTD_p_contentSizeFlag:
+ case ZSTD_p_checksumFlag:
+ case ZSTD_p_dictIDFlag:
+ return ZSTD_CCtxParam_setParameter(&cctx->requestedParams, param, value);
+
+ case ZSTD_p_forceMaxWindow : /* Force back-references to remain < windowSize,
+ * even when referencing into Dictionary content
+ * default : 0 when using a CDict, 1 when using a Prefix */
+ cctx->loadedDictEnd = 0;
+ return ZSTD_CCtxParam_setParameter(&cctx->requestedParams, param, value);
+
+ case ZSTD_p_nbThreads:
+ if (value==0) return 0;
+ DEBUGLOG(5, " setting nbThreads : %u", value);
+ if (value > 1 && cctx->staticSize) {
+ return ERROR(parameter_unsupported); /* MT not compatible with static alloc */
+ }
+ return ZSTD_CCtxParam_setParameter(&cctx->requestedParams, param, value);
+
+ case ZSTD_p_jobSize:
+ return ZSTD_CCtxParam_setParameter(&cctx->requestedParams, param, value);
+
+ case ZSTD_p_overlapSizeLog:
+ DEBUGLOG(5, " setting overlap with nbThreads == %u", cctx->requestedParams.nbThreads);
+ return ZSTD_CCtxParam_setParameter(&cctx->requestedParams, param, value);
+
+ case ZSTD_p_enableLongDistanceMatching:
+ if (cctx->cdict) return ERROR(stage_wrong);
+ if (value != 0) {
+ ZSTD_cLevelToCParams(cctx);
+ }
+ return ZSTD_CCtxParam_setParameter(&cctx->requestedParams, param, value);
+
+ case ZSTD_p_ldmHashLog:
+ case ZSTD_p_ldmMinMatch:
if (value == 0) return 0; /* special value : 0 means "don't change anything" */
if (cctx->cdict) return ERROR(stage_wrong);
+ return ZSTD_CCtxParam_setParameter(&cctx->requestedParams, param, value);
+
+ case ZSTD_p_ldmBucketSizeLog:
+ case ZSTD_p_ldmHashEveryLog:
+ if (cctx->cdict) return ERROR(stage_wrong);
+ return ZSTD_CCtxParam_setParameter(&cctx->requestedParams, param, value);
+
+ default: return ERROR(parameter_unsupported);
+ }
+}
+
+size_t ZSTD_CCtxParam_setParameter(
+ ZSTD_CCtx_params* params, ZSTD_cParameter param, unsigned value)
+{
+ switch(param)
+ {
+ case ZSTD_p_format :
+ if (value > (unsigned)ZSTD_f_zstd1_magicless)
+ return ERROR(parameter_unsupported);
+ params->format = (ZSTD_format_e)value;
+ return 0;
+
+ case ZSTD_p_compressionLevel :
+ if ((int)value > ZSTD_maxCLevel()) value = ZSTD_maxCLevel();
+ if (value == 0) return 0;
+ params->compressionLevel = value;
+ return 0;
+
+ case ZSTD_p_windowLog :
+ if (value == 0) return 0;
CLAMPCHECK(value, ZSTD_WINDOWLOG_MIN, ZSTD_WINDOWLOG_MAX);
- ZSTD_cLevelToCParams(cctx);
- cctx->requestedParams.cParams.windowLog = value;
+ ZSTD_cLevelToCCtxParams(params);
+ params->cParams.windowLog = value;
return 0;
case ZSTD_p_hashLog :
- if (value == 0) return 0; /* special value : 0 means "don't change anything" */
- if (cctx->cdict) return ERROR(stage_wrong);
+ if (value == 0) return 0;
CLAMPCHECK(value, ZSTD_HASHLOG_MIN, ZSTD_HASHLOG_MAX);
- ZSTD_cLevelToCParams(cctx);
- cctx->requestedParams.cParams.hashLog = value;
+ ZSTD_cLevelToCCtxParams(params);
+ params->cParams.hashLog = value;
return 0;
case ZSTD_p_chainLog :
- if (value == 0) return 0; /* special value : 0 means "don't change anything" */
- if (cctx->cdict) return ERROR(stage_wrong);
+ if (value == 0) return 0;
CLAMPCHECK(value, ZSTD_CHAINLOG_MIN, ZSTD_CHAINLOG_MAX);
- ZSTD_cLevelToCParams(cctx);
- cctx->requestedParams.cParams.chainLog = value;
+ ZSTD_cLevelToCCtxParams(params);
+ params->cParams.chainLog = value;
return 0;
case ZSTD_p_searchLog :
- if (value == 0) return 0; /* special value : 0 means "don't change anything" */
- if (cctx->cdict) return ERROR(stage_wrong);
+ if (value == 0) return 0;
CLAMPCHECK(value, ZSTD_SEARCHLOG_MIN, ZSTD_SEARCHLOG_MAX);
- ZSTD_cLevelToCParams(cctx);
- cctx->requestedParams.cParams.searchLog = value;
+ ZSTD_cLevelToCCtxParams(params);
+ params->cParams.searchLog = value;
return 0;
case ZSTD_p_minMatch :
- if (value == 0) return 0; /* special value : 0 means "don't change anything" */
- if (cctx->cdict) return ERROR(stage_wrong);
+ if (value == 0) return 0;
CLAMPCHECK(value, ZSTD_SEARCHLENGTH_MIN, ZSTD_SEARCHLENGTH_MAX);
- ZSTD_cLevelToCParams(cctx);
- cctx->requestedParams.cParams.searchLength = value;
+ ZSTD_cLevelToCCtxParams(params);
+ params->cParams.searchLength = value;
return 0;
case ZSTD_p_targetLength :
- if (value == 0) return 0; /* special value : 0 means "don't change anything" */
- if (cctx->cdict) return ERROR(stage_wrong);
+ if (value == 0) return 0;
CLAMPCHECK(value, ZSTD_TARGETLENGTH_MIN, ZSTD_TARGETLENGTH_MAX);
- ZSTD_cLevelToCParams(cctx);
- cctx->requestedParams.cParams.targetLength = value;
+ ZSTD_cLevelToCCtxParams(params);
+ params->cParams.targetLength = value;
return 0;
case ZSTD_p_compressionStrategy :
- if (value == 0) return 0; /* special value : 0 means "don't change anything" */
- if (cctx->cdict) return ERROR(stage_wrong);
+ if (value == 0) return 0;
CLAMPCHECK(value, (unsigned)ZSTD_fast, (unsigned)ZSTD_btultra);
- ZSTD_cLevelToCParams(cctx);
- cctx->requestedParams.cParams.strategy = (ZSTD_strategy)value;
+ ZSTD_cLevelToCCtxParams(params);
+ params->cParams.strategy = (ZSTD_strategy)value;
return 0;
case ZSTD_p_contentSizeFlag :
- DEBUGLOG(5, "set content size flag = %u", (value>0));
/* Content size written in frame header _when known_ (default:1) */
- cctx->requestedParams.fParams.contentSizeFlag = value>0;
+ DEBUGLOG(5, "set content size flag = %u", (value>0));
+ params->fParams.contentSizeFlag = value > 0;
return 0;
case ZSTD_p_checksumFlag :
/* A 32-bits content checksum will be calculated and written at end of frame (default:0) */
- cctx->requestedParams.fParams.checksumFlag = value>0;
+ params->fParams.checksumFlag = value > 0;
return 0;
case ZSTD_p_dictIDFlag : /* When applicable, dictionary's dictID is provided in frame header (default:1) */
DEBUGLOG(5, "set dictIDFlag = %u", (value>0));
- cctx->requestedParams.fParams.noDictIDFlag = (value==0);
+ params->fParams.noDictIDFlag = (value == 0);
return 0;
- /* Dictionary parameters */
- case ZSTD_p_dictMode :
- if (cctx->cdict) return ERROR(stage_wrong); /* must be set before loading */
- /* restrict dictionary mode, to "rawContent" or "fullDict" only */
- ZSTD_STATIC_ASSERT((U32)ZSTD_dm_fullDict > (U32)ZSTD_dm_rawContent);
- if (value > (unsigned)ZSTD_dm_fullDict)
- return ERROR(parameter_outOfBound);
- cctx->dictMode = (ZSTD_dictMode_e)value;
+ case ZSTD_p_forceMaxWindow :
+ params->forceWindow = value > 0;
return 0;
- case ZSTD_p_refDictContent :
- if (cctx->cdict) return ERROR(stage_wrong); /* must be set before loading */
- /* dictionary content will be referenced, instead of copied */
- cctx->dictContentByRef = value>0;
+ case ZSTD_p_nbThreads :
+ if (value == 0) return 0;
+#ifndef ZSTD_MULTITHREAD
+ if (value > 1) return ERROR(parameter_unsupported);
return 0;
+#else
+ return ZSTDMT_initializeCCtxParameters(params, value);
+#endif
- case ZSTD_p_forceMaxWindow : /* Force back-references to remain < windowSize,
- * even when referencing into Dictionary content
- * default : 0 when using a CDict, 1 when using a Prefix */
- cctx->forceWindow = value>0;
- cctx->loadedDictEnd = 0;
- return 0;
+ case ZSTD_p_jobSize :
+#ifndef ZSTD_MULTITHREAD
+ return ERROR(parameter_unsupported);
+#else
+ if (params->nbThreads <= 1) return ERROR(parameter_unsupported);
+ return ZSTDMT_CCtxParam_setMTCtxParameter(params, ZSTDMT_p_sectionSize, value);
+#endif
- case ZSTD_p_nbThreads:
- if (value==0) return 0;
- DEBUGLOG(5, " setting nbThreads : %u", value);
+ case ZSTD_p_overlapSizeLog :
#ifndef ZSTD_MULTITHREAD
- if (value > 1) return ERROR(parameter_unsupported);
+ return ERROR(parameter_unsupported);
+#else
+ if (params->nbThreads <= 1) return ERROR(parameter_unsupported);
+ return ZSTDMT_CCtxParam_setMTCtxParameter(params, ZSTDMT_p_overlapSectionLog, value);
#endif
- if ((value>1) && (cctx->nbThreads != value)) {
- if (cctx->staticSize) /* MT not compatible with static alloc */
- return ERROR(parameter_unsupported);
- ZSTDMT_freeCCtx(cctx->mtctx);
- cctx->nbThreads = 1;
- cctx->mtctx = ZSTDMT_createCCtx_advanced(value, cctx->customMem);
- if (cctx->mtctx == NULL) return ERROR(memory_allocation);
+
+ case ZSTD_p_enableLongDistanceMatching :
+ if (value != 0) {
+ ZSTD_cLevelToCCtxParams(params);
+ params->cParams.windowLog = ZSTD_LDM_DEFAULT_WINDOW_LOG;
}
- cctx->nbThreads = value;
+ return ZSTD_ldm_initializeParameters(&params->ldmParams, value);
+
+ case ZSTD_p_ldmHashLog :
+ if (value == 0) return 0;
+ CLAMPCHECK(value, ZSTD_HASHLOG_MIN, ZSTD_HASHLOG_MAX);
+ params->ldmParams.hashLog = value;
return 0;
- case ZSTD_p_jobSize:
- if (cctx->nbThreads <= 1) return ERROR(parameter_unsupported);
- assert(cctx->mtctx != NULL);
- return ZSTDMT_setMTCtxParameter(cctx->mtctx, ZSTDMT_p_sectionSize, value);
+ case ZSTD_p_ldmMinMatch :
+ if (value == 0) return 0;
+ CLAMPCHECK(value, ZSTD_LDM_MINMATCH_MIN, ZSTD_LDM_MINMATCH_MAX);
+ params->ldmParams.minMatchLength = value;
+ return 0;
- case ZSTD_p_overlapSizeLog:
- DEBUGLOG(5, " setting overlap with nbThreads == %u", cctx->nbThreads);
- if (cctx->nbThreads <= 1) return ERROR(parameter_unsupported);
- assert(cctx->mtctx != NULL);
- return ZSTDMT_setMTCtxParameter(cctx->mtctx, ZSTDMT_p_overlapSectionLog, value);
+ case ZSTD_p_ldmBucketSizeLog :
+ if (value > ZSTD_LDM_BUCKETSIZELOG_MAX) {
+ return ERROR(parameter_outOfBound);
+ }
+ params->ldmParams.bucketSizeLog = value;
+ return 0;
+
+ case ZSTD_p_ldmHashEveryLog :
+ if (value > ZSTD_WINDOWLOG_MAX - ZSTD_HASHLOG_MIN) {
+ return ERROR(parameter_outOfBound);
+ }
+ params->ldmParams.hashEveryLog = value;
+ return 0;
default: return ERROR(parameter_unsupported);
}
}
+/**
+ * This function should be updated whenever ZSTD_CCtx_params is updated.
+ * Parameters are copied manually before the dictionary is loaded.
+ * The multithreading parameters jobSize and overlapSizeLog are set only if
+ * nbThreads > 1.
+ *
+ * Pledged srcSize is treated as unknown.
+ */
+size_t ZSTD_CCtx_setParametersUsingCCtxParams(
+ ZSTD_CCtx* cctx, const ZSTD_CCtx_params* params)
+{
+ if (cctx->streamStage != zcss_init) return ERROR(stage_wrong);
+ if (cctx->cdict) return ERROR(stage_wrong);
+
+ /* Assume the compression and frame parameters are validated */
+ cctx->requestedParams.cParams = params->cParams;
+ cctx->requestedParams.fParams = params->fParams;
+ cctx->requestedParams.compressionLevel = params->compressionLevel;
+
+ /* Set force window explicitly since it sets cctx->loadedDictEnd */
+ CHECK_F( ZSTD_CCtx_setParameter(
+ cctx, ZSTD_p_forceMaxWindow, params->forceWindow) );
+
+ /* Set multithreading parameters explicitly */
+ CHECK_F( ZSTD_CCtx_setParameter(cctx, ZSTD_p_nbThreads, params->nbThreads) );
+ if (params->nbThreads > 1) {
+ CHECK_F( ZSTD_CCtx_setParameter(cctx, ZSTD_p_jobSize, params->jobSize) );
+ CHECK_F( ZSTD_CCtx_setParameter(
+ cctx, ZSTD_p_overlapSizeLog, params->overlapSizeLog) );
+ }
+
+ /* Copy long distance matching parameters */
+ cctx->requestedParams.ldmParams = params->ldmParams;
+
+ /* customMem is used only for create/free params and can be ignored */
+ return 0;
+}
+
ZSTDLIB_API size_t ZSTD_CCtx_setPledgedSrcSize(ZSTD_CCtx* cctx, unsigned long long pledgedSrcSize)
{
- DEBUGLOG(5, " setting pledgedSrcSize to %u", (U32)pledgedSrcSize);
+ DEBUGLOG(4, " setting pledgedSrcSize to %u", (U32)pledgedSrcSize);
if (cctx->streamStage != zcss_init) return ERROR(stage_wrong);
cctx->pledgedSrcSizePlusOne = pledgedSrcSize+1;
return 0;
}
-ZSTDLIB_API size_t ZSTD_CCtx_loadDictionary(ZSTD_CCtx* cctx, const void* dict, size_t dictSize)
+size_t ZSTD_CCtx_loadDictionary_advanced(
+ ZSTD_CCtx* cctx, const void* dict, size_t dictSize,
+ ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictMode_e dictMode)
{
if (cctx->streamStage != zcss_init) return ERROR(stage_wrong);
if (cctx->staticSize) return ERROR(memory_allocation); /* no malloc for static CCtx */
- DEBUGLOG(5, "load dictionary of size %u", (U32)dictSize);
+ DEBUGLOG(4, "load dictionary of size %u", (U32)dictSize);
ZSTD_freeCDict(cctx->cdictLocal); /* in case one already exists */
if (dict==NULL || dictSize==0) { /* no dictionary mode */
cctx->cdictLocal = NULL;
cctx->cdict = NULL;
} else {
ZSTD_compressionParameters const cParams =
- cctx->compressionLevel == ZSTD_CLEVEL_CUSTOM ?
- cctx->requestedParams.cParams :
- ZSTD_getCParams(cctx->compressionLevel, 0, dictSize);
+ ZSTD_getCParamsFromCCtxParams(cctx->requestedParams, 0, dictSize);
cctx->cdictLocal = ZSTD_createCDict_advanced(
dict, dictSize,
- cctx->dictContentByRef, cctx->dictMode,
+ dictLoadMethod, dictMode,
cParams, cctx->customMem);
cctx->cdict = cctx->cdictLocal;
if (cctx->cdictLocal == NULL)
@@ -407,21 +542,41 @@ ZSTDLIB_API size_t ZSTD_CCtx_loadDictionary(ZSTD_CCtx* cctx, const void* dict, s
return 0;
}
+ZSTDLIB_API size_t ZSTD_CCtx_loadDictionary_byReference(
+ ZSTD_CCtx* cctx, const void* dict, size_t dictSize)
+{
+ return ZSTD_CCtx_loadDictionary_advanced(
+ cctx, dict, dictSize, ZSTD_dlm_byRef, ZSTD_dm_auto);
+}
+
+ZSTDLIB_API size_t ZSTD_CCtx_loadDictionary(ZSTD_CCtx* cctx, const void* dict, size_t dictSize)
+{
+ return ZSTD_CCtx_loadDictionary_advanced(
+ cctx, dict, dictSize, ZSTD_dlm_byCopy, ZSTD_dm_auto);
+}
+
+
size_t ZSTD_CCtx_refCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict)
{
if (cctx->streamStage != zcss_init) return ERROR(stage_wrong);
cctx->cdict = cdict;
- cctx->prefix = NULL; /* exclusive */
- cctx->prefixSize = 0;
+ memset(&cctx->prefixDict, 0, sizeof(cctx->prefixDict)); /* exclusive */
return 0;
}
size_t ZSTD_CCtx_refPrefix(ZSTD_CCtx* cctx, const void* prefix, size_t prefixSize)
{
+ return ZSTD_CCtx_refPrefix_advanced(cctx, prefix, prefixSize, ZSTD_dm_rawContent);
+}
+
+size_t ZSTD_CCtx_refPrefix_advanced(
+ ZSTD_CCtx* cctx, const void* prefix, size_t prefixSize, ZSTD_dictMode_e dictMode)
+{
if (cctx->streamStage != zcss_init) return ERROR(stage_wrong);
cctx->cdict = NULL; /* prefix discards any prior cdict */
- cctx->prefix = prefix;
- cctx->prefixSize = prefixSize;
+ cctx->prefixDict.dict = prefix;
+ cctx->prefixDict.dictSize = prefixSize;
+ cctx->prefixDict.dictMode = dictMode;
return 0;
}
@@ -484,28 +639,37 @@ static U32 ZSTD_cycleLog(U32 hashLog, ZSTD_strategy strat)
/** ZSTD_adjustCParams_internal() :
optimize `cPar` for a given input (`srcSize` and `dictSize`).
- mostly downsizing to reduce memory consumption and initialization.
- Both `srcSize` and `dictSize` are optional (use 0 if unknown),
- but if both are 0, no optimization can be done.
- Note : cPar is considered validated at this stage. Use ZSTD_checkParams() to ensure that. */
+ mostly downsizing to reduce memory consumption and initialization latency.
+ Both `srcSize` and `dictSize` are optional (use 0 if unknown).
+ Note : cPar is considered validated at this stage. Use ZSTD_checkCParams() to ensure that condition. */
ZSTD_compressionParameters ZSTD_adjustCParams_internal(ZSTD_compressionParameters cPar, unsigned long long srcSize, size_t dictSize)
{
+ static const U64 minSrcSize = 513; /* (1<<9) + 1 */
+ static const U64 maxWindowResize = 1ULL << (ZSTD_WINDOWLOG_MAX-1);
assert(ZSTD_checkCParams(cPar)==0);
- if (srcSize+dictSize == 0) return cPar; /* no size information available : no adjustment */
-
- /* resize params, to use less memory when necessary */
- { U32 const minSrcSize = (srcSize==0) ? 500 : 0;
- U64 const rSize = srcSize + dictSize + minSrcSize;
- if (rSize < ((U64)1<<ZSTD_WINDOWLOG_MAX)) {
- U32 const srcLog = MAX(ZSTD_HASHLOG_MIN, ZSTD_highbit32((U32)(rSize)-1) + 1);
- if (cPar.windowLog > srcLog) cPar.windowLog = srcLog;
- } }
+
+ if (dictSize && (srcSize+1<2) /* srcSize unknown */ )
+ srcSize = minSrcSize; /* presumed small when there is a dictionary */
+ else if (srcSize == 0)
+ srcSize = ZSTD_CONTENTSIZE_UNKNOWN; /* 0 == unknown : presumed large */
+
+ /* resize windowLog if input is small enough, to use less memory */
+ if ( (srcSize < maxWindowResize)
+ && (dictSize < maxWindowResize) ) {
+ U32 const tSize = (U32)(srcSize + dictSize);
+ static U32 const hashSizeMin = 1 << ZSTD_HASHLOG_MIN;
+ U32 const srcLog = (tSize < hashSizeMin) ? ZSTD_HASHLOG_MIN :
+ ZSTD_highbit32(tSize-1) + 1;
+ if (cPar.windowLog > srcLog) cPar.windowLog = srcLog;
+ }
if (cPar.hashLog > cPar.windowLog) cPar.hashLog = cPar.windowLog;
{ U32 const cycleLog = ZSTD_cycleLog(cPar.chainLog, cPar.strategy);
- if (cycleLog > cPar.windowLog) cPar.chainLog -= (cycleLog - cPar.windowLog);
+ if (cycleLog > cPar.windowLog)
+ cPar.chainLog -= (cycleLog - cPar.windowLog);
}
- if (cPar.windowLog < ZSTD_WINDOWLOG_ABSOLUTEMIN) cPar.windowLog = ZSTD_WINDOWLOG_ABSOLUTEMIN; /* required for frame header */
+ if (cPar.windowLog < ZSTD_WINDOWLOG_ABSOLUTEMIN)
+ cPar.windowLog = ZSTD_WINDOWLOG_ABSOLUTEMIN; /* required for frame header */
return cPar;
}
@@ -516,56 +680,81 @@ ZSTD_compressionParameters ZSTD_adjustCParams(ZSTD_compressionParameters cPar, u
return ZSTD_adjustCParams_internal(cPar, srcSize, dictSize);
}
-
-size_t ZSTD_estimateCCtxSize_advanced(ZSTD_compressionParameters cParams)
+size_t ZSTD_estimateCCtxSize_usingCCtxParams(const ZSTD_CCtx_params* params)
{
- size_t const blockSize = MIN(ZSTD_BLOCKSIZE_MAX, (size_t)1 << cParams.windowLog);
- U32 const divider = (cParams.searchLength==3) ? 3 : 4;
- size_t const maxNbSeq = blockSize / divider;
- size_t const tokenSpace = blockSize + 11*maxNbSeq;
+ /* Estimate CCtx size is supported for single-threaded compression only. */
+ if (params->nbThreads > 1) { return ERROR(GENERIC); }
+ { ZSTD_compressionParameters const cParams =
+ ZSTD_getCParamsFromCCtxParams(*params, 0, 0);
+ size_t const blockSize = MIN(ZSTD_BLOCKSIZE_MAX, (size_t)1 << cParams.windowLog);
+ U32 const divider = (cParams.searchLength==3) ? 3 : 4;
+ size_t const maxNbSeq = blockSize / divider;
+ size_t const tokenSpace = blockSize + 11*maxNbSeq;
+ size_t const chainSize =
+ (cParams.strategy == ZSTD_fast) ? 0 : ((size_t)1 << cParams.chainLog);
+ size_t const hSize = ((size_t)1) << cParams.hashLog;
+ U32 const hashLog3 = (cParams.searchLength>3) ?
+ 0 : MIN(ZSTD_HASHLOG3_MAX, cParams.windowLog);
+ size_t const h3Size = ((size_t)1) << hashLog3;
+ size_t const entropySpace = sizeof(ZSTD_entropyCTables_t);
+ size_t const tableSpace = (chainSize + hSize + h3Size) * sizeof(U32);
+
+ size_t const optBudget =
+ ((MaxML+1) + (MaxLL+1) + (MaxOff+1) + (1<<Litbits))*sizeof(U32)
+ + (ZSTD_OPT_NUM+1)*(sizeof(ZSTD_match_t) + sizeof(ZSTD_optimal_t));
+ size_t const optSpace = ((cParams.strategy == ZSTD_btopt) || (cParams.strategy == ZSTD_btultra)) ? optBudget : 0;
- size_t const chainSize = (cParams.strategy == ZSTD_fast) ? 0 : (1 << cParams.chainLog);
- size_t const hSize = ((size_t)1) << cParams.hashLog;
- U32 const hashLog3 = (cParams.searchLength>3) ? 0 : MIN(ZSTD_HASHLOG3_MAX, cParams.windowLog);
- size_t const h3Size = ((size_t)1) << hashLog3;
- size_t const entropySpace = sizeof(ZSTD_entropyCTables_t);
- size_t const tableSpace = (chainSize + hSize + h3Size) * sizeof(U32);
+ size_t const ldmSpace = params->ldmParams.enableLdm ?
+ ZSTD_ldm_getTableSize(params->ldmParams.hashLog,
+ params->ldmParams.bucketSizeLog) : 0;
- size_t const optBudget = ((MaxML+1) + (MaxLL+1) + (MaxOff+1) + (1<<Litbits))*sizeof(U32)
- + (ZSTD_OPT_NUM+1)*(sizeof(ZSTD_match_t) + sizeof(ZSTD_optimal_t));
- size_t const optSpace = ((cParams.strategy == ZSTD_btopt) || (cParams.strategy == ZSTD_btultra)) ? optBudget : 0;
- size_t const neededSpace = entropySpace + tableSpace + tokenSpace + optSpace;
+ size_t const neededSpace = entropySpace + tableSpace + tokenSpace +
+ optSpace + ldmSpace;
- DEBUGLOG(5, "sizeof(ZSTD_CCtx) : %u", (U32)sizeof(ZSTD_CCtx));
- DEBUGLOG(5, "estimate workSpace : %u", (U32)neededSpace);
- return sizeof(ZSTD_CCtx) + neededSpace;
+ DEBUGLOG(5, "sizeof(ZSTD_CCtx) : %u", (U32)sizeof(ZSTD_CCtx));
+ DEBUGLOG(5, "estimate workSpace : %u", (U32)neededSpace);
+ return sizeof(ZSTD_CCtx) + neededSpace;
+ }
+}
+
+size_t ZSTD_estimateCCtxSize_usingCParams(ZSTD_compressionParameters cParams)
+{
+ ZSTD_CCtx_params const params = ZSTD_makeCCtxParamsFromCParams(cParams);
+ return ZSTD_estimateCCtxSize_usingCCtxParams(&params);
}
size_t ZSTD_estimateCCtxSize(int compressionLevel)
{
ZSTD_compressionParameters const cParams = ZSTD_getCParams(compressionLevel, 0, 0);
- return ZSTD_estimateCCtxSize_advanced(cParams);
+ return ZSTD_estimateCCtxSize_usingCParams(cParams);
}
-size_t ZSTD_estimateCStreamSize_advanced(ZSTD_compressionParameters cParams)
+size_t ZSTD_estimateCStreamSize_usingCCtxParams(const ZSTD_CCtx_params* params)
{
- size_t const CCtxSize = ZSTD_estimateCCtxSize_advanced(cParams);
- size_t const blockSize = MIN(ZSTD_BLOCKSIZE_MAX, (size_t)1 << cParams.windowLog);
- size_t const inBuffSize = ((size_t)1 << cParams.windowLog) + blockSize;
- size_t const outBuffSize = ZSTD_compressBound(blockSize) + 1;
- size_t const streamingSize = inBuffSize + outBuffSize;
+ if (params->nbThreads > 1) { return ERROR(GENERIC); }
+ { size_t const CCtxSize = ZSTD_estimateCCtxSize_usingCCtxParams(params);
+ size_t const blockSize = MIN(ZSTD_BLOCKSIZE_MAX, (size_t)1 << params->cParams.windowLog);
+ size_t const inBuffSize = ((size_t)1 << params->cParams.windowLog) + blockSize;
+ size_t const outBuffSize = ZSTD_compressBound(blockSize) + 1;
+ size_t const streamingSize = inBuffSize + outBuffSize;
- return CCtxSize + streamingSize;
+ return CCtxSize + streamingSize;
+ }
+}
+
+size_t ZSTD_estimateCStreamSize_usingCParams(ZSTD_compressionParameters cParams)
+{
+ ZSTD_CCtx_params const params = ZSTD_makeCCtxParamsFromCParams(cParams);
+ return ZSTD_estimateCStreamSize_usingCCtxParams(&params);
}
size_t ZSTD_estimateCStreamSize(int compressionLevel) {
ZSTD_compressionParameters const cParams = ZSTD_getCParams(compressionLevel, 0, 0);
- return ZSTD_estimateCStreamSize_advanced(cParams);
+ return ZSTD_estimateCStreamSize_usingCParams(cParams);
}
-
-static U32 ZSTD_equivalentParams(ZSTD_compressionParameters cParams1,
- ZSTD_compressionParameters cParams2)
+static U32 ZSTD_equivalentCParams(ZSTD_compressionParameters cParams1,
+ ZSTD_compressionParameters cParams2)
{
U32 bslog1 = MIN(cParams1.windowLog, ZSTD_BLOCKSIZELOG_MAX);
U32 bslog2 = MIN(cParams2.windowLog, ZSTD_BLOCKSIZELOG_MAX);
@@ -576,18 +765,39 @@ static U32 ZSTD_equivalentParams(ZSTD_compressionParameters cParams1,
& ((cParams1.searchLength==3) == (cParams2.searchLength==3)); /* hashlog3 space */
}
+/** The parameters are equivalent if ldm is not enabled in both sets or
+ * all the parameters are equivalent. */
+static U32 ZSTD_equivalentLdmParams(ldmParams_t ldmParams1,
+ ldmParams_t ldmParams2)
+{
+ return (!ldmParams1.enableLdm && !ldmParams2.enableLdm) ||
+ (ldmParams1.enableLdm == ldmParams2.enableLdm &&
+ ldmParams1.hashLog == ldmParams2.hashLog &&
+ ldmParams1.bucketSizeLog == ldmParams2.bucketSizeLog &&
+ ldmParams1.minMatchLength == ldmParams2.minMatchLength &&
+ ldmParams1.hashEveryLog == ldmParams2.hashEveryLog);
+}
+
+/** Equivalence for resetCCtx purposes */
+static U32 ZSTD_equivalentParams(ZSTD_CCtx_params params1,
+ ZSTD_CCtx_params params2)
+{
+ return ZSTD_equivalentCParams(params1.cParams, params2.cParams) &&
+ ZSTD_equivalentLdmParams(params1.ldmParams, params2.ldmParams);
+}
+
/*! ZSTD_continueCCtx() :
* reuse CCtx without reset (note : requires no dictionary) */
-static size_t ZSTD_continueCCtx(ZSTD_CCtx* cctx, ZSTD_parameters params, U64 pledgedSrcSize)
+static size_t ZSTD_continueCCtx(ZSTD_CCtx* cctx, ZSTD_CCtx_params params, U64 pledgedSrcSize)
{
U32 const end = (U32)(cctx->nextSrc - cctx->base);
- DEBUGLOG(5, "continue mode");
+ DEBUGLOG(4, "continue mode");
cctx->appliedParams = params;
cctx->pledgedSrcSizePlusOne = pledgedSrcSize+1;
cctx->consumedSrcSize = 0;
if (pledgedSrcSize == ZSTD_CONTENTSIZE_UNKNOWN)
cctx->appliedParams.fParams.contentSizeFlag = 0;
- DEBUGLOG(5, "pledged content size : %u ; flag : %u",
+ DEBUGLOG(4, "pledged content size : %u ; flag : %u",
(U32)pledgedSrcSize, cctx->appliedParams.fParams.contentSizeFlag);
cctx->lowLimit = end;
cctx->dictLimit = end;
@@ -607,15 +817,19 @@ typedef enum { ZSTDb_not_buffered, ZSTDb_buffered } ZSTD_buffered_policy_e;
/*! ZSTD_resetCCtx_internal() :
note : `params` are assumed fully validated at this stage */
static size_t ZSTD_resetCCtx_internal(ZSTD_CCtx* zc,
- ZSTD_parameters params, U64 pledgedSrcSize,
+ ZSTD_CCtx_params params, U64 pledgedSrcSize,
ZSTD_compResetPolicy_e const crp,
ZSTD_buffered_policy_e const zbuff)
{
+ DEBUGLOG(4, "ZSTD_resetCCtx_internal");
assert(!ZSTD_isError(ZSTD_checkCParams(params.cParams)));
+ DEBUGLOG(4, "pledgedSrcSize: %u", (U32)pledgedSrcSize);
if (crp == ZSTDcrp_continue) {
- if (ZSTD_equivalentParams(params.cParams, zc->appliedParams.cParams)) {
- DEBUGLOG(5, "ZSTD_equivalentParams()==1");
+ if (ZSTD_equivalentParams(params, zc->appliedParams)) {
+ DEBUGLOG(4, "ZSTD_equivalentParams()==1");
+ assert(!(params.ldmParams.enableLdm &&
+ params.ldmParams.hashEveryLog == ZSTD_LDM_HASHEVERYLOG_NOTSET));
zc->entropy->hufCTable_repeatMode = HUF_repeat_none;
zc->entropy->offcode_repeatMode = FSE_repeat_none;
zc->entropy->matchlength_repeatMode = FSE_repeat_none;
@@ -623,12 +837,21 @@ static size_t ZSTD_resetCCtx_internal(ZSTD_CCtx* zc,
return ZSTD_continueCCtx(zc, params, pledgedSrcSize);
} }
+ if (params.ldmParams.enableLdm) {
+ /* Adjust long distance matching parameters */
+ ZSTD_ldm_adjustParameters(&params.ldmParams, params.cParams.windowLog);
+ assert(params.ldmParams.hashLog >= params.ldmParams.bucketSizeLog);
+ assert(params.ldmParams.hashEveryLog < 32);
+ zc->ldmState.hashPower =
+ ZSTD_ldm_getHashPower(params.ldmParams.minMatchLength);
+ }
+
{ size_t const blockSize = MIN(ZSTD_BLOCKSIZE_MAX, (size_t)1 << params.cParams.windowLog);
U32 const divider = (params.cParams.searchLength==3) ? 3 : 4;
size_t const maxNbSeq = blockSize / divider;
size_t const tokenSpace = blockSize + 11*maxNbSeq;
size_t const chainSize = (params.cParams.strategy == ZSTD_fast) ?
- 0 : (1 << params.cParams.chainLog);
+ 0 : ((size_t)1 << params.cParams.chainLog);
size_t const hSize = ((size_t)1) << params.cParams.hashLog;
U32 const hashLog3 = (params.cParams.searchLength>3) ?
0 : MIN(ZSTD_HASHLOG3_MAX, params.cParams.windowLog);
@@ -646,10 +869,13 @@ static size_t ZSTD_resetCCtx_internal(ZSTD_CCtx* zc,
|| (params.cParams.strategy == ZSTD_btultra)) ?
optPotentialSpace : 0;
size_t const bufferSpace = buffInSize + buffOutSize;
- size_t const neededSpace = entropySpace + optSpace + tableSpace
- + tokenSpace + bufferSpace;
+ size_t const ldmSpace = params.ldmParams.enableLdm
+ ? ZSTD_ldm_getTableSize(params.ldmParams.hashLog, params.ldmParams.bucketSizeLog)
+ : 0;
+ size_t const neededSpace = entropySpace + optSpace + ldmSpace +
+ tableSpace + tokenSpace + bufferSpace;
- if (zc->workSpaceSize < neededSpace) { /* too small : resize /*/
+ if (zc->workSpaceSize < neededSpace) { /* too small : resize */
DEBUGLOG(5, "Need to update workSpaceSize from %uK to %uK \n",
(unsigned)zc->workSpaceSize>>10,
(unsigned)neededSpace>>10);
@@ -714,6 +940,16 @@ static size_t ZSTD_resetCCtx_internal(ZSTD_CCtx* zc,
ptr = zc->optState.priceTable + ZSTD_OPT_NUM+1;
}
+ /* ldm hash table */
+ /* initialize bucketOffsets table later for pointer alignment */
+ if (params.ldmParams.enableLdm) {
+ size_t const ldmHSize = ((size_t)1) << params.ldmParams.hashLog;
+ memset(ptr, 0, ldmHSize * sizeof(ldmEntry_t));
+ assert(((size_t)ptr & 3) == 0); /* ensure ptr is properly aligned */
+ zc->ldmState.hashTable = (ldmEntry_t*)ptr;
+ ptr = zc->ldmState.hashTable + ldmHSize;
+ }
+
/* table Space */
if (crp!=ZSTDcrp_noMemset) memset(ptr, 0, tableSpace); /* reset tables only */
assert(((size_t)ptr & 3) == 0); /* ensure ptr is properly aligned */
@@ -731,6 +967,16 @@ static size_t ZSTD_resetCCtx_internal(ZSTD_CCtx* zc,
zc->seqStore.litStart = zc->seqStore.ofCode + maxNbSeq;
ptr = zc->seqStore.litStart + blockSize;
+ /* ldm bucketOffsets table */
+ if (params.ldmParams.enableLdm) {
+ size_t const ldmBucketSize =
+ ((size_t)1) << (params.ldmParams.hashLog -
+ params.ldmParams.bucketSizeLog);
+ memset(ptr, 0, ldmBucketSize);
+ zc->ldmState.bucketOffsets = (BYTE*)ptr;
+ ptr = zc->ldmState.bucketOffsets + ldmBucketSize;
+ }
+
/* buffers */
zc->inBuffSize = buffInSize;
zc->inBuff = (char*)ptr;
@@ -753,6 +999,8 @@ void ZSTD_invalidateRepCodes(ZSTD_CCtx* cctx) {
/*! ZSTD_copyCCtx_internal() :
* Duplicate an existing context `srcCCtx` into another one `dstCCtx`.
+ * The "context", in this case, refers to the hash and chain tables, entropy
+ * tables, and dictionary offsets.
* Only works during stage ZSTDcs_init (i.e. after creation, but before first call to ZSTD_compressContinue()).
* pledgedSrcSize=0 means "empty" if fParams.contentSizeFlag=1
* @return : 0, or an error code */
@@ -766,14 +1014,16 @@ static size_t ZSTD_copyCCtx_internal(ZSTD_CCtx* dstCCtx,
if (srcCCtx->stage!=ZSTDcs_init) return ERROR(stage_wrong);
memcpy(&dstCCtx->customMem, &srcCCtx->customMem, sizeof(ZSTD_customMem));
- { ZSTD_parameters params = srcCCtx->appliedParams;
+ { ZSTD_CCtx_params params = dstCCtx->requestedParams;
+ /* Copy only compression parameters related to tables. */
+ params.cParams = srcCCtx->appliedParams.cParams;
params.fParams = fParams;
ZSTD_resetCCtx_internal(dstCCtx, params, pledgedSrcSize,
ZSTDcrp_noMemset, zbuff);
}
/* copy tables */
- { size_t const chainSize = (srcCCtx->appliedParams.cParams.strategy == ZSTD_fast) ? 0 : (1 << srcCCtx->appliedParams.cParams.chainLog);
+ { size_t const chainSize = (srcCCtx->appliedParams.cParams.strategy == ZSTD_fast) ? 0 : ((size_t)1 << srcCCtx->appliedParams.cParams.chainLog);
size_t const hSize = (size_t)1 << srcCCtx->appliedParams.cParams.hashLog;
size_t const h3Size = (size_t)1 << srcCCtx->hashLog3;
size_t const tableSpace = (chainSize + hSize + h3Size) * sizeof(U32);
@@ -826,18 +1076,36 @@ static void ZSTD_reduceTable (U32* const table, U32 const size, U32 const reduce
}
}
+/*! ZSTD_ldm_reduceTable() :
+ * reduce table indexes by `reducerValue` */
+static void ZSTD_ldm_reduceTable(ldmEntry_t* const table, U32 const size,
+ U32 const reducerValue)
+{
+ U32 u;
+ for (u = 0; u < size; u++) {
+ if (table[u].offset < reducerValue) table[u].offset = 0;
+ else table[u].offset -= reducerValue;
+ }
+}
+
/*! ZSTD_reduceIndex() :
* rescale all indexes to avoid future overflow (indexes are U32) */
static void ZSTD_reduceIndex (ZSTD_CCtx* zc, const U32 reducerValue)
{
- { U32 const hSize = 1 << zc->appliedParams.cParams.hashLog;
+ { U32 const hSize = (U32)1 << zc->appliedParams.cParams.hashLog;
ZSTD_reduceTable(zc->hashTable, hSize, reducerValue); }
- { U32 const chainSize = (zc->appliedParams.cParams.strategy == ZSTD_fast) ? 0 : (1 << zc->appliedParams.cParams.chainLog);
+ { U32 const chainSize = (zc->appliedParams.cParams.strategy == ZSTD_fast) ? 0 : ((U32)1 << zc->appliedParams.cParams.chainLog);
ZSTD_reduceTable(zc->chainTable, chainSize, reducerValue); }
- { U32 const h3Size = (zc->hashLog3) ? 1 << zc->hashLog3 : 0;
+ { U32 const h3Size = (zc->hashLog3) ? (U32)1 << zc->hashLog3 : 0;
ZSTD_reduceTable(zc->hashTable3, h3Size, reducerValue); }
+
+ { if (zc->appliedParams.ldmParams.enableLdm) {
+ U32 const ldmHSize = (U32)1 << zc->appliedParams.ldmParams.hashLog;
+ ZSTD_ldm_reduceTable(zc->ldmState.hashTable, ldmHSize, reducerValue);
+ }
+ }
}
@@ -976,24 +1244,6 @@ static size_t ZSTD_compressLiterals (ZSTD_entropyCTables_t * entropy,
return lhSize+cLitSize;
}
-static const BYTE LL_Code[64] = { 0, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 16, 17, 17, 18, 18, 19, 19,
- 20, 20, 20, 20, 21, 21, 21, 21,
- 22, 22, 22, 22, 22, 22, 22, 22,
- 23, 23, 23, 23, 23, 23, 23, 23,
- 24, 24, 24, 24, 24, 24, 24, 24,
- 24, 24, 24, 24, 24, 24, 24, 24 };
-
-static const BYTE ML_Code[128] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 36, 36, 37, 37, 37, 37,
- 38, 38, 38, 38, 38, 38, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39,
- 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
- 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
- 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
- 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42 };
-
void ZSTD_seqToCodes(const seqStore_t* seqStorePtr)
{
@@ -1018,20 +1268,30 @@ void ZSTD_seqToCodes(const seqStore_t* seqStorePtr)
mlCodeTable[seqStorePtr->longLengthPos] = MaxML;
}
-MEM_STATIC symbolEncodingType_e ZSTD_selectEncodingType(FSE_repeat* repeatMode,
- size_t const mostFrequent, size_t nbSeq, U32 defaultNormLog)
+typedef enum {
+ ZSTD_defaultDisallowed = 0,
+ ZSTD_defaultAllowed = 1
+} ZSTD_defaultPolicy_e;
+
+MEM_STATIC symbolEncodingType_e ZSTD_selectEncodingType(
+ FSE_repeat* repeatMode, size_t const mostFrequent, size_t nbSeq,
+ U32 defaultNormLog, ZSTD_defaultPolicy_e const isDefaultAllowed)
{
#define MIN_SEQ_FOR_DYNAMIC_FSE 64
#define MAX_SEQ_FOR_STATIC_FSE 1000
-
- if ((mostFrequent == nbSeq) && (nbSeq > 2)) {
+ ZSTD_STATIC_ASSERT(ZSTD_defaultDisallowed == 0 && ZSTD_defaultAllowed != 0);
+ if ((mostFrequent == nbSeq) && (!isDefaultAllowed || nbSeq > 2)) {
+ /* Prefer set_basic over set_rle when there are 2 or less symbols,
+ * since RLE uses 1 byte, but set_basic uses 5-6 bits per symbol.
+ * If basic encoding isn't possible, always choose RLE.
+ */
*repeatMode = FSE_repeat_check;
return set_rle;
}
- if ((*repeatMode == FSE_repeat_valid) && (nbSeq < MAX_SEQ_FOR_STATIC_FSE)) {
+ if (isDefaultAllowed && (*repeatMode == FSE_repeat_valid) && (nbSeq < MAX_SEQ_FOR_STATIC_FSE)) {
return set_repeat;
}
- if ((nbSeq < MIN_SEQ_FOR_DYNAMIC_FSE) || (mostFrequent < (nbSeq >> (defaultNormLog-1)))) {
+ if (isDefaultAllowed && ((nbSeq < MIN_SEQ_FOR_DYNAMIC_FSE) || (mostFrequent < (nbSeq >> (defaultNormLog-1))))) {
*repeatMode = FSE_repeat_valid;
return set_basic;
}
@@ -1067,6 +1327,7 @@ MEM_STATIC size_t ZSTD_buildCTable(void* dst, size_t dstCapacity,
count[codeTable[nbSeq-1]]--;
nbSeq_1--;
}
+ assert(nbSeq_1 > 1);
CHECK_F(FSE_normalizeCount(norm, tableLog, count, nbSeq_1, max));
{ size_t const NCountSize = FSE_writeNCount(op, oend - op, norm, max, tableLog); /* overflow protected */
if (FSE_isError(NCountSize)) return NCountSize;
@@ -1131,7 +1392,7 @@ MEM_STATIC size_t ZSTD_encodeSequences(void* dst, size_t dstCapacity,
BIT_addBits(&blockStream, sequences[n].litLength, llBits);
if (MEM_32bits() && ((llBits+mlBits)>24)) BIT_flushBits(&blockStream);
BIT_addBits(&blockStream, sequences[n].matchLength, mlBits);
- if (MEM_32bits()) BIT_flushBits(&blockStream); /* (7)*/
+ if (MEM_32bits() || (ofBits+mlBits+llBits > 56)) BIT_flushBits(&blockStream);
if (longOffsets) {
int const extraBits = ofBits - MIN(ofBits, STREAM_ACCUMULATOR_MIN-1);
if (extraBits) {
@@ -1204,7 +1465,7 @@ MEM_STATIC size_t ZSTD_compressSequences_internal(seqStore_t* seqStorePtr,
/* CTable for Literal Lengths */
{ U32 max = MaxLL;
size_t const mostFrequent = FSE_countFast_wksp(count, &max, llCodeTable, nbSeq, entropy->workspace);
- LLtype = ZSTD_selectEncodingType(&entropy->litlength_repeatMode, mostFrequent, nbSeq, LL_defaultNormLog);
+ LLtype = ZSTD_selectEncodingType(&entropy->litlength_repeatMode, mostFrequent, nbSeq, LL_defaultNormLog, ZSTD_defaultAllowed);
{ size_t const countSize = ZSTD_buildCTable(op, oend - op, CTable_LitLength, LLFSELog, (symbolEncodingType_e)LLtype,
count, max, llCodeTable, nbSeq, LL_defaultNorm, LL_defaultNormLog, MaxLL,
entropy->workspace, sizeof(entropy->workspace));
@@ -1214,9 +1475,11 @@ MEM_STATIC size_t ZSTD_compressSequences_internal(seqStore_t* seqStorePtr,
/* CTable for Offsets */
{ U32 max = MaxOff;
size_t const mostFrequent = FSE_countFast_wksp(count, &max, ofCodeTable, nbSeq, entropy->workspace);
- Offtype = ZSTD_selectEncodingType(&entropy->offcode_repeatMode, mostFrequent, nbSeq, OF_defaultNormLog);
+ /* We can only use the basic table if max <= DefaultMaxOff, otherwise the offsets are too large */
+ ZSTD_defaultPolicy_e const defaultPolicy = max <= DefaultMaxOff ? ZSTD_defaultAllowed : ZSTD_defaultDisallowed;
+ Offtype = ZSTD_selectEncodingType(&entropy->offcode_repeatMode, mostFrequent, nbSeq, OF_defaultNormLog, defaultPolicy);
{ size_t const countSize = ZSTD_buildCTable(op, oend - op, CTable_OffsetBits, OffFSELog, (symbolEncodingType_e)Offtype,
- count, max, ofCodeTable, nbSeq, OF_defaultNorm, OF_defaultNormLog, MaxOff,
+ count, max, ofCodeTable, nbSeq, OF_defaultNorm, OF_defaultNormLog, DefaultMaxOff,
entropy->workspace, sizeof(entropy->workspace));
if (ZSTD_isError(countSize)) return countSize;
op += countSize;
@@ -1224,7 +1487,7 @@ MEM_STATIC size_t ZSTD_compressSequences_internal(seqStore_t* seqStorePtr,
/* CTable for MatchLengths */
{ U32 max = MaxML;
size_t const mostFrequent = FSE_countFast_wksp(count, &max, mlCodeTable, nbSeq, entropy->workspace);
- MLtype = ZSTD_selectEncodingType(&entropy->matchlength_repeatMode, mostFrequent, nbSeq, ML_defaultNormLog);
+ MLtype = ZSTD_selectEncodingType(&entropy->matchlength_repeatMode, mostFrequent, nbSeq, ML_defaultNormLog, ZSTD_defaultAllowed);
{ size_t const countSize = ZSTD_buildCTable(op, oend - op, CTable_MatchLength, MLFSELog, (symbolEncodingType_e)MLtype,
count, max, mlCodeTable, nbSeq, ML_defaultNorm, ML_defaultNormLog, MaxML,
entropy->workspace, sizeof(entropy->workspace));
@@ -1279,1528 +1542,11 @@ MEM_STATIC size_t ZSTD_compressSequences(seqStore_t* seqStorePtr,
return cSize;
}
-
-/*! ZSTD_storeSeq() :
- Store a sequence (literal length, literals, offset code and match length code) into seqStore_t.
- `offsetCode` : distance to match, or 0 == repCode.
- `matchCode` : matchLength - MINMATCH
-*/
-MEM_STATIC void ZSTD_storeSeq(seqStore_t* seqStorePtr, size_t litLength, const void* literals, U32 offsetCode, size_t matchCode)
-{
-#if defined(ZSTD_DEBUG) && (ZSTD_DEBUG >= 6)
- static const BYTE* g_start = NULL;
- U32 const pos = (U32)((const BYTE*)literals - g_start);
- if (g_start==NULL) g_start = (const BYTE*)literals;
- if ((pos > 0) && (pos < 1000000000))
- DEBUGLOG(6, "Cpos %6u :%5u literals & match %3u bytes at distance %6u",
- pos, (U32)litLength, (U32)matchCode+MINMATCH, (U32)offsetCode);
-#endif
- /* copy Literals */
- assert(seqStorePtr->lit + litLength <= seqStorePtr->litStart + 128 KB);
- ZSTD_wildcopy(seqStorePtr->lit, literals, litLength);
- seqStorePtr->lit += litLength;
-
- /* literal Length */
- if (litLength>0xFFFF) {
- seqStorePtr->longLengthID = 1;
- seqStorePtr->longLengthPos = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart);
- }
- seqStorePtr->sequences[0].litLength = (U16)litLength;
-
- /* match offset */
- seqStorePtr->sequences[0].offset = offsetCode + 1;
-
- /* match Length */
- if (matchCode>0xFFFF) {
- seqStorePtr->longLengthID = 2;
- seqStorePtr->longLengthPos = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart);
- }
- seqStorePtr->sequences[0].matchLength = (U16)matchCode;
-
- seqStorePtr->sequences++;
-}
-
-
-/*-*************************************
-* Match length counter
-***************************************/
-static unsigned ZSTD_NbCommonBytes (register size_t val)
-{
- if (MEM_isLittleEndian()) {
- if (MEM_64bits()) {
-# if defined(_MSC_VER) && defined(_WIN64)
- unsigned long r = 0;
- _BitScanForward64( &r, (U64)val );
- return (unsigned)(r>>3);
-# elif defined(__GNUC__) && (__GNUC__ >= 3)
- return (__builtin_ctzll((U64)val) >> 3);
-# else
- static const int DeBruijnBytePos[64] = { 0, 0, 0, 0, 0, 1, 1, 2,
- 0, 3, 1, 3, 1, 4, 2, 7,
- 0, 2, 3, 6, 1, 5, 3, 5,
- 1, 3, 4, 4, 2, 5, 6, 7,
- 7, 0, 1, 2, 3, 3, 4, 6,
- 2, 6, 5, 5, 3, 4, 5, 6,
- 7, 1, 2, 4, 6, 4, 4, 5,
- 7, 2, 6, 5, 7, 6, 7, 7 };
- return DeBruijnBytePos[((U64)((val & -(long long)val) * 0x0218A392CDABBD3FULL)) >> 58];
-# endif
- } else { /* 32 bits */
-# if defined(_MSC_VER)
- unsigned long r=0;
- _BitScanForward( &r, (U32)val );
- return (unsigned)(r>>3);
-# elif defined(__GNUC__) && (__GNUC__ >= 3)
- return (__builtin_ctz((U32)val) >> 3);
-# else
- static const int DeBruijnBytePos[32] = { 0, 0, 3, 0, 3, 1, 3, 0,
- 3, 2, 2, 1, 3, 2, 0, 1,
- 3, 3, 1, 2, 2, 2, 2, 0,
- 3, 1, 2, 0, 1, 0, 1, 1 };
- return DeBruijnBytePos[((U32)((val & -(S32)val) * 0x077CB531U)) >> 27];
-# endif
- }
- } else { /* Big Endian CPU */
- if (MEM_64bits()) {
-# if defined(_MSC_VER) && defined(_WIN64)
- unsigned long r = 0;
- _BitScanReverse64( &r, val );
- return (unsigned)(r>>3);
-# elif defined(__GNUC__) && (__GNUC__ >= 3)
- return (__builtin_clzll(val) >> 3);
-# else
- unsigned r;
- const unsigned n32 = sizeof(size_t)*4; /* calculate this way due to compiler complaining in 32-bits mode */
- if (!(val>>n32)) { r=4; } else { r=0; val>>=n32; }
- if (!(val>>16)) { r+=2; val>>=8; } else { val>>=24; }
- r += (!val);
- return r;
-# endif
- } else { /* 32 bits */
-# if defined(_MSC_VER)
- unsigned long r = 0;
- _BitScanReverse( &r, (unsigned long)val );
- return (unsigned)(r>>3);
-# elif defined(__GNUC__) && (__GNUC__ >= 3)
- return (__builtin_clz((U32)val) >> 3);
-# else
- unsigned r;
- if (!(val>>16)) { r=2; val>>=8; } else { r=0; val>>=24; }
- r += (!val);
- return r;
-# endif
- } }
-}
-
-
-static size_t ZSTD_count(const BYTE* pIn, const BYTE* pMatch, const BYTE* const pInLimit)
-{
- const BYTE* const pStart = pIn;
- const BYTE* const pInLoopLimit = pInLimit - (sizeof(size_t)-1);
-
- while (pIn < pInLoopLimit) {
- size_t const diff = MEM_readST(pMatch) ^ MEM_readST(pIn);
- if (!diff) { pIn+=sizeof(size_t); pMatch+=sizeof(size_t); continue; }
- pIn += ZSTD_NbCommonBytes(diff);
- return (size_t)(pIn - pStart);
- }
- if (MEM_64bits()) if ((pIn<(pInLimit-3)) && (MEM_read32(pMatch) == MEM_read32(pIn))) { pIn+=4; pMatch+=4; }
- if ((pIn<(pInLimit-1)) && (MEM_read16(pMatch) == MEM_read16(pIn))) { pIn+=2; pMatch+=2; }
- if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++;
- return (size_t)(pIn - pStart);
-}
-
-/** ZSTD_count_2segments() :
-* can count match length with `ip` & `match` in 2 different segments.
-* convention : on reaching mEnd, match count continue starting from iStart
-*/
-static size_t ZSTD_count_2segments(const BYTE* ip, const BYTE* match, const BYTE* iEnd, const BYTE* mEnd, const BYTE* iStart)
-{
- const BYTE* const vEnd = MIN( ip + (mEnd - match), iEnd);
- size_t const matchLength = ZSTD_count(ip, match, vEnd);
- if (match + matchLength != mEnd) return matchLength;
- return matchLength + ZSTD_count(ip+matchLength, iStart, iEnd);
-}
-
-
-/*-*************************************
-* Hashes
-***************************************/
-static const U32 prime3bytes = 506832829U;
-static U32 ZSTD_hash3(U32 u, U32 h) { return ((u << (32-24)) * prime3bytes) >> (32-h) ; }
-MEM_STATIC size_t ZSTD_hash3Ptr(const void* ptr, U32 h) { return ZSTD_hash3(MEM_readLE32(ptr), h); } /* only in zstd_opt.h */
-
-static const U32 prime4bytes = 2654435761U;
-static U32 ZSTD_hash4(U32 u, U32 h) { return (u * prime4bytes) >> (32-h) ; }
-static size_t ZSTD_hash4Ptr(const void* ptr, U32 h) { return ZSTD_hash4(MEM_read32(ptr), h); }
-
-static const U64 prime5bytes = 889523592379ULL;
-static size_t ZSTD_hash5(U64 u, U32 h) { return (size_t)(((u << (64-40)) * prime5bytes) >> (64-h)) ; }
-static size_t ZSTD_hash5Ptr(const void* p, U32 h) { return ZSTD_hash5(MEM_readLE64(p), h); }
-
-static const U64 prime6bytes = 227718039650203ULL;
-static size_t ZSTD_hash6(U64 u, U32 h) { return (size_t)(((u << (64-48)) * prime6bytes) >> (64-h)) ; }
-static size_t ZSTD_hash6Ptr(const void* p, U32 h) { return ZSTD_hash6(MEM_readLE64(p), h); }
-
-static const U64 prime7bytes = 58295818150454627ULL;
-static size_t ZSTD_hash7(U64 u, U32 h) { return (size_t)(((u << (64-56)) * prime7bytes) >> (64-h)) ; }
-static size_t ZSTD_hash7Ptr(const void* p, U32 h) { return ZSTD_hash7(MEM_readLE64(p), h); }
-
-static const U64 prime8bytes = 0xCF1BBCDCB7A56463ULL;
-static size_t ZSTD_hash8(U64 u, U32 h) { return (size_t)(((u) * prime8bytes) >> (64-h)) ; }
-static size_t ZSTD_hash8Ptr(const void* p, U32 h) { return ZSTD_hash8(MEM_readLE64(p), h); }
-
-static size_t ZSTD_hashPtr(const void* p, U32 hBits, U32 mls)
-{
- switch(mls)
- {
- default:
- case 4: return ZSTD_hash4Ptr(p, hBits);
- case 5: return ZSTD_hash5Ptr(p, hBits);
- case 6: return ZSTD_hash6Ptr(p, hBits);
- case 7: return ZSTD_hash7Ptr(p, hBits);
- case 8: return ZSTD_hash8Ptr(p, hBits);
- }
-}
-
-
-/*-*************************************
-* Fast Scan
-***************************************/
-static void ZSTD_fillHashTable (ZSTD_CCtx* zc, const void* end, const U32 mls)
-{
- U32* const hashTable = zc->hashTable;
- U32 const hBits = zc->appliedParams.cParams.hashLog;
- const BYTE* const base = zc->base;
- const BYTE* ip = base + zc->nextToUpdate;
- const BYTE* const iend = ((const BYTE*)end) - HASH_READ_SIZE;
- const size_t fastHashFillStep = 3;
-
- while(ip <= iend) {
- hashTable[ZSTD_hashPtr(ip, hBits, mls)] = (U32)(ip - base);
- ip += fastHashFillStep;
- }
-}
-
-
-FORCE_INLINE_TEMPLATE
-void ZSTD_compressBlock_fast_generic(ZSTD_CCtx* cctx,
- const void* src, size_t srcSize,
- const U32 mls)
-{
- U32* const hashTable = cctx->hashTable;
- U32 const hBits = cctx->appliedParams.cParams.hashLog;
- seqStore_t* seqStorePtr = &(cctx->seqStore);
- const BYTE* const base = cctx->base;
- const BYTE* const istart = (const BYTE*)src;
- const BYTE* ip = istart;
- const BYTE* anchor = istart;
- const U32 lowestIndex = cctx->dictLimit;
- const BYTE* const lowest = base + lowestIndex;
- const BYTE* const iend = istart + srcSize;
- const BYTE* const ilimit = iend - HASH_READ_SIZE;
- U32 offset_1=seqStorePtr->rep[0], offset_2=seqStorePtr->rep[1];
- U32 offsetSaved = 0;
-
- /* init */
- ip += (ip==lowest);
- { U32 const maxRep = (U32)(ip-lowest);
- if (offset_2 > maxRep) offsetSaved = offset_2, offset_2 = 0;
- if (offset_1 > maxRep) offsetSaved = offset_1, offset_1 = 0;
- }
-
- /* Main Search Loop */
- while (ip < ilimit) { /* < instead of <=, because repcode check at (ip+1) */
- size_t mLength;
- size_t const h = ZSTD_hashPtr(ip, hBits, mls);
- U32 const current = (U32)(ip-base);
- U32 const matchIndex = hashTable[h];
- const BYTE* match = base + matchIndex;
- hashTable[h] = current; /* update hash table */
-
- if ((offset_1 > 0) & (MEM_read32(ip+1-offset_1) == MEM_read32(ip+1))) {
- mLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4;
- ip++;
- ZSTD_storeSeq(seqStorePtr, ip-anchor, anchor, 0, mLength-MINMATCH);
- } else {
- U32 offset;
- if ( (matchIndex <= lowestIndex) || (MEM_read32(match) != MEM_read32(ip)) ) {
- ip += ((ip-anchor) >> g_searchStrength) + 1;
- continue;
- }
- mLength = ZSTD_count(ip+4, match+4, iend) + 4;
- offset = (U32)(ip-match);
- while (((ip>anchor) & (match>lowest)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; } /* catch up */
- offset_2 = offset_1;
- offset_1 = offset;
-
- ZSTD_storeSeq(seqStorePtr, ip-anchor, anchor, offset + ZSTD_REP_MOVE, mLength-MINMATCH);
- }
-
- /* match found */
- ip += mLength;
- anchor = ip;
-
- if (ip <= ilimit) {
- /* Fill Table */
- hashTable[ZSTD_hashPtr(base+current+2, hBits, mls)] = current+2; /* here because current+2 could be > iend-8 */
- hashTable[ZSTD_hashPtr(ip-2, hBits, mls)] = (U32)(ip-2-base);
- /* check immediate repcode */
- while ( (ip <= ilimit)
- && ( (offset_2>0)
- & (MEM_read32(ip) == MEM_read32(ip - offset_2)) )) {
- /* store sequence */
- size_t const rLength = ZSTD_count(ip+4, ip+4-offset_2, iend) + 4;
- { U32 const tmpOff = offset_2; offset_2 = offset_1; offset_1 = tmpOff; } /* swap offset_2 <=> offset_1 */
- hashTable[ZSTD_hashPtr(ip, hBits, mls)] = (U32)(ip-base);
- ZSTD_storeSeq(seqStorePtr, 0, anchor, 0, rLength-MINMATCH);
- ip += rLength;
- anchor = ip;
- continue; /* faster when present ... (?) */
- } } }
-
- /* save reps for next block */
- seqStorePtr->repToConfirm[0] = offset_1 ? offset_1 : offsetSaved;
- seqStorePtr->repToConfirm[1] = offset_2 ? offset_2 : offsetSaved;
-
- /* Last Literals */
- { size_t const lastLLSize = iend - anchor;
- memcpy(seqStorePtr->lit, anchor, lastLLSize);
- seqStorePtr->lit += lastLLSize;
- }
-}
-
-
-static void ZSTD_compressBlock_fast(ZSTD_CCtx* ctx,
- const void* src, size_t srcSize)
-{
- const U32 mls = ctx->appliedParams.cParams.searchLength;
- switch(mls)
- {
- default: /* includes case 3 */
- case 4 :
- ZSTD_compressBlock_fast_generic(ctx, src, srcSize, 4); return;
- case 5 :
- ZSTD_compressBlock_fast_generic(ctx, src, srcSize, 5); return;
- case 6 :
- ZSTD_compressBlock_fast_generic(ctx, src, srcSize, 6); return;
- case 7 :
- ZSTD_compressBlock_fast_generic(ctx, src, srcSize, 7); return;
- }
-}
-
-
-static void ZSTD_compressBlock_fast_extDict_generic(ZSTD_CCtx* ctx,
- const void* src, size_t srcSize,
- const U32 mls)
-{
- U32* hashTable = ctx->hashTable;
- const U32 hBits = ctx->appliedParams.cParams.hashLog;
- seqStore_t* seqStorePtr = &(ctx->seqStore);
- const BYTE* const base = ctx->base;
- const BYTE* const dictBase = ctx->dictBase;
- const BYTE* const istart = (const BYTE*)src;
- const BYTE* ip = istart;
- const BYTE* anchor = istart;
- const U32 lowestIndex = ctx->lowLimit;
- const BYTE* const dictStart = dictBase + lowestIndex;
- const U32 dictLimit = ctx->dictLimit;
- const BYTE* const lowPrefixPtr = base + dictLimit;
- const BYTE* const dictEnd = dictBase + dictLimit;
- const BYTE* const iend = istart + srcSize;
- const BYTE* const ilimit = iend - 8;
- U32 offset_1=seqStorePtr->rep[0], offset_2=seqStorePtr->rep[1];
-
- /* Search Loop */
- while (ip < ilimit) { /* < instead of <=, because (ip+1) */
- const size_t h = ZSTD_hashPtr(ip, hBits, mls);
- const U32 matchIndex = hashTable[h];
- const BYTE* matchBase = matchIndex < dictLimit ? dictBase : base;
- const BYTE* match = matchBase + matchIndex;
- const U32 current = (U32)(ip-base);
- const U32 repIndex = current + 1 - offset_1; /* offset_1 expected <= current +1 */
- const BYTE* repBase = repIndex < dictLimit ? dictBase : base;
- const BYTE* repMatch = repBase + repIndex;
- size_t mLength;
- hashTable[h] = current; /* update hash table */
-
- if ( (((U32)((dictLimit-1) - repIndex) >= 3) /* intentional underflow */ & (repIndex > lowestIndex))
- && (MEM_read32(repMatch) == MEM_read32(ip+1)) ) {
- const BYTE* repMatchEnd = repIndex < dictLimit ? dictEnd : iend;
- mLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, lowPrefixPtr) + 4;
- ip++;
- ZSTD_storeSeq(seqStorePtr, ip-anchor, anchor, 0, mLength-MINMATCH);
- } else {
- if ( (matchIndex < lowestIndex) ||
- (MEM_read32(match) != MEM_read32(ip)) ) {
- ip += ((ip-anchor) >> g_searchStrength) + 1;
- continue;
- }
- { const BYTE* matchEnd = matchIndex < dictLimit ? dictEnd : iend;
- const BYTE* lowMatchPtr = matchIndex < dictLimit ? dictStart : lowPrefixPtr;
- U32 offset;
- mLength = ZSTD_count_2segments(ip+4, match+4, iend, matchEnd, lowPrefixPtr) + 4;
- while (((ip>anchor) & (match>lowMatchPtr)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; } /* catch up */
- offset = current - matchIndex;
- offset_2 = offset_1;
- offset_1 = offset;
- ZSTD_storeSeq(seqStorePtr, ip-anchor, anchor, offset + ZSTD_REP_MOVE, mLength-MINMATCH);
- } }
-
- /* found a match : store it */
- ip += mLength;
- anchor = ip;
-
- if (ip <= ilimit) {
- /* Fill Table */
- hashTable[ZSTD_hashPtr(base+current+2, hBits, mls)] = current+2;
- hashTable[ZSTD_hashPtr(ip-2, hBits, mls)] = (U32)(ip-2-base);
- /* check immediate repcode */
- while (ip <= ilimit) {
- U32 const current2 = (U32)(ip-base);
- U32 const repIndex2 = current2 - offset_2;
- const BYTE* repMatch2 = repIndex2 < dictLimit ? dictBase + repIndex2 : base + repIndex2;
- if ( (((U32)((dictLimit-1) - repIndex2) >= 3) & (repIndex2 > lowestIndex)) /* intentional overflow */
- && (MEM_read32(repMatch2) == MEM_read32(ip)) ) {
- const BYTE* const repEnd2 = repIndex2 < dictLimit ? dictEnd : iend;
- size_t const repLength2 = ZSTD_count_2segments(ip+4, repMatch2+4, iend, repEnd2, lowPrefixPtr) + 4;
- U32 tmpOffset = offset_2; offset_2 = offset_1; offset_1 = tmpOffset; /* swap offset_2 <=> offset_1 */
- ZSTD_storeSeq(seqStorePtr, 0, anchor, 0, repLength2-MINMATCH);
- hashTable[ZSTD_hashPtr(ip, hBits, mls)] = current2;
- ip += repLength2;
- anchor = ip;
- continue;
- }
- break;
- } } }
-
- /* save reps for next block */
- seqStorePtr->repToConfirm[0] = offset_1; seqStorePtr->repToConfirm[1] = offset_2;
-
- /* Last Literals */
- { size_t const lastLLSize = iend - anchor;
- memcpy(seqStorePtr->lit, anchor, lastLLSize);
- seqStorePtr->lit += lastLLSize;
- }
-}
-
-
-static void ZSTD_compressBlock_fast_extDict(ZSTD_CCtx* ctx,
- const void* src, size_t srcSize)
-{
- U32 const mls = ctx->appliedParams.cParams.searchLength;
- switch(mls)
- {
- default: /* includes case 3 */
- case 4 :
- ZSTD_compressBlock_fast_extDict_generic(ctx, src, srcSize, 4); return;
- case 5 :
- ZSTD_compressBlock_fast_extDict_generic(ctx, src, srcSize, 5); return;
- case 6 :
- ZSTD_compressBlock_fast_extDict_generic(ctx, src, srcSize, 6); return;
- case 7 :
- ZSTD_compressBlock_fast_extDict_generic(ctx, src, srcSize, 7); return;
- }
-}
-
-
-/*-*************************************
-* Double Fast
-***************************************/
-static void ZSTD_fillDoubleHashTable (ZSTD_CCtx* cctx, const void* end, const U32 mls)
-{
- U32* const hashLarge = cctx->hashTable;
- U32 const hBitsL = cctx->appliedParams.cParams.hashLog;
- U32* const hashSmall = cctx->chainTable;
- U32 const hBitsS = cctx->appliedParams.cParams.chainLog;
- const BYTE* const base = cctx->base;
- const BYTE* ip = base + cctx->nextToUpdate;
- const BYTE* const iend = ((const BYTE*)end) - HASH_READ_SIZE;
- const size_t fastHashFillStep = 3;
-
- while(ip <= iend) {
- hashSmall[ZSTD_hashPtr(ip, hBitsS, mls)] = (U32)(ip - base);
- hashLarge[ZSTD_hashPtr(ip, hBitsL, 8)] = (U32)(ip - base);
- ip += fastHashFillStep;
- }
-}
-
-
-FORCE_INLINE_TEMPLATE
-void ZSTD_compressBlock_doubleFast_generic(ZSTD_CCtx* cctx,
- const void* src, size_t srcSize,
- const U32 mls)
-{
- U32* const hashLong = cctx->hashTable;
- const U32 hBitsL = cctx->appliedParams.cParams.hashLog;
- U32* const hashSmall = cctx->chainTable;
- const U32 hBitsS = cctx->appliedParams.cParams.chainLog;
- seqStore_t* seqStorePtr = &(cctx->seqStore);
- const BYTE* const base = cctx->base;
- const BYTE* const istart = (const BYTE*)src;
- const BYTE* ip = istart;
- const BYTE* anchor = istart;
- const U32 lowestIndex = cctx->dictLimit;
- const BYTE* const lowest = base + lowestIndex;
- const BYTE* const iend = istart + srcSize;
- const BYTE* const ilimit = iend - HASH_READ_SIZE;
- U32 offset_1=seqStorePtr->rep[0], offset_2=seqStorePtr->rep[1];
- U32 offsetSaved = 0;
-
- /* init */
- ip += (ip==lowest);
- { U32 const maxRep = (U32)(ip-lowest);
- if (offset_2 > maxRep) offsetSaved = offset_2, offset_2 = 0;
- if (offset_1 > maxRep) offsetSaved = offset_1, offset_1 = 0;
- }
-
- /* Main Search Loop */
- while (ip < ilimit) { /* < instead of <=, because repcode check at (ip+1) */
- size_t mLength;
- size_t const h2 = ZSTD_hashPtr(ip, hBitsL, 8);
- size_t const h = ZSTD_hashPtr(ip, hBitsS, mls);
- U32 const current = (U32)(ip-base);
- U32 const matchIndexL = hashLong[h2];
- U32 const matchIndexS = hashSmall[h];
- const BYTE* matchLong = base + matchIndexL;
- const BYTE* match = base + matchIndexS;
- hashLong[h2] = hashSmall[h] = current; /* update hash tables */
-
- assert(offset_1 <= current); /* supposed guaranteed by construction */
- if ((offset_1 > 0) & (MEM_read32(ip+1-offset_1) == MEM_read32(ip+1))) {
- /* favor repcode */
- mLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4;
- ip++;
- ZSTD_storeSeq(seqStorePtr, ip-anchor, anchor, 0, mLength-MINMATCH);
- } else {
- U32 offset;
- if ( (matchIndexL > lowestIndex) && (MEM_read64(matchLong) == MEM_read64(ip)) ) {
- mLength = ZSTD_count(ip+8, matchLong+8, iend) + 8;
- offset = (U32)(ip-matchLong);
- while (((ip>anchor) & (matchLong>lowest)) && (ip[-1] == matchLong[-1])) { ip--; matchLong--; mLength++; } /* catch up */
- } else if ( (matchIndexS > lowestIndex) && (MEM_read32(match) == MEM_read32(ip)) ) {
- size_t const hl3 = ZSTD_hashPtr(ip+1, hBitsL, 8);
- U32 const matchIndexL3 = hashLong[hl3];
- const BYTE* matchL3 = base + matchIndexL3;
- hashLong[hl3] = current + 1;
- if ( (matchIndexL3 > lowestIndex) && (MEM_read64(matchL3) == MEM_read64(ip+1)) ) {
- mLength = ZSTD_count(ip+9, matchL3+8, iend) + 8;
- ip++;
- offset = (U32)(ip-matchL3);
- while (((ip>anchor) & (matchL3>lowest)) && (ip[-1] == matchL3[-1])) { ip--; matchL3--; mLength++; } /* catch up */
- } else {
- mLength = ZSTD_count(ip+4, match+4, iend) + 4;
- offset = (U32)(ip-match);
- while (((ip>anchor) & (match>lowest)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; } /* catch up */
- }
- } else {
- ip += ((ip-anchor) >> g_searchStrength) + 1;
- continue;
- }
-
- offset_2 = offset_1;
- offset_1 = offset;
-
- ZSTD_storeSeq(seqStorePtr, ip-anchor, anchor, offset + ZSTD_REP_MOVE, mLength-MINMATCH);
- }
-
- /* match found */
- ip += mLength;
- anchor = ip;
-
- if (ip <= ilimit) {
- /* Fill Table */
- hashLong[ZSTD_hashPtr(base+current+2, hBitsL, 8)] =
- hashSmall[ZSTD_hashPtr(base+current+2, hBitsS, mls)] = current+2; /* here because current+2 could be > iend-8 */
- hashLong[ZSTD_hashPtr(ip-2, hBitsL, 8)] =
- hashSmall[ZSTD_hashPtr(ip-2, hBitsS, mls)] = (U32)(ip-2-base);
-
- /* check immediate repcode */
- while ( (ip <= ilimit)
- && ( (offset_2>0)
- & (MEM_read32(ip) == MEM_read32(ip - offset_2)) )) {
- /* store sequence */
- size_t const rLength = ZSTD_count(ip+4, ip+4-offset_2, iend) + 4;
- { U32 const tmpOff = offset_2; offset_2 = offset_1; offset_1 = tmpOff; } /* swap offset_2 <=> offset_1 */
- hashSmall[ZSTD_hashPtr(ip, hBitsS, mls)] = (U32)(ip-base);
- hashLong[ZSTD_hashPtr(ip, hBitsL, 8)] = (U32)(ip-base);
- ZSTD_storeSeq(seqStorePtr, 0, anchor, 0, rLength-MINMATCH);
- ip += rLength;
- anchor = ip;
- continue; /* faster when present ... (?) */
- } } }
-
- /* save reps for next block */
- seqStorePtr->repToConfirm[0] = offset_1 ? offset_1 : offsetSaved;
- seqStorePtr->repToConfirm[1] = offset_2 ? offset_2 : offsetSaved;
-
- /* Last Literals */
- { size_t const lastLLSize = iend - anchor;
- memcpy(seqStorePtr->lit, anchor, lastLLSize);
- seqStorePtr->lit += lastLLSize;
- }
-}
-
-
-static void ZSTD_compressBlock_doubleFast(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
-{
- const U32 mls = ctx->appliedParams.cParams.searchLength;
- switch(mls)
- {
- default: /* includes case 3 */
- case 4 :
- ZSTD_compressBlock_doubleFast_generic(ctx, src, srcSize, 4); return;
- case 5 :
- ZSTD_compressBlock_doubleFast_generic(ctx, src, srcSize, 5); return;
- case 6 :
- ZSTD_compressBlock_doubleFast_generic(ctx, src, srcSize, 6); return;
- case 7 :
- ZSTD_compressBlock_doubleFast_generic(ctx, src, srcSize, 7); return;
- }
-}
-
-
-static void ZSTD_compressBlock_doubleFast_extDict_generic(ZSTD_CCtx* ctx,
- const void* src, size_t srcSize,
- const U32 mls)
-{
- U32* const hashLong = ctx->hashTable;
- U32 const hBitsL = ctx->appliedParams.cParams.hashLog;
- U32* const hashSmall = ctx->chainTable;
- U32 const hBitsS = ctx->appliedParams.cParams.chainLog;
- seqStore_t* seqStorePtr = &(ctx->seqStore);
- const BYTE* const base = ctx->base;
- const BYTE* const dictBase = ctx->dictBase;
- const BYTE* const istart = (const BYTE*)src;
- const BYTE* ip = istart;
- const BYTE* anchor = istart;
- const U32 lowestIndex = ctx->lowLimit;
- const BYTE* const dictStart = dictBase + lowestIndex;
- const U32 dictLimit = ctx->dictLimit;
- const BYTE* const lowPrefixPtr = base + dictLimit;
- const BYTE* const dictEnd = dictBase + dictLimit;
- const BYTE* const iend = istart + srcSize;
- const BYTE* const ilimit = iend - 8;
- U32 offset_1=seqStorePtr->rep[0], offset_2=seqStorePtr->rep[1];
-
- /* Search Loop */
- while (ip < ilimit) { /* < instead of <=, because (ip+1) */
- const size_t hSmall = ZSTD_hashPtr(ip, hBitsS, mls);
- const U32 matchIndex = hashSmall[hSmall];
- const BYTE* matchBase = matchIndex < dictLimit ? dictBase : base;
- const BYTE* match = matchBase + matchIndex;
-
- const size_t hLong = ZSTD_hashPtr(ip, hBitsL, 8);
- const U32 matchLongIndex = hashLong[hLong];
- const BYTE* matchLongBase = matchLongIndex < dictLimit ? dictBase : base;
- const BYTE* matchLong = matchLongBase + matchLongIndex;
-
- const U32 current = (U32)(ip-base);
- const U32 repIndex = current + 1 - offset_1; /* offset_1 expected <= current +1 */
- const BYTE* repBase = repIndex < dictLimit ? dictBase : base;
- const BYTE* repMatch = repBase + repIndex;
- size_t mLength;
- hashSmall[hSmall] = hashLong[hLong] = current; /* update hash table */
-
- if ( (((U32)((dictLimit-1) - repIndex) >= 3) /* intentional underflow */ & (repIndex > lowestIndex))
- && (MEM_read32(repMatch) == MEM_read32(ip+1)) ) {
- const BYTE* repMatchEnd = repIndex < dictLimit ? dictEnd : iend;
- mLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, lowPrefixPtr) + 4;
- ip++;
- ZSTD_storeSeq(seqStorePtr, ip-anchor, anchor, 0, mLength-MINMATCH);
- } else {
- if ((matchLongIndex > lowestIndex) && (MEM_read64(matchLong) == MEM_read64(ip))) {
- const BYTE* matchEnd = matchLongIndex < dictLimit ? dictEnd : iend;
- const BYTE* lowMatchPtr = matchLongIndex < dictLimit ? dictStart : lowPrefixPtr;
- U32 offset;
- mLength = ZSTD_count_2segments(ip+8, matchLong+8, iend, matchEnd, lowPrefixPtr) + 8;
- offset = current - matchLongIndex;
- while (((ip>anchor) & (matchLong>lowMatchPtr)) && (ip[-1] == matchLong[-1])) { ip--; matchLong--; mLength++; } /* catch up */
- offset_2 = offset_1;
- offset_1 = offset;
- ZSTD_storeSeq(seqStorePtr, ip-anchor, anchor, offset + ZSTD_REP_MOVE, mLength-MINMATCH);
-
- } else if ((matchIndex > lowestIndex) && (MEM_read32(match) == MEM_read32(ip))) {
- size_t const h3 = ZSTD_hashPtr(ip+1, hBitsL, 8);
- U32 const matchIndex3 = hashLong[h3];
- const BYTE* const match3Base = matchIndex3 < dictLimit ? dictBase : base;
- const BYTE* match3 = match3Base + matchIndex3;
- U32 offset;
- hashLong[h3] = current + 1;
- if ( (matchIndex3 > lowestIndex) && (MEM_read64(match3) == MEM_read64(ip+1)) ) {
- const BYTE* matchEnd = matchIndex3 < dictLimit ? dictEnd : iend;
- const BYTE* lowMatchPtr = matchIndex3 < dictLimit ? dictStart : lowPrefixPtr;
- mLength = ZSTD_count_2segments(ip+9, match3+8, iend, matchEnd, lowPrefixPtr) + 8;
- ip++;
- offset = current+1 - matchIndex3;
- while (((ip>anchor) & (match3>lowMatchPtr)) && (ip[-1] == match3[-1])) { ip--; match3--; mLength++; } /* catch up */
- } else {
- const BYTE* matchEnd = matchIndex < dictLimit ? dictEnd : iend;
- const BYTE* lowMatchPtr = matchIndex < dictLimit ? dictStart : lowPrefixPtr;
- mLength = ZSTD_count_2segments(ip+4, match+4, iend, matchEnd, lowPrefixPtr) + 4;
- offset = current - matchIndex;
- while (((ip>anchor) & (match>lowMatchPtr)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; } /* catch up */
- }
- offset_2 = offset_1;
- offset_1 = offset;
- ZSTD_storeSeq(seqStorePtr, ip-anchor, anchor, offset + ZSTD_REP_MOVE, mLength-MINMATCH);
-
- } else {
- ip += ((ip-anchor) >> g_searchStrength) + 1;
- continue;
- } }
-
- /* found a match : store it */
- ip += mLength;
- anchor = ip;
-
- if (ip <= ilimit) {
- /* Fill Table */
- hashSmall[ZSTD_hashPtr(base+current+2, hBitsS, mls)] = current+2;
- hashLong[ZSTD_hashPtr(base+current+2, hBitsL, 8)] = current+2;
- hashSmall[ZSTD_hashPtr(ip-2, hBitsS, mls)] = (U32)(ip-2-base);
- hashLong[ZSTD_hashPtr(ip-2, hBitsL, 8)] = (U32)(ip-2-base);
- /* check immediate repcode */
- while (ip <= ilimit) {
- U32 const current2 = (U32)(ip-base);
- U32 const repIndex2 = current2 - offset_2;
- const BYTE* repMatch2 = repIndex2 < dictLimit ? dictBase + repIndex2 : base + repIndex2;
- if ( (((U32)((dictLimit-1) - repIndex2) >= 3) & (repIndex2 > lowestIndex)) /* intentional overflow */
- && (MEM_read32(repMatch2) == MEM_read32(ip)) ) {
- const BYTE* const repEnd2 = repIndex2 < dictLimit ? dictEnd : iend;
- size_t const repLength2 = ZSTD_count_2segments(ip+4, repMatch2+4, iend, repEnd2, lowPrefixPtr) + 4;
- U32 tmpOffset = offset_2; offset_2 = offset_1; offset_1 = tmpOffset; /* swap offset_2 <=> offset_1 */
- ZSTD_storeSeq(seqStorePtr, 0, anchor, 0, repLength2-MINMATCH);
- hashSmall[ZSTD_hashPtr(ip, hBitsS, mls)] = current2;
- hashLong[ZSTD_hashPtr(ip, hBitsL, 8)] = current2;
- ip += repLength2;
- anchor = ip;
- continue;
- }
- break;
- } } }
-
- /* save reps for next block */
- seqStorePtr->repToConfirm[0] = offset_1; seqStorePtr->repToConfirm[1] = offset_2;
-
- /* Last Literals */
- { size_t const lastLLSize = iend - anchor;
- memcpy(seqStorePtr->lit, anchor, lastLLSize);
- seqStorePtr->lit += lastLLSize;
- }
-}
-
-
-static void ZSTD_compressBlock_doubleFast_extDict(ZSTD_CCtx* ctx,
- const void* src, size_t srcSize)
-{
- U32 const mls = ctx->appliedParams.cParams.searchLength;
- switch(mls)
- {
- default: /* includes case 3 */
- case 4 :
- ZSTD_compressBlock_doubleFast_extDict_generic(ctx, src, srcSize, 4); return;
- case 5 :
- ZSTD_compressBlock_doubleFast_extDict_generic(ctx, src, srcSize, 5); return;
- case 6 :
- ZSTD_compressBlock_doubleFast_extDict_generic(ctx, src, srcSize, 6); return;
- case 7 :
- ZSTD_compressBlock_doubleFast_extDict_generic(ctx, src, srcSize, 7); return;
- }
-}
-
-
-/*-*************************************
-* Binary Tree search
-***************************************/
-/** ZSTD_insertBt1() : add one or multiple positions to tree.
-* ip : assumed <= iend-8 .
-* @return : nb of positions added */
-static U32 ZSTD_insertBt1(ZSTD_CCtx* zc, const BYTE* const ip, const U32 mls, const BYTE* const iend, U32 nbCompares,
- U32 extDict)
-{
- U32* const hashTable = zc->hashTable;
- U32 const hashLog = zc->appliedParams.cParams.hashLog;
- size_t const h = ZSTD_hashPtr(ip, hashLog, mls);
- U32* const bt = zc->chainTable;
- U32 const btLog = zc->appliedParams.cParams.chainLog - 1;
- U32 const btMask = (1 << btLog) - 1;
- U32 matchIndex = hashTable[h];
- size_t commonLengthSmaller=0, commonLengthLarger=0;
- const BYTE* const base = zc->base;
- const BYTE* const dictBase = zc->dictBase;
- const U32 dictLimit = zc->dictLimit;
- const BYTE* const dictEnd = dictBase + dictLimit;
- const BYTE* const prefixStart = base + dictLimit;
- const BYTE* match;
- const U32 current = (U32)(ip-base);
- const U32 btLow = btMask >= current ? 0 : current - btMask;
- U32* smallerPtr = bt + 2*(current&btMask);
- U32* largerPtr = smallerPtr + 1;
- U32 dummy32; /* to be nullified at the end */
- U32 const windowLow = zc->lowLimit;
- U32 matchEndIdx = current+8;
- size_t bestLength = 8;
-#ifdef ZSTD_C_PREDICT
- U32 predictedSmall = *(bt + 2*((current-1)&btMask) + 0);
- U32 predictedLarge = *(bt + 2*((current-1)&btMask) + 1);
- predictedSmall += (predictedSmall>0);
- predictedLarge += (predictedLarge>0);
-#endif /* ZSTD_C_PREDICT */
-
- hashTable[h] = current; /* Update Hash Table */
-
- while (nbCompares-- && (matchIndex > windowLow)) {
- U32* const nextPtr = bt + 2*(matchIndex & btMask);
- size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of common bytes */
-
-#ifdef ZSTD_C_PREDICT /* note : can create issues when hlog small <= 11 */
- const U32* predictPtr = bt + 2*((matchIndex-1) & btMask); /* written this way, as bt is a roll buffer */
- if (matchIndex == predictedSmall) {
- /* no need to check length, result known */
- *smallerPtr = matchIndex;
- if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */
- smallerPtr = nextPtr+1; /* new "smaller" => larger of match */
- matchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */
- predictedSmall = predictPtr[1] + (predictPtr[1]>0);
- continue;
- }
- if (matchIndex == predictedLarge) {
- *largerPtr = matchIndex;
- if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */
- largerPtr = nextPtr;
- matchIndex = nextPtr[0];
- predictedLarge = predictPtr[0] + (predictPtr[0]>0);
- continue;
- }
-#endif
- if ((!extDict) || (matchIndex+matchLength >= dictLimit)) {
- match = base + matchIndex;
- if (match[matchLength] == ip[matchLength])
- matchLength += ZSTD_count(ip+matchLength+1, match+matchLength+1, iend) +1;
- } else {
- match = dictBase + matchIndex;
- matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart);
- if (matchIndex+matchLength >= dictLimit)
- match = base + matchIndex; /* to prepare for next usage of match[matchLength] */
- }
-
- if (matchLength > bestLength) {
- bestLength = matchLength;
- if (matchLength > matchEndIdx - matchIndex)
- matchEndIdx = matchIndex + (U32)matchLength;
- }
-
- if (ip+matchLength == iend) /* equal : no way to know if inf or sup */
- break; /* drop , to guarantee consistency ; miss a bit of compression, but other solutions can corrupt the tree */
-
- if (match[matchLength] < ip[matchLength]) { /* necessarily within correct buffer */
- /* match is smaller than current */
- *smallerPtr = matchIndex; /* update smaller idx */
- commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common length */
- if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */
- smallerPtr = nextPtr+1; /* new "smaller" => larger of match */
- matchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */
- } else {
- /* match is larger than current */
- *largerPtr = matchIndex;
- commonLengthLarger = matchLength;
- if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */
- largerPtr = nextPtr;
- matchIndex = nextPtr[0];
- } }
-
- *smallerPtr = *largerPtr = 0;
- if (bestLength > 384) return MIN(192, (U32)(bestLength - 384)); /* speed optimization */
- if (matchEndIdx > current + 8) return matchEndIdx - current - 8;
- return 1;
-}
-
-
-static size_t ZSTD_insertBtAndFindBestMatch (
- ZSTD_CCtx* zc,
- const BYTE* const ip, const BYTE* const iend,
- size_t* offsetPtr,
- U32 nbCompares, const U32 mls,
- U32 extDict)
-{
- U32* const hashTable = zc->hashTable;
- U32 const hashLog = zc->appliedParams.cParams.hashLog;
- size_t const h = ZSTD_hashPtr(ip, hashLog, mls);
- U32* const bt = zc->chainTable;
- U32 const btLog = zc->appliedParams.cParams.chainLog - 1;
- U32 const btMask = (1 << btLog) - 1;
- U32 matchIndex = hashTable[h];
- size_t commonLengthSmaller=0, commonLengthLarger=0;
- const BYTE* const base = zc->base;
- const BYTE* const dictBase = zc->dictBase;
- const U32 dictLimit = zc->dictLimit;
- const BYTE* const dictEnd = dictBase + dictLimit;
- const BYTE* const prefixStart = base + dictLimit;
- const U32 current = (U32)(ip-base);
- const U32 btLow = btMask >= current ? 0 : current - btMask;
- const U32 windowLow = zc->lowLimit;
- U32* smallerPtr = bt + 2*(current&btMask);
- U32* largerPtr = bt + 2*(current&btMask) + 1;
- U32 matchEndIdx = current+8;
- U32 dummy32; /* to be nullified at the end */
- size_t bestLength = 0;
-
- hashTable[h] = current; /* Update Hash Table */
-
- while (nbCompares-- && (matchIndex > windowLow)) {
- U32* const nextPtr = bt + 2*(matchIndex & btMask);
- size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of common bytes */
- const BYTE* match;
-
- if ((!extDict) || (matchIndex+matchLength >= dictLimit)) {
- match = base + matchIndex;
- if (match[matchLength] == ip[matchLength])
- matchLength += ZSTD_count(ip+matchLength+1, match+matchLength+1, iend) +1;
- } else {
- match = dictBase + matchIndex;
- matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart);
- if (matchIndex+matchLength >= dictLimit)
- match = base + matchIndex; /* to prepare for next usage of match[matchLength] */
- }
-
- if (matchLength > bestLength) {
- if (matchLength > matchEndIdx - matchIndex)
- matchEndIdx = matchIndex + (U32)matchLength;
- if ( (4*(int)(matchLength-bestLength)) > (int)(ZSTD_highbit32(current-matchIndex+1) - ZSTD_highbit32((U32)offsetPtr[0]+1)) )
- bestLength = matchLength, *offsetPtr = ZSTD_REP_MOVE + current - matchIndex;
- if (ip+matchLength == iend) /* equal : no way to know if inf or sup */
- break; /* drop, to guarantee consistency (miss a little bit of compression) */
- }
-
- if (match[matchLength] < ip[matchLength]) {
- /* match is smaller than current */
- *smallerPtr = matchIndex; /* update smaller idx */
- commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common length */
- if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */
- smallerPtr = nextPtr+1; /* new "smaller" => larger of match */
- matchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */
- } else {
- /* match is larger than current */
- *largerPtr = matchIndex;
- commonLengthLarger = matchLength;
- if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */
- largerPtr = nextPtr;
- matchIndex = nextPtr[0];
- } }
-
- *smallerPtr = *largerPtr = 0;
-
- zc->nextToUpdate = (matchEndIdx > current + 8) ? matchEndIdx - 8 : current+1;
- return bestLength;
-}
-
-
-static void ZSTD_updateTree(ZSTD_CCtx* zc, const BYTE* const ip, const BYTE* const iend, const U32 nbCompares, const U32 mls)
-{
- const BYTE* const base = zc->base;
- const U32 target = (U32)(ip - base);
- U32 idx = zc->nextToUpdate;
-
- while(idx < target)
- idx += ZSTD_insertBt1(zc, base+idx, mls, iend, nbCompares, 0);
-}
-
-/** ZSTD_BtFindBestMatch() : Tree updater, providing best match */
-static size_t ZSTD_BtFindBestMatch (
- ZSTD_CCtx* zc,
- const BYTE* const ip, const BYTE* const iLimit,
- size_t* offsetPtr,
- const U32 maxNbAttempts, const U32 mls)
-{
- if (ip < zc->base + zc->nextToUpdate) return 0; /* skipped area */
- ZSTD_updateTree(zc, ip, iLimit, maxNbAttempts, mls);
- return ZSTD_insertBtAndFindBestMatch(zc, ip, iLimit, offsetPtr, maxNbAttempts, mls, 0);
-}
-
-
-static size_t ZSTD_BtFindBestMatch_selectMLS (
- ZSTD_CCtx* zc, /* Index table will be updated */
- const BYTE* ip, const BYTE* const iLimit,
- size_t* offsetPtr,
- const U32 maxNbAttempts, const U32 matchLengthSearch)
-{
- switch(matchLengthSearch)
- {
- default : /* includes case 3 */
- case 4 : return ZSTD_BtFindBestMatch(zc, ip, iLimit, offsetPtr, maxNbAttempts, 4);
- case 5 : return ZSTD_BtFindBestMatch(zc, ip, iLimit, offsetPtr, maxNbAttempts, 5);
- case 7 :
- case 6 : return ZSTD_BtFindBestMatch(zc, ip, iLimit, offsetPtr, maxNbAttempts, 6);
- }
-}
-
-
-static void ZSTD_updateTree_extDict(ZSTD_CCtx* zc, const BYTE* const ip, const BYTE* const iend, const U32 nbCompares, const U32 mls)
-{
- const BYTE* const base = zc->base;
- const U32 target = (U32)(ip - base);
- U32 idx = zc->nextToUpdate;
-
- while (idx < target) idx += ZSTD_insertBt1(zc, base+idx, mls, iend, nbCompares, 1);
-}
-
-
-/** Tree updater, providing best match */
-static size_t ZSTD_BtFindBestMatch_extDict (
- ZSTD_CCtx* zc,
- const BYTE* const ip, const BYTE* const iLimit,
- size_t* offsetPtr,
- const U32 maxNbAttempts, const U32 mls)
-{
- if (ip < zc->base + zc->nextToUpdate) return 0; /* skipped area */
- ZSTD_updateTree_extDict(zc, ip, iLimit, maxNbAttempts, mls);
- return ZSTD_insertBtAndFindBestMatch(zc, ip, iLimit, offsetPtr, maxNbAttempts, mls, 1);
-}
-
-
-static size_t ZSTD_BtFindBestMatch_selectMLS_extDict (
- ZSTD_CCtx* zc, /* Index table will be updated */
- const BYTE* ip, const BYTE* const iLimit,
- size_t* offsetPtr,
- const U32 maxNbAttempts, const U32 matchLengthSearch)
-{
- switch(matchLengthSearch)
- {
- default : /* includes case 3 */
- case 4 : return ZSTD_BtFindBestMatch_extDict(zc, ip, iLimit, offsetPtr, maxNbAttempts, 4);
- case 5 : return ZSTD_BtFindBestMatch_extDict(zc, ip, iLimit, offsetPtr, maxNbAttempts, 5);
- case 7 :
- case 6 : return ZSTD_BtFindBestMatch_extDict(zc, ip, iLimit, offsetPtr, maxNbAttempts, 6);
- }
-}
-
-
-
-/* *********************************
-* Hash Chain
-***********************************/
-#define NEXT_IN_CHAIN(d, mask) chainTable[(d) & mask]
-
-/* Update chains up to ip (excluded)
- Assumption : always within prefix (i.e. not within extDict) */
-FORCE_INLINE_TEMPLATE
-U32 ZSTD_insertAndFindFirstIndex (ZSTD_CCtx* zc, const BYTE* ip, U32 mls)
-{
- U32* const hashTable = zc->hashTable;
- const U32 hashLog = zc->appliedParams.cParams.hashLog;
- U32* const chainTable = zc->chainTable;
- const U32 chainMask = (1 << zc->appliedParams.cParams.chainLog) - 1;
- const BYTE* const base = zc->base;
- const U32 target = (U32)(ip - base);
- U32 idx = zc->nextToUpdate;
-
- while(idx < target) { /* catch up */
- size_t const h = ZSTD_hashPtr(base+idx, hashLog, mls);
- NEXT_IN_CHAIN(idx, chainMask) = hashTable[h];
- hashTable[h] = idx;
- idx++;
- }
-
- zc->nextToUpdate = target;
- return hashTable[ZSTD_hashPtr(ip, hashLog, mls)];
-}
-
-
-/* inlining is important to hardwire a hot branch (template emulation) */
-FORCE_INLINE_TEMPLATE
-size_t ZSTD_HcFindBestMatch_generic (
- ZSTD_CCtx* zc, /* Index table will be updated */
- const BYTE* const ip, const BYTE* const iLimit,
- size_t* offsetPtr,
- const U32 maxNbAttempts, const U32 mls, const U32 extDict)
-{
- U32* const chainTable = zc->chainTable;
- const U32 chainSize = (1 << zc->appliedParams.cParams.chainLog);
- const U32 chainMask = chainSize-1;
- const BYTE* const base = zc->base;
- const BYTE* const dictBase = zc->dictBase;
- const U32 dictLimit = zc->dictLimit;
- const BYTE* const prefixStart = base + dictLimit;
- const BYTE* const dictEnd = dictBase + dictLimit;
- const U32 lowLimit = zc->lowLimit;
- const U32 current = (U32)(ip-base);
- const U32 minChain = current > chainSize ? current - chainSize : 0;
- int nbAttempts=maxNbAttempts;
- size_t ml=4-1;
-
- /* HC4 match finder */
- U32 matchIndex = ZSTD_insertAndFindFirstIndex (zc, ip, mls);
-
- for ( ; (matchIndex>lowLimit) & (nbAttempts>0) ; nbAttempts--) {
- const BYTE* match;
- size_t currentMl=0;
- if ((!extDict) || matchIndex >= dictLimit) {
- match = base + matchIndex;
- if (match[ml] == ip[ml]) /* potentially better */
- currentMl = ZSTD_count(ip, match, iLimit);
- } else {
- match = dictBase + matchIndex;
- if (MEM_read32(match) == MEM_read32(ip)) /* assumption : matchIndex <= dictLimit-4 (by table construction) */
- currentMl = ZSTD_count_2segments(ip+4, match+4, iLimit, dictEnd, prefixStart) + 4;
- }
-
- /* save best solution */
- if (currentMl > ml) {
- ml = currentMl;
- *offsetPtr = current - matchIndex + ZSTD_REP_MOVE;
- if (ip+currentMl == iLimit) break; /* best possible, avoids read overflow on next attempt */
- }
-
- if (matchIndex <= minChain) break;
- matchIndex = NEXT_IN_CHAIN(matchIndex, chainMask);
- }
-
- return ml;
-}
-
-
-FORCE_INLINE_TEMPLATE size_t ZSTD_HcFindBestMatch_selectMLS (
- ZSTD_CCtx* zc,
- const BYTE* ip, const BYTE* const iLimit,
- size_t* offsetPtr,
- const U32 maxNbAttempts, const U32 matchLengthSearch)
-{
- switch(matchLengthSearch)
- {
- default : /* includes case 3 */
- case 4 : return ZSTD_HcFindBestMatch_generic(zc, ip, iLimit, offsetPtr, maxNbAttempts, 4, 0);
- case 5 : return ZSTD_HcFindBestMatch_generic(zc, ip, iLimit, offsetPtr, maxNbAttempts, 5, 0);
- case 7 :
- case 6 : return ZSTD_HcFindBestMatch_generic(zc, ip, iLimit, offsetPtr, maxNbAttempts, 6, 0);
- }
-}
-
-
-FORCE_INLINE_TEMPLATE size_t ZSTD_HcFindBestMatch_extDict_selectMLS (
- ZSTD_CCtx* zc,
- const BYTE* ip, const BYTE* const iLimit,
- size_t* offsetPtr,
- const U32 maxNbAttempts, const U32 matchLengthSearch)
-{
- switch(matchLengthSearch)
- {
- default : /* includes case 3 */
- case 4 : return ZSTD_HcFindBestMatch_generic(zc, ip, iLimit, offsetPtr, maxNbAttempts, 4, 1);
- case 5 : return ZSTD_HcFindBestMatch_generic(zc, ip, iLimit, offsetPtr, maxNbAttempts, 5, 1);
- case 7 :
- case 6 : return ZSTD_HcFindBestMatch_generic(zc, ip, iLimit, offsetPtr, maxNbAttempts, 6, 1);
- }
-}
-
-
-/* *******************************
-* Common parser - lazy strategy
-*********************************/
-FORCE_INLINE_TEMPLATE
-void ZSTD_compressBlock_lazy_generic(ZSTD_CCtx* ctx,
- const void* src, size_t srcSize,
- const U32 searchMethod, const U32 depth)
-{
- seqStore_t* seqStorePtr = &(ctx->seqStore);
- const BYTE* const istart = (const BYTE*)src;
- const BYTE* ip = istart;
- const BYTE* anchor = istart;
- const BYTE* const iend = istart + srcSize;
- const BYTE* const ilimit = iend - 8;
- const BYTE* const base = ctx->base + ctx->dictLimit;
-
- U32 const maxSearches = 1 << ctx->appliedParams.cParams.searchLog;
- U32 const mls = ctx->appliedParams.cParams.searchLength;
-
- typedef size_t (*searchMax_f)(ZSTD_CCtx* zc, const BYTE* ip, const BYTE* iLimit,
- size_t* offsetPtr,
- U32 maxNbAttempts, U32 matchLengthSearch);
- searchMax_f const searchMax = searchMethod ? ZSTD_BtFindBestMatch_selectMLS : ZSTD_HcFindBestMatch_selectMLS;
- U32 offset_1 = seqStorePtr->rep[0], offset_2 = seqStorePtr->rep[1], savedOffset=0;
-
- /* init */
- ip += (ip==base);
- ctx->nextToUpdate3 = ctx->nextToUpdate;
- { U32 const maxRep = (U32)(ip-base);
- if (offset_2 > maxRep) savedOffset = offset_2, offset_2 = 0;
- if (offset_1 > maxRep) savedOffset = offset_1, offset_1 = 0;
- }
-
- /* Match Loop */
- while (ip < ilimit) {
- size_t matchLength=0;
- size_t offset=0;
- const BYTE* start=ip+1;
-
- /* check repCode */
- if ((offset_1>0) & (MEM_read32(ip+1) == MEM_read32(ip+1 - offset_1))) {
- /* repcode : we take it */
- matchLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4;
- if (depth==0) goto _storeSequence;
- }
-
- /* first search (depth 0) */
- { size_t offsetFound = 99999999;
- size_t const ml2 = searchMax(ctx, ip, iend, &offsetFound, maxSearches, mls);
- if (ml2 > matchLength)
- matchLength = ml2, start = ip, offset=offsetFound;
- }
-
- if (matchLength < 4) {
- ip += ((ip-anchor) >> g_searchStrength) + 1; /* jump faster over incompressible sections */
- continue;
- }
-
- /* let's try to find a better solution */
- if (depth>=1)
- while (ip<ilimit) {
- ip ++;
- if ((offset) && ((offset_1>0) & (MEM_read32(ip) == MEM_read32(ip - offset_1)))) {
- size_t const mlRep = ZSTD_count(ip+4, ip+4-offset_1, iend) + 4;
- int const gain2 = (int)(mlRep * 3);
- int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offset+1) + 1);
- if ((mlRep >= 4) && (gain2 > gain1))
- matchLength = mlRep, offset = 0, start = ip;
- }
- { size_t offset2=99999999;
- size_t const ml2 = searchMax(ctx, ip, iend, &offset2, maxSearches, mls);
- int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)offset2+1)); /* raw approx */
- int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 4);
- if ((ml2 >= 4) && (gain2 > gain1)) {
- matchLength = ml2, offset = offset2, start = ip;
- continue; /* search a better one */
- } }
-
- /* let's find an even better one */
- if ((depth==2) && (ip<ilimit)) {
- ip ++;
- if ((offset) && ((offset_1>0) & (MEM_read32(ip) == MEM_read32(ip - offset_1)))) {
- size_t const ml2 = ZSTD_count(ip+4, ip+4-offset_1, iend) + 4;
- int const gain2 = (int)(ml2 * 4);
- int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 1);
- if ((ml2 >= 4) && (gain2 > gain1))
- matchLength = ml2, offset = 0, start = ip;
- }
- { size_t offset2=99999999;
- size_t const ml2 = searchMax(ctx, ip, iend, &offset2, maxSearches, mls);
- int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)offset2+1)); /* raw approx */
- int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 7);
- if ((ml2 >= 4) && (gain2 > gain1)) {
- matchLength = ml2, offset = offset2, start = ip;
- continue;
- } } }
- break; /* nothing found : store previous solution */
- }
-
- /* NOTE:
- * start[-offset+ZSTD_REP_MOVE-1] is undefined behavior.
- * (-offset+ZSTD_REP_MOVE-1) is unsigned, and is added to start, which
- * overflows the pointer, which is undefined behavior.
- */
- /* catch up */
- if (offset) {
- while ( (start > anchor)
- && (start > base+offset-ZSTD_REP_MOVE)
- && (start[-1] == (start-offset+ZSTD_REP_MOVE)[-1]) ) /* only search for offset within prefix */
- { start--; matchLength++; }
- offset_2 = offset_1; offset_1 = (U32)(offset - ZSTD_REP_MOVE);
- }
- /* store sequence */
-_storeSequence:
- { size_t const litLength = start - anchor;
- ZSTD_storeSeq(seqStorePtr, litLength, anchor, (U32)offset, matchLength-MINMATCH);
- anchor = ip = start + matchLength;
- }
-
- /* check immediate repcode */
- while ( (ip <= ilimit)
- && ((offset_2>0)
- & (MEM_read32(ip) == MEM_read32(ip - offset_2)) )) {
- /* store sequence */
- matchLength = ZSTD_count(ip+4, ip+4-offset_2, iend) + 4;
- offset = offset_2; offset_2 = offset_1; offset_1 = (U32)offset; /* swap repcodes */
- ZSTD_storeSeq(seqStorePtr, 0, anchor, 0, matchLength-MINMATCH);
- ip += matchLength;
- anchor = ip;
- continue; /* faster when present ... (?) */
- } }
-
- /* Save reps for next block */
- seqStorePtr->repToConfirm[0] = offset_1 ? offset_1 : savedOffset;
- seqStorePtr->repToConfirm[1] = offset_2 ? offset_2 : savedOffset;
-
- /* Last Literals */
- { size_t const lastLLSize = iend - anchor;
- memcpy(seqStorePtr->lit, anchor, lastLLSize);
- seqStorePtr->lit += lastLLSize;
- }
-}
-
-
-static void ZSTD_compressBlock_btlazy2(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
-{
- ZSTD_compressBlock_lazy_generic(ctx, src, srcSize, 1, 2);
-}
-
-static void ZSTD_compressBlock_lazy2(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
-{
- ZSTD_compressBlock_lazy_generic(ctx, src, srcSize, 0, 2);
-}
-
-static void ZSTD_compressBlock_lazy(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
-{
- ZSTD_compressBlock_lazy_generic(ctx, src, srcSize, 0, 1);
-}
-
-static void ZSTD_compressBlock_greedy(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
-{
- ZSTD_compressBlock_lazy_generic(ctx, src, srcSize, 0, 0);
-}
-
-
-FORCE_INLINE_TEMPLATE
-void ZSTD_compressBlock_lazy_extDict_generic(ZSTD_CCtx* ctx,
- const void* src, size_t srcSize,
- const U32 searchMethod, const U32 depth)
-{
- seqStore_t* seqStorePtr = &(ctx->seqStore);
- const BYTE* const istart = (const BYTE*)src;
- const BYTE* ip = istart;
- const BYTE* anchor = istart;
- const BYTE* const iend = istart + srcSize;
- const BYTE* const ilimit = iend - 8;
- const BYTE* const base = ctx->base;
- const U32 dictLimit = ctx->dictLimit;
- const U32 lowestIndex = ctx->lowLimit;
- const BYTE* const prefixStart = base + dictLimit;
- const BYTE* const dictBase = ctx->dictBase;
- const BYTE* const dictEnd = dictBase + dictLimit;
- const BYTE* const dictStart = dictBase + ctx->lowLimit;
-
- const U32 maxSearches = 1 << ctx->appliedParams.cParams.searchLog;
- const U32 mls = ctx->appliedParams.cParams.searchLength;
-
- typedef size_t (*searchMax_f)(ZSTD_CCtx* zc, const BYTE* ip, const BYTE* iLimit,
- size_t* offsetPtr,
- U32 maxNbAttempts, U32 matchLengthSearch);
- searchMax_f searchMax = searchMethod ? ZSTD_BtFindBestMatch_selectMLS_extDict : ZSTD_HcFindBestMatch_extDict_selectMLS;
-
- U32 offset_1 = seqStorePtr->rep[0], offset_2 = seqStorePtr->rep[1];
-
- /* init */
- ctx->nextToUpdate3 = ctx->nextToUpdate;
- ip += (ip == prefixStart);
-
- /* Match Loop */
- while (ip < ilimit) {
- size_t matchLength=0;
- size_t offset=0;
- const BYTE* start=ip+1;
- U32 current = (U32)(ip-base);
-
- /* check repCode */
- { const U32 repIndex = (U32)(current+1 - offset_1);
- const BYTE* const repBase = repIndex < dictLimit ? dictBase : base;
- const BYTE* const repMatch = repBase + repIndex;
- if (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex > lowestIndex)) /* intentional overflow */
- if (MEM_read32(ip+1) == MEM_read32(repMatch)) {
- /* repcode detected we should take it */
- const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend;
- matchLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repEnd, prefixStart) + 4;
- if (depth==0) goto _storeSequence;
- } }
-
- /* first search (depth 0) */
- { size_t offsetFound = 99999999;
- size_t const ml2 = searchMax(ctx, ip, iend, &offsetFound, maxSearches, mls);
- if (ml2 > matchLength)
- matchLength = ml2, start = ip, offset=offsetFound;
- }
-
- if (matchLength < 4) {
- ip += ((ip-anchor) >> g_searchStrength) + 1; /* jump faster over incompressible sections */
- continue;
- }
-
- /* let's try to find a better solution */
- if (depth>=1)
- while (ip<ilimit) {
- ip ++;
- current++;
- /* check repCode */
- if (offset) {
- const U32 repIndex = (U32)(current - offset_1);
- const BYTE* const repBase = repIndex < dictLimit ? dictBase : base;
- const BYTE* const repMatch = repBase + repIndex;
- if (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex > lowestIndex)) /* intentional overflow */
- if (MEM_read32(ip) == MEM_read32(repMatch)) {
- /* repcode detected */
- const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend;
- size_t const repLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd, prefixStart) + 4;
- int const gain2 = (int)(repLength * 3);
- int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offset+1) + 1);
- if ((repLength >= 4) && (gain2 > gain1))
- matchLength = repLength, offset = 0, start = ip;
- } }
-
- /* search match, depth 1 */
- { size_t offset2=99999999;
- size_t const ml2 = searchMax(ctx, ip, iend, &offset2, maxSearches, mls);
- int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)offset2+1)); /* raw approx */
- int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 4);
- if ((ml2 >= 4) && (gain2 > gain1)) {
- matchLength = ml2, offset = offset2, start = ip;
- continue; /* search a better one */
- } }
-
- /* let's find an even better one */
- if ((depth==2) && (ip<ilimit)) {
- ip ++;
- current++;
- /* check repCode */
- if (offset) {
- const U32 repIndex = (U32)(current - offset_1);
- const BYTE* const repBase = repIndex < dictLimit ? dictBase : base;
- const BYTE* const repMatch = repBase + repIndex;
- if (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex > lowestIndex)) /* intentional overflow */
- if (MEM_read32(ip) == MEM_read32(repMatch)) {
- /* repcode detected */
- const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend;
- size_t const repLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd, prefixStart) + 4;
- int const gain2 = (int)(repLength * 4);
- int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 1);
- if ((repLength >= 4) && (gain2 > gain1))
- matchLength = repLength, offset = 0, start = ip;
- } }
-
- /* search match, depth 2 */
- { size_t offset2=99999999;
- size_t const ml2 = searchMax(ctx, ip, iend, &offset2, maxSearches, mls);
- int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)offset2+1)); /* raw approx */
- int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 7);
- if ((ml2 >= 4) && (gain2 > gain1)) {
- matchLength = ml2, offset = offset2, start = ip;
- continue;
- } } }
- break; /* nothing found : store previous solution */
- }
-
- /* catch up */
- if (offset) {
- U32 const matchIndex = (U32)((start-base) - (offset - ZSTD_REP_MOVE));
- const BYTE* match = (matchIndex < dictLimit) ? dictBase + matchIndex : base + matchIndex;
- const BYTE* const mStart = (matchIndex < dictLimit) ? dictStart : prefixStart;
- while ((start>anchor) && (match>mStart) && (start[-1] == match[-1])) { start--; match--; matchLength++; } /* catch up */
- offset_2 = offset_1; offset_1 = (U32)(offset - ZSTD_REP_MOVE);
- }
-
- /* store sequence */
-_storeSequence:
- { size_t const litLength = start - anchor;
- ZSTD_storeSeq(seqStorePtr, litLength, anchor, (U32)offset, matchLength-MINMATCH);
- anchor = ip = start + matchLength;
- }
-
- /* check immediate repcode */
- while (ip <= ilimit) {
- const U32 repIndex = (U32)((ip-base) - offset_2);
- const BYTE* const repBase = repIndex < dictLimit ? dictBase : base;
- const BYTE* const repMatch = repBase + repIndex;
- if (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex > lowestIndex)) /* intentional overflow */
- if (MEM_read32(ip) == MEM_read32(repMatch)) {
- /* repcode detected we should take it */
- const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend;
- matchLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd, prefixStart) + 4;
- offset = offset_2; offset_2 = offset_1; offset_1 = (U32)offset; /* swap offset history */
- ZSTD_storeSeq(seqStorePtr, 0, anchor, 0, matchLength-MINMATCH);
- ip += matchLength;
- anchor = ip;
- continue; /* faster when present ... (?) */
- }
- break;
- } }
-
- /* Save reps for next block */
- seqStorePtr->repToConfirm[0] = offset_1; seqStorePtr->repToConfirm[1] = offset_2;
-
- /* Last Literals */
- { size_t const lastLLSize = iend - anchor;
- memcpy(seqStorePtr->lit, anchor, lastLLSize);
- seqStorePtr->lit += lastLLSize;
- }
-}
-
-
-void ZSTD_compressBlock_greedy_extDict(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
-{
- ZSTD_compressBlock_lazy_extDict_generic(ctx, src, srcSize, 0, 0);
-}
-
-static void ZSTD_compressBlock_lazy_extDict(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
-{
- ZSTD_compressBlock_lazy_extDict_generic(ctx, src, srcSize, 0, 1);
-}
-
-static void ZSTD_compressBlock_lazy2_extDict(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
-{
- ZSTD_compressBlock_lazy_extDict_generic(ctx, src, srcSize, 0, 2);
-}
-
-static void ZSTD_compressBlock_btlazy2_extDict(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
-{
- ZSTD_compressBlock_lazy_extDict_generic(ctx, src, srcSize, 1, 2);
-}
-
-
-/* The optimal parser */
-#include "zstd_opt.h"
-
-static void ZSTD_compressBlock_btopt(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
-{
-#ifdef ZSTD_OPT_H_91842398743
- ZSTD_compressBlock_opt_generic(ctx, src, srcSize, 0);
-#else
- (void)ctx; (void)src; (void)srcSize;
- return;
-#endif
-}
-
-static void ZSTD_compressBlock_btultra(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
-{
-#ifdef ZSTD_OPT_H_91842398743
- ZSTD_compressBlock_opt_generic(ctx, src, srcSize, 1);
-#else
- (void)ctx; (void)src; (void)srcSize;
- return;
-#endif
-}
-
-static void ZSTD_compressBlock_btopt_extDict(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
-{
-#ifdef ZSTD_OPT_H_91842398743
- ZSTD_compressBlock_opt_extDict_generic(ctx, src, srcSize, 0);
-#else
- (void)ctx; (void)src; (void)srcSize;
- return;
-#endif
-}
-
-static void ZSTD_compressBlock_btultra_extDict(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
-{
-#ifdef ZSTD_OPT_H_91842398743
- ZSTD_compressBlock_opt_extDict_generic(ctx, src, srcSize, 1);
-#else
- (void)ctx; (void)src; (void)srcSize;
- return;
-#endif
-}
-
-
/* ZSTD_selectBlockCompressor() :
+ * Not static, but internal use only (used by long distance matcher)
* assumption : strat is a valid strategy */
-typedef void (*ZSTD_blockCompressor) (ZSTD_CCtx* ctx, const void* src, size_t srcSize);
-static ZSTD_blockCompressor ZSTD_selectBlockCompressor(ZSTD_strategy strat, int extDict)
+typedef size_t (*ZSTD_blockCompressor) (ZSTD_CCtx* ctx, const void* src, size_t srcSize);
+ZSTD_blockCompressor ZSTD_selectBlockCompressor(ZSTD_strategy strat, int extDict)
{
static const ZSTD_blockCompressor blockCompressor[2][(unsigned)ZSTD_btultra+1] = {
{ ZSTD_compressBlock_fast /* default for 0 */,
@@ -2819,18 +1565,37 @@ static ZSTD_blockCompressor ZSTD_selectBlockCompressor(ZSTD_strategy strat, int
return blockCompressor[extDict!=0][(U32)strat];
}
+static void ZSTD_storeLastLiterals(seqStore_t* seqStorePtr,
+ const BYTE* anchor, size_t lastLLSize)
+{
+ memcpy(seqStorePtr->lit, anchor, lastLLSize);
+ seqStorePtr->lit += lastLLSize;
+}
static size_t ZSTD_compressBlock_internal(ZSTD_CCtx* zc, void* dst, size_t dstCapacity, const void* src, size_t srcSize)
{
- ZSTD_blockCompressor const blockCompressor = ZSTD_selectBlockCompressor(zc->appliedParams.cParams.strategy, zc->lowLimit < zc->dictLimit);
const BYTE* const base = zc->base;
const BYTE* const istart = (const BYTE*)src;
const U32 current = (U32)(istart-base);
+ size_t lastLLSize;
+ const BYTE* anchor;
+ U32 const extDict = zc->lowLimit < zc->dictLimit;
+ const ZSTD_blockCompressor blockCompressor =
+ zc->appliedParams.ldmParams.enableLdm
+ ? (extDict ? ZSTD_compressBlock_ldm_extDict : ZSTD_compressBlock_ldm)
+ : ZSTD_selectBlockCompressor(zc->appliedParams.cParams.strategy, extDict);
+
if (srcSize < MIN_CBLOCK_SIZE+ZSTD_blockHeaderSize+1) return 0; /* don't even attempt compression below a certain srcSize */
ZSTD_resetSeqStore(&(zc->seqStore));
if (current > zc->nextToUpdate + 384)
zc->nextToUpdate = current - MIN(192, (U32)(current - zc->nextToUpdate - 384)); /* limited update after finding a very long match */
- blockCompressor(zc, src, srcSize);
+
+ lastLLSize = blockCompressor(zc, src, srcSize);
+
+ /* Last literals */
+ anchor = (const BYTE*)src + srcSize - lastLLSize;
+ ZSTD_storeLastLiterals(&zc->seqStore, anchor, lastLLSize);
+
return ZSTD_compressSequences(&zc->seqStore, zc->entropy, &zc->appliedParams.cParams, dst, dstCapacity, srcSize);
}
@@ -2852,7 +1617,7 @@ static size_t ZSTD_compress_frameChunk (ZSTD_CCtx* cctx,
const BYTE* ip = (const BYTE*)src;
BYTE* const ostart = (BYTE*)dst;
BYTE* op = ostart;
- U32 const maxDist = 1 << cctx->appliedParams.cParams.windowLog;
+ U32 const maxDist = (U32)1 << cctx->appliedParams.cParams.windowLog;
if (cctx->appliedParams.fParams.checksumFlag && srcSize)
XXH64_update(&cctx->xxhState, src, srcSize);
@@ -2865,13 +1630,33 @@ static size_t ZSTD_compress_frameChunk (ZSTD_CCtx* cctx,
return ERROR(dstSize_tooSmall); /* not enough space to store compressed block */
if (remaining < blockSize) blockSize = remaining;
- /* preemptive overflow correction */
+ /* preemptive overflow correction:
+ * 1. correction is large enough:
+ * lowLimit > (3<<29) ==> current > 3<<29 + 1<<windowLog - blockSize
+ * 1<<windowLog <= newCurrent < 1<<chainLog + 1<<windowLog
+ *
+ * current - newCurrent
+ * > (3<<29 + 1<<windowLog - blockSize) - (1<<windowLog + 1<<chainLog)
+ * > (3<<29 - blockSize) - (1<<chainLog)
+ * > (3<<29 - blockSize) - (1<<30) (NOTE: chainLog <= 30)
+ * > 1<<29 - 1<<17
+ *
+ * 2. (ip+blockSize - cctx->base) doesn't overflow:
+ * In 32 bit mode we limit windowLog to 30 so we don't get
+ * differences larger than 1<<31-1.
+ * 3. cctx->lowLimit < 1<<32:
+ * windowLog <= 31 ==> 3<<29 + 1<<windowLog < 7<<29 < 1<<32.
+ */
if (cctx->lowLimit > (3U<<29)) {
- U32 const cycleMask = (1 << ZSTD_cycleLog(cctx->appliedParams.cParams.hashLog, cctx->appliedParams.cParams.strategy)) - 1;
+ U32 const cycleMask = ((U32)1 << ZSTD_cycleLog(cctx->appliedParams.cParams.chainLog, cctx->appliedParams.cParams.strategy)) - 1;
U32 const current = (U32)(ip - cctx->base);
- U32 const newCurrent = (current & cycleMask) + (1 << cctx->appliedParams.cParams.windowLog);
+ U32 const newCurrent = (current & cycleMask) + ((U32)1 << cctx->appliedParams.cParams.windowLog);
U32 const correction = current - newCurrent;
- ZSTD_STATIC_ASSERT(ZSTD_WINDOWLOG_MAX_64 <= 30);
+ ZSTD_STATIC_ASSERT(ZSTD_CHAINLOG_MAX <= 30);
+ ZSTD_STATIC_ASSERT(ZSTD_WINDOWLOG_MAX_32 <= 30);
+ ZSTD_STATIC_ASSERT(ZSTD_WINDOWLOG_MAX <= 31);
+ assert(current > newCurrent);
+ assert(correction > 1<<28); /* Loose bound, should be about 1<<29 */
ZSTD_reduceIndex(cctx, correction);
cctx->base += correction;
cctx->dictBase += correction;
@@ -2879,6 +1664,7 @@ static size_t ZSTD_compress_frameChunk (ZSTD_CCtx* cctx,
cctx->dictLimit -= correction;
if (cctx->nextToUpdate < correction) cctx->nextToUpdate = 0;
else cctx->nextToUpdate -= correction;
+ DEBUGLOG(4, "Correction of 0x%x bytes to lowLimit=0x%x\n", correction, cctx->lowLimit);
}
if ((U32)(ip+blockSize - cctx->base) > cctx->loadedDictEnd + maxDist) {
@@ -2915,25 +1701,29 @@ static size_t ZSTD_compress_frameChunk (ZSTD_CCtx* cctx,
static size_t ZSTD_writeFrameHeader(void* dst, size_t dstCapacity,
- ZSTD_parameters params, U64 pledgedSrcSize, U32 dictID)
+ ZSTD_CCtx_params params, U64 pledgedSrcSize, U32 dictID)
{ BYTE* const op = (BYTE*)dst;
U32 const dictIDSizeCodeLength = (dictID>0) + (dictID>=256) + (dictID>=65536); /* 0-3 */
U32 const dictIDSizeCode = params.fParams.noDictIDFlag ? 0 : dictIDSizeCodeLength; /* 0-3 */
U32 const checksumFlag = params.fParams.checksumFlag>0;
- U32 const windowSize = 1U << params.cParams.windowLog;
+ U32 const windowSize = (U32)1 << params.cParams.windowLog;
U32 const singleSegment = params.fParams.contentSizeFlag && (windowSize >= pledgedSrcSize);
BYTE const windowLogByte = (BYTE)((params.cParams.windowLog - ZSTD_WINDOWLOG_ABSOLUTEMIN) << 3);
U32 const fcsCode = params.fParams.contentSizeFlag ?
(pledgedSrcSize>=256) + (pledgedSrcSize>=65536+256) + (pledgedSrcSize>=0xFFFFFFFFU) : 0; /* 0-3 */
BYTE const frameHeaderDecriptionByte = (BYTE)(dictIDSizeCode + (checksumFlag<<2) + (singleSegment<<5) + (fcsCode<<6) );
- size_t pos;
+ size_t pos=0;
if (dstCapacity < ZSTD_frameHeaderSize_max) return ERROR(dstSize_tooSmall);
- DEBUGLOG(5, "ZSTD_writeFrameHeader : dictIDFlag : %u ; dictID : %u ; dictIDSizeCode : %u",
+ DEBUGLOG(4, "ZSTD_writeFrameHeader : dictIDFlag : %u ; dictID : %u ; dictIDSizeCode : %u",
!params.fParams.noDictIDFlag, dictID, dictIDSizeCode);
- MEM_writeLE32(dst, ZSTD_MAGICNUMBER);
- op[4] = frameHeaderDecriptionByte; pos=5;
+ if (params.format == ZSTD_f_zstd1) {
+ DEBUGLOG(4, "writing zstd magic number");
+ MEM_writeLE32(dst, ZSTD_MAGICNUMBER);
+ pos = 4;
+ }
+ op[pos++] = frameHeaderDecriptionByte;
if (!singleSegment) op[pos++] = windowLogByte;
switch(dictIDSizeCode)
{
@@ -2969,7 +1759,7 @@ static size_t ZSTD_compressContinue_internal (ZSTD_CCtx* cctx,
if (frame && (cctx->stage==ZSTDcs_init)) {
fhSize = ZSTD_writeFrameHeader(dst, dstCapacity, cctx->appliedParams,
- cctx->pledgedSrcSizePlusOne-1, cctx->dictID);
+ cctx->pledgedSrcSizePlusOne-1, cctx->dictID);
if (ZSTD_isError(fhSize)) return fhSize;
dstCapacity -= fhSize;
dst = (char*)dst + fhSize;
@@ -3018,11 +1808,9 @@ size_t ZSTD_compressContinue (ZSTD_CCtx* cctx,
size_t ZSTD_getBlockSize(const ZSTD_CCtx* cctx)
{
- U32 const cLevel = cctx->compressionLevel;
- ZSTD_compressionParameters cParams = (cLevel == ZSTD_CLEVEL_CUSTOM) ?
- cctx->appliedParams.cParams :
- ZSTD_getCParams(cLevel, 0, 0);
- return MIN (ZSTD_BLOCKSIZE_MAX, 1 << cParams.windowLog);
+ ZSTD_compressionParameters const cParams =
+ ZSTD_getCParamsFromCCtxParams(cctx->appliedParams, 0, 0);
+ return MIN (ZSTD_BLOCKSIZE_MAX, (U32)1 << cParams.windowLog);
}
size_t ZSTD_compressBlock(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize)
@@ -3046,7 +1834,7 @@ static size_t ZSTD_loadDictionaryContent(ZSTD_CCtx* zc, const void* src, size_t
zc->dictBase = zc->base;
zc->base += ip - zc->nextSrc;
zc->nextToUpdate = zc->dictLimit;
- zc->loadedDictEnd = zc->forceWindow ? 0 : (U32)(iend - zc->base);
+ zc->loadedDictEnd = zc->appliedParams.forceWindow ? 0 : (U32)(iend - zc->base);
zc->nextSrc = iend;
if (srcSize <= HASH_READ_SIZE) return 0;
@@ -3056,7 +1844,6 @@ static size_t ZSTD_loadDictionaryContent(ZSTD_CCtx* zc, const void* src, size_t
case ZSTD_fast:
ZSTD_fillHashTable (zc, iend, zc->appliedParams.cParams.searchLength);
break;
-
case ZSTD_dfast:
ZSTD_fillDoubleHashTable (zc, iend, zc->appliedParams.cParams.searchLength);
break;
@@ -3072,7 +1859,7 @@ static size_t ZSTD_loadDictionaryContent(ZSTD_CCtx* zc, const void* src, size_t
case ZSTD_btopt:
case ZSTD_btultra:
if (srcSize >= HASH_READ_SIZE)
- ZSTD_updateTree(zc, iend-HASH_READ_SIZE, iend, 1 << zc->appliedParams.cParams.searchLog, zc->appliedParams.cParams.searchLength);
+ ZSTD_updateTree(zc, iend-HASH_READ_SIZE, iend, (U32)1 << zc->appliedParams.cParams.searchLog, zc->appliedParams.cParams.searchLength);
break;
default:
@@ -3120,8 +1907,10 @@ static size_t ZSTD_loadZstdDictionary(ZSTD_CCtx* cctx, const void* dict, size_t
cctx->dictID = cctx->appliedParams.fParams.noDictIDFlag ? 0 : MEM_readLE32(dictPtr);
dictPtr += 4;
- { size_t const hufHeaderSize = HUF_readCTable((HUF_CElt*)cctx->entropy->hufCTable, 255, dictPtr, dictEnd-dictPtr);
+ { unsigned maxSymbolValue = 255;
+ size_t const hufHeaderSize = HUF_readCTable((HUF_CElt*)cctx->entropy->hufCTable, &maxSymbolValue, dictPtr, dictEnd-dictPtr);
if (HUF_isError(hufHeaderSize)) return ERROR(dictionary_corrupted);
+ if (maxSymbolValue < 255) return ERROR(dictionary_corrupted);
dictPtr += hufHeaderSize;
}
@@ -3221,12 +2010,10 @@ static size_t ZSTD_compressBegin_internal(ZSTD_CCtx* cctx,
const void* dict, size_t dictSize,
ZSTD_dictMode_e dictMode,
const ZSTD_CDict* cdict,
- ZSTD_parameters params, U64 pledgedSrcSize,
+ ZSTD_CCtx_params params, U64 pledgedSrcSize,
ZSTD_buffered_policy_e zbuff)
{
DEBUGLOG(4, "ZSTD_compressBegin_internal");
- DEBUGLOG(4, "dict ? %s", dict ? "dict" : (cdict ? "cdict" : "none"));
- DEBUGLOG(4, "dictMode : %u", (U32)dictMode);
/* params are supposed to be fully validated at this point */
assert(!ZSTD_isError(ZSTD_checkCParams(params.cParams)));
assert(!((dict) && (cdict))); /* either dict or cdict, not both */
@@ -3242,6 +2029,19 @@ static size_t ZSTD_compressBegin_internal(ZSTD_CCtx* cctx,
return ZSTD_compress_insertDictionary(cctx, dict, dictSize, dictMode);
}
+size_t ZSTD_compressBegin_advanced_internal(
+ ZSTD_CCtx* cctx,
+ const void* dict, size_t dictSize,
+ ZSTD_dictMode_e dictMode,
+ ZSTD_CCtx_params params,
+ unsigned long long pledgedSrcSize)
+{
+ /* compression parameters verification and optimization */
+ CHECK_F( ZSTD_checkCParams(params.cParams) );
+ return ZSTD_compressBegin_internal(cctx, dict, dictSize, dictMode, NULL,
+ params, pledgedSrcSize,
+ ZSTDb_not_buffered);
+}
/*! ZSTD_compressBegin_advanced() :
* @return : 0, or an error code */
@@ -3249,21 +2049,22 @@ size_t ZSTD_compressBegin_advanced(ZSTD_CCtx* cctx,
const void* dict, size_t dictSize,
ZSTD_parameters params, unsigned long long pledgedSrcSize)
{
- /* compression parameters verification and optimization */
- CHECK_F(ZSTD_checkCParams(params.cParams));
- return ZSTD_compressBegin_internal(cctx, dict, dictSize, ZSTD_dm_auto, NULL,
- params, pledgedSrcSize, ZSTDb_not_buffered);
+ ZSTD_CCtx_params const cctxParams =
+ ZSTD_assignParamsToCCtxParams(cctx->requestedParams, params);
+ return ZSTD_compressBegin_advanced_internal(cctx, dict, dictSize, ZSTD_dm_auto,
+ cctxParams,
+ pledgedSrcSize);
}
-
size_t ZSTD_compressBegin_usingDict(ZSTD_CCtx* cctx, const void* dict, size_t dictSize, int compressionLevel)
{
ZSTD_parameters const params = ZSTD_getParams(compressionLevel, 0, dictSize);
+ ZSTD_CCtx_params const cctxParams =
+ ZSTD_assignParamsToCCtxParams(cctx->requestedParams, params);
return ZSTD_compressBegin_internal(cctx, dict, dictSize, ZSTD_dm_auto, NULL,
- params, 0, ZSTDb_not_buffered);
+ cctxParams, 0, ZSTDb_not_buffered);
}
-
size_t ZSTD_compressBegin(ZSTD_CCtx* cctx, int compressionLevel)
{
return ZSTD_compressBegin_usingDict(cctx, NULL, 0, compressionLevel);
@@ -3324,9 +2125,9 @@ size_t ZSTD_compressEnd (ZSTD_CCtx* cctx,
endResult = ZSTD_writeEpilogue(cctx, (char*)dst + cSize, dstCapacity-cSize);
if (ZSTD_isError(endResult)) return endResult;
if (cctx->appliedParams.fParams.contentSizeFlag) { /* control src size */
- DEBUGLOG(5, "end of frame : controlling src size");
+ DEBUGLOG(4, "end of frame : controlling src size");
if (cctx->pledgedSrcSizePlusOne != cctx->consumedSrcSize+1) {
- DEBUGLOG(5, "error : pledgedSrcSize = %u, while realSrcSize = %u",
+ DEBUGLOG(4, "error : pledgedSrcSize = %u, while realSrcSize = %u",
(U32)cctx->pledgedSrcSizePlusOne-1, (U32)cctx->consumedSrcSize);
return ERROR(srcSize_wrong);
} }
@@ -3340,9 +2141,13 @@ static size_t ZSTD_compress_internal (ZSTD_CCtx* cctx,
const void* dict,size_t dictSize,
ZSTD_parameters params)
{
- CHECK_F( ZSTD_compressBegin_internal(cctx, dict, dictSize, ZSTD_dm_auto, NULL,
- params, srcSize, ZSTDb_not_buffered) );
- return ZSTD_compressEnd(cctx, dst, dstCapacity, src, srcSize);
+ ZSTD_CCtx_params const cctxParams =
+ ZSTD_assignParamsToCCtxParams(cctx->requestedParams, params);
+ return ZSTD_compress_advanced_internal(cctx,
+ dst, dstCapacity,
+ src, srcSize,
+ dict, dictSize,
+ cctxParams);
}
size_t ZSTD_compress_advanced (ZSTD_CCtx* ctx,
@@ -3355,6 +2160,19 @@ size_t ZSTD_compress_advanced (ZSTD_CCtx* ctx,
return ZSTD_compress_internal(ctx, dst, dstCapacity, src, srcSize, dict, dictSize, params);
}
+/* Internal */
+size_t ZSTD_compress_advanced_internal(
+ ZSTD_CCtx* cctx,
+ void* dst, size_t dstCapacity,
+ const void* src, size_t srcSize,
+ const void* dict,size_t dictSize,
+ ZSTD_CCtx_params params)
+{
+ CHECK_F( ZSTD_compressBegin_internal(cctx, dict, dictSize, ZSTD_dm_auto, NULL,
+ params, srcSize, ZSTDb_not_buffered) );
+ return ZSTD_compressEnd(cctx, dst, dstCapacity, src, srcSize);
+}
+
size_t ZSTD_compress_usingDict(ZSTD_CCtx* ctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize,
const void* dict, size_t dictSize, int compressionLevel)
{
@@ -3384,18 +2202,21 @@ size_t ZSTD_compress(void* dst, size_t dstCapacity, const void* src, size_t srcS
/*! ZSTD_estimateCDictSize_advanced() :
* Estimate amount of memory that will be needed to create a dictionary with following arguments */
-size_t ZSTD_estimateCDictSize_advanced(size_t dictSize, ZSTD_compressionParameters cParams, unsigned byReference)
+size_t ZSTD_estimateCDictSize_advanced(
+ size_t dictSize, ZSTD_compressionParameters cParams,
+ ZSTD_dictLoadMethod_e dictLoadMethod)
{
DEBUGLOG(5, "sizeof(ZSTD_CDict) : %u", (U32)sizeof(ZSTD_CDict));
- DEBUGLOG(5, "CCtx estimate : %u", (U32)ZSTD_estimateCCtxSize_advanced(cParams));
- return sizeof(ZSTD_CDict) + ZSTD_estimateCCtxSize_advanced(cParams)
- + (byReference ? 0 : dictSize);
+ DEBUGLOG(5, "CCtx estimate : %u",
+ (U32)ZSTD_estimateCCtxSize_usingCParams(cParams));
+ return sizeof(ZSTD_CDict) + ZSTD_estimateCCtxSize_usingCParams(cParams)
+ + (dictLoadMethod == ZSTD_dlm_byRef ? 0 : dictSize);
}
size_t ZSTD_estimateCDictSize(size_t dictSize, int compressionLevel)
{
ZSTD_compressionParameters const cParams = ZSTD_getCParams(compressionLevel, 0, dictSize);
- return ZSTD_estimateCDictSize_advanced(dictSize, cParams, 0);
+ return ZSTD_estimateCDictSize_advanced(dictSize, cParams, ZSTD_dlm_byCopy);
}
size_t ZSTD_sizeof_CDict(const ZSTD_CDict* cdict)
@@ -3406,22 +2227,15 @@ size_t ZSTD_sizeof_CDict(const ZSTD_CDict* cdict)
return ZSTD_sizeof_CCtx(cdict->refContext) + (cdict->dictBuffer ? cdict->dictContentSize : 0) + sizeof(*cdict);
}
-static ZSTD_parameters ZSTD_makeParams(ZSTD_compressionParameters cParams, ZSTD_frameParameters fParams)
-{
- ZSTD_parameters params;
- params.cParams = cParams;
- params.fParams = fParams;
- return params;
-}
-
static size_t ZSTD_initCDict_internal(
ZSTD_CDict* cdict,
const void* dictBuffer, size_t dictSize,
- unsigned byReference, ZSTD_dictMode_e dictMode,
+ ZSTD_dictLoadMethod_e dictLoadMethod,
+ ZSTD_dictMode_e dictMode,
ZSTD_compressionParameters cParams)
{
DEBUGLOG(5, "ZSTD_initCDict_internal, mode %u", (U32)dictMode);
- if ((byReference) || (!dictBuffer) || (!dictSize)) {
+ if ((dictLoadMethod == ZSTD_dlm_byRef) || (!dictBuffer) || (!dictSize)) {
cdict->dictBuffer = NULL;
cdict->dictContent = dictBuffer;
} else {
@@ -3433,13 +2247,12 @@ static size_t ZSTD_initCDict_internal(
}
cdict->dictContentSize = dictSize;
- { ZSTD_frameParameters const fParams = { 0 /* contentSizeFlag */,
- 0 /* checksumFlag */, 0 /* noDictIDFlag */ }; /* dummy */
- ZSTD_parameters const params = ZSTD_makeParams(cParams, fParams);
+ { ZSTD_CCtx_params cctxParams = cdict->refContext->requestedParams;
+ cctxParams.cParams = cParams;
CHECK_F( ZSTD_compressBegin_internal(cdict->refContext,
cdict->dictContent, dictSize, dictMode,
NULL,
- params, ZSTD_CONTENTSIZE_UNKNOWN,
+ cctxParams, ZSTD_CONTENTSIZE_UNKNOWN,
ZSTDb_not_buffered) );
}
@@ -3447,7 +2260,8 @@ static size_t ZSTD_initCDict_internal(
}
ZSTD_CDict* ZSTD_createCDict_advanced(const void* dictBuffer, size_t dictSize,
- unsigned byReference, ZSTD_dictMode_e dictMode,
+ ZSTD_dictLoadMethod_e dictLoadMethod,
+ ZSTD_dictMode_e dictMode,
ZSTD_compressionParameters cParams, ZSTD_customMem customMem)
{
DEBUGLOG(5, "ZSTD_createCDict_advanced, mode %u", (U32)dictMode);
@@ -3462,10 +2276,9 @@ ZSTD_CDict* ZSTD_createCDict_advanced(const void* dictBuffer, size_t dictSize,
return NULL;
}
cdict->refContext = cctx;
-
if (ZSTD_isError( ZSTD_initCDict_internal(cdict,
dictBuffer, dictSize,
- byReference, dictMode,
+ dictLoadMethod, dictMode,
cParams) )) {
ZSTD_freeCDict(cdict);
return NULL;
@@ -3479,7 +2292,7 @@ ZSTD_CDict* ZSTD_createCDict(const void* dict, size_t dictSize, int compressionL
{
ZSTD_compressionParameters cParams = ZSTD_getCParams(compressionLevel, 0, dictSize);
return ZSTD_createCDict_advanced(dict, dictSize,
- 0 /* byReference */, ZSTD_dm_auto,
+ ZSTD_dlm_byCopy, ZSTD_dm_auto,
cParams, ZSTD_defaultCMem);
}
@@ -3487,7 +2300,7 @@ ZSTD_CDict* ZSTD_createCDict_byReference(const void* dict, size_t dictSize, int
{
ZSTD_compressionParameters cParams = ZSTD_getCParams(compressionLevel, 0, dictSize);
return ZSTD_createCDict_advanced(dict, dictSize,
- 1 /* byReference */, ZSTD_dm_auto,
+ ZSTD_dlm_byRef, ZSTD_dm_auto,
cParams, ZSTD_defaultCMem);
}
@@ -3517,11 +2330,12 @@ size_t ZSTD_freeCDict(ZSTD_CDict* cdict)
*/
ZSTD_CDict* ZSTD_initStaticCDict(void* workspace, size_t workspaceSize,
const void* dict, size_t dictSize,
- unsigned byReference, ZSTD_dictMode_e dictMode,
+ ZSTD_dictLoadMethod_e dictLoadMethod,
+ ZSTD_dictMode_e dictMode,
ZSTD_compressionParameters cParams)
{
- size_t const cctxSize = ZSTD_estimateCCtxSize_advanced(cParams);
- size_t const neededSize = sizeof(ZSTD_CDict) + (byReference ? 0 : dictSize)
+ size_t const cctxSize = ZSTD_estimateCCtxSize_usingCParams(cParams);
+ size_t const neededSize = sizeof(ZSTD_CDict) + (dictLoadMethod == ZSTD_dlm_byRef ? 0 : dictSize)
+ cctxSize;
ZSTD_CDict* const cdict = (ZSTD_CDict*) workspace;
void* ptr;
@@ -3531,7 +2345,7 @@ ZSTD_CDict* ZSTD_initStaticCDict(void* workspace, size_t workspaceSize,
(U32)workspaceSize, (U32)neededSize, (U32)(workspaceSize < neededSize));
if (workspaceSize < neededSize) return NULL;
- if (!byReference) {
+ if (dictLoadMethod == ZSTD_dlm_byCopy) {
memcpy(cdict+1, dict, dictSize);
dict = cdict+1;
ptr = (char*)workspace + sizeof(ZSTD_CDict) + dictSize;
@@ -3542,15 +2356,15 @@ ZSTD_CDict* ZSTD_initStaticCDict(void* workspace, size_t workspaceSize,
if (ZSTD_isError( ZSTD_initCDict_internal(cdict,
dict, dictSize,
- 1 /* byReference */, dictMode,
+ ZSTD_dlm_byRef, dictMode,
cParams) ))
return NULL;
return cdict;
}
-ZSTD_parameters ZSTD_getParamsFromCDict(const ZSTD_CDict* cdict) {
- return ZSTD_getParamsFromCCtx(cdict->refContext);
+ZSTD_compressionParameters ZSTD_getCParamsFromCDict(const ZSTD_CDict* cdict) {
+ return cdict->refContext->appliedParams.cParams;
}
/* ZSTD_compressBegin_usingCDict_advanced() :
@@ -3560,7 +2374,8 @@ size_t ZSTD_compressBegin_usingCDict_advanced(
ZSTD_frameParameters const fParams, unsigned long long const pledgedSrcSize)
{
if (cdict==NULL) return ERROR(dictionary_wrong);
- { ZSTD_parameters params = cdict->refContext->appliedParams;
+ { ZSTD_CCtx_params params = cctx->requestedParams;
+ params.cParams = ZSTD_getCParamsFromCDict(cdict);
params.fParams = fParams;
DEBUGLOG(5, "ZSTD_compressBegin_usingCDict_advanced");
return ZSTD_compressBegin_internal(cctx,
@@ -3644,7 +2459,7 @@ size_t ZSTD_CStreamOutSize(void)
static size_t ZSTD_resetCStream_internal(ZSTD_CStream* zcs,
const void* dict, size_t dictSize, ZSTD_dictMode_e dictMode,
const ZSTD_CDict* cdict,
- ZSTD_parameters params, unsigned long long pledgedSrcSize)
+ const ZSTD_CCtx_params params, unsigned long long pledgedSrcSize)
{
DEBUGLOG(4, "ZSTD_resetCStream_internal");
/* params are supposed to be fully validated at this point */
@@ -3668,13 +2483,11 @@ static size_t ZSTD_resetCStream_internal(ZSTD_CStream* zcs,
size_t ZSTD_resetCStream(ZSTD_CStream* zcs, unsigned long long pledgedSrcSize)
{
- ZSTD_parameters params = zcs->requestedParams;
+ ZSTD_CCtx_params params = zcs->requestedParams;
params.fParams.contentSizeFlag = (pledgedSrcSize > 0);
- DEBUGLOG(5, "ZSTD_resetCStream");
- if (zcs->compressionLevel != ZSTD_CLEVEL_CUSTOM) {
- params.cParams = ZSTD_getCParams(zcs->compressionLevel, pledgedSrcSize, 0 /* dictSize */);
- }
- return ZSTD_resetCStream_internal(zcs, NULL, 0, zcs->dictMode, zcs->cdict, params, pledgedSrcSize);
+ params.cParams = ZSTD_getCParamsFromCCtxParams(params, pledgedSrcSize, 0);
+ DEBUGLOG(4, "ZSTD_resetCStream");
+ return ZSTD_resetCStream_internal(zcs, NULL, 0, ZSTD_dm_auto, zcs->cdict, params, pledgedSrcSize);
}
/*! ZSTD_initCStream_internal() :
@@ -3683,9 +2496,9 @@ size_t ZSTD_resetCStream(ZSTD_CStream* zcs, unsigned long long pledgedSrcSize)
* Assumption 2 : either dict, or cdict, is defined, not both */
size_t ZSTD_initCStream_internal(ZSTD_CStream* zcs,
const void* dict, size_t dictSize, const ZSTD_CDict* cdict,
- ZSTD_parameters params, unsigned long long pledgedSrcSize)
+ ZSTD_CCtx_params params, unsigned long long pledgedSrcSize)
{
- DEBUGLOG(5, "ZSTD_initCStream_internal");
+ DEBUGLOG(4, "ZSTD_initCStream_internal");
assert(!ZSTD_isError(ZSTD_checkCParams(params.cParams)));
assert(!((dict) && (cdict))); /* either dict or cdict, not both */
@@ -3697,23 +2510,23 @@ size_t ZSTD_initCStream_internal(ZSTD_CStream* zcs,
}
ZSTD_freeCDict(zcs->cdictLocal);
zcs->cdictLocal = ZSTD_createCDict_advanced(dict, dictSize,
- zcs->dictContentByRef, zcs->dictMode,
+ ZSTD_dlm_byCopy, ZSTD_dm_auto,
params.cParams, zcs->customMem);
zcs->cdict = zcs->cdictLocal;
if (zcs->cdictLocal == NULL) return ERROR(memory_allocation);
} else {
if (cdict) {
- ZSTD_parameters const cdictParams = ZSTD_getParamsFromCDict(cdict);
- params.cParams = cdictParams.cParams; /* cParams are enforced from cdict */
+ params.cParams = ZSTD_getCParamsFromCDict(cdict); /* cParams are enforced from cdict */
}
ZSTD_freeCDict(zcs->cdictLocal);
zcs->cdictLocal = NULL;
zcs->cdict = cdict;
}
+ params.compressionLevel = ZSTD_CLEVEL_CUSTOM;
zcs->requestedParams = params;
- zcs->compressionLevel = ZSTD_CLEVEL_CUSTOM;
- return ZSTD_resetCStream_internal(zcs, NULL, 0, zcs->dictMode, zcs->cdict, params, pledgedSrcSize);
+
+ return ZSTD_resetCStream_internal(zcs, NULL, 0, ZSTD_dm_auto, zcs->cdict, params, pledgedSrcSize);
}
/* ZSTD_initCStream_usingCDict_advanced() :
@@ -3724,7 +2537,8 @@ size_t ZSTD_initCStream_usingCDict_advanced(ZSTD_CStream* zcs,
unsigned long long pledgedSrcSize)
{ /* cannot handle NULL cdict (does not know what to do) */
if (!cdict) return ERROR(dictionary_wrong);
- { ZSTD_parameters params = ZSTD_getParamsFromCDict(cdict);
+ { ZSTD_CCtx_params params = zcs->requestedParams;
+ params.cParams = ZSTD_getCParamsFromCDict(cdict);
params.fParams = fParams;
return ZSTD_initCStream_internal(zcs,
NULL, 0, cdict,
@@ -3743,30 +2557,32 @@ size_t ZSTD_initCStream_advanced(ZSTD_CStream* zcs,
const void* dict, size_t dictSize,
ZSTD_parameters params, unsigned long long pledgedSrcSize)
{
+ ZSTD_CCtx_params const cctxParams =
+ ZSTD_assignParamsToCCtxParams(zcs->requestedParams, params);
CHECK_F( ZSTD_checkCParams(params.cParams) );
- zcs->requestedParams = params;
- zcs->compressionLevel = ZSTD_CLEVEL_CUSTOM;
- return ZSTD_initCStream_internal(zcs, dict, dictSize, NULL, params, pledgedSrcSize);
+ return ZSTD_initCStream_internal(zcs, dict, dictSize, NULL, cctxParams, pledgedSrcSize);
}
size_t ZSTD_initCStream_usingDict(ZSTD_CStream* zcs, const void* dict, size_t dictSize, int compressionLevel)
{
ZSTD_parameters const params = ZSTD_getParams(compressionLevel, 0, dictSize);
- zcs->compressionLevel = compressionLevel;
- return ZSTD_initCStream_internal(zcs, dict, dictSize, NULL, params, 0);
+ ZSTD_CCtx_params const cctxParams =
+ ZSTD_assignParamsToCCtxParams(zcs->requestedParams, params);
+ return ZSTD_initCStream_internal(zcs, dict, dictSize, NULL, cctxParams, 0);
}
size_t ZSTD_initCStream_srcSize(ZSTD_CStream* zcs, int compressionLevel, unsigned long long pledgedSrcSize)
{
- ZSTD_parameters params = ZSTD_getParams(compressionLevel, pledgedSrcSize, 0);
- params.fParams.contentSizeFlag = (pledgedSrcSize>0);
- return ZSTD_initCStream_internal(zcs, NULL, 0, NULL, params, pledgedSrcSize);
+ ZSTD_CCtx_params cctxParams;
+ ZSTD_parameters const params = ZSTD_getParams(compressionLevel, pledgedSrcSize, 0);
+ cctxParams = ZSTD_assignParamsToCCtxParams(zcs->requestedParams, params);
+ cctxParams.fParams.contentSizeFlag = (pledgedSrcSize>0);
+ return ZSTD_initCStream_internal(zcs, NULL, 0, NULL, cctxParams, pledgedSrcSize);
}
size_t ZSTD_initCStream(ZSTD_CStream* zcs, int compressionLevel)
{
- ZSTD_parameters const params = ZSTD_getParams(compressionLevel, 0, 0);
- return ZSTD_initCStream_internal(zcs, NULL, 0, NULL, params, 0);
+ return ZSTD_initCStream_srcSize(zcs, compressionLevel, 0);
}
/*====== Compression ======*/
@@ -3781,6 +2597,7 @@ MEM_STATIC size_t ZSTD_limitCopy(void* dst, size_t dstCapacity,
/** ZSTD_compressStream_generic():
* internal function for all *compressStream*() variants and *compress_generic()
+ * non-static, because can be called from zstdmt.c
* @return : hint size for next input */
size_t ZSTD_compressStream_generic(ZSTD_CStream* zcs,
ZSTD_outBuffer* output,
@@ -3934,21 +2751,13 @@ size_t ZSTD_compressStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output, ZSTD_inBuf
return ZSTD_compressStream_generic(zcs, output, input, ZSTD_e_continue);
}
-/*! ZSTDMT_initCStream_internal() :
- * Private use only. Init streaming operation.
- * expects params to be valid.
- * must receive dict, or cdict, or none, but not both.
- * @return : 0, or an error code */
-size_t ZSTDMT_initCStream_internal(ZSTDMT_CCtx* zcs,
- const void* dict, size_t dictSize, const ZSTD_CDict* cdict,
- ZSTD_parameters params, unsigned long long pledgedSrcSize);
-
size_t ZSTD_compress_generic (ZSTD_CCtx* cctx,
ZSTD_outBuffer* output,
ZSTD_inBuffer* input,
ZSTD_EndDirective endOp)
{
+ DEBUGLOG(5, "ZSTD_compress_generic");
/* check conditions */
if (output->pos > output->size) return ERROR(GENERIC);
if (input->pos > input->size) return ERROR(GENERIC);
@@ -3956,31 +2765,42 @@ size_t ZSTD_compress_generic (ZSTD_CCtx* cctx,
/* transparent initialization stage */
if (cctx->streamStage == zcss_init) {
- const void* const prefix = cctx->prefix;
- size_t const prefixSize = cctx->prefixSize;
- ZSTD_parameters params = cctx->requestedParams;
- if (cctx->compressionLevel != ZSTD_CLEVEL_CUSTOM)
- params.cParams = ZSTD_getCParams(cctx->compressionLevel,
- cctx->pledgedSrcSizePlusOne-1, 0 /*dictSize*/);
- cctx->prefix = NULL; cctx->prefixSize = 0; /* single usage */
- assert(prefix==NULL || cctx->cdict==NULL); /* only one can be set */
+ ZSTD_prefixDict const prefixDict = cctx->prefixDict;
+ ZSTD_CCtx_params params = cctx->requestedParams;
+ params.cParams = ZSTD_getCParamsFromCCtxParams(
+ cctx->requestedParams, cctx->pledgedSrcSizePlusOne-1, 0 /*dictSize*/);
+ memset(&cctx->prefixDict, 0, sizeof(cctx->prefixDict)); /* single usage */
+ assert(prefixDict.dict==NULL || cctx->cdict==NULL); /* only one can be set */
+ DEBUGLOG(4, "ZSTD_compress_generic : transparent init stage");
#ifdef ZSTD_MULTITHREAD
- if (cctx->nbThreads > 1) {
- DEBUGLOG(4, "call ZSTDMT_initCStream_internal as nbThreads=%u", cctx->nbThreads);
- CHECK_F( ZSTDMT_initCStream_internal(cctx->mtctx, prefix, prefixSize, cctx->cdict, params, cctx->pledgedSrcSizePlusOne-1) );
+ if (params.nbThreads > 1) {
+ if (cctx->mtctx == NULL || cctx->appliedParams.nbThreads != params.nbThreads) {
+ ZSTDMT_freeCCtx(cctx->mtctx);
+ cctx->mtctx = ZSTDMT_createCCtx_advanced(params.nbThreads, cctx->customMem);
+ if (cctx->mtctx == NULL) return ERROR(memory_allocation);
+ }
+ DEBUGLOG(4, "call ZSTDMT_initCStream_internal as nbThreads=%u", params.nbThreads);
+ CHECK_F( ZSTDMT_initCStream_internal(
+ cctx->mtctx,
+ prefixDict.dict, prefixDict.dictSize, ZSTD_dm_rawContent,
+ cctx->cdict, params, cctx->pledgedSrcSizePlusOne-1) );
cctx->streamStage = zcss_load;
+ cctx->appliedParams.nbThreads = params.nbThreads;
} else
#endif
{
- CHECK_F( ZSTD_resetCStream_internal(cctx, prefix, prefixSize, cctx->dictMode, cctx->cdict, params, cctx->pledgedSrcSizePlusOne-1) );
+ CHECK_F( ZSTD_resetCStream_internal(
+ cctx, prefixDict.dict, prefixDict.dictSize,
+ prefixDict.dictMode, cctx->cdict, params,
+ cctx->pledgedSrcSizePlusOne-1) );
} }
/* compression stage */
#ifdef ZSTD_MULTITHREAD
- if (cctx->nbThreads > 1) {
+ if (cctx->appliedParams.nbThreads > 1) {
size_t const flushMin = ZSTDMT_compressStream_generic(cctx->mtctx, output, input, endOp);
- DEBUGLOG(5, "ZSTDMT_compressStream_generic : %u", (U32)flushMin);
+ DEBUGLOG(5, "ZSTDMT_compressStream_generic result : %u", (U32)flushMin);
if ( ZSTD_isError(flushMin)
|| (endOp == ZSTD_e_end && flushMin == 0) ) { /* compression completed */
ZSTD_startNewCompression(cctx);
@@ -3988,7 +2808,6 @@ size_t ZSTD_compress_generic (ZSTD_CCtx* cctx,
return flushMin;
}
#endif
-
CHECK_F( ZSTD_compressStream_generic(cctx, output, input, endOp) );
DEBUGLOG(5, "completed ZSTD_compress_generic");
return cctx->outBuffContentSize - cctx->outBuffFlushedSize; /* remaining to flush */
@@ -4189,6 +3008,7 @@ ZSTD_compressionParameters ZSTD_getCParams(int compressionLevel, unsigned long l
if (compressionLevel > ZSTD_MAX_CLEVEL) compressionLevel = ZSTD_MAX_CLEVEL;
{ ZSTD_compressionParameters const cp = ZSTD_defaultCParameters[tableID][compressionLevel];
return ZSTD_adjustCParams_internal(cp, srcSizeHint, dictSize); }
+
}
/*! ZSTD_getParams() :
diff --git a/thirdparty/zstd/compress/zstd_compress.h b/thirdparty/zstd/compress/zstd_compress.h
new file mode 100644
index 0000000000..94606edc93
--- /dev/null
+++ b/thirdparty/zstd/compress/zstd_compress.h
@@ -0,0 +1,307 @@
+/*
+ * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under both the BSD-style license (found in the
+ * LICENSE file in the root directory of this source tree) and the GPLv2 (found
+ * in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
+ */
+
+
+#ifndef ZSTD_COMPRESS_H
+#define ZSTD_COMPRESS_H
+
+/*-*************************************
+* Dependencies
+***************************************/
+#include "zstd_internal.h"
+#ifdef ZSTD_MULTITHREAD
+# include "zstdmt_compress.h"
+#endif
+
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
+/*-*************************************
+* Constants
+***************************************/
+static const U32 g_searchStrength = 8;
+#define HASH_READ_SIZE 8
+
+
+/*-*************************************
+* Context memory management
+***************************************/
+typedef enum { ZSTDcs_created=0, ZSTDcs_init, ZSTDcs_ongoing, ZSTDcs_ending } ZSTD_compressionStage_e;
+typedef enum { zcss_init=0, zcss_load, zcss_flush } ZSTD_cStreamStage;
+
+typedef struct ZSTD_prefixDict_s {
+ const void* dict;
+ size_t dictSize;
+ ZSTD_dictMode_e dictMode;
+} ZSTD_prefixDict;
+
+struct ZSTD_CCtx_s {
+ const BYTE* nextSrc; /* next block here to continue on current prefix */
+ const BYTE* base; /* All regular indexes relative to this position */
+ const BYTE* dictBase; /* extDict indexes relative to this position */
+ U32 dictLimit; /* below that point, need extDict */
+ U32 lowLimit; /* below that point, no more data */
+ U32 nextToUpdate; /* index from which to continue dictionary update */
+ U32 nextToUpdate3; /* index from which to continue dictionary update */
+ U32 hashLog3; /* dispatch table : larger == faster, more memory */
+ U32 loadedDictEnd; /* index of end of dictionary */
+ ZSTD_compressionStage_e stage;
+ U32 dictID;
+ ZSTD_CCtx_params requestedParams;
+ ZSTD_CCtx_params appliedParams;
+ void* workSpace;
+ size_t workSpaceSize;
+ size_t blockSize;
+ U64 pledgedSrcSizePlusOne; /* this way, 0 (default) == unknown */
+ U64 consumedSrcSize;
+ XXH64_state_t xxhState;
+ ZSTD_customMem customMem;
+ size_t staticSize;
+
+ seqStore_t seqStore; /* sequences storage ptrs */
+ optState_t optState;
+ ldmState_t ldmState; /* long distance matching state */
+ U32* hashTable;
+ U32* hashTable3;
+ U32* chainTable;
+ ZSTD_entropyCTables_t* entropy;
+
+ /* streaming */
+ char* inBuff;
+ size_t inBuffSize;
+ size_t inToCompress;
+ size_t inBuffPos;
+ size_t inBuffTarget;
+ char* outBuff;
+ size_t outBuffSize;
+ size_t outBuffContentSize;
+ size_t outBuffFlushedSize;
+ ZSTD_cStreamStage streamStage;
+ U32 frameEnded;
+
+ /* Dictionary */
+ ZSTD_CDict* cdictLocal;
+ const ZSTD_CDict* cdict;
+ ZSTD_prefixDict prefixDict; /* single-usage dictionary */
+
+ /* Multi-threading */
+#ifdef ZSTD_MULTITHREAD
+ ZSTDMT_CCtx* mtctx;
+#endif
+};
+
+
+static const BYTE LL_Code[64] = { 0, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 16, 17, 17, 18, 18, 19, 19,
+ 20, 20, 20, 20, 21, 21, 21, 21,
+ 22, 22, 22, 22, 22, 22, 22, 22,
+ 23, 23, 23, 23, 23, 23, 23, 23,
+ 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24 };
+
+static const BYTE ML_Code[128] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 36, 36, 37, 37, 37, 37,
+ 38, 38, 38, 38, 38, 38, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42 };
+
+/*! ZSTD_storeSeq() :
+ Store a sequence (literal length, literals, offset code and match length code) into seqStore_t.
+ `offsetCode` : distance to match, or 0 == repCode.
+ `matchCode` : matchLength - MINMATCH
+*/
+MEM_STATIC void ZSTD_storeSeq(seqStore_t* seqStorePtr, size_t litLength, const void* literals, U32 offsetCode, size_t matchCode)
+{
+#if defined(ZSTD_DEBUG) && (ZSTD_DEBUG >= 6)
+ static const BYTE* g_start = NULL;
+ U32 const pos = (U32)((const BYTE*)literals - g_start);
+ if (g_start==NULL) g_start = (const BYTE*)literals;
+ if ((pos > 0) && (pos < 1000000000))
+ DEBUGLOG(6, "Cpos %6u :%5u literals & match %3u bytes at distance %6u",
+ pos, (U32)litLength, (U32)matchCode+MINMATCH, (U32)offsetCode);
+#endif
+ /* copy Literals */
+ assert(seqStorePtr->lit + litLength <= seqStorePtr->litStart + 128 KB);
+ ZSTD_wildcopy(seqStorePtr->lit, literals, litLength);
+ seqStorePtr->lit += litLength;
+
+ /* literal Length */
+ if (litLength>0xFFFF) {
+ seqStorePtr->longLengthID = 1;
+ seqStorePtr->longLengthPos = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart);
+ }
+ seqStorePtr->sequences[0].litLength = (U16)litLength;
+
+ /* match offset */
+ seqStorePtr->sequences[0].offset = offsetCode + 1;
+
+ /* match Length */
+ if (matchCode>0xFFFF) {
+ seqStorePtr->longLengthID = 2;
+ seqStorePtr->longLengthPos = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart);
+ }
+ seqStorePtr->sequences[0].matchLength = (U16)matchCode;
+
+ seqStorePtr->sequences++;
+}
+
+
+/*-*************************************
+* Match length counter
+***************************************/
+static unsigned ZSTD_NbCommonBytes (register size_t val)
+{
+ if (MEM_isLittleEndian()) {
+ if (MEM_64bits()) {
+# if defined(_MSC_VER) && defined(_WIN64)
+ unsigned long r = 0;
+ _BitScanForward64( &r, (U64)val );
+ return (unsigned)(r>>3);
+# elif defined(__GNUC__) && (__GNUC__ >= 4)
+ return (__builtin_ctzll((U64)val) >> 3);
+# else
+ static const int DeBruijnBytePos[64] = { 0, 0, 0, 0, 0, 1, 1, 2,
+ 0, 3, 1, 3, 1, 4, 2, 7,
+ 0, 2, 3, 6, 1, 5, 3, 5,
+ 1, 3, 4, 4, 2, 5, 6, 7,
+ 7, 0, 1, 2, 3, 3, 4, 6,
+ 2, 6, 5, 5, 3, 4, 5, 6,
+ 7, 1, 2, 4, 6, 4, 4, 5,
+ 7, 2, 6, 5, 7, 6, 7, 7 };
+ return DeBruijnBytePos[((U64)((val & -(long long)val) * 0x0218A392CDABBD3FULL)) >> 58];
+# endif
+ } else { /* 32 bits */
+# if defined(_MSC_VER)
+ unsigned long r=0;
+ _BitScanForward( &r, (U32)val );
+ return (unsigned)(r>>3);
+# elif defined(__GNUC__) && (__GNUC__ >= 3)
+ return (__builtin_ctz((U32)val) >> 3);
+# else
+ static const int DeBruijnBytePos[32] = { 0, 0, 3, 0, 3, 1, 3, 0,
+ 3, 2, 2, 1, 3, 2, 0, 1,
+ 3, 3, 1, 2, 2, 2, 2, 0,
+ 3, 1, 2, 0, 1, 0, 1, 1 };
+ return DeBruijnBytePos[((U32)((val & -(S32)val) * 0x077CB531U)) >> 27];
+# endif
+ }
+ } else { /* Big Endian CPU */
+ if (MEM_64bits()) {
+# if defined(_MSC_VER) && defined(_WIN64)
+ unsigned long r = 0;
+ _BitScanReverse64( &r, val );
+ return (unsigned)(r>>3);
+# elif defined(__GNUC__) && (__GNUC__ >= 4)
+ return (__builtin_clzll(val) >> 3);
+# else
+ unsigned r;
+ const unsigned n32 = sizeof(size_t)*4; /* calculate this way due to compiler complaining in 32-bits mode */
+ if (!(val>>n32)) { r=4; } else { r=0; val>>=n32; }
+ if (!(val>>16)) { r+=2; val>>=8; } else { val>>=24; }
+ r += (!val);
+ return r;
+# endif
+ } else { /* 32 bits */
+# if defined(_MSC_VER)
+ unsigned long r = 0;
+ _BitScanReverse( &r, (unsigned long)val );
+ return (unsigned)(r>>3);
+# elif defined(__GNUC__) && (__GNUC__ >= 3)
+ return (__builtin_clz((U32)val) >> 3);
+# else
+ unsigned r;
+ if (!(val>>16)) { r=2; val>>=8; } else { r=0; val>>=24; }
+ r += (!val);
+ return r;
+# endif
+ } }
+}
+
+
+MEM_STATIC size_t ZSTD_count(const BYTE* pIn, const BYTE* pMatch, const BYTE* const pInLimit)
+{
+ const BYTE* const pStart = pIn;
+ const BYTE* const pInLoopLimit = pInLimit - (sizeof(size_t)-1);
+
+ while (pIn < pInLoopLimit) {
+ size_t const diff = MEM_readST(pMatch) ^ MEM_readST(pIn);
+ if (!diff) { pIn+=sizeof(size_t); pMatch+=sizeof(size_t); continue; }
+ pIn += ZSTD_NbCommonBytes(diff);
+ return (size_t)(pIn - pStart);
+ }
+ if (MEM_64bits()) if ((pIn<(pInLimit-3)) && (MEM_read32(pMatch) == MEM_read32(pIn))) { pIn+=4; pMatch+=4; }
+ if ((pIn<(pInLimit-1)) && (MEM_read16(pMatch) == MEM_read16(pIn))) { pIn+=2; pMatch+=2; }
+ if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++;
+ return (size_t)(pIn - pStart);
+}
+
+/** ZSTD_count_2segments() :
+* can count match length with `ip` & `match` in 2 different segments.
+* convention : on reaching mEnd, match count continue starting from iStart
+*/
+MEM_STATIC size_t ZSTD_count_2segments(const BYTE* ip, const BYTE* match, const BYTE* iEnd, const BYTE* mEnd, const BYTE* iStart)
+{
+ const BYTE* const vEnd = MIN( ip + (mEnd - match), iEnd);
+ size_t const matchLength = ZSTD_count(ip, match, vEnd);
+ if (match + matchLength != mEnd) return matchLength;
+ return matchLength + ZSTD_count(ip+matchLength, iStart, iEnd);
+}
+
+
+/*-*************************************
+* Hashes
+***************************************/
+static const U32 prime3bytes = 506832829U;
+static U32 ZSTD_hash3(U32 u, U32 h) { return ((u << (32-24)) * prime3bytes) >> (32-h) ; }
+MEM_STATIC size_t ZSTD_hash3Ptr(const void* ptr, U32 h) { return ZSTD_hash3(MEM_readLE32(ptr), h); } /* only in zstd_opt.h */
+
+static const U32 prime4bytes = 2654435761U;
+static U32 ZSTD_hash4(U32 u, U32 h) { return (u * prime4bytes) >> (32-h) ; }
+static size_t ZSTD_hash4Ptr(const void* ptr, U32 h) { return ZSTD_hash4(MEM_read32(ptr), h); }
+
+static const U64 prime5bytes = 889523592379ULL;
+static size_t ZSTD_hash5(U64 u, U32 h) { return (size_t)(((u << (64-40)) * prime5bytes) >> (64-h)) ; }
+static size_t ZSTD_hash5Ptr(const void* p, U32 h) { return ZSTD_hash5(MEM_readLE64(p), h); }
+
+static const U64 prime6bytes = 227718039650203ULL;
+static size_t ZSTD_hash6(U64 u, U32 h) { return (size_t)(((u << (64-48)) * prime6bytes) >> (64-h)) ; }
+static size_t ZSTD_hash6Ptr(const void* p, U32 h) { return ZSTD_hash6(MEM_readLE64(p), h); }
+
+static const U64 prime7bytes = 58295818150454627ULL;
+static size_t ZSTD_hash7(U64 u, U32 h) { return (size_t)(((u << (64-56)) * prime7bytes) >> (64-h)) ; }
+static size_t ZSTD_hash7Ptr(const void* p, U32 h) { return ZSTD_hash7(MEM_readLE64(p), h); }
+
+static const U64 prime8bytes = 0xCF1BBCDCB7A56463ULL;
+static size_t ZSTD_hash8(U64 u, U32 h) { return (size_t)(((u) * prime8bytes) >> (64-h)) ; }
+static size_t ZSTD_hash8Ptr(const void* p, U32 h) { return ZSTD_hash8(MEM_readLE64(p), h); }
+
+MEM_STATIC size_t ZSTD_hashPtr(const void* p, U32 hBits, U32 mls)
+{
+ switch(mls)
+ {
+ default:
+ case 4: return ZSTD_hash4Ptr(p, hBits);
+ case 5: return ZSTD_hash5Ptr(p, hBits);
+ case 6: return ZSTD_hash6Ptr(p, hBits);
+ case 7: return ZSTD_hash7Ptr(p, hBits);
+ case 8: return ZSTD_hash8Ptr(p, hBits);
+ }
+}
+
+#if defined (__cplusplus)
+}
+#endif
+
+#endif /* ZSTD_COMPRESS_H */
diff --git a/thirdparty/zstd/compress/zstd_double_fast.c b/thirdparty/zstd/compress/zstd_double_fast.c
new file mode 100644
index 0000000000..876a36042c
--- /dev/null
+++ b/thirdparty/zstd/compress/zstd_double_fast.c
@@ -0,0 +1,308 @@
+/*
+ * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under both the BSD-style license (found in the
+ * LICENSE file in the root directory of this source tree) and the GPLv2 (found
+ * in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
+ */
+
+#include "zstd_double_fast.h"
+
+
+void ZSTD_fillDoubleHashTable(ZSTD_CCtx* cctx, const void* end, const U32 mls)
+{
+ U32* const hashLarge = cctx->hashTable;
+ U32 const hBitsL = cctx->appliedParams.cParams.hashLog;
+ U32* const hashSmall = cctx->chainTable;
+ U32 const hBitsS = cctx->appliedParams.cParams.chainLog;
+ const BYTE* const base = cctx->base;
+ const BYTE* ip = base + cctx->nextToUpdate;
+ const BYTE* const iend = ((const BYTE*)end) - HASH_READ_SIZE;
+ const size_t fastHashFillStep = 3;
+
+ while(ip <= iend) {
+ hashSmall[ZSTD_hashPtr(ip, hBitsS, mls)] = (U32)(ip - base);
+ hashLarge[ZSTD_hashPtr(ip, hBitsL, 8)] = (U32)(ip - base);
+ ip += fastHashFillStep;
+ }
+}
+
+
+FORCE_INLINE_TEMPLATE
+size_t ZSTD_compressBlock_doubleFast_generic(ZSTD_CCtx* cctx,
+ const void* src, size_t srcSize,
+ const U32 mls)
+{
+ U32* const hashLong = cctx->hashTable;
+ const U32 hBitsL = cctx->appliedParams.cParams.hashLog;
+ U32* const hashSmall = cctx->chainTable;
+ const U32 hBitsS = cctx->appliedParams.cParams.chainLog;
+ seqStore_t* seqStorePtr = &(cctx->seqStore);
+ const BYTE* const base = cctx->base;
+ const BYTE* const istart = (const BYTE*)src;
+ const BYTE* ip = istart;
+ const BYTE* anchor = istart;
+ const U32 lowestIndex = cctx->dictLimit;
+ const BYTE* const lowest = base + lowestIndex;
+ const BYTE* const iend = istart + srcSize;
+ const BYTE* const ilimit = iend - HASH_READ_SIZE;
+ U32 offset_1=seqStorePtr->rep[0], offset_2=seqStorePtr->rep[1];
+ U32 offsetSaved = 0;
+
+ /* init */
+ ip += (ip==lowest);
+ { U32 const maxRep = (U32)(ip-lowest);
+ if (offset_2 > maxRep) offsetSaved = offset_2, offset_2 = 0;
+ if (offset_1 > maxRep) offsetSaved = offset_1, offset_1 = 0;
+ }
+
+ /* Main Search Loop */
+ while (ip < ilimit) { /* < instead of <=, because repcode check at (ip+1) */
+ size_t mLength;
+ size_t const h2 = ZSTD_hashPtr(ip, hBitsL, 8);
+ size_t const h = ZSTD_hashPtr(ip, hBitsS, mls);
+ U32 const current = (U32)(ip-base);
+ U32 const matchIndexL = hashLong[h2];
+ U32 const matchIndexS = hashSmall[h];
+ const BYTE* matchLong = base + matchIndexL;
+ const BYTE* match = base + matchIndexS;
+ hashLong[h2] = hashSmall[h] = current; /* update hash tables */
+
+ assert(offset_1 <= current); /* supposed guaranteed by construction */
+ if ((offset_1 > 0) & (MEM_read32(ip+1-offset_1) == MEM_read32(ip+1))) {
+ /* favor repcode */
+ mLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4;
+ ip++;
+ ZSTD_storeSeq(seqStorePtr, ip-anchor, anchor, 0, mLength-MINMATCH);
+ } else {
+ U32 offset;
+ if ( (matchIndexL > lowestIndex) && (MEM_read64(matchLong) == MEM_read64(ip)) ) {
+ mLength = ZSTD_count(ip+8, matchLong+8, iend) + 8;
+ offset = (U32)(ip-matchLong);
+ while (((ip>anchor) & (matchLong>lowest)) && (ip[-1] == matchLong[-1])) { ip--; matchLong--; mLength++; } /* catch up */
+ } else if ( (matchIndexS > lowestIndex) && (MEM_read32(match) == MEM_read32(ip)) ) {
+ size_t const hl3 = ZSTD_hashPtr(ip+1, hBitsL, 8);
+ U32 const matchIndexL3 = hashLong[hl3];
+ const BYTE* matchL3 = base + matchIndexL3;
+ hashLong[hl3] = current + 1;
+ if ( (matchIndexL3 > lowestIndex) && (MEM_read64(matchL3) == MEM_read64(ip+1)) ) {
+ mLength = ZSTD_count(ip+9, matchL3+8, iend) + 8;
+ ip++;
+ offset = (U32)(ip-matchL3);
+ while (((ip>anchor) & (matchL3>lowest)) && (ip[-1] == matchL3[-1])) { ip--; matchL3--; mLength++; } /* catch up */
+ } else {
+ mLength = ZSTD_count(ip+4, match+4, iend) + 4;
+ offset = (U32)(ip-match);
+ while (((ip>anchor) & (match>lowest)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; } /* catch up */
+ }
+ } else {
+ ip += ((ip-anchor) >> g_searchStrength) + 1;
+ continue;
+ }
+
+ offset_2 = offset_1;
+ offset_1 = offset;
+
+ ZSTD_storeSeq(seqStorePtr, ip-anchor, anchor, offset + ZSTD_REP_MOVE, mLength-MINMATCH);
+ }
+
+ /* match found */
+ ip += mLength;
+ anchor = ip;
+
+ if (ip <= ilimit) {
+ /* Fill Table */
+ hashLong[ZSTD_hashPtr(base+current+2, hBitsL, 8)] =
+ hashSmall[ZSTD_hashPtr(base+current+2, hBitsS, mls)] = current+2; /* here because current+2 could be > iend-8 */
+ hashLong[ZSTD_hashPtr(ip-2, hBitsL, 8)] =
+ hashSmall[ZSTD_hashPtr(ip-2, hBitsS, mls)] = (U32)(ip-2-base);
+
+ /* check immediate repcode */
+ while ( (ip <= ilimit)
+ && ( (offset_2>0)
+ & (MEM_read32(ip) == MEM_read32(ip - offset_2)) )) {
+ /* store sequence */
+ size_t const rLength = ZSTD_count(ip+4, ip+4-offset_2, iend) + 4;
+ { U32 const tmpOff = offset_2; offset_2 = offset_1; offset_1 = tmpOff; } /* swap offset_2 <=> offset_1 */
+ hashSmall[ZSTD_hashPtr(ip, hBitsS, mls)] = (U32)(ip-base);
+ hashLong[ZSTD_hashPtr(ip, hBitsL, 8)] = (U32)(ip-base);
+ ZSTD_storeSeq(seqStorePtr, 0, anchor, 0, rLength-MINMATCH);
+ ip += rLength;
+ anchor = ip;
+ continue; /* faster when present ... (?) */
+ } } }
+
+ /* save reps for next block */
+ seqStorePtr->repToConfirm[0] = offset_1 ? offset_1 : offsetSaved;
+ seqStorePtr->repToConfirm[1] = offset_2 ? offset_2 : offsetSaved;
+
+ /* Return the last literals size */
+ return iend - anchor;
+}
+
+
+size_t ZSTD_compressBlock_doubleFast(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
+{
+ const U32 mls = ctx->appliedParams.cParams.searchLength;
+ switch(mls)
+ {
+ default: /* includes case 3 */
+ case 4 :
+ return ZSTD_compressBlock_doubleFast_generic(ctx, src, srcSize, 4);
+ case 5 :
+ return ZSTD_compressBlock_doubleFast_generic(ctx, src, srcSize, 5);
+ case 6 :
+ return ZSTD_compressBlock_doubleFast_generic(ctx, src, srcSize, 6);
+ case 7 :
+ return ZSTD_compressBlock_doubleFast_generic(ctx, src, srcSize, 7);
+ }
+}
+
+
+static size_t ZSTD_compressBlock_doubleFast_extDict_generic(ZSTD_CCtx* ctx,
+ const void* src, size_t srcSize,
+ const U32 mls)
+{
+ U32* const hashLong = ctx->hashTable;
+ U32 const hBitsL = ctx->appliedParams.cParams.hashLog;
+ U32* const hashSmall = ctx->chainTable;
+ U32 const hBitsS = ctx->appliedParams.cParams.chainLog;
+ seqStore_t* seqStorePtr = &(ctx->seqStore);
+ const BYTE* const base = ctx->base;
+ const BYTE* const dictBase = ctx->dictBase;
+ const BYTE* const istart = (const BYTE*)src;
+ const BYTE* ip = istart;
+ const BYTE* anchor = istart;
+ const U32 lowestIndex = ctx->lowLimit;
+ const BYTE* const dictStart = dictBase + lowestIndex;
+ const U32 dictLimit = ctx->dictLimit;
+ const BYTE* const lowPrefixPtr = base + dictLimit;
+ const BYTE* const dictEnd = dictBase + dictLimit;
+ const BYTE* const iend = istart + srcSize;
+ const BYTE* const ilimit = iend - 8;
+ U32 offset_1=seqStorePtr->rep[0], offset_2=seqStorePtr->rep[1];
+
+ /* Search Loop */
+ while (ip < ilimit) { /* < instead of <=, because (ip+1) */
+ const size_t hSmall = ZSTD_hashPtr(ip, hBitsS, mls);
+ const U32 matchIndex = hashSmall[hSmall];
+ const BYTE* matchBase = matchIndex < dictLimit ? dictBase : base;
+ const BYTE* match = matchBase + matchIndex;
+
+ const size_t hLong = ZSTD_hashPtr(ip, hBitsL, 8);
+ const U32 matchLongIndex = hashLong[hLong];
+ const BYTE* matchLongBase = matchLongIndex < dictLimit ? dictBase : base;
+ const BYTE* matchLong = matchLongBase + matchLongIndex;
+
+ const U32 current = (U32)(ip-base);
+ const U32 repIndex = current + 1 - offset_1; /* offset_1 expected <= current +1 */
+ const BYTE* repBase = repIndex < dictLimit ? dictBase : base;
+ const BYTE* repMatch = repBase + repIndex;
+ size_t mLength;
+ hashSmall[hSmall] = hashLong[hLong] = current; /* update hash table */
+
+ if ( (((U32)((dictLimit-1) - repIndex) >= 3) /* intentional underflow */ & (repIndex > lowestIndex))
+ && (MEM_read32(repMatch) == MEM_read32(ip+1)) ) {
+ const BYTE* repMatchEnd = repIndex < dictLimit ? dictEnd : iend;
+ mLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, lowPrefixPtr) + 4;
+ ip++;
+ ZSTD_storeSeq(seqStorePtr, ip-anchor, anchor, 0, mLength-MINMATCH);
+ } else {
+ if ((matchLongIndex > lowestIndex) && (MEM_read64(matchLong) == MEM_read64(ip))) {
+ const BYTE* matchEnd = matchLongIndex < dictLimit ? dictEnd : iend;
+ const BYTE* lowMatchPtr = matchLongIndex < dictLimit ? dictStart : lowPrefixPtr;
+ U32 offset;
+ mLength = ZSTD_count_2segments(ip+8, matchLong+8, iend, matchEnd, lowPrefixPtr) + 8;
+ offset = current - matchLongIndex;
+ while (((ip>anchor) & (matchLong>lowMatchPtr)) && (ip[-1] == matchLong[-1])) { ip--; matchLong--; mLength++; } /* catch up */
+ offset_2 = offset_1;
+ offset_1 = offset;
+ ZSTD_storeSeq(seqStorePtr, ip-anchor, anchor, offset + ZSTD_REP_MOVE, mLength-MINMATCH);
+
+ } else if ((matchIndex > lowestIndex) && (MEM_read32(match) == MEM_read32(ip))) {
+ size_t const h3 = ZSTD_hashPtr(ip+1, hBitsL, 8);
+ U32 const matchIndex3 = hashLong[h3];
+ const BYTE* const match3Base = matchIndex3 < dictLimit ? dictBase : base;
+ const BYTE* match3 = match3Base + matchIndex3;
+ U32 offset;
+ hashLong[h3] = current + 1;
+ if ( (matchIndex3 > lowestIndex) && (MEM_read64(match3) == MEM_read64(ip+1)) ) {
+ const BYTE* matchEnd = matchIndex3 < dictLimit ? dictEnd : iend;
+ const BYTE* lowMatchPtr = matchIndex3 < dictLimit ? dictStart : lowPrefixPtr;
+ mLength = ZSTD_count_2segments(ip+9, match3+8, iend, matchEnd, lowPrefixPtr) + 8;
+ ip++;
+ offset = current+1 - matchIndex3;
+ while (((ip>anchor) & (match3>lowMatchPtr)) && (ip[-1] == match3[-1])) { ip--; match3--; mLength++; } /* catch up */
+ } else {
+ const BYTE* matchEnd = matchIndex < dictLimit ? dictEnd : iend;
+ const BYTE* lowMatchPtr = matchIndex < dictLimit ? dictStart : lowPrefixPtr;
+ mLength = ZSTD_count_2segments(ip+4, match+4, iend, matchEnd, lowPrefixPtr) + 4;
+ offset = current - matchIndex;
+ while (((ip>anchor) & (match>lowMatchPtr)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; } /* catch up */
+ }
+ offset_2 = offset_1;
+ offset_1 = offset;
+ ZSTD_storeSeq(seqStorePtr, ip-anchor, anchor, offset + ZSTD_REP_MOVE, mLength-MINMATCH);
+
+ } else {
+ ip += ((ip-anchor) >> g_searchStrength) + 1;
+ continue;
+ } }
+
+ /* found a match : store it */
+ ip += mLength;
+ anchor = ip;
+
+ if (ip <= ilimit) {
+ /* Fill Table */
+ hashSmall[ZSTD_hashPtr(base+current+2, hBitsS, mls)] = current+2;
+ hashLong[ZSTD_hashPtr(base+current+2, hBitsL, 8)] = current+2;
+ hashSmall[ZSTD_hashPtr(ip-2, hBitsS, mls)] = (U32)(ip-2-base);
+ hashLong[ZSTD_hashPtr(ip-2, hBitsL, 8)] = (U32)(ip-2-base);
+ /* check immediate repcode */
+ while (ip <= ilimit) {
+ U32 const current2 = (U32)(ip-base);
+ U32 const repIndex2 = current2 - offset_2;
+ const BYTE* repMatch2 = repIndex2 < dictLimit ? dictBase + repIndex2 : base + repIndex2;
+ if ( (((U32)((dictLimit-1) - repIndex2) >= 3) & (repIndex2 > lowestIndex)) /* intentional overflow */
+ && (MEM_read32(repMatch2) == MEM_read32(ip)) ) {
+ const BYTE* const repEnd2 = repIndex2 < dictLimit ? dictEnd : iend;
+ size_t const repLength2 = ZSTD_count_2segments(ip+4, repMatch2+4, iend, repEnd2, lowPrefixPtr) + 4;
+ U32 tmpOffset = offset_2; offset_2 = offset_1; offset_1 = tmpOffset; /* swap offset_2 <=> offset_1 */
+ ZSTD_storeSeq(seqStorePtr, 0, anchor, 0, repLength2-MINMATCH);
+ hashSmall[ZSTD_hashPtr(ip, hBitsS, mls)] = current2;
+ hashLong[ZSTD_hashPtr(ip, hBitsL, 8)] = current2;
+ ip += repLength2;
+ anchor = ip;
+ continue;
+ }
+ break;
+ } } }
+
+ /* save reps for next block */
+ seqStorePtr->repToConfirm[0] = offset_1; seqStorePtr->repToConfirm[1] = offset_2;
+
+ /* Return the last literals size */
+ return iend - anchor;
+}
+
+
+size_t ZSTD_compressBlock_doubleFast_extDict(ZSTD_CCtx* ctx,
+ const void* src, size_t srcSize)
+{
+ U32 const mls = ctx->appliedParams.cParams.searchLength;
+ switch(mls)
+ {
+ default: /* includes case 3 */
+ case 4 :
+ return ZSTD_compressBlock_doubleFast_extDict_generic(ctx, src, srcSize, 4);
+ case 5 :
+ return ZSTD_compressBlock_doubleFast_extDict_generic(ctx, src, srcSize, 5);
+ case 6 :
+ return ZSTD_compressBlock_doubleFast_extDict_generic(ctx, src, srcSize, 6);
+ case 7 :
+ return ZSTD_compressBlock_doubleFast_extDict_generic(ctx, src, srcSize, 7);
+ }
+}
diff --git a/thirdparty/zstd/compress/zstd_double_fast.h b/thirdparty/zstd/compress/zstd_double_fast.h
new file mode 100644
index 0000000000..3dba6c7108
--- /dev/null
+++ b/thirdparty/zstd/compress/zstd_double_fast.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under both the BSD-style license (found in the
+ * LICENSE file in the root directory of this source tree) and the GPLv2 (found
+ * in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
+ */
+
+#ifndef ZSTD_DOUBLE_FAST_H
+#define ZSTD_DOUBLE_FAST_H
+
+#include "zstd_compress.h"
+
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
+void ZSTD_fillDoubleHashTable(ZSTD_CCtx* cctx, const void* end, const U32 mls);
+size_t ZSTD_compressBlock_doubleFast(ZSTD_CCtx* ctx, const void* src, size_t srcSize);
+size_t ZSTD_compressBlock_doubleFast_extDict(ZSTD_CCtx* ctx, const void* src, size_t srcSize);
+
+#if defined (__cplusplus)
+}
+#endif
+
+#endif /* ZSTD_DOUBLE_FAST_H */
diff --git a/thirdparty/zstd/compress/zstd_fast.c b/thirdparty/zstd/compress/zstd_fast.c
new file mode 100644
index 0000000000..2e057017b9
--- /dev/null
+++ b/thirdparty/zstd/compress/zstd_fast.c
@@ -0,0 +1,242 @@
+/*
+ * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under both the BSD-style license (found in the
+ * LICENSE file in the root directory of this source tree) and the GPLv2 (found
+ * in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
+ */
+
+#include "zstd_fast.h"
+
+
+void ZSTD_fillHashTable (ZSTD_CCtx* zc, const void* end, const U32 mls)
+{
+ U32* const hashTable = zc->hashTable;
+ U32 const hBits = zc->appliedParams.cParams.hashLog;
+ const BYTE* const base = zc->base;
+ const BYTE* ip = base + zc->nextToUpdate;
+ const BYTE* const iend = ((const BYTE*)end) - HASH_READ_SIZE;
+ const size_t fastHashFillStep = 3;
+
+ while(ip <= iend) {
+ hashTable[ZSTD_hashPtr(ip, hBits, mls)] = (U32)(ip - base);
+ ip += fastHashFillStep;
+ }
+}
+
+
+FORCE_INLINE_TEMPLATE
+size_t ZSTD_compressBlock_fast_generic(ZSTD_CCtx* cctx,
+ const void* src, size_t srcSize,
+ const U32 mls)
+{
+ U32* const hashTable = cctx->hashTable;
+ U32 const hBits = cctx->appliedParams.cParams.hashLog;
+ seqStore_t* seqStorePtr = &(cctx->seqStore);
+ const BYTE* const base = cctx->base;
+ const BYTE* const istart = (const BYTE*)src;
+ const BYTE* ip = istart;
+ const BYTE* anchor = istart;
+ const U32 lowestIndex = cctx->dictLimit;
+ const BYTE* const lowest = base + lowestIndex;
+ const BYTE* const iend = istart + srcSize;
+ const BYTE* const ilimit = iend - HASH_READ_SIZE;
+ U32 offset_1=seqStorePtr->rep[0], offset_2=seqStorePtr->rep[1];
+ U32 offsetSaved = 0;
+
+ /* init */
+ ip += (ip==lowest);
+ { U32 const maxRep = (U32)(ip-lowest);
+ if (offset_2 > maxRep) offsetSaved = offset_2, offset_2 = 0;
+ if (offset_1 > maxRep) offsetSaved = offset_1, offset_1 = 0;
+ }
+
+ /* Main Search Loop */
+ while (ip < ilimit) { /* < instead of <=, because repcode check at (ip+1) */
+ size_t mLength;
+ size_t const h = ZSTD_hashPtr(ip, hBits, mls);
+ U32 const current = (U32)(ip-base);
+ U32 const matchIndex = hashTable[h];
+ const BYTE* match = base + matchIndex;
+ hashTable[h] = current; /* update hash table */
+
+ if ((offset_1 > 0) & (MEM_read32(ip+1-offset_1) == MEM_read32(ip+1))) {
+ mLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4;
+ ip++;
+ ZSTD_storeSeq(seqStorePtr, ip-anchor, anchor, 0, mLength-MINMATCH);
+ } else {
+ U32 offset;
+ if ( (matchIndex <= lowestIndex) || (MEM_read32(match) != MEM_read32(ip)) ) {
+ ip += ((ip-anchor) >> g_searchStrength) + 1;
+ continue;
+ }
+ mLength = ZSTD_count(ip+4, match+4, iend) + 4;
+ offset = (U32)(ip-match);
+ while (((ip>anchor) & (match>lowest)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; } /* catch up */
+ offset_2 = offset_1;
+ offset_1 = offset;
+
+ ZSTD_storeSeq(seqStorePtr, ip-anchor, anchor, offset + ZSTD_REP_MOVE, mLength-MINMATCH);
+ }
+
+ /* match found */
+ ip += mLength;
+ anchor = ip;
+
+ if (ip <= ilimit) {
+ /* Fill Table */
+ hashTable[ZSTD_hashPtr(base+current+2, hBits, mls)] = current+2; /* here because current+2 could be > iend-8 */
+ hashTable[ZSTD_hashPtr(ip-2, hBits, mls)] = (U32)(ip-2-base);
+ /* check immediate repcode */
+ while ( (ip <= ilimit)
+ && ( (offset_2>0)
+ & (MEM_read32(ip) == MEM_read32(ip - offset_2)) )) {
+ /* store sequence */
+ size_t const rLength = ZSTD_count(ip+4, ip+4-offset_2, iend) + 4;
+ { U32 const tmpOff = offset_2; offset_2 = offset_1; offset_1 = tmpOff; } /* swap offset_2 <=> offset_1 */
+ hashTable[ZSTD_hashPtr(ip, hBits, mls)] = (U32)(ip-base);
+ ZSTD_storeSeq(seqStorePtr, 0, anchor, 0, rLength-MINMATCH);
+ ip += rLength;
+ anchor = ip;
+ continue; /* faster when present ... (?) */
+ } } }
+
+ /* save reps for next block */
+ seqStorePtr->repToConfirm[0] = offset_1 ? offset_1 : offsetSaved;
+ seqStorePtr->repToConfirm[1] = offset_2 ? offset_2 : offsetSaved;
+
+ /* Return the last literals size */
+ return iend - anchor;
+}
+
+
+size_t ZSTD_compressBlock_fast(ZSTD_CCtx* ctx,
+ const void* src, size_t srcSize)
+{
+ const U32 mls = ctx->appliedParams.cParams.searchLength;
+ switch(mls)
+ {
+ default: /* includes case 3 */
+ case 4 :
+ return ZSTD_compressBlock_fast_generic(ctx, src, srcSize, 4);
+ case 5 :
+ return ZSTD_compressBlock_fast_generic(ctx, src, srcSize, 5);
+ case 6 :
+ return ZSTD_compressBlock_fast_generic(ctx, src, srcSize, 6);
+ case 7 :
+ return ZSTD_compressBlock_fast_generic(ctx, src, srcSize, 7);
+ }
+}
+
+
+static size_t ZSTD_compressBlock_fast_extDict_generic(ZSTD_CCtx* ctx,
+ const void* src, size_t srcSize,
+ const U32 mls)
+{
+ U32* hashTable = ctx->hashTable;
+ const U32 hBits = ctx->appliedParams.cParams.hashLog;
+ seqStore_t* seqStorePtr = &(ctx->seqStore);
+ const BYTE* const base = ctx->base;
+ const BYTE* const dictBase = ctx->dictBase;
+ const BYTE* const istart = (const BYTE*)src;
+ const BYTE* ip = istart;
+ const BYTE* anchor = istart;
+ const U32 lowestIndex = ctx->lowLimit;
+ const BYTE* const dictStart = dictBase + lowestIndex;
+ const U32 dictLimit = ctx->dictLimit;
+ const BYTE* const lowPrefixPtr = base + dictLimit;
+ const BYTE* const dictEnd = dictBase + dictLimit;
+ const BYTE* const iend = istart + srcSize;
+ const BYTE* const ilimit = iend - 8;
+ U32 offset_1=seqStorePtr->rep[0], offset_2=seqStorePtr->rep[1];
+
+ /* Search Loop */
+ while (ip < ilimit) { /* < instead of <=, because (ip+1) */
+ const size_t h = ZSTD_hashPtr(ip, hBits, mls);
+ const U32 matchIndex = hashTable[h];
+ const BYTE* matchBase = matchIndex < dictLimit ? dictBase : base;
+ const BYTE* match = matchBase + matchIndex;
+ const U32 current = (U32)(ip-base);
+ const U32 repIndex = current + 1 - offset_1; /* offset_1 expected <= current +1 */
+ const BYTE* repBase = repIndex < dictLimit ? dictBase : base;
+ const BYTE* repMatch = repBase + repIndex;
+ size_t mLength;
+ hashTable[h] = current; /* update hash table */
+
+ if ( (((U32)((dictLimit-1) - repIndex) >= 3) /* intentional underflow */ & (repIndex > lowestIndex))
+ && (MEM_read32(repMatch) == MEM_read32(ip+1)) ) {
+ const BYTE* repMatchEnd = repIndex < dictLimit ? dictEnd : iend;
+ mLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, lowPrefixPtr) + 4;
+ ip++;
+ ZSTD_storeSeq(seqStorePtr, ip-anchor, anchor, 0, mLength-MINMATCH);
+ } else {
+ if ( (matchIndex < lowestIndex) ||
+ (MEM_read32(match) != MEM_read32(ip)) ) {
+ ip += ((ip-anchor) >> g_searchStrength) + 1;
+ continue;
+ }
+ { const BYTE* matchEnd = matchIndex < dictLimit ? dictEnd : iend;
+ const BYTE* lowMatchPtr = matchIndex < dictLimit ? dictStart : lowPrefixPtr;
+ U32 offset;
+ mLength = ZSTD_count_2segments(ip+4, match+4, iend, matchEnd, lowPrefixPtr) + 4;
+ while (((ip>anchor) & (match>lowMatchPtr)) && (ip[-1] == match[-1])) { ip--; match--; mLength++; } /* catch up */
+ offset = current - matchIndex;
+ offset_2 = offset_1;
+ offset_1 = offset;
+ ZSTD_storeSeq(seqStorePtr, ip-anchor, anchor, offset + ZSTD_REP_MOVE, mLength-MINMATCH);
+ } }
+
+ /* found a match : store it */
+ ip += mLength;
+ anchor = ip;
+
+ if (ip <= ilimit) {
+ /* Fill Table */
+ hashTable[ZSTD_hashPtr(base+current+2, hBits, mls)] = current+2;
+ hashTable[ZSTD_hashPtr(ip-2, hBits, mls)] = (U32)(ip-2-base);
+ /* check immediate repcode */
+ while (ip <= ilimit) {
+ U32 const current2 = (U32)(ip-base);
+ U32 const repIndex2 = current2 - offset_2;
+ const BYTE* repMatch2 = repIndex2 < dictLimit ? dictBase + repIndex2 : base + repIndex2;
+ if ( (((U32)((dictLimit-1) - repIndex2) >= 3) & (repIndex2 > lowestIndex)) /* intentional overflow */
+ && (MEM_read32(repMatch2) == MEM_read32(ip)) ) {
+ const BYTE* const repEnd2 = repIndex2 < dictLimit ? dictEnd : iend;
+ size_t const repLength2 = ZSTD_count_2segments(ip+4, repMatch2+4, iend, repEnd2, lowPrefixPtr) + 4;
+ U32 tmpOffset = offset_2; offset_2 = offset_1; offset_1 = tmpOffset; /* swap offset_2 <=> offset_1 */
+ ZSTD_storeSeq(seqStorePtr, 0, anchor, 0, repLength2-MINMATCH);
+ hashTable[ZSTD_hashPtr(ip, hBits, mls)] = current2;
+ ip += repLength2;
+ anchor = ip;
+ continue;
+ }
+ break;
+ } } }
+
+ /* save reps for next block */
+ seqStorePtr->repToConfirm[0] = offset_1; seqStorePtr->repToConfirm[1] = offset_2;
+
+ /* Return the last literals size */
+ return iend - anchor;
+}
+
+
+size_t ZSTD_compressBlock_fast_extDict(ZSTD_CCtx* ctx,
+ const void* src, size_t srcSize)
+{
+ U32 const mls = ctx->appliedParams.cParams.searchLength;
+ switch(mls)
+ {
+ default: /* includes case 3 */
+ case 4 :
+ return ZSTD_compressBlock_fast_extDict_generic(ctx, src, srcSize, 4);
+ case 5 :
+ return ZSTD_compressBlock_fast_extDict_generic(ctx, src, srcSize, 5);
+ case 6 :
+ return ZSTD_compressBlock_fast_extDict_generic(ctx, src, srcSize, 6);
+ case 7 :
+ return ZSTD_compressBlock_fast_extDict_generic(ctx, src, srcSize, 7);
+ }
+}
diff --git a/thirdparty/zstd/compress/zstd_fast.h b/thirdparty/zstd/compress/zstd_fast.h
new file mode 100644
index 0000000000..4205141a9a
--- /dev/null
+++ b/thirdparty/zstd/compress/zstd_fast.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under both the BSD-style license (found in the
+ * LICENSE file in the root directory of this source tree) and the GPLv2 (found
+ * in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
+ */
+
+#ifndef ZSTD_FAST_H
+#define ZSTD_FAST_H
+
+#include "zstd_compress.h"
+
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
+void ZSTD_fillHashTable(ZSTD_CCtx* zc, const void* end, const U32 mls);
+size_t ZSTD_compressBlock_fast(ZSTD_CCtx* ctx,
+ const void* src, size_t srcSize);
+size_t ZSTD_compressBlock_fast_extDict(ZSTD_CCtx* ctx,
+ const void* src, size_t srcSize);
+
+#if defined (__cplusplus)
+}
+#endif
+
+#endif /* ZSTD_FAST_H */
diff --git a/thirdparty/zstd/compress/zstd_lazy.c b/thirdparty/zstd/compress/zstd_lazy.c
new file mode 100644
index 0000000000..2a7f6a0fe2
--- /dev/null
+++ b/thirdparty/zstd/compress/zstd_lazy.c
@@ -0,0 +1,749 @@
+/*
+ * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under both the BSD-style license (found in the
+ * LICENSE file in the root directory of this source tree) and the GPLv2 (found
+ * in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
+ */
+
+#include "zstd_lazy.h"
+
+
+/*-*************************************
+* Binary Tree search
+***************************************/
+/** ZSTD_insertBt1() : add one or multiple positions to tree.
+* ip : assumed <= iend-8 .
+* @return : nb of positions added */
+static U32 ZSTD_insertBt1(ZSTD_CCtx* zc, const BYTE* const ip, const U32 mls, const BYTE* const iend, U32 nbCompares,
+ U32 extDict)
+{
+ U32* const hashTable = zc->hashTable;
+ U32 const hashLog = zc->appliedParams.cParams.hashLog;
+ size_t const h = ZSTD_hashPtr(ip, hashLog, mls);
+ U32* const bt = zc->chainTable;
+ U32 const btLog = zc->appliedParams.cParams.chainLog - 1;
+ U32 const btMask = (1 << btLog) - 1;
+ U32 matchIndex = hashTable[h];
+ size_t commonLengthSmaller=0, commonLengthLarger=0;
+ const BYTE* const base = zc->base;
+ const BYTE* const dictBase = zc->dictBase;
+ const U32 dictLimit = zc->dictLimit;
+ const BYTE* const dictEnd = dictBase + dictLimit;
+ const BYTE* const prefixStart = base + dictLimit;
+ const BYTE* match;
+ const U32 current = (U32)(ip-base);
+ const U32 btLow = btMask >= current ? 0 : current - btMask;
+ U32* smallerPtr = bt + 2*(current&btMask);
+ U32* largerPtr = smallerPtr + 1;
+ U32 dummy32; /* to be nullified at the end */
+ U32 const windowLow = zc->lowLimit;
+ U32 matchEndIdx = current+8;
+ size_t bestLength = 8;
+#ifdef ZSTD_C_PREDICT
+ U32 predictedSmall = *(bt + 2*((current-1)&btMask) + 0);
+ U32 predictedLarge = *(bt + 2*((current-1)&btMask) + 1);
+ predictedSmall += (predictedSmall>0);
+ predictedLarge += (predictedLarge>0);
+#endif /* ZSTD_C_PREDICT */
+
+ assert(ip <= iend-8); /* required for h calculation */
+ hashTable[h] = current; /* Update Hash Table */
+
+ while (nbCompares-- && (matchIndex > windowLow)) {
+ U32* const nextPtr = bt + 2*(matchIndex & btMask);
+ size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of common bytes */
+
+#ifdef ZSTD_C_PREDICT /* note : can create issues when hlog small <= 11 */
+ const U32* predictPtr = bt + 2*((matchIndex-1) & btMask); /* written this way, as bt is a roll buffer */
+ if (matchIndex == predictedSmall) {
+ /* no need to check length, result known */
+ *smallerPtr = matchIndex;
+ if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */
+ smallerPtr = nextPtr+1; /* new "smaller" => larger of match */
+ matchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */
+ predictedSmall = predictPtr[1] + (predictPtr[1]>0);
+ continue;
+ }
+ if (matchIndex == predictedLarge) {
+ *largerPtr = matchIndex;
+ if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */
+ largerPtr = nextPtr;
+ matchIndex = nextPtr[0];
+ predictedLarge = predictPtr[0] + (predictPtr[0]>0);
+ continue;
+ }
+#endif
+ if ((!extDict) || (matchIndex+matchLength >= dictLimit)) {
+ match = base + matchIndex;
+ if (match[matchLength] == ip[matchLength])
+ matchLength += ZSTD_count(ip+matchLength+1, match+matchLength+1, iend) +1;
+ } else {
+ match = dictBase + matchIndex;
+ matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart);
+ if (matchIndex+matchLength >= dictLimit)
+ match = base + matchIndex; /* to prepare for next usage of match[matchLength] */
+ }
+
+ if (matchLength > bestLength) {
+ bestLength = matchLength;
+ if (matchLength > matchEndIdx - matchIndex)
+ matchEndIdx = matchIndex + (U32)matchLength;
+ }
+
+ if (ip+matchLength == iend) /* equal : no way to know if inf or sup */
+ break; /* drop , to guarantee consistency ; miss a bit of compression, but other solutions can corrupt tree */
+
+ if (match[matchLength] < ip[matchLength]) { /* necessarily within buffer */
+ /* match+1 is smaller than current */
+ *smallerPtr = matchIndex; /* update smaller idx */
+ commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common length */
+ if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop searching */
+ smallerPtr = nextPtr+1; /* new "smaller" => larger of match */
+ matchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */
+ } else {
+ /* match is larger than current */
+ *largerPtr = matchIndex;
+ commonLengthLarger = matchLength;
+ if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop searching */
+ largerPtr = nextPtr;
+ matchIndex = nextPtr[0];
+ } }
+
+ *smallerPtr = *largerPtr = 0;
+ if (bestLength > 384) return MIN(192, (U32)(bestLength - 384)); /* speed optimization */
+ if (matchEndIdx > current + 8) return matchEndIdx - (current + 8);
+ return 1;
+}
+
+
+static size_t ZSTD_insertBtAndFindBestMatch (
+ ZSTD_CCtx* zc,
+ const BYTE* const ip, const BYTE* const iend,
+ size_t* offsetPtr,
+ U32 nbCompares, const U32 mls,
+ U32 extDict)
+{
+ U32* const hashTable = zc->hashTable;
+ U32 const hashLog = zc->appliedParams.cParams.hashLog;
+ size_t const h = ZSTD_hashPtr(ip, hashLog, mls);
+ U32* const bt = zc->chainTable;
+ U32 const btLog = zc->appliedParams.cParams.chainLog - 1;
+ U32 const btMask = (1 << btLog) - 1;
+ U32 matchIndex = hashTable[h];
+ size_t commonLengthSmaller=0, commonLengthLarger=0;
+ const BYTE* const base = zc->base;
+ const BYTE* const dictBase = zc->dictBase;
+ const U32 dictLimit = zc->dictLimit;
+ const BYTE* const dictEnd = dictBase + dictLimit;
+ const BYTE* const prefixStart = base + dictLimit;
+ const U32 current = (U32)(ip-base);
+ const U32 btLow = btMask >= current ? 0 : current - btMask;
+ const U32 windowLow = zc->lowLimit;
+ U32* smallerPtr = bt + 2*(current&btMask);
+ U32* largerPtr = bt + 2*(current&btMask) + 1;
+ U32 matchEndIdx = current+8;
+ U32 dummy32; /* to be nullified at the end */
+ size_t bestLength = 0;
+
+ assert(ip <= iend-8); /* required for h calculation */
+ hashTable[h] = current; /* Update Hash Table */
+
+ while (nbCompares-- && (matchIndex > windowLow)) {
+ U32* const nextPtr = bt + 2*(matchIndex & btMask);
+ size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of common bytes */
+ const BYTE* match;
+
+ if ((!extDict) || (matchIndex+matchLength >= dictLimit)) {
+ match = base + matchIndex;
+ if (match[matchLength] == ip[matchLength])
+ matchLength += ZSTD_count(ip+matchLength+1, match+matchLength+1, iend) +1;
+ } else {
+ match = dictBase + matchIndex;
+ matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart);
+ if (matchIndex+matchLength >= dictLimit)
+ match = base + matchIndex; /* to prepare for next usage of match[matchLength] */
+ }
+
+ if (matchLength > bestLength) {
+ if (matchLength > matchEndIdx - matchIndex)
+ matchEndIdx = matchIndex + (U32)matchLength;
+ if ( (4*(int)(matchLength-bestLength)) > (int)(ZSTD_highbit32(current-matchIndex+1) - ZSTD_highbit32((U32)offsetPtr[0]+1)) )
+ bestLength = matchLength, *offsetPtr = ZSTD_REP_MOVE + current - matchIndex;
+ if (ip+matchLength == iend) /* equal : no way to know if inf or sup */
+ break; /* drop, to guarantee consistency (miss a little bit of compression) */
+ }
+
+ if (match[matchLength] < ip[matchLength]) {
+ /* match is smaller than current */
+ *smallerPtr = matchIndex; /* update smaller idx */
+ commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common length */
+ if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */
+ smallerPtr = nextPtr+1; /* new "smaller" => larger of match */
+ matchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */
+ } else {
+ /* match is larger than current */
+ *largerPtr = matchIndex;
+ commonLengthLarger = matchLength;
+ if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */
+ largerPtr = nextPtr;
+ matchIndex = nextPtr[0];
+ } }
+
+ *smallerPtr = *largerPtr = 0;
+
+ zc->nextToUpdate = (matchEndIdx > current + 8) ? matchEndIdx - 8 : current+1;
+ return bestLength;
+}
+
+
+void ZSTD_updateTree(ZSTD_CCtx* zc, const BYTE* const ip, const BYTE* const iend, const U32 nbCompares, const U32 mls)
+{
+ const BYTE* const base = zc->base;
+ const U32 target = (U32)(ip - base);
+ U32 idx = zc->nextToUpdate;
+
+ while(idx < target)
+ idx += ZSTD_insertBt1(zc, base+idx, mls, iend, nbCompares, 0);
+}
+
+/** ZSTD_BtFindBestMatch() : Tree updater, providing best match */
+static size_t ZSTD_BtFindBestMatch (
+ ZSTD_CCtx* zc,
+ const BYTE* const ip, const BYTE* const iLimit,
+ size_t* offsetPtr,
+ const U32 maxNbAttempts, const U32 mls)
+{
+ if (ip < zc->base + zc->nextToUpdate) return 0; /* skipped area */
+ ZSTD_updateTree(zc, ip, iLimit, maxNbAttempts, mls);
+ return ZSTD_insertBtAndFindBestMatch(zc, ip, iLimit, offsetPtr, maxNbAttempts, mls, 0);
+}
+
+
+static size_t ZSTD_BtFindBestMatch_selectMLS (
+ ZSTD_CCtx* zc, /* Index table will be updated */
+ const BYTE* ip, const BYTE* const iLimit,
+ size_t* offsetPtr,
+ const U32 maxNbAttempts, const U32 matchLengthSearch)
+{
+ switch(matchLengthSearch)
+ {
+ default : /* includes case 3 */
+ case 4 : return ZSTD_BtFindBestMatch(zc, ip, iLimit, offsetPtr, maxNbAttempts, 4);
+ case 5 : return ZSTD_BtFindBestMatch(zc, ip, iLimit, offsetPtr, maxNbAttempts, 5);
+ case 7 :
+ case 6 : return ZSTD_BtFindBestMatch(zc, ip, iLimit, offsetPtr, maxNbAttempts, 6);
+ }
+}
+
+
+void ZSTD_updateTree_extDict(ZSTD_CCtx* zc, const BYTE* const ip, const BYTE* const iend, const U32 nbCompares, const U32 mls)
+{
+ const BYTE* const base = zc->base;
+ const U32 target = (U32)(ip - base);
+ U32 idx = zc->nextToUpdate;
+
+ while (idx < target) idx += ZSTD_insertBt1(zc, base+idx, mls, iend, nbCompares, 1);
+}
+
+
+/** Tree updater, providing best match */
+static size_t ZSTD_BtFindBestMatch_extDict (
+ ZSTD_CCtx* zc,
+ const BYTE* const ip, const BYTE* const iLimit,
+ size_t* offsetPtr,
+ const U32 maxNbAttempts, const U32 mls)
+{
+ if (ip < zc->base + zc->nextToUpdate) return 0; /* skipped area */
+ ZSTD_updateTree_extDict(zc, ip, iLimit, maxNbAttempts, mls);
+ return ZSTD_insertBtAndFindBestMatch(zc, ip, iLimit, offsetPtr, maxNbAttempts, mls, 1);
+}
+
+
+static size_t ZSTD_BtFindBestMatch_selectMLS_extDict (
+ ZSTD_CCtx* zc, /* Index table will be updated */
+ const BYTE* ip, const BYTE* const iLimit,
+ size_t* offsetPtr,
+ const U32 maxNbAttempts, const U32 matchLengthSearch)
+{
+ switch(matchLengthSearch)
+ {
+ default : /* includes case 3 */
+ case 4 : return ZSTD_BtFindBestMatch_extDict(zc, ip, iLimit, offsetPtr, maxNbAttempts, 4);
+ case 5 : return ZSTD_BtFindBestMatch_extDict(zc, ip, iLimit, offsetPtr, maxNbAttempts, 5);
+ case 7 :
+ case 6 : return ZSTD_BtFindBestMatch_extDict(zc, ip, iLimit, offsetPtr, maxNbAttempts, 6);
+ }
+}
+
+
+
+/* *********************************
+* Hash Chain
+***********************************/
+#define NEXT_IN_CHAIN(d, mask) chainTable[(d) & mask]
+
+/* Update chains up to ip (excluded)
+ Assumption : always within prefix (i.e. not within extDict) */
+U32 ZSTD_insertAndFindFirstIndex (ZSTD_CCtx* zc, const BYTE* ip, U32 mls)
+{
+ U32* const hashTable = zc->hashTable;
+ const U32 hashLog = zc->appliedParams.cParams.hashLog;
+ U32* const chainTable = zc->chainTable;
+ const U32 chainMask = (1 << zc->appliedParams.cParams.chainLog) - 1;
+ const BYTE* const base = zc->base;
+ const U32 target = (U32)(ip - base);
+ U32 idx = zc->nextToUpdate;
+
+ while(idx < target) { /* catch up */
+ size_t const h = ZSTD_hashPtr(base+idx, hashLog, mls);
+ NEXT_IN_CHAIN(idx, chainMask) = hashTable[h];
+ hashTable[h] = idx;
+ idx++;
+ }
+
+ zc->nextToUpdate = target;
+ return hashTable[ZSTD_hashPtr(ip, hashLog, mls)];
+}
+
+
+/* inlining is important to hardwire a hot branch (template emulation) */
+FORCE_INLINE_TEMPLATE
+size_t ZSTD_HcFindBestMatch_generic (
+ ZSTD_CCtx* zc, /* Index table will be updated */
+ const BYTE* const ip, const BYTE* const iLimit,
+ size_t* offsetPtr,
+ const U32 maxNbAttempts, const U32 mls, const U32 extDict)
+{
+ U32* const chainTable = zc->chainTable;
+ const U32 chainSize = (1 << zc->appliedParams.cParams.chainLog);
+ const U32 chainMask = chainSize-1;
+ const BYTE* const base = zc->base;
+ const BYTE* const dictBase = zc->dictBase;
+ const U32 dictLimit = zc->dictLimit;
+ const BYTE* const prefixStart = base + dictLimit;
+ const BYTE* const dictEnd = dictBase + dictLimit;
+ const U32 lowLimit = zc->lowLimit;
+ const U32 current = (U32)(ip-base);
+ const U32 minChain = current > chainSize ? current - chainSize : 0;
+ int nbAttempts=maxNbAttempts;
+ size_t ml=4-1;
+
+ /* HC4 match finder */
+ U32 matchIndex = ZSTD_insertAndFindFirstIndex (zc, ip, mls);
+
+ for ( ; (matchIndex>lowLimit) & (nbAttempts>0) ; nbAttempts--) {
+ const BYTE* match;
+ size_t currentMl=0;
+ if ((!extDict) || matchIndex >= dictLimit) {
+ match = base + matchIndex;
+ if (match[ml] == ip[ml]) /* potentially better */
+ currentMl = ZSTD_count(ip, match, iLimit);
+ } else {
+ match = dictBase + matchIndex;
+ if (MEM_read32(match) == MEM_read32(ip)) /* assumption : matchIndex <= dictLimit-4 (by table construction) */
+ currentMl = ZSTD_count_2segments(ip+4, match+4, iLimit, dictEnd, prefixStart) + 4;
+ }
+
+ /* save best solution */
+ if (currentMl > ml) {
+ ml = currentMl;
+ *offsetPtr = current - matchIndex + ZSTD_REP_MOVE;
+ if (ip+currentMl == iLimit) break; /* best possible, avoids read overflow on next attempt */
+ }
+
+ if (matchIndex <= minChain) break;
+ matchIndex = NEXT_IN_CHAIN(matchIndex, chainMask);
+ }
+
+ return ml;
+}
+
+
+FORCE_INLINE_TEMPLATE size_t ZSTD_HcFindBestMatch_selectMLS (
+ ZSTD_CCtx* zc,
+ const BYTE* ip, const BYTE* const iLimit,
+ size_t* offsetPtr,
+ const U32 maxNbAttempts, const U32 matchLengthSearch)
+{
+ switch(matchLengthSearch)
+ {
+ default : /* includes case 3 */
+ case 4 : return ZSTD_HcFindBestMatch_generic(zc, ip, iLimit, offsetPtr, maxNbAttempts, 4, 0);
+ case 5 : return ZSTD_HcFindBestMatch_generic(zc, ip, iLimit, offsetPtr, maxNbAttempts, 5, 0);
+ case 7 :
+ case 6 : return ZSTD_HcFindBestMatch_generic(zc, ip, iLimit, offsetPtr, maxNbAttempts, 6, 0);
+ }
+}
+
+
+FORCE_INLINE_TEMPLATE size_t ZSTD_HcFindBestMatch_extDict_selectMLS (
+ ZSTD_CCtx* zc,
+ const BYTE* ip, const BYTE* const iLimit,
+ size_t* offsetPtr,
+ const U32 maxNbAttempts, const U32 matchLengthSearch)
+{
+ switch(matchLengthSearch)
+ {
+ default : /* includes case 3 */
+ case 4 : return ZSTD_HcFindBestMatch_generic(zc, ip, iLimit, offsetPtr, maxNbAttempts, 4, 1);
+ case 5 : return ZSTD_HcFindBestMatch_generic(zc, ip, iLimit, offsetPtr, maxNbAttempts, 5, 1);
+ case 7 :
+ case 6 : return ZSTD_HcFindBestMatch_generic(zc, ip, iLimit, offsetPtr, maxNbAttempts, 6, 1);
+ }
+}
+
+
+/* *******************************
+* Common parser - lazy strategy
+*********************************/
+FORCE_INLINE_TEMPLATE
+size_t ZSTD_compressBlock_lazy_generic(ZSTD_CCtx* ctx,
+ const void* src, size_t srcSize,
+ const U32 searchMethod, const U32 depth)
+{
+ seqStore_t* seqStorePtr = &(ctx->seqStore);
+ const BYTE* const istart = (const BYTE*)src;
+ const BYTE* ip = istart;
+ const BYTE* anchor = istart;
+ const BYTE* const iend = istart + srcSize;
+ const BYTE* const ilimit = iend - 8;
+ const BYTE* const base = ctx->base + ctx->dictLimit;
+
+ U32 const maxSearches = 1 << ctx->appliedParams.cParams.searchLog;
+ U32 const mls = ctx->appliedParams.cParams.searchLength;
+
+ typedef size_t (*searchMax_f)(ZSTD_CCtx* zc, const BYTE* ip, const BYTE* iLimit,
+ size_t* offsetPtr,
+ U32 maxNbAttempts, U32 matchLengthSearch);
+ searchMax_f const searchMax = searchMethod ? ZSTD_BtFindBestMatch_selectMLS : ZSTD_HcFindBestMatch_selectMLS;
+ U32 offset_1 = seqStorePtr->rep[0], offset_2 = seqStorePtr->rep[1], savedOffset=0;
+
+ /* init */
+ ip += (ip==base);
+ ctx->nextToUpdate3 = ctx->nextToUpdate;
+ { U32 const maxRep = (U32)(ip-base);
+ if (offset_2 > maxRep) savedOffset = offset_2, offset_2 = 0;
+ if (offset_1 > maxRep) savedOffset = offset_1, offset_1 = 0;
+ }
+
+ /* Match Loop */
+ while (ip < ilimit) {
+ size_t matchLength=0;
+ size_t offset=0;
+ const BYTE* start=ip+1;
+
+ /* check repCode */
+ if ((offset_1>0) & (MEM_read32(ip+1) == MEM_read32(ip+1 - offset_1))) {
+ /* repcode : we take it */
+ matchLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4;
+ if (depth==0) goto _storeSequence;
+ }
+
+ /* first search (depth 0) */
+ { size_t offsetFound = 99999999;
+ size_t const ml2 = searchMax(ctx, ip, iend, &offsetFound, maxSearches, mls);
+ if (ml2 > matchLength)
+ matchLength = ml2, start = ip, offset=offsetFound;
+ }
+
+ if (matchLength < 4) {
+ ip += ((ip-anchor) >> g_searchStrength) + 1; /* jump faster over incompressible sections */
+ continue;
+ }
+
+ /* let's try to find a better solution */
+ if (depth>=1)
+ while (ip<ilimit) {
+ ip ++;
+ if ((offset) && ((offset_1>0) & (MEM_read32(ip) == MEM_read32(ip - offset_1)))) {
+ size_t const mlRep = ZSTD_count(ip+4, ip+4-offset_1, iend) + 4;
+ int const gain2 = (int)(mlRep * 3);
+ int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offset+1) + 1);
+ if ((mlRep >= 4) && (gain2 > gain1))
+ matchLength = mlRep, offset = 0, start = ip;
+ }
+ { size_t offset2=99999999;
+ size_t const ml2 = searchMax(ctx, ip, iend, &offset2, maxSearches, mls);
+ int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)offset2+1)); /* raw approx */
+ int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 4);
+ if ((ml2 >= 4) && (gain2 > gain1)) {
+ matchLength = ml2, offset = offset2, start = ip;
+ continue; /* search a better one */
+ } }
+
+ /* let's find an even better one */
+ if ((depth==2) && (ip<ilimit)) {
+ ip ++;
+ if ((offset) && ((offset_1>0) & (MEM_read32(ip) == MEM_read32(ip - offset_1)))) {
+ size_t const ml2 = ZSTD_count(ip+4, ip+4-offset_1, iend) + 4;
+ int const gain2 = (int)(ml2 * 4);
+ int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 1);
+ if ((ml2 >= 4) && (gain2 > gain1))
+ matchLength = ml2, offset = 0, start = ip;
+ }
+ { size_t offset2=99999999;
+ size_t const ml2 = searchMax(ctx, ip, iend, &offset2, maxSearches, mls);
+ int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)offset2+1)); /* raw approx */
+ int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 7);
+ if ((ml2 >= 4) && (gain2 > gain1)) {
+ matchLength = ml2, offset = offset2, start = ip;
+ continue;
+ } } }
+ break; /* nothing found : store previous solution */
+ }
+
+ /* NOTE:
+ * start[-offset+ZSTD_REP_MOVE-1] is undefined behavior.
+ * (-offset+ZSTD_REP_MOVE-1) is unsigned, and is added to start, which
+ * overflows the pointer, which is undefined behavior.
+ */
+ /* catch up */
+ if (offset) {
+ while ( (start > anchor)
+ && (start > base+offset-ZSTD_REP_MOVE)
+ && (start[-1] == (start-offset+ZSTD_REP_MOVE)[-1]) ) /* only search for offset within prefix */
+ { start--; matchLength++; }
+ offset_2 = offset_1; offset_1 = (U32)(offset - ZSTD_REP_MOVE);
+ }
+ /* store sequence */
+_storeSequence:
+ { size_t const litLength = start - anchor;
+ ZSTD_storeSeq(seqStorePtr, litLength, anchor, (U32)offset, matchLength-MINMATCH);
+ anchor = ip = start + matchLength;
+ }
+
+ /* check immediate repcode */
+ while ( (ip <= ilimit)
+ && ((offset_2>0)
+ & (MEM_read32(ip) == MEM_read32(ip - offset_2)) )) {
+ /* store sequence */
+ matchLength = ZSTD_count(ip+4, ip+4-offset_2, iend) + 4;
+ offset = offset_2; offset_2 = offset_1; offset_1 = (U32)offset; /* swap repcodes */
+ ZSTD_storeSeq(seqStorePtr, 0, anchor, 0, matchLength-MINMATCH);
+ ip += matchLength;
+ anchor = ip;
+ continue; /* faster when present ... (?) */
+ } }
+
+ /* Save reps for next block */
+ seqStorePtr->repToConfirm[0] = offset_1 ? offset_1 : savedOffset;
+ seqStorePtr->repToConfirm[1] = offset_2 ? offset_2 : savedOffset;
+
+ /* Return the last literals size */
+ return iend - anchor;
+}
+
+
+size_t ZSTD_compressBlock_btlazy2(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
+{
+ return ZSTD_compressBlock_lazy_generic(ctx, src, srcSize, 1, 2);
+}
+
+size_t ZSTD_compressBlock_lazy2(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
+{
+ return ZSTD_compressBlock_lazy_generic(ctx, src, srcSize, 0, 2);
+}
+
+size_t ZSTD_compressBlock_lazy(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
+{
+ return ZSTD_compressBlock_lazy_generic(ctx, src, srcSize, 0, 1);
+}
+
+size_t ZSTD_compressBlock_greedy(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
+{
+ return ZSTD_compressBlock_lazy_generic(ctx, src, srcSize, 0, 0);
+}
+
+
+FORCE_INLINE_TEMPLATE
+size_t ZSTD_compressBlock_lazy_extDict_generic(ZSTD_CCtx* ctx,
+ const void* src, size_t srcSize,
+ const U32 searchMethod, const U32 depth)
+{
+ seqStore_t* seqStorePtr = &(ctx->seqStore);
+ const BYTE* const istart = (const BYTE*)src;
+ const BYTE* ip = istart;
+ const BYTE* anchor = istart;
+ const BYTE* const iend = istart + srcSize;
+ const BYTE* const ilimit = iend - 8;
+ const BYTE* const base = ctx->base;
+ const U32 dictLimit = ctx->dictLimit;
+ const U32 lowestIndex = ctx->lowLimit;
+ const BYTE* const prefixStart = base + dictLimit;
+ const BYTE* const dictBase = ctx->dictBase;
+ const BYTE* const dictEnd = dictBase + dictLimit;
+ const BYTE* const dictStart = dictBase + ctx->lowLimit;
+
+ const U32 maxSearches = 1 << ctx->appliedParams.cParams.searchLog;
+ const U32 mls = ctx->appliedParams.cParams.searchLength;
+
+ typedef size_t (*searchMax_f)(ZSTD_CCtx* zc, const BYTE* ip, const BYTE* iLimit,
+ size_t* offsetPtr,
+ U32 maxNbAttempts, U32 matchLengthSearch);
+ searchMax_f searchMax = searchMethod ? ZSTD_BtFindBestMatch_selectMLS_extDict : ZSTD_HcFindBestMatch_extDict_selectMLS;
+
+ U32 offset_1 = seqStorePtr->rep[0], offset_2 = seqStorePtr->rep[1];
+
+ /* init */
+ ctx->nextToUpdate3 = ctx->nextToUpdate;
+ ip += (ip == prefixStart);
+
+ /* Match Loop */
+ while (ip < ilimit) {
+ size_t matchLength=0;
+ size_t offset=0;
+ const BYTE* start=ip+1;
+ U32 current = (U32)(ip-base);
+
+ /* check repCode */
+ { const U32 repIndex = (U32)(current+1 - offset_1);
+ const BYTE* const repBase = repIndex < dictLimit ? dictBase : base;
+ const BYTE* const repMatch = repBase + repIndex;
+ if (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex > lowestIndex)) /* intentional overflow */
+ if (MEM_read32(ip+1) == MEM_read32(repMatch)) {
+ /* repcode detected we should take it */
+ const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend;
+ matchLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repEnd, prefixStart) + 4;
+ if (depth==0) goto _storeSequence;
+ } }
+
+ /* first search (depth 0) */
+ { size_t offsetFound = 99999999;
+ size_t const ml2 = searchMax(ctx, ip, iend, &offsetFound, maxSearches, mls);
+ if (ml2 > matchLength)
+ matchLength = ml2, start = ip, offset=offsetFound;
+ }
+
+ if (matchLength < 4) {
+ ip += ((ip-anchor) >> g_searchStrength) + 1; /* jump faster over incompressible sections */
+ continue;
+ }
+
+ /* let's try to find a better solution */
+ if (depth>=1)
+ while (ip<ilimit) {
+ ip ++;
+ current++;
+ /* check repCode */
+ if (offset) {
+ const U32 repIndex = (U32)(current - offset_1);
+ const BYTE* const repBase = repIndex < dictLimit ? dictBase : base;
+ const BYTE* const repMatch = repBase + repIndex;
+ if (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex > lowestIndex)) /* intentional overflow */
+ if (MEM_read32(ip) == MEM_read32(repMatch)) {
+ /* repcode detected */
+ const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend;
+ size_t const repLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd, prefixStart) + 4;
+ int const gain2 = (int)(repLength * 3);
+ int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offset+1) + 1);
+ if ((repLength >= 4) && (gain2 > gain1))
+ matchLength = repLength, offset = 0, start = ip;
+ } }
+
+ /* search match, depth 1 */
+ { size_t offset2=99999999;
+ size_t const ml2 = searchMax(ctx, ip, iend, &offset2, maxSearches, mls);
+ int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)offset2+1)); /* raw approx */
+ int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 4);
+ if ((ml2 >= 4) && (gain2 > gain1)) {
+ matchLength = ml2, offset = offset2, start = ip;
+ continue; /* search a better one */
+ } }
+
+ /* let's find an even better one */
+ if ((depth==2) && (ip<ilimit)) {
+ ip ++;
+ current++;
+ /* check repCode */
+ if (offset) {
+ const U32 repIndex = (U32)(current - offset_1);
+ const BYTE* const repBase = repIndex < dictLimit ? dictBase : base;
+ const BYTE* const repMatch = repBase + repIndex;
+ if (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex > lowestIndex)) /* intentional overflow */
+ if (MEM_read32(ip) == MEM_read32(repMatch)) {
+ /* repcode detected */
+ const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend;
+ size_t const repLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd, prefixStart) + 4;
+ int const gain2 = (int)(repLength * 4);
+ int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 1);
+ if ((repLength >= 4) && (gain2 > gain1))
+ matchLength = repLength, offset = 0, start = ip;
+ } }
+
+ /* search match, depth 2 */
+ { size_t offset2=99999999;
+ size_t const ml2 = searchMax(ctx, ip, iend, &offset2, maxSearches, mls);
+ int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)offset2+1)); /* raw approx */
+ int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 7);
+ if ((ml2 >= 4) && (gain2 > gain1)) {
+ matchLength = ml2, offset = offset2, start = ip;
+ continue;
+ } } }
+ break; /* nothing found : store previous solution */
+ }
+
+ /* catch up */
+ if (offset) {
+ U32 const matchIndex = (U32)((start-base) - (offset - ZSTD_REP_MOVE));
+ const BYTE* match = (matchIndex < dictLimit) ? dictBase + matchIndex : base + matchIndex;
+ const BYTE* const mStart = (matchIndex < dictLimit) ? dictStart : prefixStart;
+ while ((start>anchor) && (match>mStart) && (start[-1] == match[-1])) { start--; match--; matchLength++; } /* catch up */
+ offset_2 = offset_1; offset_1 = (U32)(offset - ZSTD_REP_MOVE);
+ }
+
+ /* store sequence */
+_storeSequence:
+ { size_t const litLength = start - anchor;
+ ZSTD_storeSeq(seqStorePtr, litLength, anchor, (U32)offset, matchLength-MINMATCH);
+ anchor = ip = start + matchLength;
+ }
+
+ /* check immediate repcode */
+ while (ip <= ilimit) {
+ const U32 repIndex = (U32)((ip-base) - offset_2);
+ const BYTE* const repBase = repIndex < dictLimit ? dictBase : base;
+ const BYTE* const repMatch = repBase + repIndex;
+ if (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex > lowestIndex)) /* intentional overflow */
+ if (MEM_read32(ip) == MEM_read32(repMatch)) {
+ /* repcode detected we should take it */
+ const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend;
+ matchLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd, prefixStart) + 4;
+ offset = offset_2; offset_2 = offset_1; offset_1 = (U32)offset; /* swap offset history */
+ ZSTD_storeSeq(seqStorePtr, 0, anchor, 0, matchLength-MINMATCH);
+ ip += matchLength;
+ anchor = ip;
+ continue; /* faster when present ... (?) */
+ }
+ break;
+ } }
+
+ /* Save reps for next block */
+ seqStorePtr->repToConfirm[0] = offset_1; seqStorePtr->repToConfirm[1] = offset_2;
+
+ /* Return the last literals size */
+ return iend - anchor;
+}
+
+
+size_t ZSTD_compressBlock_greedy_extDict(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
+{
+ return ZSTD_compressBlock_lazy_extDict_generic(ctx, src, srcSize, 0, 0);
+}
+
+size_t ZSTD_compressBlock_lazy_extDict(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
+{
+ return ZSTD_compressBlock_lazy_extDict_generic(ctx, src, srcSize, 0, 1);
+}
+
+size_t ZSTD_compressBlock_lazy2_extDict(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
+{
+ return ZSTD_compressBlock_lazy_extDict_generic(ctx, src, srcSize, 0, 2);
+}
+
+size_t ZSTD_compressBlock_btlazy2_extDict(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
+{
+ return ZSTD_compressBlock_lazy_extDict_generic(ctx, src, srcSize, 1, 2);
+}
diff --git a/thirdparty/zstd/compress/zstd_lazy.h b/thirdparty/zstd/compress/zstd_lazy.h
new file mode 100644
index 0000000000..a9c4daed25
--- /dev/null
+++ b/thirdparty/zstd/compress/zstd_lazy.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under both the BSD-style license (found in the
+ * LICENSE file in the root directory of this source tree) and the GPLv2 (found
+ * in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
+ */
+
+#ifndef ZSTD_LAZY_H
+#define ZSTD_LAZY_H
+
+#include "zstd_compress.h"
+
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
+U32 ZSTD_insertAndFindFirstIndex (ZSTD_CCtx* zc, const BYTE* ip, U32 mls);
+void ZSTD_updateTree(ZSTD_CCtx* zc, const BYTE* const ip, const BYTE* const iend, const U32 nbCompares, const U32 mls);
+void ZSTD_updateTree_extDict(ZSTD_CCtx* zc, const BYTE* const ip, const BYTE* const iend, const U32 nbCompares, const U32 mls);
+
+size_t ZSTD_compressBlock_btlazy2(ZSTD_CCtx* ctx, const void* src, size_t srcSize);
+size_t ZSTD_compressBlock_lazy2(ZSTD_CCtx* ctx, const void* src, size_t srcSize);
+size_t ZSTD_compressBlock_lazy(ZSTD_CCtx* ctx, const void* src, size_t srcSize);
+size_t ZSTD_compressBlock_greedy(ZSTD_CCtx* ctx, const void* src, size_t srcSize);
+
+size_t ZSTD_compressBlock_greedy_extDict(ZSTD_CCtx* ctx, const void* src, size_t srcSize);
+size_t ZSTD_compressBlock_lazy_extDict(ZSTD_CCtx* ctx, const void* src, size_t srcSize);
+size_t ZSTD_compressBlock_lazy2_extDict(ZSTD_CCtx* ctx, const void* src, size_t srcSize);
+size_t ZSTD_compressBlock_btlazy2_extDict(ZSTD_CCtx* ctx, const void* src, size_t srcSize);
+
+#if defined (__cplusplus)
+}
+#endif
+
+#endif /* ZSTD_LAZY_H */
diff --git a/thirdparty/zstd/compress/zstd_ldm.c b/thirdparty/zstd/compress/zstd_ldm.c
new file mode 100644
index 0000000000..be50872cf7
--- /dev/null
+++ b/thirdparty/zstd/compress/zstd_ldm.c
@@ -0,0 +1,707 @@
+/*
+ * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under both the BSD-style license (found in the
+ * LICENSE file in the root directory of this source tree) and the GPLv2 (found
+ * in the COPYING file in the root directory of this source tree).
+ */
+
+#include "zstd_ldm.h"
+
+#include "zstd_fast.h" /* ZSTD_fillHashTable() */
+#include "zstd_double_fast.h" /* ZSTD_fillDoubleHashTable() */
+
+#define LDM_BUCKET_SIZE_LOG 3
+#define LDM_MIN_MATCH_LENGTH 64
+#define LDM_HASH_RLOG 7
+#define LDM_HASH_CHAR_OFFSET 10
+
+size_t ZSTD_ldm_initializeParameters(ldmParams_t* params, U32 enableLdm)
+{
+ ZSTD_STATIC_ASSERT(LDM_BUCKET_SIZE_LOG <= ZSTD_LDM_BUCKETSIZELOG_MAX);
+ params->enableLdm = enableLdm>0;
+ params->hashLog = 0;
+ params->bucketSizeLog = LDM_BUCKET_SIZE_LOG;
+ params->minMatchLength = LDM_MIN_MATCH_LENGTH;
+ params->hashEveryLog = ZSTD_LDM_HASHEVERYLOG_NOTSET;
+ return 0;
+}
+
+void ZSTD_ldm_adjustParameters(ldmParams_t* params, U32 windowLog)
+{
+ if (params->hashLog == 0) {
+ params->hashLog = MAX(ZSTD_HASHLOG_MIN, windowLog - LDM_HASH_RLOG);
+ assert(params->hashLog <= ZSTD_HASHLOG_MAX);
+ }
+ if (params->hashEveryLog == ZSTD_LDM_HASHEVERYLOG_NOTSET) {
+ params->hashEveryLog =
+ windowLog < params->hashLog ? 0 : windowLog - params->hashLog;
+ }
+ params->bucketSizeLog = MIN(params->bucketSizeLog, params->hashLog);
+}
+
+size_t ZSTD_ldm_getTableSize(U32 hashLog, U32 bucketSizeLog) {
+ size_t const ldmHSize = ((size_t)1) << hashLog;
+ size_t const ldmBucketSizeLog = MIN(bucketSizeLog, hashLog);
+ size_t const ldmBucketSize =
+ ((size_t)1) << (hashLog - ldmBucketSizeLog);
+ return ldmBucketSize + (ldmHSize * (sizeof(ldmEntry_t)));
+}
+
+/** ZSTD_ldm_getSmallHash() :
+ * numBits should be <= 32
+ * If numBits==0, returns 0.
+ * @return : the most significant numBits of value. */
+static U32 ZSTD_ldm_getSmallHash(U64 value, U32 numBits)
+{
+ assert(numBits <= 32);
+ return numBits == 0 ? 0 : (U32)(value >> (64 - numBits));
+}
+
+/** ZSTD_ldm_getChecksum() :
+ * numBitsToDiscard should be <= 32
+ * @return : the next most significant 32 bits after numBitsToDiscard */
+static U32 ZSTD_ldm_getChecksum(U64 hash, U32 numBitsToDiscard)
+{
+ assert(numBitsToDiscard <= 32);
+ return (hash >> (64 - 32 - numBitsToDiscard)) & 0xFFFFFFFF;
+}
+
+/** ZSTD_ldm_getTag() ;
+ * Given the hash, returns the most significant numTagBits bits
+ * after (32 + hbits) bits.
+ *
+ * If there are not enough bits remaining, return the last
+ * numTagBits bits. */
+static U32 ZSTD_ldm_getTag(U64 hash, U32 hbits, U32 numTagBits)
+{
+ assert(numTagBits < 32 && hbits <= 32);
+ if (32 - hbits < numTagBits) {
+ return hash & (((U32)1 << numTagBits) - 1);
+ } else {
+ return (hash >> (32 - hbits - numTagBits)) & (((U32)1 << numTagBits) - 1);
+ }
+}
+
+/** ZSTD_ldm_getBucket() :
+ * Returns a pointer to the start of the bucket associated with hash. */
+static ldmEntry_t* ZSTD_ldm_getBucket(
+ ldmState_t* ldmState, size_t hash, ldmParams_t const ldmParams)
+{
+ return ldmState->hashTable + (hash << ldmParams.bucketSizeLog);
+}
+
+/** ZSTD_ldm_insertEntry() :
+ * Insert the entry with corresponding hash into the hash table */
+static void ZSTD_ldm_insertEntry(ldmState_t* ldmState,
+ size_t const hash, const ldmEntry_t entry,
+ ldmParams_t const ldmParams)
+{
+ BYTE* const bucketOffsets = ldmState->bucketOffsets;
+ *(ZSTD_ldm_getBucket(ldmState, hash, ldmParams) + bucketOffsets[hash]) = entry;
+ bucketOffsets[hash]++;
+ bucketOffsets[hash] &= ((U32)1 << ldmParams.bucketSizeLog) - 1;
+}
+
+/** ZSTD_ldm_makeEntryAndInsertByTag() :
+ *
+ * Gets the small hash, checksum, and tag from the rollingHash.
+ *
+ * If the tag matches (1 << ldmParams.hashEveryLog)-1, then
+ * creates an ldmEntry from the offset, and inserts it into the hash table.
+ *
+ * hBits is the length of the small hash, which is the most significant hBits
+ * of rollingHash. The checksum is the next 32 most significant bits, followed
+ * by ldmParams.hashEveryLog bits that make up the tag. */
+static void ZSTD_ldm_makeEntryAndInsertByTag(ldmState_t* ldmState,
+ U64 const rollingHash,
+ U32 const hBits,
+ U32 const offset,
+ ldmParams_t const ldmParams)
+{
+ U32 const tag = ZSTD_ldm_getTag(rollingHash, hBits, ldmParams.hashEveryLog);
+ U32 const tagMask = ((U32)1 << ldmParams.hashEveryLog) - 1;
+ if (tag == tagMask) {
+ U32 const hash = ZSTD_ldm_getSmallHash(rollingHash, hBits);
+ U32 const checksum = ZSTD_ldm_getChecksum(rollingHash, hBits);
+ ldmEntry_t entry;
+ entry.offset = offset;
+ entry.checksum = checksum;
+ ZSTD_ldm_insertEntry(ldmState, hash, entry, ldmParams);
+ }
+}
+
+/** ZSTD_ldm_getRollingHash() :
+ * Get a 64-bit hash using the first len bytes from buf.
+ *
+ * Giving bytes s = s_1, s_2, ... s_k, the hash is defined to be
+ * H(s) = s_1*(a^(k-1)) + s_2*(a^(k-2)) + ... + s_k*(a^0)
+ *
+ * where the constant a is defined to be prime8bytes.
+ *
+ * The implementation adds an offset to each byte, so
+ * H(s) = (s_1 + HASH_CHAR_OFFSET)*(a^(k-1)) + ... */
+static U64 ZSTD_ldm_getRollingHash(const BYTE* buf, U32 len)
+{
+ U64 ret = 0;
+ U32 i;
+ for (i = 0; i < len; i++) {
+ ret *= prime8bytes;
+ ret += buf[i] + LDM_HASH_CHAR_OFFSET;
+ }
+ return ret;
+}
+
+/** ZSTD_ldm_ipow() :
+ * Return base^exp. */
+static U64 ZSTD_ldm_ipow(U64 base, U64 exp)
+{
+ U64 ret = 1;
+ while (exp) {
+ if (exp & 1) { ret *= base; }
+ exp >>= 1;
+ base *= base;
+ }
+ return ret;
+}
+
+U64 ZSTD_ldm_getHashPower(U32 minMatchLength) {
+ assert(minMatchLength >= ZSTD_LDM_MINMATCH_MIN);
+ return ZSTD_ldm_ipow(prime8bytes, minMatchLength - 1);
+}
+
+/** ZSTD_ldm_updateHash() :
+ * Updates hash by removing toRemove and adding toAdd. */
+static U64 ZSTD_ldm_updateHash(U64 hash, BYTE toRemove, BYTE toAdd, U64 hashPower)
+{
+ hash -= ((toRemove + LDM_HASH_CHAR_OFFSET) * hashPower);
+ hash *= prime8bytes;
+ hash += toAdd + LDM_HASH_CHAR_OFFSET;
+ return hash;
+}
+
+/** ZSTD_ldm_countBackwardsMatch() :
+ * Returns the number of bytes that match backwards before pIn and pMatch.
+ *
+ * We count only bytes where pMatch >= pBase and pIn >= pAnchor. */
+static size_t ZSTD_ldm_countBackwardsMatch(
+ const BYTE* pIn, const BYTE* pAnchor,
+ const BYTE* pMatch, const BYTE* pBase)
+{
+ size_t matchLength = 0;
+ while (pIn > pAnchor && pMatch > pBase && pIn[-1] == pMatch[-1]) {
+ pIn--;
+ pMatch--;
+ matchLength++;
+ }
+ return matchLength;
+}
+
+/** ZSTD_ldm_fillFastTables() :
+ *
+ * Fills the relevant tables for the ZSTD_fast and ZSTD_dfast strategies.
+ * This is similar to ZSTD_loadDictionaryContent.
+ *
+ * The tables for the other strategies are filled within their
+ * block compressors. */
+static size_t ZSTD_ldm_fillFastTables(ZSTD_CCtx* zc, const void* end)
+{
+ const BYTE* const iend = (const BYTE*)end;
+ const U32 mls = zc->appliedParams.cParams.searchLength;
+
+ switch(zc->appliedParams.cParams.strategy)
+ {
+ case ZSTD_fast:
+ ZSTD_fillHashTable(zc, iend, mls);
+ zc->nextToUpdate = (U32)(iend - zc->base);
+ break;
+
+ case ZSTD_dfast:
+ ZSTD_fillDoubleHashTable(zc, iend, mls);
+ zc->nextToUpdate = (U32)(iend - zc->base);
+ break;
+
+ case ZSTD_greedy:
+ case ZSTD_lazy:
+ case ZSTD_lazy2:
+ case ZSTD_btlazy2:
+ case ZSTD_btopt:
+ case ZSTD_btultra:
+ break;
+ default:
+ assert(0); /* not possible : not a valid strategy id */
+ }
+
+ return 0;
+}
+
+/** ZSTD_ldm_fillLdmHashTable() :
+ *
+ * Fills hashTable from (lastHashed + 1) to iend (non-inclusive).
+ * lastHash is the rolling hash that corresponds to lastHashed.
+ *
+ * Returns the rolling hash corresponding to position iend-1. */
+static U64 ZSTD_ldm_fillLdmHashTable(ldmState_t* state,
+ U64 lastHash, const BYTE* lastHashed,
+ const BYTE* iend, const BYTE* base,
+ U32 hBits, ldmParams_t const ldmParams)
+{
+ U64 rollingHash = lastHash;
+ const BYTE* cur = lastHashed + 1;
+
+ while (cur < iend) {
+ rollingHash = ZSTD_ldm_updateHash(rollingHash, cur[-1],
+ cur[ldmParams.minMatchLength-1],
+ state->hashPower);
+ ZSTD_ldm_makeEntryAndInsertByTag(state,
+ rollingHash, hBits,
+ (U32)(cur - base), ldmParams);
+ ++cur;
+ }
+ return rollingHash;
+}
+
+
+/** ZSTD_ldm_limitTableUpdate() :
+ *
+ * Sets cctx->nextToUpdate to a position corresponding closer to anchor
+ * if it is far way
+ * (after a long match, only update tables a limited amount). */
+static void ZSTD_ldm_limitTableUpdate(ZSTD_CCtx* cctx, const BYTE* anchor)
+{
+ U32 const current = (U32)(anchor - cctx->base);
+ if (current > cctx->nextToUpdate + 1024) {
+ cctx->nextToUpdate =
+ current - MIN(512, current - cctx->nextToUpdate - 1024);
+ }
+}
+
+typedef size_t (*ZSTD_blockCompressor) (ZSTD_CCtx* ctx, const void* src, size_t srcSize);
+/* defined in zstd_compress.c */
+ZSTD_blockCompressor ZSTD_selectBlockCompressor(ZSTD_strategy strat, int extDict);
+
+FORCE_INLINE_TEMPLATE
+size_t ZSTD_compressBlock_ldm_generic(ZSTD_CCtx* cctx,
+ const void* src, size_t srcSize)
+{
+ ldmState_t* const ldmState = &(cctx->ldmState);
+ const ldmParams_t ldmParams = cctx->appliedParams.ldmParams;
+ const U64 hashPower = ldmState->hashPower;
+ const U32 hBits = ldmParams.hashLog - ldmParams.bucketSizeLog;
+ const U32 ldmBucketSize = ((U32)1 << ldmParams.bucketSizeLog);
+ const U32 ldmTagMask = ((U32)1 << ldmParams.hashEveryLog) - 1;
+ seqStore_t* const seqStorePtr = &(cctx->seqStore);
+ const BYTE* const base = cctx->base;
+ const BYTE* const istart = (const BYTE*)src;
+ const BYTE* ip = istart;
+ const BYTE* anchor = istart;
+ const U32 lowestIndex = cctx->dictLimit;
+ const BYTE* const lowest = base + lowestIndex;
+ const BYTE* const iend = istart + srcSize;
+ const BYTE* const ilimit = iend - MAX(ldmParams.minMatchLength, HASH_READ_SIZE);
+
+ const ZSTD_blockCompressor blockCompressor =
+ ZSTD_selectBlockCompressor(cctx->appliedParams.cParams.strategy, 0);
+ U32* const repToConfirm = seqStorePtr->repToConfirm;
+ U32 savedRep[ZSTD_REP_NUM];
+ U64 rollingHash = 0;
+ const BYTE* lastHashed = NULL;
+ size_t i, lastLiterals;
+
+ /* Save seqStorePtr->rep and copy repToConfirm */
+ for (i = 0; i < ZSTD_REP_NUM; i++)
+ savedRep[i] = repToConfirm[i] = seqStorePtr->rep[i];
+
+ /* Main Search Loop */
+ while (ip < ilimit) { /* < instead of <=, because repcode check at (ip+1) */
+ size_t mLength;
+ U32 const current = (U32)(ip - base);
+ size_t forwardMatchLength = 0, backwardMatchLength = 0;
+ ldmEntry_t* bestEntry = NULL;
+ if (ip != istart) {
+ rollingHash = ZSTD_ldm_updateHash(rollingHash, lastHashed[0],
+ lastHashed[ldmParams.minMatchLength],
+ hashPower);
+ } else {
+ rollingHash = ZSTD_ldm_getRollingHash(ip, ldmParams.minMatchLength);
+ }
+ lastHashed = ip;
+
+ /* Do not insert and do not look for a match */
+ if (ZSTD_ldm_getTag(rollingHash, hBits, ldmParams.hashEveryLog) !=
+ ldmTagMask) {
+ ip++;
+ continue;
+ }
+
+ /* Get the best entry and compute the match lengths */
+ {
+ ldmEntry_t* const bucket =
+ ZSTD_ldm_getBucket(ldmState,
+ ZSTD_ldm_getSmallHash(rollingHash, hBits),
+ ldmParams);
+ ldmEntry_t* cur;
+ size_t bestMatchLength = 0;
+ U32 const checksum = ZSTD_ldm_getChecksum(rollingHash, hBits);
+
+ for (cur = bucket; cur < bucket + ldmBucketSize; ++cur) {
+ const BYTE* const pMatch = cur->offset + base;
+ size_t curForwardMatchLength, curBackwardMatchLength,
+ curTotalMatchLength;
+ if (cur->checksum != checksum || cur->offset <= lowestIndex) {
+ continue;
+ }
+
+ curForwardMatchLength = ZSTD_count(ip, pMatch, iend);
+ if (curForwardMatchLength < ldmParams.minMatchLength) {
+ continue;
+ }
+ curBackwardMatchLength = ZSTD_ldm_countBackwardsMatch(
+ ip, anchor, pMatch, lowest);
+ curTotalMatchLength = curForwardMatchLength +
+ curBackwardMatchLength;
+
+ if (curTotalMatchLength > bestMatchLength) {
+ bestMatchLength = curTotalMatchLength;
+ forwardMatchLength = curForwardMatchLength;
+ backwardMatchLength = curBackwardMatchLength;
+ bestEntry = cur;
+ }
+ }
+ }
+
+ /* No match found -- continue searching */
+ if (bestEntry == NULL) {
+ ZSTD_ldm_makeEntryAndInsertByTag(ldmState, rollingHash,
+ hBits, current,
+ ldmParams);
+ ip++;
+ continue;
+ }
+
+ /* Match found */
+ mLength = forwardMatchLength + backwardMatchLength;
+ ip -= backwardMatchLength;
+
+ /* Call the block compressor on the remaining literals */
+ {
+ U32 const matchIndex = bestEntry->offset;
+ const BYTE* const match = base + matchIndex - backwardMatchLength;
+ U32 const offset = (U32)(ip - match);
+
+ /* Overwrite rep codes */
+ for (i = 0; i < ZSTD_REP_NUM; i++)
+ seqStorePtr->rep[i] = repToConfirm[i];
+
+ /* Fill tables for block compressor */
+ ZSTD_ldm_limitTableUpdate(cctx, anchor);
+ ZSTD_ldm_fillFastTables(cctx, anchor);
+
+ /* Call block compressor and get remaining literals */
+ lastLiterals = blockCompressor(cctx, anchor, ip - anchor);
+ cctx->nextToUpdate = (U32)(ip - base);
+
+ /* Update repToConfirm with the new offset */
+ for (i = ZSTD_REP_NUM - 1; i > 0; i--)
+ repToConfirm[i] = repToConfirm[i-1];
+ repToConfirm[0] = offset;
+
+ /* Store the sequence with the leftover literals */
+ ZSTD_storeSeq(seqStorePtr, lastLiterals, ip - lastLiterals,
+ offset + ZSTD_REP_MOVE, mLength - MINMATCH);
+ }
+
+ /* Insert the current entry into the hash table */
+ ZSTD_ldm_makeEntryAndInsertByTag(ldmState, rollingHash, hBits,
+ (U32)(lastHashed - base),
+ ldmParams);
+
+ assert(ip + backwardMatchLength == lastHashed);
+
+ /* Fill the hash table from lastHashed+1 to ip+mLength*/
+ /* Heuristic: don't need to fill the entire table at end of block */
+ if (ip + mLength < ilimit) {
+ rollingHash = ZSTD_ldm_fillLdmHashTable(
+ ldmState, rollingHash, lastHashed,
+ ip + mLength, base, hBits, ldmParams);
+ lastHashed = ip + mLength - 1;
+ }
+ ip += mLength;
+ anchor = ip;
+ /* Check immediate repcode */
+ while ( (ip < ilimit)
+ && ( (repToConfirm[1] > 0) && (repToConfirm[1] <= (U32)(ip-lowest))
+ && (MEM_read32(ip) == MEM_read32(ip - repToConfirm[1])) )) {
+
+ size_t const rLength = ZSTD_count(ip+4, ip+4-repToConfirm[1],
+ iend) + 4;
+ /* Swap repToConfirm[1] <=> repToConfirm[0] */
+ {
+ U32 const tmpOff = repToConfirm[1];
+ repToConfirm[1] = repToConfirm[0];
+ repToConfirm[0] = tmpOff;
+ }
+
+ ZSTD_storeSeq(seqStorePtr, 0, anchor, 0, rLength-MINMATCH);
+
+ /* Fill the hash table from lastHashed+1 to ip+rLength*/
+ if (ip + rLength < ilimit) {
+ rollingHash = ZSTD_ldm_fillLdmHashTable(
+ ldmState, rollingHash, lastHashed,
+ ip + rLength, base, hBits, ldmParams);
+ lastHashed = ip + rLength - 1;
+ }
+ ip += rLength;
+ anchor = ip;
+ }
+ }
+
+ /* Overwrite rep */
+ for (i = 0; i < ZSTD_REP_NUM; i++)
+ seqStorePtr->rep[i] = repToConfirm[i];
+
+ ZSTD_ldm_limitTableUpdate(cctx, anchor);
+ ZSTD_ldm_fillFastTables(cctx, anchor);
+
+ lastLiterals = blockCompressor(cctx, anchor, iend - anchor);
+ cctx->nextToUpdate = (U32)(iend - base);
+
+ /* Restore seqStorePtr->rep */
+ for (i = 0; i < ZSTD_REP_NUM; i++)
+ seqStorePtr->rep[i] = savedRep[i];
+
+ /* Return the last literals size */
+ return lastLiterals;
+}
+
+size_t ZSTD_compressBlock_ldm(ZSTD_CCtx* ctx,
+ const void* src, size_t srcSize)
+{
+ return ZSTD_compressBlock_ldm_generic(ctx, src, srcSize);
+}
+
+static size_t ZSTD_compressBlock_ldm_extDict_generic(
+ ZSTD_CCtx* ctx,
+ const void* src, size_t srcSize)
+{
+ ldmState_t* const ldmState = &(ctx->ldmState);
+ const ldmParams_t ldmParams = ctx->appliedParams.ldmParams;
+ const U64 hashPower = ldmState->hashPower;
+ const U32 hBits = ldmParams.hashLog - ldmParams.bucketSizeLog;
+ const U32 ldmBucketSize = ((U32)1 << ldmParams.bucketSizeLog);
+ const U32 ldmTagMask = ((U32)1 << ldmParams.hashEveryLog) - 1;
+ seqStore_t* const seqStorePtr = &(ctx->seqStore);
+ const BYTE* const base = ctx->base;
+ const BYTE* const dictBase = ctx->dictBase;
+ const BYTE* const istart = (const BYTE*)src;
+ const BYTE* ip = istart;
+ const BYTE* anchor = istart;
+ const U32 lowestIndex = ctx->lowLimit;
+ const BYTE* const dictStart = dictBase + lowestIndex;
+ const U32 dictLimit = ctx->dictLimit;
+ const BYTE* const lowPrefixPtr = base + dictLimit;
+ const BYTE* const dictEnd = dictBase + dictLimit;
+ const BYTE* const iend = istart + srcSize;
+ const BYTE* const ilimit = iend - MAX(ldmParams.minMatchLength, HASH_READ_SIZE);
+
+ const ZSTD_blockCompressor blockCompressor =
+ ZSTD_selectBlockCompressor(ctx->appliedParams.cParams.strategy, 1);
+ U32* const repToConfirm = seqStorePtr->repToConfirm;
+ U32 savedRep[ZSTD_REP_NUM];
+ U64 rollingHash = 0;
+ const BYTE* lastHashed = NULL;
+ size_t i, lastLiterals;
+
+ /* Save seqStorePtr->rep and copy repToConfirm */
+ for (i = 0; i < ZSTD_REP_NUM; i++) {
+ savedRep[i] = repToConfirm[i] = seqStorePtr->rep[i];
+ }
+
+ /* Search Loop */
+ while (ip < ilimit) { /* < instead of <=, because (ip+1) */
+ size_t mLength;
+ const U32 current = (U32)(ip-base);
+ size_t forwardMatchLength = 0, backwardMatchLength = 0;
+ ldmEntry_t* bestEntry = NULL;
+ if (ip != istart) {
+ rollingHash = ZSTD_ldm_updateHash(rollingHash, lastHashed[0],
+ lastHashed[ldmParams.minMatchLength],
+ hashPower);
+ } else {
+ rollingHash = ZSTD_ldm_getRollingHash(ip, ldmParams.minMatchLength);
+ }
+ lastHashed = ip;
+
+ if (ZSTD_ldm_getTag(rollingHash, hBits, ldmParams.hashEveryLog) !=
+ ldmTagMask) {
+ /* Don't insert and don't look for a match */
+ ip++;
+ continue;
+ }
+
+ /* Get the best entry and compute the match lengths */
+ {
+ ldmEntry_t* const bucket =
+ ZSTD_ldm_getBucket(ldmState,
+ ZSTD_ldm_getSmallHash(rollingHash, hBits),
+ ldmParams);
+ ldmEntry_t* cur;
+ size_t bestMatchLength = 0;
+ U32 const checksum = ZSTD_ldm_getChecksum(rollingHash, hBits);
+
+ for (cur = bucket; cur < bucket + ldmBucketSize; ++cur) {
+ const BYTE* const curMatchBase =
+ cur->offset < dictLimit ? dictBase : base;
+ const BYTE* const pMatch = curMatchBase + cur->offset;
+ const BYTE* const matchEnd =
+ cur->offset < dictLimit ? dictEnd : iend;
+ const BYTE* const lowMatchPtr =
+ cur->offset < dictLimit ? dictStart : lowPrefixPtr;
+ size_t curForwardMatchLength, curBackwardMatchLength,
+ curTotalMatchLength;
+
+ if (cur->checksum != checksum || cur->offset <= lowestIndex) {
+ continue;
+ }
+
+ curForwardMatchLength = ZSTD_count_2segments(
+ ip, pMatch, iend,
+ matchEnd, lowPrefixPtr);
+ if (curForwardMatchLength < ldmParams.minMatchLength) {
+ continue;
+ }
+ curBackwardMatchLength = ZSTD_ldm_countBackwardsMatch(
+ ip, anchor, pMatch, lowMatchPtr);
+ curTotalMatchLength = curForwardMatchLength +
+ curBackwardMatchLength;
+
+ if (curTotalMatchLength > bestMatchLength) {
+ bestMatchLength = curTotalMatchLength;
+ forwardMatchLength = curForwardMatchLength;
+ backwardMatchLength = curBackwardMatchLength;
+ bestEntry = cur;
+ }
+ }
+ }
+
+ /* No match found -- continue searching */
+ if (bestEntry == NULL) {
+ ZSTD_ldm_makeEntryAndInsertByTag(ldmState, rollingHash, hBits,
+ (U32)(lastHashed - base),
+ ldmParams);
+ ip++;
+ continue;
+ }
+
+ /* Match found */
+ mLength = forwardMatchLength + backwardMatchLength;
+ ip -= backwardMatchLength;
+
+ /* Call the block compressor on the remaining literals */
+ {
+ /* ip = current - backwardMatchLength
+ * The match is at (bestEntry->offset - backwardMatchLength) */
+ U32 const matchIndex = bestEntry->offset;
+ U32 const offset = current - matchIndex;
+
+ /* Overwrite rep codes */
+ for (i = 0; i < ZSTD_REP_NUM; i++)
+ seqStorePtr->rep[i] = repToConfirm[i];
+
+ /* Fill the hash table for the block compressor */
+ ZSTD_ldm_limitTableUpdate(ctx, anchor);
+ ZSTD_ldm_fillFastTables(ctx, anchor);
+
+ /* Call block compressor and get remaining literals */
+ lastLiterals = blockCompressor(ctx, anchor, ip - anchor);
+ ctx->nextToUpdate = (U32)(ip - base);
+
+ /* Update repToConfirm with the new offset */
+ for (i = ZSTD_REP_NUM - 1; i > 0; i--)
+ repToConfirm[i] = repToConfirm[i-1];
+ repToConfirm[0] = offset;
+
+ /* Store the sequence with the leftover literals */
+ ZSTD_storeSeq(seqStorePtr, lastLiterals, ip - lastLiterals,
+ offset + ZSTD_REP_MOVE, mLength - MINMATCH);
+ }
+
+ /* Insert the current entry into the hash table */
+ ZSTD_ldm_makeEntryAndInsertByTag(ldmState, rollingHash, hBits,
+ (U32)(lastHashed - base),
+ ldmParams);
+
+ /* Fill the hash table from lastHashed+1 to ip+mLength */
+ assert(ip + backwardMatchLength == lastHashed);
+ if (ip + mLength < ilimit) {
+ rollingHash = ZSTD_ldm_fillLdmHashTable(
+ ldmState, rollingHash, lastHashed,
+ ip + mLength, base, hBits,
+ ldmParams);
+ lastHashed = ip + mLength - 1;
+ }
+ ip += mLength;
+ anchor = ip;
+
+ /* check immediate repcode */
+ while (ip < ilimit) {
+ U32 const current2 = (U32)(ip-base);
+ U32 const repIndex2 = current2 - repToConfirm[1];
+ const BYTE* repMatch2 = repIndex2 < dictLimit ?
+ dictBase + repIndex2 : base + repIndex2;
+ if ( (((U32)((dictLimit-1) - repIndex2) >= 3) &
+ (repIndex2 > lowestIndex)) /* intentional overflow */
+ && (MEM_read32(repMatch2) == MEM_read32(ip)) ) {
+ const BYTE* const repEnd2 = repIndex2 < dictLimit ?
+ dictEnd : iend;
+ size_t const repLength2 =
+ ZSTD_count_2segments(ip+4, repMatch2+4, iend,
+ repEnd2, lowPrefixPtr) + 4;
+
+ U32 tmpOffset = repToConfirm[1];
+ repToConfirm[1] = repToConfirm[0];
+ repToConfirm[0] = tmpOffset;
+
+ ZSTD_storeSeq(seqStorePtr, 0, anchor, 0, repLength2-MINMATCH);
+
+ /* Fill the hash table from lastHashed+1 to ip+repLength2*/
+ if (ip + repLength2 < ilimit) {
+ rollingHash = ZSTD_ldm_fillLdmHashTable(
+ ldmState, rollingHash, lastHashed,
+ ip + repLength2, base, hBits,
+ ldmParams);
+ lastHashed = ip + repLength2 - 1;
+ }
+ ip += repLength2;
+ anchor = ip;
+ continue;
+ }
+ break;
+ }
+ }
+
+ /* Overwrite rep */
+ for (i = 0; i < ZSTD_REP_NUM; i++)
+ seqStorePtr->rep[i] = repToConfirm[i];
+
+ ZSTD_ldm_limitTableUpdate(ctx, anchor);
+ ZSTD_ldm_fillFastTables(ctx, anchor);
+
+ /* Call the block compressor one last time on the last literals */
+ lastLiterals = blockCompressor(ctx, anchor, iend - anchor);
+ ctx->nextToUpdate = (U32)(iend - base);
+
+ /* Restore seqStorePtr->rep */
+ for (i = 0; i < ZSTD_REP_NUM; i++)
+ seqStorePtr->rep[i] = savedRep[i];
+
+ /* Return the last literals size */
+ return lastLiterals;
+}
+
+size_t ZSTD_compressBlock_ldm_extDict(ZSTD_CCtx* ctx,
+ const void* src, size_t srcSize)
+{
+ return ZSTD_compressBlock_ldm_extDict_generic(ctx, src, srcSize);
+}
diff --git a/thirdparty/zstd/compress/zstd_ldm.h b/thirdparty/zstd/compress/zstd_ldm.h
new file mode 100644
index 0000000000..d6d3d42c33
--- /dev/null
+++ b/thirdparty/zstd/compress/zstd_ldm.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under both the BSD-style license (found in the
+ * LICENSE file in the root directory of this source tree) and the GPLv2 (found
+ * in the COPYING file in the root directory of this source tree).
+ */
+
+#ifndef ZSTD_LDM_H
+#define ZSTD_LDM_H
+
+#include "zstd_compress.h"
+
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
+/*-*************************************
+* Long distance matching
+***************************************/
+
+#define ZSTD_LDM_DEFAULT_WINDOW_LOG ZSTD_WINDOWLOG_DEFAULTMAX
+#define ZSTD_LDM_HASHEVERYLOG_NOTSET 9999
+
+/** ZSTD_compressBlock_ldm_generic() :
+ *
+ * This is a block compressor intended for long distance matching.
+ *
+ * The function searches for matches of length at least
+ * ldmParams.minMatchLength using a hash table in cctx->ldmState.
+ * Matches can be at a distance of up to cParams.windowLog.
+ *
+ * Upon finding a match, the unmatched literals are compressed using a
+ * ZSTD_blockCompressor (depending on the strategy in the compression
+ * parameters), which stores the matched sequences. The "long distance"
+ * match is then stored with the remaining literals from the
+ * ZSTD_blockCompressor. */
+size_t ZSTD_compressBlock_ldm(ZSTD_CCtx* cctx, const void* src, size_t srcSize);
+size_t ZSTD_compressBlock_ldm_extDict(ZSTD_CCtx* ctx,
+ const void* src, size_t srcSize);
+
+/** ZSTD_ldm_initializeParameters() :
+ * Initialize the long distance matching parameters to their default values. */
+size_t ZSTD_ldm_initializeParameters(ldmParams_t* params, U32 enableLdm);
+
+/** ZSTD_ldm_getTableSize() :
+ * Estimate the space needed for long distance matching tables. */
+size_t ZSTD_ldm_getTableSize(U32 hashLog, U32 bucketSizeLog);
+
+/** ZSTD_ldm_getTableSize() :
+ * Return prime8bytes^(minMatchLength-1) */
+U64 ZSTD_ldm_getHashPower(U32 minMatchLength);
+
+/** ZSTD_ldm_adjustParameters() :
+ * If the params->hashEveryLog is not set, set it to its default value based on
+ * windowLog and params->hashLog.
+ *
+ * Ensures that params->bucketSizeLog is <= params->hashLog (setting it to
+ * params->hashLog if it is not). */
+void ZSTD_ldm_adjustParameters(ldmParams_t* params, U32 windowLog);
+
+#if defined (__cplusplus)
+}
+#endif
+
+#endif /* ZSTD_FAST_H */
diff --git a/thirdparty/zstd/compress/zstd_opt.c b/thirdparty/zstd/compress/zstd_opt.c
new file mode 100644
index 0000000000..c47ce23ad5
--- /dev/null
+++ b/thirdparty/zstd/compress/zstd_opt.c
@@ -0,0 +1,957 @@
+/*
+ * Copyright (c) 2016-present, Przemyslaw Skibinski, Yann Collet, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under both the BSD-style license (found in the
+ * LICENSE file in the root directory of this source tree) and the GPLv2 (found
+ * in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
+ */
+
+#include "zstd_opt.h"
+#include "zstd_lazy.h"
+
+
+#define ZSTD_LITFREQ_ADD 2
+#define ZSTD_FREQ_DIV 4
+#define ZSTD_MAX_PRICE (1<<30)
+
+/*-*************************************
+* Price functions for optimal parser
+***************************************/
+static void ZSTD_setLog2Prices(optState_t* optPtr)
+{
+ optPtr->log2matchLengthSum = ZSTD_highbit32(optPtr->matchLengthSum+1);
+ optPtr->log2litLengthSum = ZSTD_highbit32(optPtr->litLengthSum+1);
+ optPtr->log2litSum = ZSTD_highbit32(optPtr->litSum+1);
+ optPtr->log2offCodeSum = ZSTD_highbit32(optPtr->offCodeSum+1);
+ optPtr->factor = 1 + ((optPtr->litSum>>5) / optPtr->litLengthSum) + ((optPtr->litSum<<1) / (optPtr->litSum + optPtr->matchSum));
+}
+
+
+static void ZSTD_rescaleFreqs(optState_t* optPtr, const BYTE* src, size_t srcSize)
+{
+ unsigned u;
+
+ optPtr->cachedLiterals = NULL;
+ optPtr->cachedPrice = optPtr->cachedLitLength = 0;
+ optPtr->staticPrices = 0;
+
+ if (optPtr->litLengthSum == 0) {
+ if (srcSize <= 1024) optPtr->staticPrices = 1;
+
+ assert(optPtr->litFreq!=NULL);
+ for (u=0; u<=MaxLit; u++)
+ optPtr->litFreq[u] = 0;
+ for (u=0; u<srcSize; u++)
+ optPtr->litFreq[src[u]]++;
+
+ optPtr->litSum = 0;
+ optPtr->litLengthSum = MaxLL+1;
+ optPtr->matchLengthSum = MaxML+1;
+ optPtr->offCodeSum = (MaxOff+1);
+ optPtr->matchSum = (ZSTD_LITFREQ_ADD<<Litbits);
+
+ for (u=0; u<=MaxLit; u++) {
+ optPtr->litFreq[u] = 1 + (optPtr->litFreq[u]>>ZSTD_FREQ_DIV);
+ optPtr->litSum += optPtr->litFreq[u];
+ }
+ for (u=0; u<=MaxLL; u++)
+ optPtr->litLengthFreq[u] = 1;
+ for (u=0; u<=MaxML; u++)
+ optPtr->matchLengthFreq[u] = 1;
+ for (u=0; u<=MaxOff; u++)
+ optPtr->offCodeFreq[u] = 1;
+ } else {
+ optPtr->matchLengthSum = 0;
+ optPtr->litLengthSum = 0;
+ optPtr->offCodeSum = 0;
+ optPtr->matchSum = 0;
+ optPtr->litSum = 0;
+
+ for (u=0; u<=MaxLit; u++) {
+ optPtr->litFreq[u] = 1 + (optPtr->litFreq[u]>>(ZSTD_FREQ_DIV+1));
+ optPtr->litSum += optPtr->litFreq[u];
+ }
+ for (u=0; u<=MaxLL; u++) {
+ optPtr->litLengthFreq[u] = 1 + (optPtr->litLengthFreq[u]>>(ZSTD_FREQ_DIV+1));
+ optPtr->litLengthSum += optPtr->litLengthFreq[u];
+ }
+ for (u=0; u<=MaxML; u++) {
+ optPtr->matchLengthFreq[u] = 1 + (optPtr->matchLengthFreq[u]>>ZSTD_FREQ_DIV);
+ optPtr->matchLengthSum += optPtr->matchLengthFreq[u];
+ optPtr->matchSum += optPtr->matchLengthFreq[u] * (u + 3);
+ }
+ optPtr->matchSum *= ZSTD_LITFREQ_ADD;
+ for (u=0; u<=MaxOff; u++) {
+ optPtr->offCodeFreq[u] = 1 + (optPtr->offCodeFreq[u]>>ZSTD_FREQ_DIV);
+ optPtr->offCodeSum += optPtr->offCodeFreq[u];
+ }
+ }
+
+ ZSTD_setLog2Prices(optPtr);
+}
+
+
+static U32 ZSTD_getLiteralPrice(optState_t* optPtr, U32 litLength, const BYTE* literals)
+{
+ U32 price, u;
+
+ if (optPtr->staticPrices)
+ return ZSTD_highbit32((U32)litLength+1) + (litLength*6);
+
+ if (litLength == 0)
+ return optPtr->log2litLengthSum - ZSTD_highbit32(optPtr->litLengthFreq[0]+1);
+
+ /* literals */
+ if (optPtr->cachedLiterals == literals) {
+ U32 const additional = litLength - optPtr->cachedLitLength;
+ const BYTE* literals2 = optPtr->cachedLiterals + optPtr->cachedLitLength;
+ price = optPtr->cachedPrice + additional * optPtr->log2litSum;
+ for (u=0; u < additional; u++)
+ price -= ZSTD_highbit32(optPtr->litFreq[literals2[u]]+1);
+ optPtr->cachedPrice = price;
+ optPtr->cachedLitLength = litLength;
+ } else {
+ price = litLength * optPtr->log2litSum;
+ for (u=0; u < litLength; u++)
+ price -= ZSTD_highbit32(optPtr->litFreq[literals[u]]+1);
+
+ if (litLength >= 12) {
+ optPtr->cachedLiterals = literals;
+ optPtr->cachedPrice = price;
+ optPtr->cachedLitLength = litLength;
+ }
+ }
+
+ /* literal Length */
+ { const BYTE LL_deltaCode = 19;
+ const BYTE llCode = (litLength>63) ? (BYTE)ZSTD_highbit32(litLength) + LL_deltaCode : LL_Code[litLength];
+ price += LL_bits[llCode] + optPtr->log2litLengthSum - ZSTD_highbit32(optPtr->litLengthFreq[llCode]+1);
+ }
+
+ return price;
+}
+
+
+FORCE_INLINE_TEMPLATE U32 ZSTD_getPrice(optState_t* optPtr, U32 litLength, const BYTE* literals, U32 offset, U32 matchLength, const int ultra)
+{
+ /* offset */
+ U32 price;
+ BYTE const offCode = (BYTE)ZSTD_highbit32(offset+1);
+
+ if (optPtr->staticPrices)
+ return ZSTD_getLiteralPrice(optPtr, litLength, literals) + ZSTD_highbit32((U32)matchLength+1) + 16 + offCode;
+
+ price = offCode + optPtr->log2offCodeSum - ZSTD_highbit32(optPtr->offCodeFreq[offCode]+1);
+ if (!ultra && offCode >= 20) price += (offCode-19)*2;
+
+ /* match Length */
+ { const BYTE ML_deltaCode = 36;
+ const BYTE mlCode = (matchLength>127) ? (BYTE)ZSTD_highbit32(matchLength) + ML_deltaCode : ML_Code[matchLength];
+ price += ML_bits[mlCode] + optPtr->log2matchLengthSum - ZSTD_highbit32(optPtr->matchLengthFreq[mlCode]+1);
+ }
+
+ return price + ZSTD_getLiteralPrice(optPtr, litLength, literals) + optPtr->factor;
+}
+
+
+static void ZSTD_updatePrice(optState_t* optPtr, U32 litLength, const BYTE* literals, U32 offset, U32 matchLength)
+{
+ U32 u;
+
+ /* literals */
+ optPtr->litSum += litLength*ZSTD_LITFREQ_ADD;
+ for (u=0; u < litLength; u++)
+ optPtr->litFreq[literals[u]] += ZSTD_LITFREQ_ADD;
+
+ /* literal Length */
+ { const BYTE LL_deltaCode = 19;
+ const BYTE llCode = (litLength>63) ? (BYTE)ZSTD_highbit32(litLength) + LL_deltaCode : LL_Code[litLength];
+ optPtr->litLengthFreq[llCode]++;
+ optPtr->litLengthSum++;
+ }
+
+ /* match offset */
+ { BYTE const offCode = (BYTE)ZSTD_highbit32(offset+1);
+ optPtr->offCodeSum++;
+ optPtr->offCodeFreq[offCode]++;
+ }
+
+ /* match Length */
+ { const BYTE ML_deltaCode = 36;
+ const BYTE mlCode = (matchLength>127) ? (BYTE)ZSTD_highbit32(matchLength) + ML_deltaCode : ML_Code[matchLength];
+ optPtr->matchLengthFreq[mlCode]++;
+ optPtr->matchLengthSum++;
+ }
+
+ ZSTD_setLog2Prices(optPtr);
+}
+
+
+#define SET_PRICE(pos, mlen_, offset_, litlen_, price_) \
+ { \
+ while (last_pos < pos) { opt[last_pos+1].price = ZSTD_MAX_PRICE; last_pos++; } \
+ opt[pos].mlen = mlen_; \
+ opt[pos].off = offset_; \
+ opt[pos].litlen = litlen_; \
+ opt[pos].price = price_; \
+ }
+
+
+/* function safe only for comparisons */
+static U32 ZSTD_readMINMATCH(const void* memPtr, U32 length)
+{
+ switch (length)
+ {
+ default :
+ case 4 : return MEM_read32(memPtr);
+ case 3 : if (MEM_isLittleEndian())
+ return MEM_read32(memPtr)<<8;
+ else
+ return MEM_read32(memPtr)>>8;
+ }
+}
+
+
+/* Update hashTable3 up to ip (excluded)
+ Assumption : always within prefix (i.e. not within extDict) */
+static
+U32 ZSTD_insertAndFindFirstIndexHash3 (ZSTD_CCtx* zc, const BYTE* ip)
+{
+ U32* const hashTable3 = zc->hashTable3;
+ U32 const hashLog3 = zc->hashLog3;
+ const BYTE* const base = zc->base;
+ U32 idx = zc->nextToUpdate3;
+ const U32 target = zc->nextToUpdate3 = (U32)(ip - base);
+ const size_t hash3 = ZSTD_hash3Ptr(ip, hashLog3);
+
+ while(idx < target) {
+ hashTable3[ZSTD_hash3Ptr(base+idx, hashLog3)] = idx;
+ idx++;
+ }
+
+ return hashTable3[hash3];
+}
+
+
+/*-*************************************
+* Binary Tree search
+***************************************/
+static U32 ZSTD_insertBtAndGetAllMatches (
+ ZSTD_CCtx* zc,
+ const BYTE* const ip, const BYTE* const iLimit,
+ U32 nbCompares, const U32 mls,
+ U32 extDict, ZSTD_match_t* matches, const U32 minMatchLen)
+{
+ const BYTE* const base = zc->base;
+ const U32 current = (U32)(ip-base);
+ const U32 hashLog = zc->appliedParams.cParams.hashLog;
+ const size_t h = ZSTD_hashPtr(ip, hashLog, mls);
+ U32* const hashTable = zc->hashTable;
+ U32 matchIndex = hashTable[h];
+ U32* const bt = zc->chainTable;
+ const U32 btLog = zc->appliedParams.cParams.chainLog - 1;
+ const U32 btMask= (1U << btLog) - 1;
+ size_t commonLengthSmaller=0, commonLengthLarger=0;
+ const BYTE* const dictBase = zc->dictBase;
+ const U32 dictLimit = zc->dictLimit;
+ const BYTE* const dictEnd = dictBase + dictLimit;
+ const BYTE* const prefixStart = base + dictLimit;
+ const U32 btLow = btMask >= current ? 0 : current - btMask;
+ const U32 windowLow = zc->lowLimit;
+ U32* smallerPtr = bt + 2*(current&btMask);
+ U32* largerPtr = bt + 2*(current&btMask) + 1;
+ U32 matchEndIdx = current+8;
+ U32 dummy32; /* to be nullified at the end */
+ U32 mnum = 0;
+
+ const U32 minMatch = (mls == 3) ? 3 : 4;
+ size_t bestLength = minMatchLen-1;
+
+ if (minMatch == 3) { /* HC3 match finder */
+ U32 const matchIndex3 = ZSTD_insertAndFindFirstIndexHash3 (zc, ip);
+ if (matchIndex3>windowLow && (current - matchIndex3 < (1<<18))) {
+ const BYTE* match;
+ size_t currentMl=0;
+ if ((!extDict) || matchIndex3 >= dictLimit) {
+ match = base + matchIndex3;
+ if (match[bestLength] == ip[bestLength]) currentMl = ZSTD_count(ip, match, iLimit);
+ } else {
+ match = dictBase + matchIndex3;
+ if (ZSTD_readMINMATCH(match, MINMATCH) == ZSTD_readMINMATCH(ip, MINMATCH)) /* assumption : matchIndex3 <= dictLimit-4 (by table construction) */
+ currentMl = ZSTD_count_2segments(ip+MINMATCH, match+MINMATCH, iLimit, dictEnd, prefixStart) + MINMATCH;
+ }
+
+ /* save best solution */
+ if (currentMl > bestLength) {
+ bestLength = currentMl;
+ matches[mnum].off = ZSTD_REP_MOVE_OPT + current - matchIndex3;
+ matches[mnum].len = (U32)currentMl;
+ mnum++;
+ if (currentMl > ZSTD_OPT_NUM) goto update;
+ if (ip+currentMl == iLimit) goto update; /* best possible, and avoid read overflow*/
+ }
+ }
+ }
+
+ hashTable[h] = current; /* Update Hash Table */
+
+ while (nbCompares-- && (matchIndex > windowLow)) {
+ U32* nextPtr = bt + 2*(matchIndex & btMask);
+ size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of common bytes */
+ const BYTE* match;
+
+ if ((!extDict) || (matchIndex+matchLength >= dictLimit)) {
+ match = base + matchIndex;
+ if (match[matchLength] == ip[matchLength]) {
+ matchLength += ZSTD_count(ip+matchLength+1, match+matchLength+1, iLimit) +1;
+ }
+ } else {
+ match = dictBase + matchIndex;
+ matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iLimit, dictEnd, prefixStart);
+ if (matchIndex+matchLength >= dictLimit)
+ match = base + matchIndex; /* to prepare for next usage of match[matchLength] */
+ }
+
+ if (matchLength > bestLength) {
+ if (matchLength > matchEndIdx - matchIndex) matchEndIdx = matchIndex + (U32)matchLength;
+ bestLength = matchLength;
+ matches[mnum].off = ZSTD_REP_MOVE_OPT + current - matchIndex;
+ matches[mnum].len = (U32)matchLength;
+ mnum++;
+ if (matchLength > ZSTD_OPT_NUM) break;
+ if (ip+matchLength == iLimit) /* equal : no way to know if inf or sup */
+ break; /* drop, to guarantee consistency (miss a little bit of compression) */
+ }
+
+ if (match[matchLength] < ip[matchLength]) {
+ /* match is smaller than current */
+ *smallerPtr = matchIndex; /* update smaller idx */
+ commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common length */
+ if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */
+ smallerPtr = nextPtr+1; /* new "smaller" => larger of match */
+ matchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */
+ } else {
+ /* match is larger than current */
+ *largerPtr = matchIndex;
+ commonLengthLarger = matchLength;
+ if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */
+ largerPtr = nextPtr;
+ matchIndex = nextPtr[0];
+ } }
+
+ *smallerPtr = *largerPtr = 0;
+
+update:
+ zc->nextToUpdate = (matchEndIdx > current + 8) ? matchEndIdx - 8 : current+1;
+ return mnum;
+}
+
+
+/** Tree updater, providing best match */
+static U32 ZSTD_BtGetAllMatches (
+ ZSTD_CCtx* zc,
+ const BYTE* const ip, const BYTE* const iLimit,
+ const U32 maxNbAttempts, const U32 mls, ZSTD_match_t* matches, const U32 minMatchLen)
+{
+ if (ip < zc->base + zc->nextToUpdate) return 0; /* skipped area */
+ ZSTD_updateTree(zc, ip, iLimit, maxNbAttempts, mls);
+ return ZSTD_insertBtAndGetAllMatches(zc, ip, iLimit, maxNbAttempts, mls, 0, matches, minMatchLen);
+}
+
+
+static U32 ZSTD_BtGetAllMatches_selectMLS (
+ ZSTD_CCtx* zc, /* Index table will be updated */
+ const BYTE* ip, const BYTE* const iHighLimit,
+ const U32 maxNbAttempts, const U32 matchLengthSearch, ZSTD_match_t* matches, const U32 minMatchLen)
+{
+ switch(matchLengthSearch)
+ {
+ case 3 : return ZSTD_BtGetAllMatches(zc, ip, iHighLimit, maxNbAttempts, 3, matches, minMatchLen);
+ default :
+ case 4 : return ZSTD_BtGetAllMatches(zc, ip, iHighLimit, maxNbAttempts, 4, matches, minMatchLen);
+ case 5 : return ZSTD_BtGetAllMatches(zc, ip, iHighLimit, maxNbAttempts, 5, matches, minMatchLen);
+ case 7 :
+ case 6 : return ZSTD_BtGetAllMatches(zc, ip, iHighLimit, maxNbAttempts, 6, matches, minMatchLen);
+ }
+}
+
+/** Tree updater, providing best match */
+static U32 ZSTD_BtGetAllMatches_extDict (
+ ZSTD_CCtx* zc,
+ const BYTE* const ip, const BYTE* const iLimit,
+ const U32 maxNbAttempts, const U32 mls, ZSTD_match_t* matches, const U32 minMatchLen)
+{
+ if (ip < zc->base + zc->nextToUpdate) return 0; /* skipped area */
+ ZSTD_updateTree_extDict(zc, ip, iLimit, maxNbAttempts, mls);
+ return ZSTD_insertBtAndGetAllMatches(zc, ip, iLimit, maxNbAttempts, mls, 1, matches, minMatchLen);
+}
+
+
+static U32 ZSTD_BtGetAllMatches_selectMLS_extDict (
+ ZSTD_CCtx* zc, /* Index table will be updated */
+ const BYTE* ip, const BYTE* const iHighLimit,
+ const U32 maxNbAttempts, const U32 matchLengthSearch, ZSTD_match_t* matches, const U32 minMatchLen)
+{
+ switch(matchLengthSearch)
+ {
+ case 3 : return ZSTD_BtGetAllMatches_extDict(zc, ip, iHighLimit, maxNbAttempts, 3, matches, minMatchLen);
+ default :
+ case 4 : return ZSTD_BtGetAllMatches_extDict(zc, ip, iHighLimit, maxNbAttempts, 4, matches, minMatchLen);
+ case 5 : return ZSTD_BtGetAllMatches_extDict(zc, ip, iHighLimit, maxNbAttempts, 5, matches, minMatchLen);
+ case 7 :
+ case 6 : return ZSTD_BtGetAllMatches_extDict(zc, ip, iHighLimit, maxNbAttempts, 6, matches, minMatchLen);
+ }
+}
+
+
+/*-*******************************
+* Optimal parser
+*********************************/
+FORCE_INLINE_TEMPLATE
+size_t ZSTD_compressBlock_opt_generic(ZSTD_CCtx* ctx,
+ const void* src, size_t srcSize, const int ultra)
+{
+ seqStore_t* seqStorePtr = &(ctx->seqStore);
+ optState_t* optStatePtr = &(ctx->optState);
+ const BYTE* const istart = (const BYTE*)src;
+ const BYTE* ip = istart;
+ const BYTE* anchor = istart;
+ const BYTE* const iend = istart + srcSize;
+ const BYTE* const ilimit = iend - 8;
+ const BYTE* const base = ctx->base;
+ const BYTE* const prefixStart = base + ctx->dictLimit;
+
+ const U32 maxSearches = 1U << ctx->appliedParams.cParams.searchLog;
+ const U32 sufficient_len = ctx->appliedParams.cParams.targetLength;
+ const U32 mls = ctx->appliedParams.cParams.searchLength;
+ const U32 minMatch = (ctx->appliedParams.cParams.searchLength == 3) ? 3 : 4;
+
+ ZSTD_optimal_t* opt = optStatePtr->priceTable;
+ ZSTD_match_t* matches = optStatePtr->matchTable;
+ const BYTE* inr;
+ U32 offset, rep[ZSTD_REP_NUM];
+
+ /* init */
+ ctx->nextToUpdate3 = ctx->nextToUpdate;
+ ZSTD_rescaleFreqs(optStatePtr, (const BYTE*)src, srcSize);
+ ip += (ip==prefixStart);
+ { U32 i; for (i=0; i<ZSTD_REP_NUM; i++) rep[i]=seqStorePtr->rep[i]; }
+
+ /* Match Loop */
+ while (ip < ilimit) {
+ U32 cur, match_num, last_pos, litlen, price;
+ U32 u, mlen, best_mlen, best_off, litLength;
+ memset(opt, 0, sizeof(ZSTD_optimal_t));
+ last_pos = 0;
+ litlen = (U32)(ip - anchor);
+
+ /* check repCode */
+ { U32 i, last_i = ZSTD_REP_CHECK + (ip==anchor);
+ for (i=(ip == anchor); i<last_i; i++) {
+ const S32 repCur = (i==ZSTD_REP_MOVE_OPT) ? (rep[0] - 1) : rep[i];
+ if ( (repCur > 0) && (repCur < (S32)(ip-prefixStart))
+ && (ZSTD_readMINMATCH(ip, minMatch) == ZSTD_readMINMATCH(ip - repCur, minMatch))) {
+ mlen = (U32)ZSTD_count(ip+minMatch, ip+minMatch-repCur, iend) + minMatch;
+ if (mlen > sufficient_len || mlen >= ZSTD_OPT_NUM) {
+ best_mlen = mlen; best_off = i; cur = 0; last_pos = 1;
+ goto _storeSequence;
+ }
+ best_off = i - (ip == anchor);
+ do {
+ price = ZSTD_getPrice(optStatePtr, litlen, anchor, best_off, mlen - MINMATCH, ultra);
+ if (mlen > last_pos || price < opt[mlen].price)
+ SET_PRICE(mlen, mlen, i, litlen, price); /* note : macro modifies last_pos */
+ mlen--;
+ } while (mlen >= minMatch);
+ } } }
+
+ match_num = ZSTD_BtGetAllMatches_selectMLS(ctx, ip, iend, maxSearches, mls, matches, minMatch);
+
+ if (!last_pos && !match_num) { ip++; continue; }
+
+ if (match_num && (matches[match_num-1].len > sufficient_len || matches[match_num-1].len >= ZSTD_OPT_NUM)) {
+ best_mlen = matches[match_num-1].len;
+ best_off = matches[match_num-1].off;
+ cur = 0;
+ last_pos = 1;
+ goto _storeSequence;
+ }
+
+ /* set prices using matches at position = 0 */
+ best_mlen = (last_pos) ? last_pos : minMatch;
+ for (u = 0; u < match_num; u++) {
+ mlen = (u>0) ? matches[u-1].len+1 : best_mlen;
+ best_mlen = matches[u].len;
+ while (mlen <= best_mlen) {
+ price = ZSTD_getPrice(optStatePtr, litlen, anchor, matches[u].off-1, mlen - MINMATCH, ultra);
+ if (mlen > last_pos || price < opt[mlen].price)
+ SET_PRICE(mlen, mlen, matches[u].off, litlen, price); /* note : macro modifies last_pos */
+ mlen++;
+ } }
+
+ if (last_pos < minMatch) { ip++; continue; }
+
+ /* initialize opt[0] */
+ { U32 i ; for (i=0; i<ZSTD_REP_NUM; i++) opt[0].rep[i] = rep[i]; }
+ opt[0].mlen = 1;
+ opt[0].litlen = litlen;
+
+ /* check further positions */
+ for (cur = 1; cur <= last_pos; cur++) {
+ inr = ip + cur;
+
+ if (opt[cur-1].mlen == 1) {
+ litlen = opt[cur-1].litlen + 1;
+ if (cur > litlen) {
+ price = opt[cur - litlen].price + ZSTD_getLiteralPrice(optStatePtr, litlen, inr-litlen);
+ } else
+ price = ZSTD_getLiteralPrice(optStatePtr, litlen, anchor);
+ } else {
+ litlen = 1;
+ price = opt[cur - 1].price + ZSTD_getLiteralPrice(optStatePtr, litlen, inr-1);
+ }
+
+ if (cur > last_pos || price <= opt[cur].price)
+ SET_PRICE(cur, 1, 0, litlen, price);
+
+ if (cur == last_pos) break;
+
+ if (inr > ilimit) /* last match must start at a minimum distance of 8 from oend */
+ continue;
+
+ mlen = opt[cur].mlen;
+ if (opt[cur].off > ZSTD_REP_MOVE_OPT) {
+ opt[cur].rep[2] = opt[cur-mlen].rep[1];
+ opt[cur].rep[1] = opt[cur-mlen].rep[0];
+ opt[cur].rep[0] = opt[cur].off - ZSTD_REP_MOVE_OPT;
+ } else {
+ opt[cur].rep[2] = (opt[cur].off > 1) ? opt[cur-mlen].rep[1] : opt[cur-mlen].rep[2];
+ opt[cur].rep[1] = (opt[cur].off > 0) ? opt[cur-mlen].rep[0] : opt[cur-mlen].rep[1];
+ /* If opt[cur].off == ZSTD_REP_MOVE_OPT, then mlen != 1.
+ * offset ZSTD_REP_MOVE_OPT is used for the special case
+ * litLength == 0, where offset 0 means something special.
+ * mlen == 1 means the previous byte was stored as a literal,
+ * so they are mutually exclusive.
+ */
+ assert(!(opt[cur].off == ZSTD_REP_MOVE_OPT && mlen == 1));
+ opt[cur].rep[0] = (opt[cur].off == ZSTD_REP_MOVE_OPT) ? (opt[cur-mlen].rep[0] - 1) : (opt[cur-mlen].rep[opt[cur].off]);
+ }
+
+ best_mlen = minMatch;
+ { U32 i, last_i = ZSTD_REP_CHECK + (mlen != 1);
+ for (i=(opt[cur].mlen != 1); i<last_i; i++) { /* check rep */
+ const S32 repCur = (i==ZSTD_REP_MOVE_OPT) ? (opt[cur].rep[0] - 1) : opt[cur].rep[i];
+ if ( (repCur > 0) && (repCur < (S32)(inr-prefixStart))
+ && (ZSTD_readMINMATCH(inr, minMatch) == ZSTD_readMINMATCH(inr - repCur, minMatch))) {
+ mlen = (U32)ZSTD_count(inr+minMatch, inr+minMatch - repCur, iend) + minMatch;
+
+ if (mlen > sufficient_len || cur + mlen >= ZSTD_OPT_NUM) {
+ best_mlen = mlen; best_off = i; last_pos = cur + 1;
+ goto _storeSequence;
+ }
+
+ best_off = i - (opt[cur].mlen != 1);
+ if (mlen > best_mlen) best_mlen = mlen;
+
+ do {
+ if (opt[cur].mlen == 1) {
+ litlen = opt[cur].litlen;
+ if (cur > litlen) {
+ price = opt[cur - litlen].price + ZSTD_getPrice(optStatePtr, litlen, inr-litlen, best_off, mlen - MINMATCH, ultra);
+ } else
+ price = ZSTD_getPrice(optStatePtr, litlen, anchor, best_off, mlen - MINMATCH, ultra);
+ } else {
+ litlen = 0;
+ price = opt[cur].price + ZSTD_getPrice(optStatePtr, 0, NULL, best_off, mlen - MINMATCH, ultra);
+ }
+
+ if (cur + mlen > last_pos || price <= opt[cur + mlen].price)
+ SET_PRICE(cur + mlen, mlen, i, litlen, price);
+ mlen--;
+ } while (mlen >= minMatch);
+ } } }
+
+ match_num = ZSTD_BtGetAllMatches_selectMLS(ctx, inr, iend, maxSearches, mls, matches, best_mlen);
+
+ if (match_num > 0 && (matches[match_num-1].len > sufficient_len || cur + matches[match_num-1].len >= ZSTD_OPT_NUM)) {
+ best_mlen = matches[match_num-1].len;
+ best_off = matches[match_num-1].off;
+ last_pos = cur + 1;
+ goto _storeSequence;
+ }
+
+ /* set prices using matches at position = cur */
+ for (u = 0; u < match_num; u++) {
+ mlen = (u>0) ? matches[u-1].len+1 : best_mlen;
+ best_mlen = matches[u].len;
+
+ while (mlen <= best_mlen) {
+ if (opt[cur].mlen == 1) {
+ litlen = opt[cur].litlen;
+ if (cur > litlen)
+ price = opt[cur - litlen].price + ZSTD_getPrice(optStatePtr, litlen, ip+cur-litlen, matches[u].off-1, mlen - MINMATCH, ultra);
+ else
+ price = ZSTD_getPrice(optStatePtr, litlen, anchor, matches[u].off-1, mlen - MINMATCH, ultra);
+ } else {
+ litlen = 0;
+ price = opt[cur].price + ZSTD_getPrice(optStatePtr, 0, NULL, matches[u].off-1, mlen - MINMATCH, ultra);
+ }
+
+ if (cur + mlen > last_pos || (price < opt[cur + mlen].price))
+ SET_PRICE(cur + mlen, mlen, matches[u].off, litlen, price);
+
+ mlen++;
+ } } }
+
+ best_mlen = opt[last_pos].mlen;
+ best_off = opt[last_pos].off;
+ cur = last_pos - best_mlen;
+
+ /* store sequence */
+_storeSequence: /* cur, last_pos, best_mlen, best_off have to be set */
+ opt[0].mlen = 1;
+
+ while (1) {
+ mlen = opt[cur].mlen;
+ offset = opt[cur].off;
+ opt[cur].mlen = best_mlen;
+ opt[cur].off = best_off;
+ best_mlen = mlen;
+ best_off = offset;
+ if (mlen > cur) break;
+ cur -= mlen;
+ }
+
+ for (u = 0; u <= last_pos;) {
+ u += opt[u].mlen;
+ }
+
+ for (cur=0; cur < last_pos; ) {
+ mlen = opt[cur].mlen;
+ if (mlen == 1) { ip++; cur++; continue; }
+ offset = opt[cur].off;
+ cur += mlen;
+ litLength = (U32)(ip - anchor);
+
+ if (offset > ZSTD_REP_MOVE_OPT) {
+ rep[2] = rep[1];
+ rep[1] = rep[0];
+ rep[0] = offset - ZSTD_REP_MOVE_OPT;
+ offset--;
+ } else {
+ if (offset != 0) {
+ best_off = (offset==ZSTD_REP_MOVE_OPT) ? (rep[0] - 1) : (rep[offset]);
+ if (offset != 1) rep[2] = rep[1];
+ rep[1] = rep[0];
+ rep[0] = best_off;
+ }
+ if (litLength==0) offset--;
+ }
+
+ ZSTD_updatePrice(optStatePtr, litLength, anchor, offset, mlen-MINMATCH);
+ ZSTD_storeSeq(seqStorePtr, litLength, anchor, offset, mlen-MINMATCH);
+ anchor = ip = ip + mlen;
+ } } /* for (cur=0; cur < last_pos; ) */
+
+ /* Save reps for next block */
+ { int i; for (i=0; i<ZSTD_REP_NUM; i++) seqStorePtr->repToConfirm[i] = rep[i]; }
+
+ /* Return the last literals size */
+ return iend - anchor;
+}
+
+
+size_t ZSTD_compressBlock_btopt(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
+{
+ return ZSTD_compressBlock_opt_generic(ctx, src, srcSize, 0);
+}
+
+size_t ZSTD_compressBlock_btultra(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
+{
+ return ZSTD_compressBlock_opt_generic(ctx, src, srcSize, 1);
+}
+
+
+FORCE_INLINE_TEMPLATE
+size_t ZSTD_compressBlock_opt_extDict_generic(ZSTD_CCtx* ctx,
+ const void* src, size_t srcSize, const int ultra)
+{
+ seqStore_t* seqStorePtr = &(ctx->seqStore);
+ optState_t* optStatePtr = &(ctx->optState);
+ const BYTE* const istart = (const BYTE*)src;
+ const BYTE* ip = istart;
+ const BYTE* anchor = istart;
+ const BYTE* const iend = istart + srcSize;
+ const BYTE* const ilimit = iend - 8;
+ const BYTE* const base = ctx->base;
+ const U32 lowestIndex = ctx->lowLimit;
+ const U32 dictLimit = ctx->dictLimit;
+ const BYTE* const prefixStart = base + dictLimit;
+ const BYTE* const dictBase = ctx->dictBase;
+ const BYTE* const dictEnd = dictBase + dictLimit;
+
+ const U32 maxSearches = 1U << ctx->appliedParams.cParams.searchLog;
+ const U32 sufficient_len = ctx->appliedParams.cParams.targetLength;
+ const U32 mls = ctx->appliedParams.cParams.searchLength;
+ const U32 minMatch = (ctx->appliedParams.cParams.searchLength == 3) ? 3 : 4;
+
+ ZSTD_optimal_t* opt = optStatePtr->priceTable;
+ ZSTD_match_t* matches = optStatePtr->matchTable;
+ const BYTE* inr;
+
+ /* init */
+ U32 offset, rep[ZSTD_REP_NUM];
+ { U32 i; for (i=0; i<ZSTD_REP_NUM; i++) rep[i]=seqStorePtr->rep[i]; }
+
+ ctx->nextToUpdate3 = ctx->nextToUpdate;
+ ZSTD_rescaleFreqs(optStatePtr, (const BYTE*)src, srcSize);
+ ip += (ip==prefixStart);
+
+ /* Match Loop */
+ while (ip < ilimit) {
+ U32 cur, match_num, last_pos, litlen, price;
+ U32 u, mlen, best_mlen, best_off, litLength;
+ U32 current = (U32)(ip-base);
+ memset(opt, 0, sizeof(ZSTD_optimal_t));
+ last_pos = 0;
+ opt[0].litlen = (U32)(ip - anchor);
+
+ /* check repCode */
+ { U32 i, last_i = ZSTD_REP_CHECK + (ip==anchor);
+ for (i = (ip==anchor); i<last_i; i++) {
+ const S32 repCur = (i==ZSTD_REP_MOVE_OPT) ? (rep[0] - 1) : rep[i];
+ const U32 repIndex = (U32)(current - repCur);
+ const BYTE* const repBase = repIndex < dictLimit ? dictBase : base;
+ const BYTE* const repMatch = repBase + repIndex;
+ if ( (repCur > 0 && repCur <= (S32)current)
+ && (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex>lowestIndex)) /* intentional overflow */
+ && (ZSTD_readMINMATCH(ip, minMatch) == ZSTD_readMINMATCH(repMatch, minMatch)) ) {
+ /* repcode detected we should take it */
+ const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend;
+ mlen = (U32)ZSTD_count_2segments(ip+minMatch, repMatch+minMatch, iend, repEnd, prefixStart) + minMatch;
+
+ if (mlen > sufficient_len || mlen >= ZSTD_OPT_NUM) {
+ best_mlen = mlen; best_off = i; cur = 0; last_pos = 1;
+ goto _storeSequence;
+ }
+
+ best_off = i - (ip==anchor);
+ litlen = opt[0].litlen;
+ do {
+ price = ZSTD_getPrice(optStatePtr, litlen, anchor, best_off, mlen - MINMATCH, ultra);
+ if (mlen > last_pos || price < opt[mlen].price)
+ SET_PRICE(mlen, mlen, i, litlen, price); /* note : macro modifies last_pos */
+ mlen--;
+ } while (mlen >= minMatch);
+ } } }
+
+ match_num = ZSTD_BtGetAllMatches_selectMLS_extDict(ctx, ip, iend, maxSearches, mls, matches, minMatch); /* first search (depth 0) */
+
+ if (!last_pos && !match_num) { ip++; continue; }
+
+ { U32 i; for (i=0; i<ZSTD_REP_NUM; i++) opt[0].rep[i] = rep[i]; }
+ opt[0].mlen = 1;
+
+ if (match_num && (matches[match_num-1].len > sufficient_len || matches[match_num-1].len >= ZSTD_OPT_NUM)) {
+ best_mlen = matches[match_num-1].len;
+ best_off = matches[match_num-1].off;
+ cur = 0;
+ last_pos = 1;
+ goto _storeSequence;
+ }
+
+ best_mlen = (last_pos) ? last_pos : minMatch;
+
+ /* set prices using matches at position = 0 */
+ for (u = 0; u < match_num; u++) {
+ mlen = (u>0) ? matches[u-1].len+1 : best_mlen;
+ best_mlen = matches[u].len;
+ litlen = opt[0].litlen;
+ while (mlen <= best_mlen) {
+ price = ZSTD_getPrice(optStatePtr, litlen, anchor, matches[u].off-1, mlen - MINMATCH, ultra);
+ if (mlen > last_pos || price < opt[mlen].price)
+ SET_PRICE(mlen, mlen, matches[u].off, litlen, price);
+ mlen++;
+ } }
+
+ if (last_pos < minMatch) {
+ ip++; continue;
+ }
+
+ /* check further positions */
+ for (cur = 1; cur <= last_pos; cur++) {
+ inr = ip + cur;
+
+ if (opt[cur-1].mlen == 1) {
+ litlen = opt[cur-1].litlen + 1;
+ if (cur > litlen) {
+ price = opt[cur - litlen].price + ZSTD_getLiteralPrice(optStatePtr, litlen, inr-litlen);
+ } else
+ price = ZSTD_getLiteralPrice(optStatePtr, litlen, anchor);
+ } else {
+ litlen = 1;
+ price = opt[cur - 1].price + ZSTD_getLiteralPrice(optStatePtr, litlen, inr-1);
+ }
+
+ if (cur > last_pos || price <= opt[cur].price)
+ SET_PRICE(cur, 1, 0, litlen, price);
+
+ if (cur == last_pos) break;
+
+ if (inr > ilimit) /* last match must start at a minimum distance of 8 from oend */
+ continue;
+
+ mlen = opt[cur].mlen;
+ if (opt[cur].off > ZSTD_REP_MOVE_OPT) {
+ opt[cur].rep[2] = opt[cur-mlen].rep[1];
+ opt[cur].rep[1] = opt[cur-mlen].rep[0];
+ opt[cur].rep[0] = opt[cur].off - ZSTD_REP_MOVE_OPT;
+ } else {
+ opt[cur].rep[2] = (opt[cur].off > 1) ? opt[cur-mlen].rep[1] : opt[cur-mlen].rep[2];
+ opt[cur].rep[1] = (opt[cur].off > 0) ? opt[cur-mlen].rep[0] : opt[cur-mlen].rep[1];
+ assert(!(opt[cur].off == ZSTD_REP_MOVE_OPT && mlen == 1));
+ opt[cur].rep[0] = (opt[cur].off == ZSTD_REP_MOVE_OPT) ? (opt[cur-mlen].rep[0] - 1) : (opt[cur-mlen].rep[opt[cur].off]);
+ }
+
+ best_mlen = minMatch;
+ { U32 i, last_i = ZSTD_REP_CHECK + (mlen != 1);
+ for (i = (mlen != 1); i<last_i; i++) {
+ const S32 repCur = (i==ZSTD_REP_MOVE_OPT) ? (opt[cur].rep[0] - 1) : opt[cur].rep[i];
+ const U32 repIndex = (U32)(current+cur - repCur);
+ const BYTE* const repBase = repIndex < dictLimit ? dictBase : base;
+ const BYTE* const repMatch = repBase + repIndex;
+ if ( (repCur > 0 && repCur <= (S32)(current+cur))
+ && (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex>lowestIndex)) /* intentional overflow */
+ && (ZSTD_readMINMATCH(inr, minMatch) == ZSTD_readMINMATCH(repMatch, minMatch)) ) {
+ /* repcode detected */
+ const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend;
+ mlen = (U32)ZSTD_count_2segments(inr+minMatch, repMatch+minMatch, iend, repEnd, prefixStart) + minMatch;
+
+ if (mlen > sufficient_len || cur + mlen >= ZSTD_OPT_NUM) {
+ best_mlen = mlen; best_off = i; last_pos = cur + 1;
+ goto _storeSequence;
+ }
+
+ best_off = i - (opt[cur].mlen != 1);
+ if (mlen > best_mlen) best_mlen = mlen;
+
+ do {
+ if (opt[cur].mlen == 1) {
+ litlen = opt[cur].litlen;
+ if (cur > litlen) {
+ price = opt[cur - litlen].price + ZSTD_getPrice(optStatePtr, litlen, inr-litlen, best_off, mlen - MINMATCH, ultra);
+ } else
+ price = ZSTD_getPrice(optStatePtr, litlen, anchor, best_off, mlen - MINMATCH, ultra);
+ } else {
+ litlen = 0;
+ price = opt[cur].price + ZSTD_getPrice(optStatePtr, 0, NULL, best_off, mlen - MINMATCH, ultra);
+ }
+
+ if (cur + mlen > last_pos || price <= opt[cur + mlen].price)
+ SET_PRICE(cur + mlen, mlen, i, litlen, price);
+ mlen--;
+ } while (mlen >= minMatch);
+ } } }
+
+ match_num = ZSTD_BtGetAllMatches_selectMLS_extDict(ctx, inr, iend, maxSearches, mls, matches, minMatch);
+
+ if (match_num > 0 && (matches[match_num-1].len > sufficient_len || cur + matches[match_num-1].len >= ZSTD_OPT_NUM)) {
+ best_mlen = matches[match_num-1].len;
+ best_off = matches[match_num-1].off;
+ last_pos = cur + 1;
+ goto _storeSequence;
+ }
+
+ /* set prices using matches at position = cur */
+ for (u = 0; u < match_num; u++) {
+ mlen = (u>0) ? matches[u-1].len+1 : best_mlen;
+ best_mlen = matches[u].len;
+
+ while (mlen <= best_mlen) {
+ if (opt[cur].mlen == 1) {
+ litlen = opt[cur].litlen;
+ if (cur > litlen)
+ price = opt[cur - litlen].price + ZSTD_getPrice(optStatePtr, litlen, ip+cur-litlen, matches[u].off-1, mlen - MINMATCH, ultra);
+ else
+ price = ZSTD_getPrice(optStatePtr, litlen, anchor, matches[u].off-1, mlen - MINMATCH, ultra);
+ } else {
+ litlen = 0;
+ price = opt[cur].price + ZSTD_getPrice(optStatePtr, 0, NULL, matches[u].off-1, mlen - MINMATCH, ultra);
+ }
+
+ if (cur + mlen > last_pos || (price < opt[cur + mlen].price))
+ SET_PRICE(cur + mlen, mlen, matches[u].off, litlen, price);
+
+ mlen++;
+ } } } /* for (cur = 1; cur <= last_pos; cur++) */
+
+ best_mlen = opt[last_pos].mlen;
+ best_off = opt[last_pos].off;
+ cur = last_pos - best_mlen;
+
+ /* store sequence */
+_storeSequence: /* cur, last_pos, best_mlen, best_off have to be set */
+ opt[0].mlen = 1;
+
+ while (1) {
+ mlen = opt[cur].mlen;
+ offset = opt[cur].off;
+ opt[cur].mlen = best_mlen;
+ opt[cur].off = best_off;
+ best_mlen = mlen;
+ best_off = offset;
+ if (mlen > cur) break;
+ cur -= mlen;
+ }
+
+ for (u = 0; u <= last_pos; ) {
+ u += opt[u].mlen;
+ }
+
+ for (cur=0; cur < last_pos; ) {
+ mlen = opt[cur].mlen;
+ if (mlen == 1) { ip++; cur++; continue; }
+ offset = opt[cur].off;
+ cur += mlen;
+ litLength = (U32)(ip - anchor);
+
+ if (offset > ZSTD_REP_MOVE_OPT) {
+ rep[2] = rep[1];
+ rep[1] = rep[0];
+ rep[0] = offset - ZSTD_REP_MOVE_OPT;
+ offset--;
+ } else {
+ if (offset != 0) {
+ best_off = (offset==ZSTD_REP_MOVE_OPT) ? (rep[0] - 1) : (rep[offset]);
+ if (offset != 1) rep[2] = rep[1];
+ rep[1] = rep[0];
+ rep[0] = best_off;
+ }
+
+ if (litLength==0) offset--;
+ }
+
+ ZSTD_updatePrice(optStatePtr, litLength, anchor, offset, mlen-MINMATCH);
+ ZSTD_storeSeq(seqStorePtr, litLength, anchor, offset, mlen-MINMATCH);
+ anchor = ip = ip + mlen;
+ } } /* for (cur=0; cur < last_pos; ) */
+
+ /* Save reps for next block */
+ { int i; for (i=0; i<ZSTD_REP_NUM; i++) seqStorePtr->repToConfirm[i] = rep[i]; }
+
+ /* Return the last literals size */
+ return iend - anchor;
+}
+
+
+size_t ZSTD_compressBlock_btopt_extDict(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
+{
+ return ZSTD_compressBlock_opt_extDict_generic(ctx, src, srcSize, 0);
+}
+
+size_t ZSTD_compressBlock_btultra_extDict(ZSTD_CCtx* ctx, const void* src, size_t srcSize)
+{
+ return ZSTD_compressBlock_opt_extDict_generic(ctx, src, srcSize, 1);
+}
diff --git a/thirdparty/zstd/compress/zstd_opt.h b/thirdparty/zstd/compress/zstd_opt.h
index ae24732c7d..816a1fabbf 100644
--- a/thirdparty/zstd/compress/zstd_opt.h
+++ b/thirdparty/zstd/compress/zstd_opt.h
@@ -5,934 +5,26 @@
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
*/
+#ifndef ZSTD_OPT_H
+#define ZSTD_OPT_H
-/* Note : this file is intended to be included within zstd_compress.c */
+#include "zstd_compress.h"
+#if defined (__cplusplus)
+extern "C" {
+#endif
-#ifndef ZSTD_OPT_H_91842398743
-#define ZSTD_OPT_H_91842398743
+size_t ZSTD_compressBlock_btopt(ZSTD_CCtx* ctx, const void* src, size_t srcSize);
+size_t ZSTD_compressBlock_btultra(ZSTD_CCtx* ctx, const void* src, size_t srcSize);
+size_t ZSTD_compressBlock_btopt_extDict(ZSTD_CCtx* ctx, const void* src, size_t srcSize);
+size_t ZSTD_compressBlock_btultra_extDict(ZSTD_CCtx* ctx, const void* src, size_t srcSize);
-#define ZSTD_LITFREQ_ADD 2
-#define ZSTD_FREQ_DIV 4
-#define ZSTD_MAX_PRICE (1<<30)
-
-/*-*************************************
-* Price functions for optimal parser
-***************************************/
-static void ZSTD_setLog2Prices(optState_t* optPtr)
-{
- optPtr->log2matchLengthSum = ZSTD_highbit32(optPtr->matchLengthSum+1);
- optPtr->log2litLengthSum = ZSTD_highbit32(optPtr->litLengthSum+1);
- optPtr->log2litSum = ZSTD_highbit32(optPtr->litSum+1);
- optPtr->log2offCodeSum = ZSTD_highbit32(optPtr->offCodeSum+1);
- optPtr->factor = 1 + ((optPtr->litSum>>5) / optPtr->litLengthSum) + ((optPtr->litSum<<1) / (optPtr->litSum + optPtr->matchSum));
-}
-
-
-static void ZSTD_rescaleFreqs(optState_t* optPtr, const BYTE* src, size_t srcSize)
-{
- unsigned u;
-
- optPtr->cachedLiterals = NULL;
- optPtr->cachedPrice = optPtr->cachedLitLength = 0;
- optPtr->staticPrices = 0;
-
- if (optPtr->litLengthSum == 0) {
- if (srcSize <= 1024) optPtr->staticPrices = 1;
-
- assert(optPtr->litFreq!=NULL);
- for (u=0; u<=MaxLit; u++)
- optPtr->litFreq[u] = 0;
- for (u=0; u<srcSize; u++)
- optPtr->litFreq[src[u]]++;
-
- optPtr->litSum = 0;
- optPtr->litLengthSum = MaxLL+1;
- optPtr->matchLengthSum = MaxML+1;
- optPtr->offCodeSum = (MaxOff+1);
- optPtr->matchSum = (ZSTD_LITFREQ_ADD<<Litbits);
-
- for (u=0; u<=MaxLit; u++) {
- optPtr->litFreq[u] = 1 + (optPtr->litFreq[u]>>ZSTD_FREQ_DIV);
- optPtr->litSum += optPtr->litFreq[u];
- }
- for (u=0; u<=MaxLL; u++)
- optPtr->litLengthFreq[u] = 1;
- for (u=0; u<=MaxML; u++)
- optPtr->matchLengthFreq[u] = 1;
- for (u=0; u<=MaxOff; u++)
- optPtr->offCodeFreq[u] = 1;
- } else {
- optPtr->matchLengthSum = 0;
- optPtr->litLengthSum = 0;
- optPtr->offCodeSum = 0;
- optPtr->matchSum = 0;
- optPtr->litSum = 0;
-
- for (u=0; u<=MaxLit; u++) {
- optPtr->litFreq[u] = 1 + (optPtr->litFreq[u]>>(ZSTD_FREQ_DIV+1));
- optPtr->litSum += optPtr->litFreq[u];
- }
- for (u=0; u<=MaxLL; u++) {
- optPtr->litLengthFreq[u] = 1 + (optPtr->litLengthFreq[u]>>(ZSTD_FREQ_DIV+1));
- optPtr->litLengthSum += optPtr->litLengthFreq[u];
- }
- for (u=0; u<=MaxML; u++) {
- optPtr->matchLengthFreq[u] = 1 + (optPtr->matchLengthFreq[u]>>ZSTD_FREQ_DIV);
- optPtr->matchLengthSum += optPtr->matchLengthFreq[u];
- optPtr->matchSum += optPtr->matchLengthFreq[u] * (u + 3);
- }
- optPtr->matchSum *= ZSTD_LITFREQ_ADD;
- for (u=0; u<=MaxOff; u++) {
- optPtr->offCodeFreq[u] = 1 + (optPtr->offCodeFreq[u]>>ZSTD_FREQ_DIV);
- optPtr->offCodeSum += optPtr->offCodeFreq[u];
- }
- }
-
- ZSTD_setLog2Prices(optPtr);
-}
-
-
-static U32 ZSTD_getLiteralPrice(optState_t* optPtr, U32 litLength, const BYTE* literals)
-{
- U32 price, u;
-
- if (optPtr->staticPrices)
- return ZSTD_highbit32((U32)litLength+1) + (litLength*6);
-
- if (litLength == 0)
- return optPtr->log2litLengthSum - ZSTD_highbit32(optPtr->litLengthFreq[0]+1);
-
- /* literals */
- if (optPtr->cachedLiterals == literals) {
- U32 const additional = litLength - optPtr->cachedLitLength;
- const BYTE* literals2 = optPtr->cachedLiterals + optPtr->cachedLitLength;
- price = optPtr->cachedPrice + additional * optPtr->log2litSum;
- for (u=0; u < additional; u++)
- price -= ZSTD_highbit32(optPtr->litFreq[literals2[u]]+1);
- optPtr->cachedPrice = price;
- optPtr->cachedLitLength = litLength;
- } else {
- price = litLength * optPtr->log2litSum;
- for (u=0; u < litLength; u++)
- price -= ZSTD_highbit32(optPtr->litFreq[literals[u]]+1);
-
- if (litLength >= 12) {
- optPtr->cachedLiterals = literals;
- optPtr->cachedPrice = price;
- optPtr->cachedLitLength = litLength;
- }
- }
-
- /* literal Length */
- { const BYTE LL_deltaCode = 19;
- const BYTE llCode = (litLength>63) ? (BYTE)ZSTD_highbit32(litLength) + LL_deltaCode : LL_Code[litLength];
- price += LL_bits[llCode] + optPtr->log2litLengthSum - ZSTD_highbit32(optPtr->litLengthFreq[llCode]+1);
- }
-
- return price;
-}
-
-
-FORCE_INLINE_TEMPLATE U32 ZSTD_getPrice(optState_t* optPtr, U32 litLength, const BYTE* literals, U32 offset, U32 matchLength, const int ultra)
-{
- /* offset */
- U32 price;
- BYTE const offCode = (BYTE)ZSTD_highbit32(offset+1);
-
- if (optPtr->staticPrices)
- return ZSTD_getLiteralPrice(optPtr, litLength, literals) + ZSTD_highbit32((U32)matchLength+1) + 16 + offCode;
-
- price = offCode + optPtr->log2offCodeSum - ZSTD_highbit32(optPtr->offCodeFreq[offCode]+1);
- if (!ultra && offCode >= 20) price += (offCode-19)*2;
-
- /* match Length */
- { const BYTE ML_deltaCode = 36;
- const BYTE mlCode = (matchLength>127) ? (BYTE)ZSTD_highbit32(matchLength) + ML_deltaCode : ML_Code[matchLength];
- price += ML_bits[mlCode] + optPtr->log2matchLengthSum - ZSTD_highbit32(optPtr->matchLengthFreq[mlCode]+1);
- }
-
- return price + ZSTD_getLiteralPrice(optPtr, litLength, literals) + optPtr->factor;
-}
-
-
-static void ZSTD_updatePrice(optState_t* optPtr, U32 litLength, const BYTE* literals, U32 offset, U32 matchLength)
-{
- U32 u;
-
- /* literals */
- optPtr->litSum += litLength*ZSTD_LITFREQ_ADD;
- for (u=0; u < litLength; u++)
- optPtr->litFreq[literals[u]] += ZSTD_LITFREQ_ADD;
-
- /* literal Length */
- { const BYTE LL_deltaCode = 19;
- const BYTE llCode = (litLength>63) ? (BYTE)ZSTD_highbit32(litLength) + LL_deltaCode : LL_Code[litLength];
- optPtr->litLengthFreq[llCode]++;
- optPtr->litLengthSum++;
- }
-
- /* match offset */
- { BYTE const offCode = (BYTE)ZSTD_highbit32(offset+1);
- optPtr->offCodeSum++;
- optPtr->offCodeFreq[offCode]++;
- }
-
- /* match Length */
- { const BYTE ML_deltaCode = 36;
- const BYTE mlCode = (matchLength>127) ? (BYTE)ZSTD_highbit32(matchLength) + ML_deltaCode : ML_Code[matchLength];
- optPtr->matchLengthFreq[mlCode]++;
- optPtr->matchLengthSum++;
- }
-
- ZSTD_setLog2Prices(optPtr);
-}
-
-
-#define SET_PRICE(pos, mlen_, offset_, litlen_, price_) \
- { \
- while (last_pos < pos) { opt[last_pos+1].price = ZSTD_MAX_PRICE; last_pos++; } \
- opt[pos].mlen = mlen_; \
- opt[pos].off = offset_; \
- opt[pos].litlen = litlen_; \
- opt[pos].price = price_; \
- }
-
-
-/* function safe only for comparisons */
-static U32 ZSTD_readMINMATCH(const void* memPtr, U32 length)
-{
- switch (length)
- {
- default :
- case 4 : return MEM_read32(memPtr);
- case 3 : if (MEM_isLittleEndian())
- return MEM_read32(memPtr)<<8;
- else
- return MEM_read32(memPtr)>>8;
- }
-}
-
-
-/* Update hashTable3 up to ip (excluded)
- Assumption : always within prefix (i.e. not within extDict) */
-static
-U32 ZSTD_insertAndFindFirstIndexHash3 (ZSTD_CCtx* zc, const BYTE* ip)
-{
- U32* const hashTable3 = zc->hashTable3;
- U32 const hashLog3 = zc->hashLog3;
- const BYTE* const base = zc->base;
- U32 idx = zc->nextToUpdate3;
- const U32 target = zc->nextToUpdate3 = (U32)(ip - base);
- const size_t hash3 = ZSTD_hash3Ptr(ip, hashLog3);
-
- while(idx < target) {
- hashTable3[ZSTD_hash3Ptr(base+idx, hashLog3)] = idx;
- idx++;
- }
-
- return hashTable3[hash3];
-}
-
-
-/*-*************************************
-* Binary Tree search
-***************************************/
-static U32 ZSTD_insertBtAndGetAllMatches (
- ZSTD_CCtx* zc,
- const BYTE* const ip, const BYTE* const iLimit,
- U32 nbCompares, const U32 mls,
- U32 extDict, ZSTD_match_t* matches, const U32 minMatchLen)
-{
- const BYTE* const base = zc->base;
- const U32 current = (U32)(ip-base);
- const U32 hashLog = zc->appliedParams.cParams.hashLog;
- const size_t h = ZSTD_hashPtr(ip, hashLog, mls);
- U32* const hashTable = zc->hashTable;
- U32 matchIndex = hashTable[h];
- U32* const bt = zc->chainTable;
- const U32 btLog = zc->appliedParams.cParams.chainLog - 1;
- const U32 btMask= (1U << btLog) - 1;
- size_t commonLengthSmaller=0, commonLengthLarger=0;
- const BYTE* const dictBase = zc->dictBase;
- const U32 dictLimit = zc->dictLimit;
- const BYTE* const dictEnd = dictBase + dictLimit;
- const BYTE* const prefixStart = base + dictLimit;
- const U32 btLow = btMask >= current ? 0 : current - btMask;
- const U32 windowLow = zc->lowLimit;
- U32* smallerPtr = bt + 2*(current&btMask);
- U32* largerPtr = bt + 2*(current&btMask) + 1;
- U32 matchEndIdx = current+8;
- U32 dummy32; /* to be nullified at the end */
- U32 mnum = 0;
-
- const U32 minMatch = (mls == 3) ? 3 : 4;
- size_t bestLength = minMatchLen-1;
-
- if (minMatch == 3) { /* HC3 match finder */
- U32 const matchIndex3 = ZSTD_insertAndFindFirstIndexHash3 (zc, ip);
- if (matchIndex3>windowLow && (current - matchIndex3 < (1<<18))) {
- const BYTE* match;
- size_t currentMl=0;
- if ((!extDict) || matchIndex3 >= dictLimit) {
- match = base + matchIndex3;
- if (match[bestLength] == ip[bestLength]) currentMl = ZSTD_count(ip, match, iLimit);
- } else {
- match = dictBase + matchIndex3;
- if (ZSTD_readMINMATCH(match, MINMATCH) == ZSTD_readMINMATCH(ip, MINMATCH)) /* assumption : matchIndex3 <= dictLimit-4 (by table construction) */
- currentMl = ZSTD_count_2segments(ip+MINMATCH, match+MINMATCH, iLimit, dictEnd, prefixStart) + MINMATCH;
- }
-
- /* save best solution */
- if (currentMl > bestLength) {
- bestLength = currentMl;
- matches[mnum].off = ZSTD_REP_MOVE_OPT + current - matchIndex3;
- matches[mnum].len = (U32)currentMl;
- mnum++;
- if (currentMl > ZSTD_OPT_NUM) goto update;
- if (ip+currentMl == iLimit) goto update; /* best possible, and avoid read overflow*/
- }
- }
- }
-
- hashTable[h] = current; /* Update Hash Table */
-
- while (nbCompares-- && (matchIndex > windowLow)) {
- U32* nextPtr = bt + 2*(matchIndex & btMask);
- size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of common bytes */
- const BYTE* match;
-
- if ((!extDict) || (matchIndex+matchLength >= dictLimit)) {
- match = base + matchIndex;
- if (match[matchLength] == ip[matchLength]) {
- matchLength += ZSTD_count(ip+matchLength+1, match+matchLength+1, iLimit) +1;
- }
- } else {
- match = dictBase + matchIndex;
- matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iLimit, dictEnd, prefixStart);
- if (matchIndex+matchLength >= dictLimit)
- match = base + matchIndex; /* to prepare for next usage of match[matchLength] */
- }
-
- if (matchLength > bestLength) {
- if (matchLength > matchEndIdx - matchIndex) matchEndIdx = matchIndex + (U32)matchLength;
- bestLength = matchLength;
- matches[mnum].off = ZSTD_REP_MOVE_OPT + current - matchIndex;
- matches[mnum].len = (U32)matchLength;
- mnum++;
- if (matchLength > ZSTD_OPT_NUM) break;
- if (ip+matchLength == iLimit) /* equal : no way to know if inf or sup */
- break; /* drop, to guarantee consistency (miss a little bit of compression) */
- }
-
- if (match[matchLength] < ip[matchLength]) {
- /* match is smaller than current */
- *smallerPtr = matchIndex; /* update smaller idx */
- commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common length */
- if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */
- smallerPtr = nextPtr+1; /* new "smaller" => larger of match */
- matchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */
- } else {
- /* match is larger than current */
- *largerPtr = matchIndex;
- commonLengthLarger = matchLength;
- if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */
- largerPtr = nextPtr;
- matchIndex = nextPtr[0];
- } }
-
- *smallerPtr = *largerPtr = 0;
-
-update:
- zc->nextToUpdate = (matchEndIdx > current + 8) ? matchEndIdx - 8 : current+1;
- return mnum;
-}
-
-
-/** Tree updater, providing best match */
-static U32 ZSTD_BtGetAllMatches (
- ZSTD_CCtx* zc,
- const BYTE* const ip, const BYTE* const iLimit,
- const U32 maxNbAttempts, const U32 mls, ZSTD_match_t* matches, const U32 minMatchLen)
-{
- if (ip < zc->base + zc->nextToUpdate) return 0; /* skipped area */
- ZSTD_updateTree(zc, ip, iLimit, maxNbAttempts, mls);
- return ZSTD_insertBtAndGetAllMatches(zc, ip, iLimit, maxNbAttempts, mls, 0, matches, minMatchLen);
-}
-
-
-static U32 ZSTD_BtGetAllMatches_selectMLS (
- ZSTD_CCtx* zc, /* Index table will be updated */
- const BYTE* ip, const BYTE* const iHighLimit,
- const U32 maxNbAttempts, const U32 matchLengthSearch, ZSTD_match_t* matches, const U32 minMatchLen)
-{
- switch(matchLengthSearch)
- {
- case 3 : return ZSTD_BtGetAllMatches(zc, ip, iHighLimit, maxNbAttempts, 3, matches, minMatchLen);
- default :
- case 4 : return ZSTD_BtGetAllMatches(zc, ip, iHighLimit, maxNbAttempts, 4, matches, minMatchLen);
- case 5 : return ZSTD_BtGetAllMatches(zc, ip, iHighLimit, maxNbAttempts, 5, matches, minMatchLen);
- case 7 :
- case 6 : return ZSTD_BtGetAllMatches(zc, ip, iHighLimit, maxNbAttempts, 6, matches, minMatchLen);
- }
-}
-
-/** Tree updater, providing best match */
-static U32 ZSTD_BtGetAllMatches_extDict (
- ZSTD_CCtx* zc,
- const BYTE* const ip, const BYTE* const iLimit,
- const U32 maxNbAttempts, const U32 mls, ZSTD_match_t* matches, const U32 minMatchLen)
-{
- if (ip < zc->base + zc->nextToUpdate) return 0; /* skipped area */
- ZSTD_updateTree_extDict(zc, ip, iLimit, maxNbAttempts, mls);
- return ZSTD_insertBtAndGetAllMatches(zc, ip, iLimit, maxNbAttempts, mls, 1, matches, minMatchLen);
-}
-
-
-static U32 ZSTD_BtGetAllMatches_selectMLS_extDict (
- ZSTD_CCtx* zc, /* Index table will be updated */
- const BYTE* ip, const BYTE* const iHighLimit,
- const U32 maxNbAttempts, const U32 matchLengthSearch, ZSTD_match_t* matches, const U32 minMatchLen)
-{
- switch(matchLengthSearch)
- {
- case 3 : return ZSTD_BtGetAllMatches_extDict(zc, ip, iHighLimit, maxNbAttempts, 3, matches, minMatchLen);
- default :
- case 4 : return ZSTD_BtGetAllMatches_extDict(zc, ip, iHighLimit, maxNbAttempts, 4, matches, minMatchLen);
- case 5 : return ZSTD_BtGetAllMatches_extDict(zc, ip, iHighLimit, maxNbAttempts, 5, matches, minMatchLen);
- case 7 :
- case 6 : return ZSTD_BtGetAllMatches_extDict(zc, ip, iHighLimit, maxNbAttempts, 6, matches, minMatchLen);
- }
-}
-
-
-/*-*******************************
-* Optimal parser
-*********************************/
-FORCE_INLINE_TEMPLATE
-void ZSTD_compressBlock_opt_generic(ZSTD_CCtx* ctx,
- const void* src, size_t srcSize, const int ultra)
-{
- seqStore_t* seqStorePtr = &(ctx->seqStore);
- optState_t* optStatePtr = &(ctx->optState);
- const BYTE* const istart = (const BYTE*)src;
- const BYTE* ip = istart;
- const BYTE* anchor = istart;
- const BYTE* const iend = istart + srcSize;
- const BYTE* const ilimit = iend - 8;
- const BYTE* const base = ctx->base;
- const BYTE* const prefixStart = base + ctx->dictLimit;
-
- const U32 maxSearches = 1U << ctx->appliedParams.cParams.searchLog;
- const U32 sufficient_len = ctx->appliedParams.cParams.targetLength;
- const U32 mls = ctx->appliedParams.cParams.searchLength;
- const U32 minMatch = (ctx->appliedParams.cParams.searchLength == 3) ? 3 : 4;
-
- ZSTD_optimal_t* opt = optStatePtr->priceTable;
- ZSTD_match_t* matches = optStatePtr->matchTable;
- const BYTE* inr;
- U32 offset, rep[ZSTD_REP_NUM];
-
- /* init */
- ctx->nextToUpdate3 = ctx->nextToUpdate;
- ZSTD_rescaleFreqs(optStatePtr, (const BYTE*)src, srcSize);
- ip += (ip==prefixStart);
- { U32 i; for (i=0; i<ZSTD_REP_NUM; i++) rep[i]=seqStorePtr->rep[i]; }
-
- /* Match Loop */
- while (ip < ilimit) {
- U32 cur, match_num, last_pos, litlen, price;
- U32 u, mlen, best_mlen, best_off, litLength;
- memset(opt, 0, sizeof(ZSTD_optimal_t));
- last_pos = 0;
- litlen = (U32)(ip - anchor);
-
- /* check repCode */
- { U32 i, last_i = ZSTD_REP_CHECK + (ip==anchor);
- for (i=(ip == anchor); i<last_i; i++) {
- const S32 repCur = (i==ZSTD_REP_MOVE_OPT) ? (rep[0] - 1) : rep[i];
- if ( (repCur > 0) && (repCur < (S32)(ip-prefixStart))
- && (ZSTD_readMINMATCH(ip, minMatch) == ZSTD_readMINMATCH(ip - repCur, minMatch))) {
- mlen = (U32)ZSTD_count(ip+minMatch, ip+minMatch-repCur, iend) + minMatch;
- if (mlen > sufficient_len || mlen >= ZSTD_OPT_NUM) {
- best_mlen = mlen; best_off = i; cur = 0; last_pos = 1;
- goto _storeSequence;
- }
- best_off = i - (ip == anchor);
- do {
- price = ZSTD_getPrice(optStatePtr, litlen, anchor, best_off, mlen - MINMATCH, ultra);
- if (mlen > last_pos || price < opt[mlen].price)
- SET_PRICE(mlen, mlen, i, litlen, price); /* note : macro modifies last_pos */
- mlen--;
- } while (mlen >= minMatch);
- } } }
-
- match_num = ZSTD_BtGetAllMatches_selectMLS(ctx, ip, iend, maxSearches, mls, matches, minMatch);
-
- if (!last_pos && !match_num) { ip++; continue; }
-
- if (match_num && (matches[match_num-1].len > sufficient_len || matches[match_num-1].len >= ZSTD_OPT_NUM)) {
- best_mlen = matches[match_num-1].len;
- best_off = matches[match_num-1].off;
- cur = 0;
- last_pos = 1;
- goto _storeSequence;
- }
-
- /* set prices using matches at position = 0 */
- best_mlen = (last_pos) ? last_pos : minMatch;
- for (u = 0; u < match_num; u++) {
- mlen = (u>0) ? matches[u-1].len+1 : best_mlen;
- best_mlen = matches[u].len;
- while (mlen <= best_mlen) {
- price = ZSTD_getPrice(optStatePtr, litlen, anchor, matches[u].off-1, mlen - MINMATCH, ultra);
- if (mlen > last_pos || price < opt[mlen].price)
- SET_PRICE(mlen, mlen, matches[u].off, litlen, price); /* note : macro modifies last_pos */
- mlen++;
- } }
-
- if (last_pos < minMatch) { ip++; continue; }
-
- /* initialize opt[0] */
- { U32 i ; for (i=0; i<ZSTD_REP_NUM; i++) opt[0].rep[i] = rep[i]; }
- opt[0].mlen = 1;
- opt[0].litlen = litlen;
-
- /* check further positions */
- for (cur = 1; cur <= last_pos; cur++) {
- inr = ip + cur;
-
- if (opt[cur-1].mlen == 1) {
- litlen = opt[cur-1].litlen + 1;
- if (cur > litlen) {
- price = opt[cur - litlen].price + ZSTD_getLiteralPrice(optStatePtr, litlen, inr-litlen);
- } else
- price = ZSTD_getLiteralPrice(optStatePtr, litlen, anchor);
- } else {
- litlen = 1;
- price = opt[cur - 1].price + ZSTD_getLiteralPrice(optStatePtr, litlen, inr-1);
- }
-
- if (cur > last_pos || price <= opt[cur].price)
- SET_PRICE(cur, 1, 0, litlen, price);
-
- if (cur == last_pos) break;
-
- if (inr > ilimit) /* last match must start at a minimum distance of 8 from oend */
- continue;
-
- mlen = opt[cur].mlen;
- if (opt[cur].off > ZSTD_REP_MOVE_OPT) {
- opt[cur].rep[2] = opt[cur-mlen].rep[1];
- opt[cur].rep[1] = opt[cur-mlen].rep[0];
- opt[cur].rep[0] = opt[cur].off - ZSTD_REP_MOVE_OPT;
- } else {
- opt[cur].rep[2] = (opt[cur].off > 1) ? opt[cur-mlen].rep[1] : opt[cur-mlen].rep[2];
- opt[cur].rep[1] = (opt[cur].off > 0) ? opt[cur-mlen].rep[0] : opt[cur-mlen].rep[1];
- opt[cur].rep[0] = ((opt[cur].off==ZSTD_REP_MOVE_OPT) && (mlen != 1)) ? (opt[cur-mlen].rep[0] - 1) : (opt[cur-mlen].rep[opt[cur].off]);
- }
-
- best_mlen = minMatch;
- { U32 i, last_i = ZSTD_REP_CHECK + (mlen != 1);
- for (i=(opt[cur].mlen != 1); i<last_i; i++) { /* check rep */
- const S32 repCur = (i==ZSTD_REP_MOVE_OPT) ? (opt[cur].rep[0] - 1) : opt[cur].rep[i];
- if ( (repCur > 0) && (repCur < (S32)(inr-prefixStart))
- && (ZSTD_readMINMATCH(inr, minMatch) == ZSTD_readMINMATCH(inr - repCur, minMatch))) {
- mlen = (U32)ZSTD_count(inr+minMatch, inr+minMatch - repCur, iend) + minMatch;
-
- if (mlen > sufficient_len || cur + mlen >= ZSTD_OPT_NUM) {
- best_mlen = mlen; best_off = i; last_pos = cur + 1;
- goto _storeSequence;
- }
-
- best_off = i - (opt[cur].mlen != 1);
- if (mlen > best_mlen) best_mlen = mlen;
-
- do {
- if (opt[cur].mlen == 1) {
- litlen = opt[cur].litlen;
- if (cur > litlen) {
- price = opt[cur - litlen].price + ZSTD_getPrice(optStatePtr, litlen, inr-litlen, best_off, mlen - MINMATCH, ultra);
- } else
- price = ZSTD_getPrice(optStatePtr, litlen, anchor, best_off, mlen - MINMATCH, ultra);
- } else {
- litlen = 0;
- price = opt[cur].price + ZSTD_getPrice(optStatePtr, 0, NULL, best_off, mlen - MINMATCH, ultra);
- }
-
- if (cur + mlen > last_pos || price <= opt[cur + mlen].price)
- SET_PRICE(cur + mlen, mlen, i, litlen, price);
- mlen--;
- } while (mlen >= minMatch);
- } } }
-
- match_num = ZSTD_BtGetAllMatches_selectMLS(ctx, inr, iend, maxSearches, mls, matches, best_mlen);
-
- if (match_num > 0 && (matches[match_num-1].len > sufficient_len || cur + matches[match_num-1].len >= ZSTD_OPT_NUM)) {
- best_mlen = matches[match_num-1].len;
- best_off = matches[match_num-1].off;
- last_pos = cur + 1;
- goto _storeSequence;
- }
-
- /* set prices using matches at position = cur */
- for (u = 0; u < match_num; u++) {
- mlen = (u>0) ? matches[u-1].len+1 : best_mlen;
- best_mlen = matches[u].len;
-
- while (mlen <= best_mlen) {
- if (opt[cur].mlen == 1) {
- litlen = opt[cur].litlen;
- if (cur > litlen)
- price = opt[cur - litlen].price + ZSTD_getPrice(optStatePtr, litlen, ip+cur-litlen, matches[u].off-1, mlen - MINMATCH, ultra);
- else
- price = ZSTD_getPrice(optStatePtr, litlen, anchor, matches[u].off-1, mlen - MINMATCH, ultra);
- } else {
- litlen = 0;
- price = opt[cur].price + ZSTD_getPrice(optStatePtr, 0, NULL, matches[u].off-1, mlen - MINMATCH, ultra);
- }
-
- if (cur + mlen > last_pos || (price < opt[cur + mlen].price))
- SET_PRICE(cur + mlen, mlen, matches[u].off, litlen, price);
-
- mlen++;
- } } }
-
- best_mlen = opt[last_pos].mlen;
- best_off = opt[last_pos].off;
- cur = last_pos - best_mlen;
-
- /* store sequence */
-_storeSequence: /* cur, last_pos, best_mlen, best_off have to be set */
- opt[0].mlen = 1;
-
- while (1) {
- mlen = opt[cur].mlen;
- offset = opt[cur].off;
- opt[cur].mlen = best_mlen;
- opt[cur].off = best_off;
- best_mlen = mlen;
- best_off = offset;
- if (mlen > cur) break;
- cur -= mlen;
- }
-
- for (u = 0; u <= last_pos;) {
- u += opt[u].mlen;
- }
-
- for (cur=0; cur < last_pos; ) {
- mlen = opt[cur].mlen;
- if (mlen == 1) { ip++; cur++; continue; }
- offset = opt[cur].off;
- cur += mlen;
- litLength = (U32)(ip - anchor);
-
- if (offset > ZSTD_REP_MOVE_OPT) {
- rep[2] = rep[1];
- rep[1] = rep[0];
- rep[0] = offset - ZSTD_REP_MOVE_OPT;
- offset--;
- } else {
- if (offset != 0) {
- best_off = (offset==ZSTD_REP_MOVE_OPT) ? (rep[0] - 1) : (rep[offset]);
- if (offset != 1) rep[2] = rep[1];
- rep[1] = rep[0];
- rep[0] = best_off;
- }
- if (litLength==0) offset--;
- }
-
- ZSTD_updatePrice(optStatePtr, litLength, anchor, offset, mlen-MINMATCH);
- ZSTD_storeSeq(seqStorePtr, litLength, anchor, offset, mlen-MINMATCH);
- anchor = ip = ip + mlen;
- } } /* for (cur=0; cur < last_pos; ) */
-
- /* Save reps for next block */
- { int i; for (i=0; i<ZSTD_REP_NUM; i++) seqStorePtr->repToConfirm[i] = rep[i]; }
-
- /* Last Literals */
- { size_t const lastLLSize = iend - anchor;
- memcpy(seqStorePtr->lit, anchor, lastLLSize);
- seqStorePtr->lit += lastLLSize;
- }
-}
-
-
-FORCE_INLINE_TEMPLATE
-void ZSTD_compressBlock_opt_extDict_generic(ZSTD_CCtx* ctx,
- const void* src, size_t srcSize, const int ultra)
-{
- seqStore_t* seqStorePtr = &(ctx->seqStore);
- optState_t* optStatePtr = &(ctx->optState);
- const BYTE* const istart = (const BYTE*)src;
- const BYTE* ip = istart;
- const BYTE* anchor = istart;
- const BYTE* const iend = istart + srcSize;
- const BYTE* const ilimit = iend - 8;
- const BYTE* const base = ctx->base;
- const U32 lowestIndex = ctx->lowLimit;
- const U32 dictLimit = ctx->dictLimit;
- const BYTE* const prefixStart = base + dictLimit;
- const BYTE* const dictBase = ctx->dictBase;
- const BYTE* const dictEnd = dictBase + dictLimit;
-
- const U32 maxSearches = 1U << ctx->appliedParams.cParams.searchLog;
- const U32 sufficient_len = ctx->appliedParams.cParams.targetLength;
- const U32 mls = ctx->appliedParams.cParams.searchLength;
- const U32 minMatch = (ctx->appliedParams.cParams.searchLength == 3) ? 3 : 4;
-
- ZSTD_optimal_t* opt = optStatePtr->priceTable;
- ZSTD_match_t* matches = optStatePtr->matchTable;
- const BYTE* inr;
-
- /* init */
- U32 offset, rep[ZSTD_REP_NUM];
- { U32 i; for (i=0; i<ZSTD_REP_NUM; i++) rep[i]=seqStorePtr->rep[i]; }
-
- ctx->nextToUpdate3 = ctx->nextToUpdate;
- ZSTD_rescaleFreqs(optStatePtr, (const BYTE*)src, srcSize);
- ip += (ip==prefixStart);
-
- /* Match Loop */
- while (ip < ilimit) {
- U32 cur, match_num, last_pos, litlen, price;
- U32 u, mlen, best_mlen, best_off, litLength;
- U32 current = (U32)(ip-base);
- memset(opt, 0, sizeof(ZSTD_optimal_t));
- last_pos = 0;
- opt[0].litlen = (U32)(ip - anchor);
-
- /* check repCode */
- { U32 i, last_i = ZSTD_REP_CHECK + (ip==anchor);
- for (i = (ip==anchor); i<last_i; i++) {
- const S32 repCur = (i==ZSTD_REP_MOVE_OPT) ? (rep[0] - 1) : rep[i];
- const U32 repIndex = (U32)(current - repCur);
- const BYTE* const repBase = repIndex < dictLimit ? dictBase : base;
- const BYTE* const repMatch = repBase + repIndex;
- if ( (repCur > 0 && repCur <= (S32)current)
- && (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex>lowestIndex)) /* intentional overflow */
- && (ZSTD_readMINMATCH(ip, minMatch) == ZSTD_readMINMATCH(repMatch, minMatch)) ) {
- /* repcode detected we should take it */
- const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend;
- mlen = (U32)ZSTD_count_2segments(ip+minMatch, repMatch+minMatch, iend, repEnd, prefixStart) + minMatch;
-
- if (mlen > sufficient_len || mlen >= ZSTD_OPT_NUM) {
- best_mlen = mlen; best_off = i; cur = 0; last_pos = 1;
- goto _storeSequence;
- }
-
- best_off = i - (ip==anchor);
- litlen = opt[0].litlen;
- do {
- price = ZSTD_getPrice(optStatePtr, litlen, anchor, best_off, mlen - MINMATCH, ultra);
- if (mlen > last_pos || price < opt[mlen].price)
- SET_PRICE(mlen, mlen, i, litlen, price); /* note : macro modifies last_pos */
- mlen--;
- } while (mlen >= minMatch);
- } } }
-
- match_num = ZSTD_BtGetAllMatches_selectMLS_extDict(ctx, ip, iend, maxSearches, mls, matches, minMatch); /* first search (depth 0) */
-
- if (!last_pos && !match_num) { ip++; continue; }
-
- { U32 i; for (i=0; i<ZSTD_REP_NUM; i++) opt[0].rep[i] = rep[i]; }
- opt[0].mlen = 1;
-
- if (match_num && (matches[match_num-1].len > sufficient_len || matches[match_num-1].len >= ZSTD_OPT_NUM)) {
- best_mlen = matches[match_num-1].len;
- best_off = matches[match_num-1].off;
- cur = 0;
- last_pos = 1;
- goto _storeSequence;
- }
-
- best_mlen = (last_pos) ? last_pos : minMatch;
-
- /* set prices using matches at position = 0 */
- for (u = 0; u < match_num; u++) {
- mlen = (u>0) ? matches[u-1].len+1 : best_mlen;
- best_mlen = matches[u].len;
- litlen = opt[0].litlen;
- while (mlen <= best_mlen) {
- price = ZSTD_getPrice(optStatePtr, litlen, anchor, matches[u].off-1, mlen - MINMATCH, ultra);
- if (mlen > last_pos || price < opt[mlen].price)
- SET_PRICE(mlen, mlen, matches[u].off, litlen, price);
- mlen++;
- } }
-
- if (last_pos < minMatch) {
- ip++; continue;
- }
-
- /* check further positions */
- for (cur = 1; cur <= last_pos; cur++) {
- inr = ip + cur;
-
- if (opt[cur-1].mlen == 1) {
- litlen = opt[cur-1].litlen + 1;
- if (cur > litlen) {
- price = opt[cur - litlen].price + ZSTD_getLiteralPrice(optStatePtr, litlen, inr-litlen);
- } else
- price = ZSTD_getLiteralPrice(optStatePtr, litlen, anchor);
- } else {
- litlen = 1;
- price = opt[cur - 1].price + ZSTD_getLiteralPrice(optStatePtr, litlen, inr-1);
- }
-
- if (cur > last_pos || price <= opt[cur].price)
- SET_PRICE(cur, 1, 0, litlen, price);
-
- if (cur == last_pos) break;
-
- if (inr > ilimit) /* last match must start at a minimum distance of 8 from oend */
- continue;
-
- mlen = opt[cur].mlen;
- if (opt[cur].off > ZSTD_REP_MOVE_OPT) {
- opt[cur].rep[2] = opt[cur-mlen].rep[1];
- opt[cur].rep[1] = opt[cur-mlen].rep[0];
- opt[cur].rep[0] = opt[cur].off - ZSTD_REP_MOVE_OPT;
- } else {
- opt[cur].rep[2] = (opt[cur].off > 1) ? opt[cur-mlen].rep[1] : opt[cur-mlen].rep[2];
- opt[cur].rep[1] = (opt[cur].off > 0) ? opt[cur-mlen].rep[0] : opt[cur-mlen].rep[1];
- opt[cur].rep[0] = ((opt[cur].off==ZSTD_REP_MOVE_OPT) && (mlen != 1)) ? (opt[cur-mlen].rep[0] - 1) : (opt[cur-mlen].rep[opt[cur].off]);
- }
-
- best_mlen = minMatch;
- { U32 i, last_i = ZSTD_REP_CHECK + (mlen != 1);
- for (i = (mlen != 1); i<last_i; i++) {
- const S32 repCur = (i==ZSTD_REP_MOVE_OPT) ? (opt[cur].rep[0] - 1) : opt[cur].rep[i];
- const U32 repIndex = (U32)(current+cur - repCur);
- const BYTE* const repBase = repIndex < dictLimit ? dictBase : base;
- const BYTE* const repMatch = repBase + repIndex;
- if ( (repCur > 0 && repCur <= (S32)(current+cur))
- && (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex>lowestIndex)) /* intentional overflow */
- && (ZSTD_readMINMATCH(inr, minMatch) == ZSTD_readMINMATCH(repMatch, minMatch)) ) {
- /* repcode detected */
- const BYTE* const repEnd = repIndex < dictLimit ? dictEnd : iend;
- mlen = (U32)ZSTD_count_2segments(inr+minMatch, repMatch+minMatch, iend, repEnd, prefixStart) + minMatch;
-
- if (mlen > sufficient_len || cur + mlen >= ZSTD_OPT_NUM) {
- best_mlen = mlen; best_off = i; last_pos = cur + 1;
- goto _storeSequence;
- }
-
- best_off = i - (opt[cur].mlen != 1);
- if (mlen > best_mlen) best_mlen = mlen;
-
- do {
- if (opt[cur].mlen == 1) {
- litlen = opt[cur].litlen;
- if (cur > litlen) {
- price = opt[cur - litlen].price + ZSTD_getPrice(optStatePtr, litlen, inr-litlen, best_off, mlen - MINMATCH, ultra);
- } else
- price = ZSTD_getPrice(optStatePtr, litlen, anchor, best_off, mlen - MINMATCH, ultra);
- } else {
- litlen = 0;
- price = opt[cur].price + ZSTD_getPrice(optStatePtr, 0, NULL, best_off, mlen - MINMATCH, ultra);
- }
-
- if (cur + mlen > last_pos || price <= opt[cur + mlen].price)
- SET_PRICE(cur + mlen, mlen, i, litlen, price);
- mlen--;
- } while (mlen >= minMatch);
- } } }
-
- match_num = ZSTD_BtGetAllMatches_selectMLS_extDict(ctx, inr, iend, maxSearches, mls, matches, minMatch);
-
- if (match_num > 0 && (matches[match_num-1].len > sufficient_len || cur + matches[match_num-1].len >= ZSTD_OPT_NUM)) {
- best_mlen = matches[match_num-1].len;
- best_off = matches[match_num-1].off;
- last_pos = cur + 1;
- goto _storeSequence;
- }
-
- /* set prices using matches at position = cur */
- for (u = 0; u < match_num; u++) {
- mlen = (u>0) ? matches[u-1].len+1 : best_mlen;
- best_mlen = matches[u].len;
-
- while (mlen <= best_mlen) {
- if (opt[cur].mlen == 1) {
- litlen = opt[cur].litlen;
- if (cur > litlen)
- price = opt[cur - litlen].price + ZSTD_getPrice(optStatePtr, litlen, ip+cur-litlen, matches[u].off-1, mlen - MINMATCH, ultra);
- else
- price = ZSTD_getPrice(optStatePtr, litlen, anchor, matches[u].off-1, mlen - MINMATCH, ultra);
- } else {
- litlen = 0;
- price = opt[cur].price + ZSTD_getPrice(optStatePtr, 0, NULL, matches[u].off-1, mlen - MINMATCH, ultra);
- }
-
- if (cur + mlen > last_pos || (price < opt[cur + mlen].price))
- SET_PRICE(cur + mlen, mlen, matches[u].off, litlen, price);
-
- mlen++;
- } } } /* for (cur = 1; cur <= last_pos; cur++) */
-
- best_mlen = opt[last_pos].mlen;
- best_off = opt[last_pos].off;
- cur = last_pos - best_mlen;
-
- /* store sequence */
-_storeSequence: /* cur, last_pos, best_mlen, best_off have to be set */
- opt[0].mlen = 1;
-
- while (1) {
- mlen = opt[cur].mlen;
- offset = opt[cur].off;
- opt[cur].mlen = best_mlen;
- opt[cur].off = best_off;
- best_mlen = mlen;
- best_off = offset;
- if (mlen > cur) break;
- cur -= mlen;
- }
-
- for (u = 0; u <= last_pos; ) {
- u += opt[u].mlen;
- }
-
- for (cur=0; cur < last_pos; ) {
- mlen = opt[cur].mlen;
- if (mlen == 1) { ip++; cur++; continue; }
- offset = opt[cur].off;
- cur += mlen;
- litLength = (U32)(ip - anchor);
-
- if (offset > ZSTD_REP_MOVE_OPT) {
- rep[2] = rep[1];
- rep[1] = rep[0];
- rep[0] = offset - ZSTD_REP_MOVE_OPT;
- offset--;
- } else {
- if (offset != 0) {
- best_off = (offset==ZSTD_REP_MOVE_OPT) ? (rep[0] - 1) : (rep[offset]);
- if (offset != 1) rep[2] = rep[1];
- rep[1] = rep[0];
- rep[0] = best_off;
- }
-
- if (litLength==0) offset--;
- }
-
- ZSTD_updatePrice(optStatePtr, litLength, anchor, offset, mlen-MINMATCH);
- ZSTD_storeSeq(seqStorePtr, litLength, anchor, offset, mlen-MINMATCH);
- anchor = ip = ip + mlen;
- } } /* for (cur=0; cur < last_pos; ) */
-
- /* Save reps for next block */
- { int i; for (i=0; i<ZSTD_REP_NUM; i++) seqStorePtr->repToConfirm[i] = rep[i]; }
-
- /* Last Literals */
- { size_t lastLLSize = iend - anchor;
- memcpy(seqStorePtr->lit, anchor, lastLLSize);
- seqStorePtr->lit += lastLLSize;
- }
+#if defined (__cplusplus)
}
+#endif
-#endif /* ZSTD_OPT_H_91842398743 */
+#endif /* ZSTD_OPT_H */
diff --git a/thirdparty/zstd/compress/zstdmt_compress.c b/thirdparty/zstd/compress/zstdmt_compress.c
index 8564bc4392..7831cd3bd8 100644
--- a/thirdparty/zstd/compress/zstdmt_compress.c
+++ b/thirdparty/zstd/compress/zstdmt_compress.c
@@ -5,11 +5,12 @@
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
*/
/* ====== Tuning parameters ====== */
-#define ZSTDMT_NBTHREADS_MAX 256
+#define ZSTDMT_NBTHREADS_MAX 200
#define ZSTDMT_OVERLAPLOG_DEFAULT 6
@@ -52,22 +53,24 @@ static unsigned long long GetCurrentClockTimeMicroseconds(void)
}
#define MUTEX_WAIT_TIME_DLEVEL 6
-#define PTHREAD_MUTEX_LOCK(mutex) { \
- if (ZSTD_DEBUG>=MUTEX_WAIT_TIME_DLEVEL) { \
+#define ZSTD_PTHREAD_MUTEX_LOCK(mutex) { \
+ if (ZSTD_DEBUG >= MUTEX_WAIT_TIME_DLEVEL) { \
unsigned long long const beforeTime = GetCurrentClockTimeMicroseconds(); \
- pthread_mutex_lock(mutex); \
+ ZSTD_pthread_mutex_lock(mutex); \
{ unsigned long long const afterTime = GetCurrentClockTimeMicroseconds(); \
unsigned long long const elapsedTime = (afterTime-beforeTime); \
if (elapsedTime > 1000) { /* or whatever threshold you like; I'm using 1 millisecond here */ \
DEBUGLOG(MUTEX_WAIT_TIME_DLEVEL, "Thread took %llu microseconds to acquire mutex %s \n", \
elapsedTime, #mutex); \
} } \
- } else pthread_mutex_lock(mutex); \
+ } else { \
+ ZSTD_pthread_mutex_lock(mutex); \
+ } \
}
#else
-# define PTHREAD_MUTEX_LOCK(m) pthread_mutex_lock(m)
+# define ZSTD_PTHREAD_MUTEX_LOCK(m) ZSTD_pthread_mutex_lock(m)
# define DEBUG_PRINTHEX(l,p,n) {}
#endif
@@ -84,7 +87,7 @@ typedef struct buffer_s {
static const buffer_t g_nullBuffer = { NULL, 0 };
typedef struct ZSTDMT_bufferPool_s {
- pthread_mutex_t poolMutex;
+ ZSTD_pthread_mutex_t poolMutex;
size_t bufferSize;
unsigned totalBuffers;
unsigned nbBuffers;
@@ -98,7 +101,7 @@ static ZSTDMT_bufferPool* ZSTDMT_createBufferPool(unsigned nbThreads, ZSTD_custo
ZSTDMT_bufferPool* const bufPool = (ZSTDMT_bufferPool*)ZSTD_calloc(
sizeof(ZSTDMT_bufferPool) + (maxNbBuffers-1) * sizeof(buffer_t), cMem);
if (bufPool==NULL) return NULL;
- if (pthread_mutex_init(&bufPool->poolMutex, NULL)) {
+ if (ZSTD_pthread_mutex_init(&bufPool->poolMutex, NULL)) {
ZSTD_free(bufPool, cMem);
return NULL;
}
@@ -112,10 +115,13 @@ static ZSTDMT_bufferPool* ZSTDMT_createBufferPool(unsigned nbThreads, ZSTD_custo
static void ZSTDMT_freeBufferPool(ZSTDMT_bufferPool* bufPool)
{
unsigned u;
+ DEBUGLOG(3, "ZSTDMT_freeBufferPool (address:%08X)", (U32)(size_t)bufPool);
if (!bufPool) return; /* compatibility with free on NULL */
- for (u=0; u<bufPool->totalBuffers; u++)
+ for (u=0; u<bufPool->totalBuffers; u++) {
+ DEBUGLOG(4, "free buffer %2u (address:%08X)", u, (U32)(size_t)bufPool->bTable[u].start);
ZSTD_free(bufPool->bTable[u].start, bufPool->cMem);
- pthread_mutex_destroy(&bufPool->poolMutex);
+ }
+ ZSTD_pthread_mutex_destroy(&bufPool->poolMutex);
ZSTD_free(bufPool, bufPool->cMem);
}
@@ -126,10 +132,10 @@ static size_t ZSTDMT_sizeof_bufferPool(ZSTDMT_bufferPool* bufPool)
+ (bufPool->totalBuffers - 1) * sizeof(buffer_t);
unsigned u;
size_t totalBufferSize = 0;
- pthread_mutex_lock(&bufPool->poolMutex);
+ ZSTD_pthread_mutex_lock(&bufPool->poolMutex);
for (u=0; u<bufPool->totalBuffers; u++)
totalBufferSize += bufPool->bTable[u].size;
- pthread_mutex_unlock(&bufPool->poolMutex);
+ ZSTD_pthread_mutex_unlock(&bufPool->poolMutex);
return poolSize + totalBufferSize;
}
@@ -145,20 +151,21 @@ static buffer_t ZSTDMT_getBuffer(ZSTDMT_bufferPool* bufPool)
{
size_t const bSize = bufPool->bufferSize;
DEBUGLOG(5, "ZSTDMT_getBuffer");
- pthread_mutex_lock(&bufPool->poolMutex);
+ ZSTD_pthread_mutex_lock(&bufPool->poolMutex);
if (bufPool->nbBuffers) { /* try to use an existing buffer */
buffer_t const buf = bufPool->bTable[--(bufPool->nbBuffers)];
size_t const availBufferSize = buf.size;
+ bufPool->bTable[bufPool->nbBuffers] = g_nullBuffer;
if ((availBufferSize >= bSize) & (availBufferSize <= 10*bSize)) {
/* large enough, but not too much */
- pthread_mutex_unlock(&bufPool->poolMutex);
+ ZSTD_pthread_mutex_unlock(&bufPool->poolMutex);
return buf;
}
/* size conditions not respected : scratch this buffer, create new one */
DEBUGLOG(5, "existing buffer does not meet size conditions => freeing");
ZSTD_free(buf.start, bufPool->cMem);
}
- pthread_mutex_unlock(&bufPool->poolMutex);
+ ZSTD_pthread_mutex_unlock(&bufPool->poolMutex);
/* create new buffer */
DEBUGLOG(5, "create a new buffer");
{ buffer_t buffer;
@@ -174,24 +181,38 @@ static void ZSTDMT_releaseBuffer(ZSTDMT_bufferPool* bufPool, buffer_t buf)
{
if (buf.start == NULL) return; /* compatible with release on NULL */
DEBUGLOG(5, "ZSTDMT_releaseBuffer");
- pthread_mutex_lock(&bufPool->poolMutex);
+ ZSTD_pthread_mutex_lock(&bufPool->poolMutex);
if (bufPool->nbBuffers < bufPool->totalBuffers) {
bufPool->bTable[bufPool->nbBuffers++] = buf; /* stored for later use */
- pthread_mutex_unlock(&bufPool->poolMutex);
+ ZSTD_pthread_mutex_unlock(&bufPool->poolMutex);
return;
}
- pthread_mutex_unlock(&bufPool->poolMutex);
+ ZSTD_pthread_mutex_unlock(&bufPool->poolMutex);
/* Reached bufferPool capacity (should not happen) */
DEBUGLOG(5, "buffer pool capacity reached => freeing ");
ZSTD_free(buf.start, bufPool->cMem);
}
+/* Sets parameters relevant to the compression job, initializing others to
+ * default values. Notably, nbThreads should probably be zero. */
+static ZSTD_CCtx_params ZSTDMT_makeJobCCtxParams(ZSTD_CCtx_params const params)
+{
+ ZSTD_CCtx_params jobParams;
+ memset(&jobParams, 0, sizeof(jobParams));
+
+ jobParams.cParams = params.cParams;
+ jobParams.fParams = params.fParams;
+ jobParams.compressionLevel = params.compressionLevel;
+
+ jobParams.ldmParams = params.ldmParams;
+ return jobParams;
+}
/* ===== CCtx Pool ===== */
/* a single CCtx Pool can be invoked from multiple threads in parallel */
typedef struct {
- pthread_mutex_t poolMutex;
+ ZSTD_pthread_mutex_t poolMutex;
unsigned totalCCtx;
unsigned availCCtx;
ZSTD_customMem cMem;
@@ -204,7 +225,7 @@ static void ZSTDMT_freeCCtxPool(ZSTDMT_CCtxPool* pool)
unsigned u;
for (u=0; u<pool->totalCCtx; u++)
ZSTD_freeCCtx(pool->cctx[u]); /* note : compatible with free on NULL */
- pthread_mutex_destroy(&pool->poolMutex);
+ ZSTD_pthread_mutex_destroy(&pool->poolMutex);
ZSTD_free(pool, pool->cMem);
}
@@ -216,7 +237,7 @@ static ZSTDMT_CCtxPool* ZSTDMT_createCCtxPool(unsigned nbThreads,
ZSTDMT_CCtxPool* const cctxPool = (ZSTDMT_CCtxPool*) ZSTD_calloc(
sizeof(ZSTDMT_CCtxPool) + (nbThreads-1)*sizeof(ZSTD_CCtx*), cMem);
if (!cctxPool) return NULL;
- if (pthread_mutex_init(&cctxPool->poolMutex, NULL)) {
+ if (ZSTD_pthread_mutex_init(&cctxPool->poolMutex, NULL)) {
ZSTD_free(cctxPool, cMem);
return NULL;
}
@@ -232,7 +253,7 @@ static ZSTDMT_CCtxPool* ZSTDMT_createCCtxPool(unsigned nbThreads,
/* only works during initialization phase, not during compression */
static size_t ZSTDMT_sizeof_CCtxPool(ZSTDMT_CCtxPool* cctxPool)
{
- pthread_mutex_lock(&cctxPool->poolMutex);
+ ZSTD_pthread_mutex_lock(&cctxPool->poolMutex);
{ unsigned const nbThreads = cctxPool->totalCCtx;
size_t const poolSize = sizeof(*cctxPool)
+ (nbThreads-1)*sizeof(ZSTD_CCtx*);
@@ -241,7 +262,7 @@ static size_t ZSTDMT_sizeof_CCtxPool(ZSTDMT_CCtxPool* cctxPool)
for (u=0; u<nbThreads; u++) {
totalCCtxSize += ZSTD_sizeof_CCtx(cctxPool->cctx[u]);
}
- pthread_mutex_unlock(&cctxPool->poolMutex);
+ ZSTD_pthread_mutex_unlock(&cctxPool->poolMutex);
return poolSize + totalCCtxSize;
}
}
@@ -249,14 +270,14 @@ static size_t ZSTDMT_sizeof_CCtxPool(ZSTDMT_CCtxPool* cctxPool)
static ZSTD_CCtx* ZSTDMT_getCCtx(ZSTDMT_CCtxPool* cctxPool)
{
DEBUGLOG(5, "ZSTDMT_getCCtx");
- pthread_mutex_lock(&cctxPool->poolMutex);
+ ZSTD_pthread_mutex_lock(&cctxPool->poolMutex);
if (cctxPool->availCCtx) {
cctxPool->availCCtx--;
{ ZSTD_CCtx* const cctx = cctxPool->cctx[cctxPool->availCCtx];
- pthread_mutex_unlock(&cctxPool->poolMutex);
+ ZSTD_pthread_mutex_unlock(&cctxPool->poolMutex);
return cctx;
} }
- pthread_mutex_unlock(&cctxPool->poolMutex);
+ ZSTD_pthread_mutex_unlock(&cctxPool->poolMutex);
DEBUGLOG(5, "create one more CCtx");
return ZSTD_createCCtx_advanced(cctxPool->cMem); /* note : can be NULL, when creation fails ! */
}
@@ -264,7 +285,7 @@ static ZSTD_CCtx* ZSTDMT_getCCtx(ZSTDMT_CCtxPool* cctxPool)
static void ZSTDMT_releaseCCtx(ZSTDMT_CCtxPool* pool, ZSTD_CCtx* cctx)
{
if (cctx==NULL) return; /* compatibility with release on NULL */
- pthread_mutex_lock(&pool->poolMutex);
+ ZSTD_pthread_mutex_lock(&pool->poolMutex);
if (pool->availCCtx < pool->totalCCtx)
pool->cctx[pool->availCCtx++] = cctx;
else {
@@ -272,7 +293,7 @@ static void ZSTDMT_releaseCCtx(ZSTDMT_CCtxPool* pool, ZSTD_CCtx* cctx)
DEBUGLOG(5, "CCtx pool overflow : free cctx");
ZSTD_freeCCtx(cctx);
}
- pthread_mutex_unlock(&pool->poolMutex);
+ ZSTD_pthread_mutex_unlock(&pool->poolMutex);
}
@@ -290,9 +311,9 @@ typedef struct {
unsigned lastChunk;
unsigned jobCompleted;
unsigned jobScanned;
- pthread_mutex_t* jobCompleted_mutex;
- pthread_cond_t* jobCompleted_cond;
- ZSTD_parameters params;
+ ZSTD_pthread_mutex_t* jobCompleted_mutex;
+ ZSTD_pthread_cond_t* jobCompleted_cond;
+ ZSTD_CCtx_params params;
const ZSTD_CDict* cdict;
ZSTDMT_CCtxPool* cctxPool;
ZSTDMT_bufferPool* bufPool;
@@ -329,10 +350,15 @@ void ZSTDMT_compressChunk(void* jobDescription)
if (ZSTD_isError(initError)) { job->cSize = initError; goto _endJob; }
} else { /* srcStart points at reloaded section */
if (!job->firstChunk) job->params.fParams.contentSizeFlag = 0; /* ensure no srcSize control */
- { size_t const dictModeError = ZSTD_setCCtxParameter(cctx, ZSTD_p_forceRawDict, 1); /* Force loading dictionary in "content-only" mode (no header analysis) */
- size_t const initError = ZSTD_compressBegin_advanced(cctx, job->srcStart, job->dictSize, job->params, job->fullFrameSize);
- if (ZSTD_isError(initError) || ZSTD_isError(dictModeError)) { job->cSize = initError; goto _endJob; }
- ZSTD_setCCtxParameter(cctx, ZSTD_p_forceWindow, 1);
+ { ZSTD_CCtx_params jobParams = job->params;
+ size_t const forceWindowError =
+ ZSTD_CCtxParam_setParameter(&jobParams, ZSTD_p_forceMaxWindow, !job->firstChunk);
+ /* Force loading dictionary in "content-only" mode (no header analysis) */
+ size_t const initError = ZSTD_compressBegin_advanced_internal(cctx, job->srcStart, job->dictSize, ZSTD_dm_rawContent, jobParams, job->fullFrameSize);
+ if (ZSTD_isError(initError) || ZSTD_isError(forceWindowError)) {
+ job->cSize = initError;
+ goto _endJob;
+ }
} }
if (!job->firstChunk) { /* flush and overwrite frame header when it's not first segment */
size_t const hSize = ZSTD_compressContinue(cctx, dstBuff.start, dstBuff.size, src, 0);
@@ -353,11 +379,11 @@ _endJob:
ZSTDMT_releaseCCtx(job->cctxPool, cctx);
ZSTDMT_releaseBuffer(job->bufPool, job->src);
job->src = g_nullBuffer; job->srcStart = NULL;
- PTHREAD_MUTEX_LOCK(job->jobCompleted_mutex);
+ ZSTD_PTHREAD_MUTEX_LOCK(job->jobCompleted_mutex);
job->jobCompleted = 1;
job->jobScanned = 0;
- pthread_cond_signal(job->jobCompleted_cond);
- pthread_mutex_unlock(job->jobCompleted_mutex);
+ ZSTD_pthread_cond_signal(job->jobCompleted_cond);
+ ZSTD_pthread_mutex_unlock(job->jobCompleted_mutex);
}
@@ -375,24 +401,21 @@ struct ZSTDMT_CCtx_s {
ZSTDMT_jobDescription* jobs;
ZSTDMT_bufferPool* bufPool;
ZSTDMT_CCtxPool* cctxPool;
- pthread_mutex_t jobCompleted_mutex;
- pthread_cond_t jobCompleted_cond;
+ ZSTD_pthread_mutex_t jobCompleted_mutex;
+ ZSTD_pthread_cond_t jobCompleted_cond;
size_t targetSectionSize;
size_t inBuffSize;
size_t dictSize;
size_t targetDictSize;
inBuff_t inBuff;
- ZSTD_parameters params;
+ ZSTD_CCtx_params params;
XXH64_state_t xxhState;
- unsigned nbThreads;
unsigned jobIDMask;
unsigned doneJobID;
unsigned nextJobID;
unsigned frameEnded;
unsigned allJobsCompleted;
- unsigned overlapLog;
unsigned long long frameContentSize;
- size_t sectionSize;
ZSTD_customMem cMem;
ZSTD_CDict* cdictLocal;
const ZSTD_CDict* cdict;
@@ -407,6 +430,15 @@ static ZSTDMT_jobDescription* ZSTDMT_allocJobsTable(U32* nbJobsPtr, ZSTD_customM
nbJobs * sizeof(ZSTDMT_jobDescription), cMem);
}
+/* Internal only */
+size_t ZSTDMT_initializeCCtxParameters(ZSTD_CCtx_params* params, unsigned nbThreads)
+{
+ params->nbThreads = nbThreads;
+ params->overlapSizeLog = ZSTDMT_OVERLAPLOG_DEFAULT;
+ params->jobSize = 0;
+ return 0;
+}
+
ZSTDMT_CCtx* ZSTDMT_createCCtx_advanced(unsigned nbThreads, ZSTD_customMem cMem)
{
ZSTDMT_CCtx* mtctx;
@@ -421,12 +453,10 @@ ZSTDMT_CCtx* ZSTDMT_createCCtx_advanced(unsigned nbThreads, ZSTD_customMem cMem)
mtctx = (ZSTDMT_CCtx*) ZSTD_calloc(sizeof(ZSTDMT_CCtx), cMem);
if (!mtctx) return NULL;
+ ZSTDMT_initializeCCtxParameters(&mtctx->params, nbThreads);
mtctx->cMem = cMem;
- mtctx->nbThreads = nbThreads;
mtctx->allJobsCompleted = 1;
- mtctx->sectionSize = 0;
- mtctx->overlapLog = ZSTDMT_OVERLAPLOG_DEFAULT;
- mtctx->factory = POOL_create(nbThreads, 0);
+ mtctx->factory = POOL_create_advanced(nbThreads, 0, cMem);
mtctx->jobs = ZSTDMT_allocJobsTable(&nbJobs, cMem);
mtctx->jobIDMask = nbJobs - 1;
mtctx->bufPool = ZSTDMT_createBufferPool(nbThreads, cMem);
@@ -435,11 +465,11 @@ ZSTDMT_CCtx* ZSTDMT_createCCtx_advanced(unsigned nbThreads, ZSTD_customMem cMem)
ZSTDMT_freeCCtx(mtctx);
return NULL;
}
- if (pthread_mutex_init(&mtctx->jobCompleted_mutex, NULL)) {
+ if (ZSTD_pthread_mutex_init(&mtctx->jobCompleted_mutex, NULL)) {
ZSTDMT_freeCCtx(mtctx);
return NULL;
}
- if (pthread_cond_init(&mtctx->jobCompleted_cond, NULL)) {
+ if (ZSTD_pthread_cond_init(&mtctx->jobCompleted_cond, NULL)) {
ZSTDMT_freeCCtx(mtctx);
return NULL;
}
@@ -459,28 +489,46 @@ static void ZSTDMT_releaseAllJobResources(ZSTDMT_CCtx* mtctx)
unsigned jobID;
DEBUGLOG(3, "ZSTDMT_releaseAllJobResources");
for (jobID=0; jobID <= mtctx->jobIDMask; jobID++) {
+ DEBUGLOG(4, "job%02u: release dst address %08X", jobID, (U32)(size_t)mtctx->jobs[jobID].dstBuff.start);
ZSTDMT_releaseBuffer(mtctx->bufPool, mtctx->jobs[jobID].dstBuff);
mtctx->jobs[jobID].dstBuff = g_nullBuffer;
+ DEBUGLOG(4, "job%02u: release src address %08X", jobID, (U32)(size_t)mtctx->jobs[jobID].src.start);
ZSTDMT_releaseBuffer(mtctx->bufPool, mtctx->jobs[jobID].src);
mtctx->jobs[jobID].src = g_nullBuffer;
}
memset(mtctx->jobs, 0, (mtctx->jobIDMask+1)*sizeof(ZSTDMT_jobDescription));
+ DEBUGLOG(4, "input: release address %08X", (U32)(size_t)mtctx->inBuff.buffer.start);
ZSTDMT_releaseBuffer(mtctx->bufPool, mtctx->inBuff.buffer);
mtctx->inBuff.buffer = g_nullBuffer;
mtctx->allJobsCompleted = 1;
}
+static void ZSTDMT_waitForAllJobsCompleted(ZSTDMT_CCtx* zcs)
+{
+ DEBUGLOG(4, "ZSTDMT_waitForAllJobsCompleted");
+ while (zcs->doneJobID < zcs->nextJobID) {
+ unsigned const jobID = zcs->doneJobID & zcs->jobIDMask;
+ ZSTD_PTHREAD_MUTEX_LOCK(&zcs->jobCompleted_mutex);
+ while (zcs->jobs[jobID].jobCompleted==0) {
+ DEBUGLOG(5, "waiting for jobCompleted signal from chunk %u", zcs->doneJobID); /* we want to block when waiting for data to flush */
+ ZSTD_pthread_cond_wait(&zcs->jobCompleted_cond, &zcs->jobCompleted_mutex);
+ }
+ ZSTD_pthread_mutex_unlock(&zcs->jobCompleted_mutex);
+ zcs->doneJobID++;
+ }
+}
+
size_t ZSTDMT_freeCCtx(ZSTDMT_CCtx* mtctx)
{
if (mtctx==NULL) return 0; /* compatible with free on NULL */
- POOL_free(mtctx->factory);
- if (!mtctx->allJobsCompleted) ZSTDMT_releaseAllJobResources(mtctx); /* stop workers first */
- ZSTDMT_freeBufferPool(mtctx->bufPool); /* release job resources into pools first */
+ POOL_free(mtctx->factory); /* stop and free worker threads */
+ ZSTDMT_releaseAllJobResources(mtctx); /* release job resources into pools first */
ZSTD_free(mtctx->jobs, mtctx->cMem);
+ ZSTDMT_freeBufferPool(mtctx->bufPool);
ZSTDMT_freeCCtxPool(mtctx->cctxPool);
ZSTD_freeCDict(mtctx->cdictLocal);
- pthread_mutex_destroy(&mtctx->jobCompleted_mutex);
- pthread_cond_destroy(&mtctx->jobCompleted_cond);
+ ZSTD_pthread_mutex_destroy(&mtctx->jobCompleted_mutex);
+ ZSTD_pthread_cond_destroy(&mtctx->jobCompleted_cond);
ZSTD_free(mtctx, mtctx->cMem);
return 0;
}
@@ -496,22 +544,35 @@ size_t ZSTDMT_sizeof_CCtx(ZSTDMT_CCtx* mtctx)
+ ZSTD_sizeof_CDict(mtctx->cdictLocal);
}
-size_t ZSTDMT_setMTCtxParameter(ZSTDMT_CCtx* mtctx, ZSDTMT_parameter parameter, unsigned value)
-{
+/* Internal only */
+size_t ZSTDMT_CCtxParam_setMTCtxParameter(
+ ZSTD_CCtx_params* params, ZSTDMT_parameter parameter, unsigned value) {
switch(parameter)
{
case ZSTDMT_p_sectionSize :
- mtctx->sectionSize = value;
+ params->jobSize = value;
return 0;
case ZSTDMT_p_overlapSectionLog :
- DEBUGLOG(5, "ZSTDMT_p_overlapSectionLog : %u", value);
- mtctx->overlapLog = (value >= 9) ? 9 : value;
+ DEBUGLOG(4, "ZSTDMT_p_overlapSectionLog : %u", value);
+ params->overlapSizeLog = (value >= 9) ? 9 : value;
return 0;
default :
return ERROR(parameter_unsupported);
}
}
+size_t ZSTDMT_setMTCtxParameter(ZSTDMT_CCtx* mtctx, ZSTDMT_parameter parameter, unsigned value)
+{
+ switch(parameter)
+ {
+ case ZSTDMT_p_sectionSize :
+ return ZSTDMT_CCtxParam_setMTCtxParameter(&mtctx->params, parameter, value);
+ case ZSTDMT_p_overlapSectionLog :
+ return ZSTDMT_CCtxParam_setMTCtxParameter(&mtctx->params, parameter, value);
+ default :
+ return ERROR(parameter_unsupported);
+ }
+}
/* ------------------------------------------ */
/* ===== Multi-threaded compression ===== */
@@ -528,17 +589,17 @@ static unsigned computeNbChunks(size_t srcSize, unsigned windowLog, unsigned nbT
return (multiplier>1) ? nbChunksLarge : nbChunksSmall;
}
-
-size_t ZSTDMT_compress_advanced(ZSTDMT_CCtx* mtctx,
- void* dst, size_t dstCapacity,
- const void* src, size_t srcSize,
- const ZSTD_CDict* cdict,
- ZSTD_parameters const params,
- unsigned overlapLog)
+static size_t ZSTDMT_compress_advanced_internal(
+ ZSTDMT_CCtx* mtctx,
+ void* dst, size_t dstCapacity,
+ const void* src, size_t srcSize,
+ const ZSTD_CDict* cdict,
+ ZSTD_CCtx_params const params)
{
- unsigned const overlapRLog = (overlapLog>9) ? 0 : 9-overlapLog;
+ ZSTD_CCtx_params const jobParams = ZSTDMT_makeJobCCtxParams(params);
+ unsigned const overlapRLog = (params.overlapSizeLog>9) ? 0 : 9-params.overlapSizeLog;
size_t const overlapSize = (overlapRLog>=9) ? 0 : (size_t)1 << (params.cParams.windowLog - overlapRLog);
- unsigned nbChunks = computeNbChunks(srcSize, params.cParams.windowLog, mtctx->nbThreads);
+ unsigned nbChunks = computeNbChunks(srcSize, params.cParams.windowLog, params.nbThreads);
size_t const proposedChunkSize = (srcSize + (nbChunks-1)) / nbChunks;
size_t const avgChunkSize = ((proposedChunkSize & 0x1FFFF) < 0x7FFF) ? proposedChunkSize + 0xFFFF : proposedChunkSize; /* avoid too small last block */
const char* const srcStart = (const char*)src;
@@ -546,12 +607,14 @@ size_t ZSTDMT_compress_advanced(ZSTDMT_CCtx* mtctx,
unsigned const compressWithinDst = (dstCapacity >= ZSTD_compressBound(srcSize)) ? nbChunks : (unsigned)(dstCapacity / ZSTD_compressBound(avgChunkSize)); /* presumes avgChunkSize >= 256 KB, which should be the case */
size_t frameStartPos = 0, dstBufferPos = 0;
XXH64_state_t xxh64;
+ assert(jobParams.nbThreads == 0);
+ assert(mtctx->cctxPool->totalCCtx == params.nbThreads);
DEBUGLOG(4, "nbChunks : %2u (chunkSize : %u bytes) ", nbChunks, (U32)avgChunkSize);
if (nbChunks==1) { /* fallback to single-thread mode */
ZSTD_CCtx* const cctx = mtctx->cctxPool->cctx[0];
- if (cdict) return ZSTD_compress_usingCDict_advanced(cctx, dst, dstCapacity, src, srcSize, cdict, params.fParams);
- return ZSTD_compress_advanced(cctx, dst, dstCapacity, src, srcSize, NULL, 0, params);
+ if (cdict) return ZSTD_compress_usingCDict_advanced(cctx, dst, dstCapacity, src, srcSize, cdict, jobParams.fParams);
+ return ZSTD_compress_advanced_internal(cctx, dst, dstCapacity, src, srcSize, NULL, 0, jobParams);
}
assert(avgChunkSize >= 256 KB); /* condition for ZSTD_compressBound(A) + ZSTD_compressBound(B) <= ZSTD_compressBound(A+B), which is required for compressWithinDst */
ZSTDMT_setBufferSize(mtctx->bufPool, ZSTD_compressBound(avgChunkSize) );
@@ -580,7 +643,7 @@ size_t ZSTDMT_compress_advanced(ZSTDMT_CCtx* mtctx,
mtctx->jobs[u].srcSize = chunkSize;
mtctx->jobs[u].cdict = mtctx->nextJobID==0 ? cdict : NULL;
mtctx->jobs[u].fullFrameSize = srcSize;
- mtctx->jobs[u].params = params;
+ mtctx->jobs[u].params = jobParams;
/* do not calculate checksum within sections, but write it in header for first section */
if (u!=0) mtctx->jobs[u].params.fParams.checksumFlag = 0;
mtctx->jobs[u].dstBuff = dstBuffer;
@@ -610,12 +673,12 @@ size_t ZSTDMT_compress_advanced(ZSTDMT_CCtx* mtctx,
unsigned chunkID;
for (chunkID=0; chunkID<nbChunks; chunkID++) {
DEBUGLOG(5, "waiting for chunk %u ", chunkID);
- PTHREAD_MUTEX_LOCK(&mtctx->jobCompleted_mutex);
+ ZSTD_PTHREAD_MUTEX_LOCK(&mtctx->jobCompleted_mutex);
while (mtctx->jobs[chunkID].jobCompleted==0) {
DEBUGLOG(5, "waiting for jobCompleted signal from chunk %u", chunkID);
- pthread_cond_wait(&mtctx->jobCompleted_cond, &mtctx->jobCompleted_mutex);
+ ZSTD_pthread_cond_wait(&mtctx->jobCompleted_cond, &mtctx->jobCompleted_mutex);
}
- pthread_mutex_unlock(&mtctx->jobCompleted_mutex);
+ ZSTD_pthread_mutex_unlock(&mtctx->jobCompleted_mutex);
DEBUGLOG(5, "ready to write chunk %u ", chunkID);
mtctx->jobs[chunkID].srcStart = NULL;
@@ -628,9 +691,8 @@ size_t ZSTDMT_compress_advanced(ZSTDMT_CCtx* mtctx,
if (chunkID >= compressWithinDst) { /* chunk compressed into its own buffer, which must be released */
DEBUGLOG(5, "releasing buffer %u>=%u", chunkID, compressWithinDst);
ZSTDMT_releaseBuffer(mtctx->bufPool, mtctx->jobs[chunkID].dstBuff);
- }
- mtctx->jobs[chunkID].dstBuff = g_nullBuffer;
- }
+ } }
+ mtctx->jobs[chunkID].dstBuff = g_nullBuffer;
dstPos += cSize ;
}
} /* for (chunkID=0; chunkID<nbChunks; chunkID++) */
@@ -651,6 +713,23 @@ size_t ZSTDMT_compress_advanced(ZSTDMT_CCtx* mtctx,
}
}
+size_t ZSTDMT_compress_advanced(ZSTDMT_CCtx* mtctx,
+ void* dst, size_t dstCapacity,
+ const void* src, size_t srcSize,
+ const ZSTD_CDict* cdict,
+ ZSTD_parameters const params,
+ unsigned overlapLog)
+{
+ ZSTD_CCtx_params cctxParams = mtctx->params;
+ cctxParams.cParams = params.cParams;
+ cctxParams.fParams = params.fParams;
+ cctxParams.overlapSizeLog = overlapLog;
+ return ZSTDMT_compress_advanced_internal(mtctx,
+ dst, dstCapacity,
+ src, srcSize,
+ cdict, cctxParams);
+}
+
size_t ZSTDMT_compressCCtx(ZSTDMT_CCtx* mtctx,
void* dst, size_t dstCapacity,
@@ -668,38 +747,25 @@ size_t ZSTDMT_compressCCtx(ZSTDMT_CCtx* mtctx,
/* ======= Streaming API ======= */
/* ====================================== */
-static void ZSTDMT_waitForAllJobsCompleted(ZSTDMT_CCtx* zcs)
-{
- DEBUGLOG(4, "ZSTDMT_waitForAllJobsCompleted");
- while (zcs->doneJobID < zcs->nextJobID) {
- unsigned const jobID = zcs->doneJobID & zcs->jobIDMask;
- PTHREAD_MUTEX_LOCK(&zcs->jobCompleted_mutex);
- while (zcs->jobs[jobID].jobCompleted==0) {
- DEBUGLOG(5, "waiting for jobCompleted signal from chunk %u", zcs->doneJobID); /* we want to block when waiting for data to flush */
- pthread_cond_wait(&zcs->jobCompleted_cond, &zcs->jobCompleted_mutex);
- }
- pthread_mutex_unlock(&zcs->jobCompleted_mutex);
- zcs->doneJobID++;
- }
-}
-
-
-/** ZSTDMT_initCStream_internal() :
- * internal usage only */
-size_t ZSTDMT_initCStream_internal(ZSTDMT_CCtx* zcs,
- const void* dict, size_t dictSize, const ZSTD_CDict* cdict,
- ZSTD_parameters params, unsigned long long pledgedSrcSize)
+size_t ZSTDMT_initCStream_internal(
+ ZSTDMT_CCtx* zcs,
+ const void* dict, size_t dictSize, ZSTD_dictMode_e dictMode,
+ const ZSTD_CDict* cdict, ZSTD_CCtx_params params,
+ unsigned long long pledgedSrcSize)
{
DEBUGLOG(4, "ZSTDMT_initCStream_internal");
/* params are supposed to be fully validated at this point */
assert(!ZSTD_isError(ZSTD_checkCParams(params.cParams)));
assert(!((dict) && (cdict))); /* either dict or cdict, not both */
+ assert(zcs->cctxPool->totalCCtx == params.nbThreads);
- if (zcs->nbThreads==1) {
+ if (params.nbThreads==1) {
+ ZSTD_CCtx_params const singleThreadParams = ZSTDMT_makeJobCCtxParams(params);
DEBUGLOG(4, "single thread mode");
+ assert(singleThreadParams.nbThreads == 0);
return ZSTD_initCStream_internal(zcs->cctxPool->cctx[0],
- dict, dictSize, cdict,
- params, pledgedSrcSize);
+ dict, dictSize, cdict,
+ singleThreadParams, pledgedSrcSize);
}
if (zcs->allJobsCompleted == 0) { /* previous compression not correctly finished */
@@ -714,7 +780,7 @@ size_t ZSTDMT_initCStream_internal(ZSTDMT_CCtx* zcs,
DEBUGLOG(4,"cdictLocal: %08X", (U32)(size_t)zcs->cdictLocal);
ZSTD_freeCDict(zcs->cdictLocal);
zcs->cdictLocal = ZSTD_createCDict_advanced(dict, dictSize,
- 0 /* byRef */, ZSTD_dm_auto, /* note : a loadPrefix becomes an internal CDict */
+ ZSTD_dlm_byCopy, dictMode, /* note : a loadPrefix becomes an internal CDict */
params.cParams, zcs->cMem);
zcs->cdict = zcs->cdictLocal;
if (zcs->cdictLocal == NULL) return ERROR(memory_allocation);
@@ -725,10 +791,10 @@ size_t ZSTDMT_initCStream_internal(ZSTDMT_CCtx* zcs,
zcs->cdict = cdict;
}
- zcs->targetDictSize = (zcs->overlapLog==0) ? 0 : (size_t)1 << (zcs->params.cParams.windowLog - (9 - zcs->overlapLog));
- DEBUGLOG(4, "overlapLog : %u ", zcs->overlapLog);
+ zcs->targetDictSize = (params.overlapSizeLog==0) ? 0 : (size_t)1 << (params.cParams.windowLog - (9 - params.overlapSizeLog));
+ DEBUGLOG(4, "overlapLog : %u ", params.overlapSizeLog);
DEBUGLOG(4, "overlap Size : %u KB", (U32)(zcs->targetDictSize>>10));
- zcs->targetSectionSize = zcs->sectionSize ? zcs->sectionSize : (size_t)1 << (zcs->params.cParams.windowLog + 2);
+ zcs->targetSectionSize = params.jobSize ? params.jobSize : (size_t)1 << (params.cParams.windowLog + 2);
zcs->targetSectionSize = MAX(ZSTDMT_SECTION_SIZE_MIN, zcs->targetSectionSize);
zcs->targetSectionSize = MAX(zcs->targetDictSize, zcs->targetSectionSize);
DEBUGLOG(4, "Section Size : %u KB", (U32)(zcs->targetSectionSize>>10));
@@ -749,8 +815,12 @@ size_t ZSTDMT_initCStream_advanced(ZSTDMT_CCtx* mtctx,
ZSTD_parameters params,
unsigned long long pledgedSrcSize)
{
+ ZSTD_CCtx_params cctxParams = mtctx->params;
DEBUGLOG(5, "ZSTDMT_initCStream_advanced");
- return ZSTDMT_initCStream_internal(mtctx, dict, dictSize, NULL, params, pledgedSrcSize);
+ cctxParams.cParams = params.cParams;
+ cctxParams.fParams = params.fParams;
+ return ZSTDMT_initCStream_internal(mtctx, dict, dictSize, ZSTD_dm_auto, NULL,
+ cctxParams, pledgedSrcSize);
}
size_t ZSTDMT_initCStream_usingCDict(ZSTDMT_CCtx* mtctx,
@@ -758,11 +828,12 @@ size_t ZSTDMT_initCStream_usingCDict(ZSTDMT_CCtx* mtctx,
ZSTD_frameParameters fParams,
unsigned long long pledgedSrcSize)
{
- ZSTD_parameters params = ZSTD_getParamsFromCDict(cdict);
+ ZSTD_CCtx_params cctxParams = mtctx->params;
+ cctxParams.cParams = ZSTD_getCParamsFromCDict(cdict);
+ cctxParams.fParams = fParams;
if (cdict==NULL) return ERROR(dictionary_wrong); /* method incompatible with NULL cdict */
- params.fParams = fParams;
- return ZSTDMT_initCStream_internal(mtctx, NULL, 0 /*dictSize*/, cdict,
- params, pledgedSrcSize);
+ return ZSTDMT_initCStream_internal(mtctx, NULL, 0 /*dictSize*/, ZSTD_dm_auto, cdict,
+ cctxParams, pledgedSrcSize);
}
@@ -770,14 +841,18 @@ size_t ZSTDMT_initCStream_usingCDict(ZSTDMT_CCtx* mtctx,
* pledgedSrcSize is optional and can be zero == unknown */
size_t ZSTDMT_resetCStream(ZSTDMT_CCtx* zcs, unsigned long long pledgedSrcSize)
{
- if (zcs->nbThreads==1)
+ if (zcs->params.nbThreads==1)
return ZSTD_resetCStream(zcs->cctxPool->cctx[0], pledgedSrcSize);
- return ZSTDMT_initCStream_internal(zcs, NULL, 0, 0, zcs->params, pledgedSrcSize);
+ return ZSTDMT_initCStream_internal(zcs, NULL, 0, ZSTD_dm_auto, 0, zcs->params,
+ pledgedSrcSize);
}
size_t ZSTDMT_initCStream(ZSTDMT_CCtx* zcs, int compressionLevel) {
ZSTD_parameters const params = ZSTD_getParams(compressionLevel, 0, 0);
- return ZSTDMT_initCStream_internal(zcs, NULL, 0, NULL, params, 0);
+ ZSTD_CCtx_params cctxParams = zcs->params;
+ cctxParams.cParams = params.cParams;
+ cctxParams.fParams = params.fParams;
+ return ZSTDMT_initCStream_internal(zcs, NULL, 0, ZSTD_dm_auto, NULL, cctxParams, 0);
}
@@ -856,13 +931,13 @@ static size_t ZSTDMT_flushNextJob(ZSTDMT_CCtx* zcs, ZSTD_outBuffer* output, unsi
{
unsigned const wJobID = zcs->doneJobID & zcs->jobIDMask;
if (zcs->doneJobID == zcs->nextJobID) return 0; /* all flushed ! */
- PTHREAD_MUTEX_LOCK(&zcs->jobCompleted_mutex);
+ ZSTD_PTHREAD_MUTEX_LOCK(&zcs->jobCompleted_mutex);
while (zcs->jobs[wJobID].jobCompleted==0) {
DEBUGLOG(5, "waiting for jobCompleted signal from job %u", zcs->doneJobID);
- if (!blockToFlush) { pthread_mutex_unlock(&zcs->jobCompleted_mutex); return 0; } /* nothing ready to be flushed => skip */
- pthread_cond_wait(&zcs->jobCompleted_cond, &zcs->jobCompleted_mutex); /* block when nothing available to flush */
+ if (!blockToFlush) { ZSTD_pthread_mutex_unlock(&zcs->jobCompleted_mutex); return 0; } /* nothing ready to be flushed => skip */
+ ZSTD_pthread_cond_wait(&zcs->jobCompleted_cond, &zcs->jobCompleted_mutex); /* block when nothing available to flush */
}
- pthread_mutex_unlock(&zcs->jobCompleted_mutex);
+ ZSTD_pthread_mutex_unlock(&zcs->jobCompleted_mutex);
/* compression job completed : output can be flushed */
{ ZSTDMT_jobDescription job = zcs->jobs[wJobID];
if (!job.jobScanned) {
@@ -906,7 +981,7 @@ static size_t ZSTDMT_flushNextJob(ZSTDMT_CCtx* zcs, ZSTD_outBuffer* output, unsi
/** ZSTDMT_compressStream_generic() :
- * internal use only
+ * internal use only - exposed to be invoked from zstd_compress.c
* assumption : output and input are valid (pos <= size)
* @return : minimum amount of data remaining to flush, 0 if none */
size_t ZSTDMT_compressStream_generic(ZSTDMT_CCtx* mtctx,
@@ -915,25 +990,26 @@ size_t ZSTDMT_compressStream_generic(ZSTDMT_CCtx* mtctx,
ZSTD_EndDirective endOp)
{
size_t const newJobThreshold = mtctx->dictSize + mtctx->targetSectionSize;
+ unsigned forwardInputProgress = 0;
assert(output->pos <= output->size);
assert(input->pos <= input->size);
if ((mtctx->frameEnded) && (endOp==ZSTD_e_continue)) {
- /* current frame being ended. Only flush/end are allowed. Or start new frame with init */
+ /* current frame being ended. Only flush/end are allowed */
return ERROR(stage_wrong);
}
- if (mtctx->nbThreads==1) { /* delegate to single-thread (synchronous) */
+ if (mtctx->params.nbThreads==1) { /* delegate to single-thread (synchronous) */
return ZSTD_compressStream_generic(mtctx->cctxPool->cctx[0], output, input, endOp);
}
- /* single-pass shortcut (note : this is synchronous-mode) */
- if ( (mtctx->nextJobID==0) /* just started */
- && (mtctx->inBuff.filled==0) /* nothing buffered */
- && (endOp==ZSTD_e_end) /* end order */
+ /* single-pass shortcut (note : synchronous-mode) */
+ if ( (mtctx->nextJobID == 0) /* just started */
+ && (mtctx->inBuff.filled == 0) /* nothing buffered */
+ && (endOp == ZSTD_e_end) /* end order */
&& (output->size - output->pos >= ZSTD_compressBound(input->size - input->pos)) ) { /* enough room */
- size_t const cSize = ZSTDMT_compress_advanced(mtctx,
+ size_t const cSize = ZSTDMT_compress_advanced_internal(mtctx,
(char*)output->dst + output->pos, output->size - output->pos,
(const char*)input->src + input->pos, input->size - input->pos,
- mtctx->cdict, mtctx->params, mtctx->overlapLog);
+ mtctx->cdict, mtctx->params);
if (ZSTD_isError(cSize)) return cSize;
input->pos = input->size;
output->pos += cSize;
@@ -946,15 +1022,16 @@ size_t ZSTDMT_compressStream_generic(ZSTDMT_CCtx* mtctx,
/* fill input buffer */
if (input->size > input->pos) { /* support NULL input */
if (mtctx->inBuff.buffer.start == NULL) {
- mtctx->inBuff.buffer = ZSTDMT_getBuffer(mtctx->bufPool);
- if (mtctx->inBuff.buffer.start == NULL) return ERROR(memory_allocation);
+ mtctx->inBuff.buffer = ZSTDMT_getBuffer(mtctx->bufPool); /* note : may fail, in which case, no forward input progress */
mtctx->inBuff.filled = 0;
}
- { size_t const toLoad = MIN(input->size - input->pos, mtctx->inBuffSize - mtctx->inBuff.filled);
+ if (mtctx->inBuff.buffer.start) {
+ size_t const toLoad = MIN(input->size - input->pos, mtctx->inBuffSize - mtctx->inBuff.filled);
DEBUGLOG(5, "inBuff:%08X; inBuffSize=%u; ToCopy=%u", (U32)(size_t)mtctx->inBuff.buffer.start, (U32)mtctx->inBuffSize, (U32)toLoad);
memcpy((char*)mtctx->inBuff.buffer.start + mtctx->inBuff.filled, (const char*)input->src + input->pos, toLoad);
input->pos += toLoad;
mtctx->inBuff.filled += toLoad;
+ forwardInputProgress = toLoad>0;
} }
if ( (mtctx->inBuff.filled >= newJobThreshold) /* filled enough : let's compress */
@@ -963,7 +1040,7 @@ size_t ZSTDMT_compressStream_generic(ZSTDMT_CCtx* mtctx,
}
/* check for potential compressed data ready to be flushed */
- CHECK_F( ZSTDMT_flushNextJob(mtctx, output, (mtctx->inBuff.filled == mtctx->inBuffSize) /* blockToFlush */) ); /* block if it wasn't possible to create new job due to saturation */
+ CHECK_F( ZSTDMT_flushNextJob(mtctx, output, !forwardInputProgress /* blockToFlush */) ); /* block if there was no forward input progress */
if (input->pos < input->size) /* input not consumed : do not flush yet */
endOp = ZSTD_e_continue;
@@ -1008,7 +1085,7 @@ static size_t ZSTDMT_flushStream_internal(ZSTDMT_CCtx* zcs, ZSTD_outBuffer* outp
size_t ZSTDMT_flushStream(ZSTDMT_CCtx* zcs, ZSTD_outBuffer* output)
{
DEBUGLOG(5, "ZSTDMT_flushStream");
- if (zcs->nbThreads==1)
+ if (zcs->params.nbThreads==1)
return ZSTD_flushStream(zcs->cctxPool->cctx[0], output);
return ZSTDMT_flushStream_internal(zcs, output, 0 /* endFrame */);
}
@@ -1016,7 +1093,7 @@ size_t ZSTDMT_flushStream(ZSTDMT_CCtx* zcs, ZSTD_outBuffer* output)
size_t ZSTDMT_endStream(ZSTDMT_CCtx* zcs, ZSTD_outBuffer* output)
{
DEBUGLOG(4, "ZSTDMT_endStream");
- if (zcs->nbThreads==1)
+ if (zcs->params.nbThreads==1)
return ZSTD_endStream(zcs->cctxPool->cctx[0], output);
return ZSTDMT_flushStream_internal(zcs, output, 1 /* endFrame */);
}
diff --git a/thirdparty/zstd/compress/zstdmt_compress.h b/thirdparty/zstd/compress/zstdmt_compress.h
index 0f0fc2b03f..8c59c684f1 100644
--- a/thirdparty/zstd/compress/zstdmt_compress.h
+++ b/thirdparty/zstd/compress/zstdmt_compress.h
@@ -5,6 +5,7 @@
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
*/
#ifndef ZSTDMT_COMPRESS_H
@@ -80,19 +81,19 @@ ZSTDLIB_API size_t ZSTDMT_initCStream_usingCDict(ZSTDMT_CCtx* mtctx,
ZSTD_frameParameters fparams,
unsigned long long pledgedSrcSize); /* note : zero means empty */
-/* ZSDTMT_parameter :
+/* ZSTDMT_parameter :
* List of parameters that can be set using ZSTDMT_setMTCtxParameter() */
typedef enum {
ZSTDMT_p_sectionSize, /* size of input "section". Each section is compressed in parallel. 0 means default, which is dynamically determined within compression functions */
ZSTDMT_p_overlapSectionLog /* Log of overlapped section; 0 == no overlap, 6(default) == use 1/8th of window, >=9 == use full window */
-} ZSDTMT_parameter;
+} ZSTDMT_parameter;
/* ZSTDMT_setMTCtxParameter() :
* allow setting individual parameters, one at a time, among a list of enums defined in ZSTDMT_parameter.
* The function must be called typically after ZSTD_createCCtx().
* Parameters not explicitly reset by ZSTDMT_init*() remain the same in consecutive compression sessions.
* @return : 0, or an error code (which can be tested using ZSTD_isError()) */
-ZSTDLIB_API size_t ZSTDMT_setMTCtxParameter(ZSTDMT_CCtx* mtctx, ZSDTMT_parameter parameter, unsigned value);
+ZSTDLIB_API size_t ZSTDMT_setMTCtxParameter(ZSTDMT_CCtx* mtctx, ZSTDMT_parameter parameter, unsigned value);
/*! ZSTDMT_compressStream_generic() :
@@ -107,6 +108,22 @@ ZSTDLIB_API size_t ZSTDMT_compressStream_generic(ZSTDMT_CCtx* mtctx,
ZSTD_EndDirective endOp);
+/* === Private definitions; never ever use directly === */
+
+size_t ZSTDMT_CCtxParam_setMTCtxParameter(ZSTD_CCtx_params* params, ZSTDMT_parameter parameter, unsigned value);
+
+size_t ZSTDMT_initializeCCtxParameters(ZSTD_CCtx_params* params, unsigned nbThreads);
+
+/*! ZSTDMT_initCStream_internal() :
+ * Private use only. Init streaming operation.
+ * expects params to be valid.
+ * must receive dict, or cdict, or none, but not both.
+ * @return : 0, or an error code */
+size_t ZSTDMT_initCStream_internal(ZSTDMT_CCtx* zcs,
+ const void* dict, size_t dictSize, ZSTD_dictMode_e dictMode,
+ const ZSTD_CDict* cdict,
+ ZSTD_CCtx_params params, unsigned long long pledgedSrcSize);
+
#if defined (__cplusplus)
}
diff --git a/thirdparty/zstd/decompress/zstd_decompress.c b/thirdparty/zstd/decompress/zstd_decompress.c
index d2bc545e52..96fc609089 100644
--- a/thirdparty/zstd/decompress/zstd_decompress.c
+++ b/thirdparty/zstd/decompress/zstd_decompress.c
@@ -5,6 +5,7 @@
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
*/
@@ -34,7 +35,7 @@
* Frames requiring more memory will be rejected.
*/
#ifndef ZSTD_MAXWINDOWSIZE_DEFAULT
-# define ZSTD_MAXWINDOWSIZE_DEFAULT ((1 << ZSTD_WINDOWLOG_MAX) + 1) /* defined within zstd.h */
+# define ZSTD_MAXWINDOWSIZE_DEFAULT (((U32)1 << ZSTD_WINDOWLOG_DEFAULTMAX) + 1)
#endif
@@ -101,13 +102,15 @@ struct ZSTD_DCtx_s
const void* dictEnd; /* end of previous segment */
size_t expected;
ZSTD_frameHeader fParams;
- blockType_e bType; /* used in ZSTD_decompressContinue(), to transfer blockType between header decoding and block decoding stages */
+ U64 decodedSize;
+ blockType_e bType; /* used in ZSTD_decompressContinue(), store blockType between block header decoding and block decompression stages */
ZSTD_dStage stage;
U32 litEntropy;
U32 fseEntropy;
XXH64_state_t xxhState;
size_t headerSize;
U32 dictID;
+ ZSTD_format_e format;
const BYTE* litPtr;
ZSTD_customMem customMem;
size_t litSize;
@@ -126,7 +129,6 @@ struct ZSTD_DCtx_s
size_t outBuffSize;
size_t outStart;
size_t outEnd;
- size_t blockSize;
size_t lhSize;
void* legacyContext;
U32 previousLegacyVersion;
@@ -148,39 +150,44 @@ size_t ZSTD_sizeof_DCtx (const ZSTD_DCtx* dctx)
size_t ZSTD_estimateDCtxSize(void) { return sizeof(ZSTD_DCtx); }
-size_t ZSTD_decompressBegin(ZSTD_DCtx* dctx)
+
+static size_t ZSTD_startingInputLength(ZSTD_format_e format)
{
- dctx->expected = ZSTD_frameHeaderSize_prefix;
- dctx->stage = ZSTDds_getFrameHeaderSize;
- dctx->previousDstEnd = NULL;
- dctx->base = NULL;
- dctx->vBase = NULL;
- dctx->dictEnd = NULL;
- dctx->entropy.hufTable[0] = (HUF_DTable)((HufLog)*0x1000001); /* cover both little and big endian */
- dctx->litEntropy = dctx->fseEntropy = 0;
- dctx->dictID = 0;
- MEM_STATIC_ASSERT(sizeof(dctx->entropy.rep) == sizeof(repStartValue));
- memcpy(dctx->entropy.rep, repStartValue, sizeof(repStartValue)); /* initial repcodes */
- dctx->LLTptr = dctx->entropy.LLTable;
- dctx->MLTptr = dctx->entropy.MLTable;
- dctx->OFTptr = dctx->entropy.OFTable;
- dctx->HUFptr = dctx->entropy.hufTable;
- return 0;
+ size_t const startingInputLength = (format==ZSTD_f_zstd1_magicless) ?
+ ZSTD_frameHeaderSize_prefix - ZSTD_frameIdSize :
+ ZSTD_frameHeaderSize_prefix;
+ ZSTD_STATIC_ASSERT(ZSTD_FRAMEHEADERSIZE_PREFIX >= ZSTD_FRAMEIDSIZE);
+ /* only supports formats ZSTD_f_zstd1 and ZSTD_f_zstd1_magicless */
+ assert( (format == ZSTD_f_zstd1) || (format == ZSTD_f_zstd1_magicless) );
+ return startingInputLength;
}
static void ZSTD_initDCtx_internal(ZSTD_DCtx* dctx)
{
- ZSTD_decompressBegin(dctx); /* cannot fail */
- dctx->staticSize = 0;
+ dctx->format = ZSTD_f_zstd1; /* ZSTD_decompressBegin() invokes ZSTD_startingInputLength() with argument dctx->format */
+ dctx->staticSize = 0;
dctx->maxWindowSize = ZSTD_MAXWINDOWSIZE_DEFAULT;
- dctx->ddict = NULL;
- dctx->ddictLocal = NULL;
- dctx->inBuff = NULL;
- dctx->inBuffSize = 0;
- dctx->outBuffSize= 0;
+ dctx->ddict = NULL;
+ dctx->ddictLocal = NULL;
+ dctx->inBuff = NULL;
+ dctx->inBuffSize = 0;
+ dctx->outBuffSize = 0;
dctx->streamStage = zdss_init;
}
+ZSTD_DCtx* ZSTD_initStaticDCtx(void *workspace, size_t workspaceSize)
+{
+ ZSTD_DCtx* const dctx = (ZSTD_DCtx*) workspace;
+
+ if ((size_t)workspace & 7) return NULL; /* 8-aligned */
+ if (workspaceSize < sizeof(ZSTD_DCtx)) return NULL; /* minimum size */
+
+ ZSTD_initDCtx_internal(dctx);
+ dctx->staticSize = workspaceSize;
+ dctx->inBuff = (char*)(dctx+1);
+ return dctx;
+}
+
ZSTD_DCtx* ZSTD_createDCtx_advanced(ZSTD_customMem customMem)
{
if (!customMem.customAlloc ^ !customMem.customFree) return NULL;
@@ -195,19 +202,6 @@ ZSTD_DCtx* ZSTD_createDCtx_advanced(ZSTD_customMem customMem)
}
}
-ZSTD_DCtx* ZSTD_initStaticDCtx(void *workspace, size_t workspaceSize)
-{
- ZSTD_DCtx* dctx = (ZSTD_DCtx*) workspace;
-
- if ((size_t)workspace & 7) return NULL; /* 8-aligned */
- if (workspaceSize < sizeof(ZSTD_DCtx)) return NULL; /* minimum size */
-
- ZSTD_initDCtx_internal(dctx);
- dctx->staticSize = workspaceSize;
- dctx->inBuff = (char*)(dctx+1);
- return dctx;
-}
-
ZSTD_DCtx* ZSTD_createDCtx(void)
{
return ZSTD_createDCtx_advanced(ZSTD_defaultCMem);
@@ -250,7 +244,7 @@ void ZSTD_copyDCtx(ZSTD_DCtx* dstDCtx, const ZSTD_DCtx* srcDCtx)
* Note 3 : Skippable Frame Identifiers are considered valid. */
unsigned ZSTD_isFrame(const void* buffer, size_t size)
{
- if (size < 4) return 0;
+ if (size < ZSTD_frameIdSize) return 0;
{ U32 const magic = MEM_readLE32(buffer);
if (magic == ZSTD_MAGICNUMBER) return 1;
if ((magic & 0xFFFFFFF0U) == ZSTD_MAGIC_SKIPPABLE_START) return 1;
@@ -261,55 +255,70 @@ unsigned ZSTD_isFrame(const void* buffer, size_t size)
return 0;
}
-
-/** ZSTD_frameHeaderSize() :
-* srcSize must be >= ZSTD_frameHeaderSize_prefix.
-* @return : size of the Frame Header */
-size_t ZSTD_frameHeaderSize(const void* src, size_t srcSize)
+/** ZSTD_frameHeaderSize_internal() :
+ * srcSize must be large enough to reach header size fields.
+ * note : only works for formats ZSTD_f_zstd1 and ZSTD_f_zstd1_magicless
+ * @return : size of the Frame Header
+ * or an error code, which can be tested with ZSTD_isError() */
+static size_t ZSTD_frameHeaderSize_internal(const void* src, size_t srcSize, ZSTD_format_e format)
{
- if (srcSize < ZSTD_frameHeaderSize_prefix) return ERROR(srcSize_wrong);
- { BYTE const fhd = ((const BYTE*)src)[4];
+ size_t const minInputSize = ZSTD_startingInputLength(format);
+ if (srcSize < minInputSize) return ERROR(srcSize_wrong);
+
+ { BYTE const fhd = ((const BYTE*)src)[minInputSize-1];
U32 const dictID= fhd & 3;
U32 const singleSegment = (fhd >> 5) & 1;
U32 const fcsId = fhd >> 6;
- return ZSTD_frameHeaderSize_prefix + !singleSegment + ZSTD_did_fieldSize[dictID] + ZSTD_fcs_fieldSize[fcsId]
- + (singleSegment && !fcsId);
+ return minInputSize + !singleSegment
+ + ZSTD_did_fieldSize[dictID] + ZSTD_fcs_fieldSize[fcsId]
+ + (singleSegment && !fcsId);
}
}
+/** ZSTD_frameHeaderSize() :
+ * srcSize must be >= ZSTD_frameHeaderSize_prefix.
+ * @return : size of the Frame Header */
+size_t ZSTD_frameHeaderSize(const void* src, size_t srcSize)
+{
+ return ZSTD_frameHeaderSize_internal(src, srcSize, ZSTD_f_zstd1);
+}
-/** ZSTD_getFrameHeader() :
-* decode Frame Header, or require larger `srcSize`.
-* @return : 0, `zfhPtr` is correctly filled,
-* >0, `srcSize` is too small, result is expected `srcSize`,
-* or an error code, which can be tested using ZSTD_isError() */
-size_t ZSTD_getFrameHeader(ZSTD_frameHeader* zfhPtr, const void* src, size_t srcSize)
+
+/** ZSTD_getFrameHeader_internal() :
+ * decode Frame Header, or require larger `srcSize`.
+ * note : only works for formats ZSTD_f_zstd1 and ZSTD_f_zstd1_magicless
+ * @return : 0, `zfhPtr` is correctly filled,
+ * >0, `srcSize` is too small, value is wanted `srcSize` amount,
+ * or an error code, which can be tested using ZSTD_isError() */
+static size_t ZSTD_getFrameHeader_internal(ZSTD_frameHeader* zfhPtr, const void* src, size_t srcSize, ZSTD_format_e format)
{
const BYTE* ip = (const BYTE*)src;
- if (srcSize < ZSTD_frameHeaderSize_prefix) return ZSTD_frameHeaderSize_prefix;
+ size_t const minInputSize = ZSTD_startingInputLength(format);
- if (MEM_readLE32(src) != ZSTD_MAGICNUMBER) {
+ if (srcSize < minInputSize) return minInputSize;
+
+ if ( (format != ZSTD_f_zstd1_magicless)
+ && (MEM_readLE32(src) != ZSTD_MAGICNUMBER) ) {
if ((MEM_readLE32(src) & 0xFFFFFFF0U) == ZSTD_MAGIC_SKIPPABLE_START) {
/* skippable frame */
if (srcSize < ZSTD_skippableHeaderSize)
return ZSTD_skippableHeaderSize; /* magic number + frame length */
memset(zfhPtr, 0, sizeof(*zfhPtr));
- zfhPtr->frameContentSize = MEM_readLE32((const char *)src + 4);
+ zfhPtr->frameContentSize = MEM_readLE32((const char *)src + ZSTD_frameIdSize);
zfhPtr->frameType = ZSTD_skippableFrame;
- zfhPtr->windowSize = 0;
return 0;
}
return ERROR(prefix_unknown);
}
/* ensure there is enough `srcSize` to fully read/decode frame header */
- { size_t const fhsize = ZSTD_frameHeaderSize(src, srcSize);
+ { size_t const fhsize = ZSTD_frameHeaderSize_internal(src, srcSize, format);
if (srcSize < fhsize) return fhsize;
zfhPtr->headerSize = (U32)fhsize;
}
- { BYTE const fhdByte = ip[4];
- size_t pos = 5;
+ { BYTE const fhdByte = ip[minInputSize-1];
+ size_t pos = minInputSize;
U32 const dictIDSizeCode = fhdByte&3;
U32 const checksumFlag = (fhdByte>>2)&1;
U32 const singleSegment = (fhdByte>>5)&1;
@@ -349,12 +358,25 @@ size_t ZSTD_getFrameHeader(ZSTD_frameHeader* zfhPtr, const void* src, size_t src
zfhPtr->frameType = ZSTD_frame;
zfhPtr->frameContentSize = frameContentSize;
zfhPtr->windowSize = windowSize;
+ zfhPtr->blockSizeMax = (unsigned) MIN(windowSize, ZSTD_BLOCKSIZE_MAX);
zfhPtr->dictID = dictID;
zfhPtr->checksumFlag = checksumFlag;
}
return 0;
}
+/** ZSTD_getFrameHeader() :
+ * decode Frame Header, or require larger `srcSize`.
+ * note : this function does not consume input, it only reads it.
+ * @return : 0, `zfhPtr` is correctly filled,
+ * >0, `srcSize` is too small, value is wanted `srcSize` amount,
+ * or an error code, which can be tested using ZSTD_isError() */
+size_t ZSTD_getFrameHeader(ZSTD_frameHeader* zfhPtr, const void* src, size_t srcSize)
+{
+ return ZSTD_getFrameHeader_internal(zfhPtr, src, srcSize, ZSTD_f_zstd1);
+}
+
+
/** ZSTD_getFrameContentSize() :
* compatible with legacy mode
* @return : decompressed size of the single frame pointed to be `src` if known, otherwise
@@ -388,14 +410,14 @@ unsigned long long ZSTD_findDecompressedSize(const void* src, size_t srcSize)
unsigned long long totalDstSize = 0;
while (srcSize >= ZSTD_frameHeaderSize_prefix) {
- const U32 magicNumber = MEM_readLE32(src);
+ U32 const magicNumber = MEM_readLE32(src);
if ((magicNumber & 0xFFFFFFF0U) == ZSTD_MAGIC_SKIPPABLE_START) {
size_t skippableSize;
if (srcSize < ZSTD_skippableHeaderSize)
return ERROR(srcSize_wrong);
- skippableSize = MEM_readLE32((const BYTE *)src + 4) +
- ZSTD_skippableHeaderSize;
+ skippableSize = MEM_readLE32((const BYTE *)src + ZSTD_frameIdSize)
+ + ZSTD_skippableHeaderSize;
if (srcSize < skippableSize) {
return ZSTD_CONTENTSIZE_ERROR;
}
@@ -420,11 +442,9 @@ unsigned long long ZSTD_findDecompressedSize(const void* src, size_t srcSize)
src = (const BYTE *)src + frameSrcSize;
srcSize -= frameSrcSize;
}
- }
+ } /* while (srcSize >= ZSTD_frameHeaderSize_prefix) */
- if (srcSize) {
- return ZSTD_CONTENTSIZE_ERROR;
- }
+ if (srcSize) return ZSTD_CONTENTSIZE_ERROR;
return totalDstSize;
}
@@ -440,7 +460,8 @@ unsigned long long ZSTD_findDecompressedSize(const void* src, size_t srcSize)
unsigned long long ZSTD_getDecompressedSize(const void* src, size_t srcSize)
{
unsigned long long const ret = ZSTD_getFrameContentSize(src, srcSize);
- return ret >= ZSTD_CONTENTSIZE_ERROR ? 0 : ret;
+ ZSTD_STATIC_ASSERT(ZSTD_CONTENTSIZE_ERROR < ZSTD_CONTENTSIZE_UNKNOWN);
+ return (ret >= ZSTD_CONTENTSIZE_ERROR) ? 0 : ret;
}
@@ -449,9 +470,9 @@ unsigned long long ZSTD_getDecompressedSize(const void* src, size_t srcSize)
* @return : 0 if success, or an error code, which can be tested using ZSTD_isError() */
static size_t ZSTD_decodeFrameHeader(ZSTD_DCtx* dctx, const void* src, size_t headerSize)
{
- size_t const result = ZSTD_getFrameHeader(&(dctx->fParams), src, headerSize);
- if (ZSTD_isError(result)) return result; /* invalid header */
- if (result>0) return ERROR(srcSize_wrong); /* headerSize too small */
+ size_t const result = ZSTD_getFrameHeader_internal(&(dctx->fParams), src, headerSize, dctx->format);
+ if (ZSTD_isError(result)) return result; /* invalid header */
+ if (result>0) return ERROR(srcSize_wrong); /* headerSize too small */
if (dctx->fParams.dictID && (dctx->dictID != dctx->fParams.dictID))
return ERROR(dictionary_wrong);
if (dctx->fParams.checksumFlag) XXH64_reset(&dctx->xxhState, 0);
@@ -497,7 +518,8 @@ static size_t ZSTD_setRleBlock(void* dst, size_t dstCapacity,
}
/*! ZSTD_decodeLiteralsBlock() :
- @return : nb of bytes read from src (< srcSize ) */
+ * @return : nb of bytes read from src (< srcSize )
+ * note : symbol not declared but exposed for fullbench */
size_t ZSTD_decodeLiteralsBlock(ZSTD_DCtx* dctx,
const void* src, size_t srcSize) /* note : srcSize < BLOCKSIZE */
{
@@ -698,9 +720,9 @@ static const FSE_decode_t4 OF_defaultDTable[(1<<OF_DEFAULTNORMLOG)+1] = {
}; /* OF_defaultDTable */
/*! ZSTD_buildSeqTable() :
- @return : nb bytes read from src,
- or an error code if it fails, testable with ZSTD_isError()
-*/
+ * @return : nb bytes read from src,
+ * or an error code if it fails, testable with ZSTD_isError()
+ */
static size_t ZSTD_buildSeqTable(FSE_DTable* DTableSpace, const FSE_DTable** DTablePtr,
symbolEncodingType_e type, U32 max, U32 maxLog,
const void* src, size_t srcSize,
@@ -858,13 +880,25 @@ size_t ZSTD_execSequenceLast7(BYTE* op,
}
-static seq_t ZSTD_decodeSequence(seqState_t* seqState)
+typedef enum { ZSTD_lo_isRegularOffset, ZSTD_lo_isLongOffset=1 } ZSTD_longOffset_e;
+
+/* We need to add at most (ZSTD_WINDOWLOG_MAX_32 - 1) bits to read the maximum
+ * offset bits. But we can only read at most (STREAM_ACCUMULATOR_MIN_32 - 1)
+ * bits before reloading. This value is the maximum number of bytes we read
+ * after reloading when we are decoding long offets.
+ */
+#define LONG_OFFSETS_MAX_EXTRA_BITS_32 \
+ (ZSTD_WINDOWLOG_MAX_32 > STREAM_ACCUMULATOR_MIN_32 \
+ ? ZSTD_WINDOWLOG_MAX_32 - STREAM_ACCUMULATOR_MIN_32 \
+ : 0)
+
+static seq_t ZSTD_decodeSequence(seqState_t* seqState, const ZSTD_longOffset_e longOffsets)
{
seq_t seq;
U32 const llCode = FSE_peekSymbol(&seqState->stateLL);
U32 const mlCode = FSE_peekSymbol(&seqState->stateML);
- U32 const ofCode = FSE_peekSymbol(&seqState->stateOffb); /* <= maxOff, by table construction */
+ U32 const ofCode = FSE_peekSymbol(&seqState->stateOffb); /* <= MaxOff, by table construction */
U32 const llBits = LL_bits[llCode];
U32 const mlBits = ML_bits[mlCode];
@@ -891,15 +925,25 @@ static seq_t ZSTD_decodeSequence(seqState_t* seqState)
0, 1, 1, 5, 0xD, 0x1D, 0x3D, 0x7D,
0xFD, 0x1FD, 0x3FD, 0x7FD, 0xFFD, 0x1FFD, 0x3FFD, 0x7FFD,
0xFFFD, 0x1FFFD, 0x3FFFD, 0x7FFFD, 0xFFFFD, 0x1FFFFD, 0x3FFFFD, 0x7FFFFD,
- 0xFFFFFD, 0x1FFFFFD, 0x3FFFFFD, 0x7FFFFFD, 0xFFFFFFD };
+ 0xFFFFFD, 0x1FFFFFD, 0x3FFFFFD, 0x7FFFFFD, 0xFFFFFFD, 0x1FFFFFFD, 0x3FFFFFFD, 0x7FFFFFFD };
/* sequence */
{ size_t offset;
if (!ofCode)
offset = 0;
else {
- offset = OF_base[ofCode] + BIT_readBitsFast(&seqState->DStream, ofBits); /* <= (ZSTD_WINDOWLOG_MAX-1) bits */
- if (MEM_32bits()) BIT_reloadDStream(&seqState->DStream);
+ ZSTD_STATIC_ASSERT(ZSTD_lo_isLongOffset == 1);
+ ZSTD_STATIC_ASSERT(LONG_OFFSETS_MAX_EXTRA_BITS_32 == 5);
+ assert(ofBits <= MaxOff);
+ if (MEM_32bits() && longOffsets) {
+ U32 const extraBits = ofBits - MIN(ofBits, STREAM_ACCUMULATOR_MIN_32-1);
+ offset = OF_base[ofCode] + (BIT_readBitsFast(&seqState->DStream, ofBits - extraBits) << extraBits);
+ if (MEM_32bits() || extraBits) BIT_reloadDStream(&seqState->DStream);
+ if (extraBits) offset += BIT_readBitsFast(&seqState->DStream, extraBits);
+ } else {
+ offset = OF_base[ofCode] + BIT_readBitsFast(&seqState->DStream, ofBits); /* <= (ZSTD_WINDOWLOG_MAX-1) bits */
+ if (MEM_32bits()) BIT_reloadDStream(&seqState->DStream);
+ }
}
if (ofCode <= 1) {
@@ -923,13 +967,17 @@ static seq_t ZSTD_decodeSequence(seqState_t* seqState)
seq.matchLength = ML_base[mlCode]
+ ((mlCode>31) ? BIT_readBitsFast(&seqState->DStream, mlBits) : 0); /* <= 16 bits */
- if (MEM_32bits() && (mlBits+llBits>24)) BIT_reloadDStream(&seqState->DStream);
+ if (MEM_32bits() && (mlBits+llBits >= STREAM_ACCUMULATOR_MIN_32-LONG_OFFSETS_MAX_EXTRA_BITS_32))
+ BIT_reloadDStream(&seqState->DStream);
+ if (MEM_64bits() && (totalBits >= STREAM_ACCUMULATOR_MIN_64-(LLFSELog+MLFSELog+OffFSELog)))
+ BIT_reloadDStream(&seqState->DStream);
+ /* Verify that there is enough bits to read the rest of the data in 64-bit mode. */
+ ZSTD_STATIC_ASSERT(16+LLFSELog+MLFSELog+OffFSELog < STREAM_ACCUMULATOR_MIN_64);
seq.litLength = LL_base[llCode]
+ ((llCode>15) ? BIT_readBitsFast(&seqState->DStream, llBits) : 0); /* <= 16 bits */
- if ( MEM_32bits()
- || (totalBits > 64 - 7 - (LLFSELog+MLFSELog+OffFSELog)) )
- BIT_reloadDStream(&seqState->DStream);
+ if (MEM_32bits())
+ BIT_reloadDStream(&seqState->DStream);
DEBUGLOG(6, "seq: litL=%u, matchL=%u, offset=%u",
(U32)seq.litLength, (U32)seq.matchLength, (U32)seq.offset);
@@ -1028,7 +1076,8 @@ size_t ZSTD_execSequence(BYTE* op,
static size_t ZSTD_decompressSequences(
ZSTD_DCtx* dctx,
void* dst, size_t maxDstSize,
- const void* seqStart, size_t seqSize)
+ const void* seqStart, size_t seqSize,
+ const ZSTD_longOffset_e isLongOffset)
{
const BYTE* ip = (const BYTE*)seqStart;
const BYTE* const iend = ip + seqSize;
@@ -1063,7 +1112,7 @@ static size_t ZSTD_decompressSequences(
for ( ; (BIT_reloadDStream(&(seqState.DStream)) <= BIT_DStream_completed) && nbSeq ; ) {
nbSeq--;
- { seq_t const sequence = ZSTD_decodeSequence(&seqState);
+ { seq_t const sequence = ZSTD_decodeSequence(&seqState, isLongOffset);
size_t const oneSeqSize = ZSTD_execSequence(op, oend, sequence, &litPtr, litEnd, base, vBase, dictEnd);
DEBUGLOG(6, "regenerated sequence size : %u", (U32)oneSeqSize);
if (ZSTD_isError(oneSeqSize)) return oneSeqSize;
@@ -1088,13 +1137,14 @@ static size_t ZSTD_decompressSequences(
}
-FORCE_INLINE_TEMPLATE seq_t ZSTD_decodeSequenceLong_generic(seqState_t* seqState, int const longOffsets)
+HINT_INLINE
+seq_t ZSTD_decodeSequenceLong(seqState_t* seqState, ZSTD_longOffset_e const longOffsets)
{
seq_t seq;
U32 const llCode = FSE_peekSymbol(&seqState->stateLL);
U32 const mlCode = FSE_peekSymbol(&seqState->stateML);
- U32 const ofCode = FSE_peekSymbol(&seqState->stateOffb); /* <= maxOff, by table construction */
+ U32 const ofCode = FSE_peekSymbol(&seqState->stateOffb); /* <= MaxOff, by table construction */
U32 const llBits = LL_bits[llCode];
U32 const mlBits = ML_bits[mlCode];
@@ -1121,15 +1171,18 @@ FORCE_INLINE_TEMPLATE seq_t ZSTD_decodeSequenceLong_generic(seqState_t* seqState
0, 1, 1, 5, 0xD, 0x1D, 0x3D, 0x7D,
0xFD, 0x1FD, 0x3FD, 0x7FD, 0xFFD, 0x1FFD, 0x3FFD, 0x7FFD,
0xFFFD, 0x1FFFD, 0x3FFFD, 0x7FFFD, 0xFFFFD, 0x1FFFFD, 0x3FFFFD, 0x7FFFFD,
- 0xFFFFFD, 0x1FFFFFD, 0x3FFFFFD, 0x7FFFFFD, 0xFFFFFFD };
+ 0xFFFFFD, 0x1FFFFFD, 0x3FFFFFD, 0x7FFFFFD, 0xFFFFFFD, 0x1FFFFFFD, 0x3FFFFFFD, 0x7FFFFFFD };
/* sequence */
{ size_t offset;
if (!ofCode)
offset = 0;
else {
- if (longOffsets) {
- int const extraBits = ofBits - MIN(ofBits, STREAM_ACCUMULATOR_MIN);
+ ZSTD_STATIC_ASSERT(ZSTD_lo_isLongOffset == 1);
+ ZSTD_STATIC_ASSERT(LONG_OFFSETS_MAX_EXTRA_BITS_32 == 5);
+ assert(ofBits <= MaxOff);
+ if (MEM_32bits() && longOffsets) {
+ U32 const extraBits = ofBits - MIN(ofBits, STREAM_ACCUMULATOR_MIN_32-1);
offset = OF_base[ofCode] + (BIT_readBitsFast(&seqState->DStream, ofBits - extraBits) << extraBits);
if (MEM_32bits() || extraBits) BIT_reloadDStream(&seqState->DStream);
if (extraBits) offset += BIT_readBitsFast(&seqState->DStream, extraBits);
@@ -1159,11 +1212,16 @@ FORCE_INLINE_TEMPLATE seq_t ZSTD_decodeSequenceLong_generic(seqState_t* seqState
}
seq.matchLength = ML_base[mlCode] + ((mlCode>31) ? BIT_readBitsFast(&seqState->DStream, mlBits) : 0); /* <= 16 bits */
- if (MEM_32bits() && (mlBits+llBits>24)) BIT_reloadDStream(&seqState->DStream);
+ if (MEM_32bits() && (mlBits+llBits >= STREAM_ACCUMULATOR_MIN_32-LONG_OFFSETS_MAX_EXTRA_BITS_32))
+ BIT_reloadDStream(&seqState->DStream);
+ if (MEM_64bits() && (totalBits >= STREAM_ACCUMULATOR_MIN_64-(LLFSELog+MLFSELog+OffFSELog)))
+ BIT_reloadDStream(&seqState->DStream);
+ /* Verify that there is enough bits to read the rest of the data in 64-bit mode. */
+ ZSTD_STATIC_ASSERT(16+LLFSELog+MLFSELog+OffFSELog < STREAM_ACCUMULATOR_MIN_64);
seq.litLength = LL_base[llCode] + ((llCode>15) ? BIT_readBitsFast(&seqState->DStream, llBits) : 0); /* <= 16 bits */
- if (MEM_32bits() ||
- (totalBits > 64 - 7 - (LLFSELog+MLFSELog+OffFSELog)) ) BIT_reloadDStream(&seqState->DStream);
+ if (MEM_32bits())
+ BIT_reloadDStream(&seqState->DStream);
{ size_t const pos = seqState->pos + seq.litLength;
seq.match = seqState->base + pos - seq.offset; /* single memory segment */
@@ -1180,19 +1238,12 @@ FORCE_INLINE_TEMPLATE seq_t ZSTD_decodeSequenceLong_generic(seqState_t* seqState
return seq;
}
-static seq_t ZSTD_decodeSequenceLong(seqState_t* seqState, unsigned const windowSize) {
- if (ZSTD_highbit32(windowSize) > STREAM_ACCUMULATOR_MIN) {
- return ZSTD_decodeSequenceLong_generic(seqState, 1);
- } else {
- return ZSTD_decodeSequenceLong_generic(seqState, 0);
- }
-}
HINT_INLINE
size_t ZSTD_execSequenceLong(BYTE* op,
- BYTE* const oend, seq_t sequence,
- const BYTE** litPtr, const BYTE* const litLimit,
- const BYTE* const base, const BYTE* const vBase, const BYTE* const dictEnd)
+ BYTE* const oend, seq_t sequence,
+ const BYTE** litPtr, const BYTE* const litLimit,
+ const BYTE* const base, const BYTE* const vBase, const BYTE* const dictEnd)
{
BYTE* const oLitEnd = op + sequence.litLength;
size_t const sequenceLength = sequence.litLength + sequence.matchLength;
@@ -1202,11 +1253,9 @@ size_t ZSTD_execSequenceLong(BYTE* op,
const BYTE* match = sequence.match;
/* check */
-#if 1
if (oMatchEnd>oend) return ERROR(dstSize_tooSmall); /* last match must start at a minimum distance of WILDCOPY_OVERLENGTH from oend */
if (iLitEnd > litLimit) return ERROR(corruption_detected); /* over-read beyond lit buffer */
if (oLitEnd>oend_w) return ZSTD_execSequenceLast7(op, oend, sequence, litPtr, litLimit, base, vBase, dictEnd);
-#endif
/* copy Literals */
ZSTD_copy8(op, *litPtr);
@@ -1216,7 +1265,6 @@ size_t ZSTD_execSequenceLong(BYTE* op,
*litPtr = iLitEnd; /* update for next sequence */
/* copy Match */
-#if 1
if (sequence.offset > (size_t)(oLitEnd - base)) {
/* offset beyond prefix */
if (sequence.offset > (size_t)(oLitEnd - vBase)) return ERROR(corruption_detected);
@@ -1236,8 +1284,8 @@ size_t ZSTD_execSequenceLong(BYTE* op,
return sequenceLength;
}
} }
- /* Requirement: op <= oend_w && sequence.matchLength >= MINMATCH */
-#endif
+ assert(op <= oend_w);
+ assert(sequence.matchLength >= MINMATCH);
/* match within prefix */
if (sequence.offset < 8) {
@@ -1273,7 +1321,8 @@ size_t ZSTD_execSequenceLong(BYTE* op,
static size_t ZSTD_decompressSequencesLong(
ZSTD_DCtx* dctx,
void* dst, size_t maxDstSize,
- const void* seqStart, size_t seqSize)
+ const void* seqStart, size_t seqSize,
+ const ZSTD_longOffset_e isLongOffset)
{
const BYTE* ip = (const BYTE*)seqStart;
const BYTE* const iend = ip + seqSize;
@@ -1285,7 +1334,6 @@ static size_t ZSTD_decompressSequencesLong(
const BYTE* const base = (const BYTE*) (dctx->base);
const BYTE* const vBase = (const BYTE*) (dctx->vBase);
const BYTE* const dictEnd = (const BYTE*) (dctx->dictEnd);
- unsigned const windowSize32 = (unsigned)dctx->fParams.windowSize;
int nbSeq;
/* Build Decoding Tables */
@@ -1315,13 +1363,13 @@ static size_t ZSTD_decompressSequencesLong(
/* prepare in advance */
for (seqNb=0; (BIT_reloadDStream(&seqState.DStream) <= BIT_DStream_completed) && seqNb<seqAdvance; seqNb++) {
- sequences[seqNb] = ZSTD_decodeSequenceLong(&seqState, windowSize32);
+ sequences[seqNb] = ZSTD_decodeSequenceLong(&seqState, isLongOffset);
}
if (seqNb<seqAdvance) return ERROR(corruption_detected);
/* decode and decompress */
for ( ; (BIT_reloadDStream(&(seqState.DStream)) <= BIT_DStream_completed) && seqNb<nbSeq ; seqNb++) {
- seq_t const sequence = ZSTD_decodeSequenceLong(&seqState, windowSize32);
+ seq_t const sequence = ZSTD_decodeSequenceLong(&seqState, isLongOffset);
size_t const oneSeqSize = ZSTD_execSequenceLong(op, oend, sequences[(seqNb-ADVANCED_SEQS) & STOSEQ_MASK], &litPtr, litEnd, base, vBase, dictEnd);
if (ZSTD_isError(oneSeqSize)) return oneSeqSize;
PREFETCH(sequence.match);
@@ -1355,10 +1403,20 @@ static size_t ZSTD_decompressSequencesLong(
static size_t ZSTD_decompressBlock_internal(ZSTD_DCtx* dctx,
void* dst, size_t dstCapacity,
- const void* src, size_t srcSize)
+ const void* src, size_t srcSize, const int frame)
{ /* blockType == blockCompressed */
const BYTE* ip = (const BYTE*)src;
- DEBUGLOG(5, "ZSTD_decompressBlock_internal");
+ /* isLongOffset must be true if there are long offsets.
+ * Offsets are long if they are larger than 2^STREAM_ACCUMULATOR_MIN.
+ * We don't expect that to be the case in 64-bit mode.
+ * If we are in block mode we don't know the window size, so we have to be
+ * conservative.
+ */
+ ZSTD_longOffset_e const isLongOffset = (ZSTD_longOffset_e)(MEM_32bits() && (!frame || dctx->fParams.windowSize > (1ULL << STREAM_ACCUMULATOR_MIN)));
+ /* windowSize could be any value at this point, since it is only validated
+ * in the streaming API.
+ */
+ DEBUGLOG(5, "ZSTD_decompressBlock_internal (size : %u)", (U32)srcSize);
if (srcSize >= ZSTD_BLOCKSIZE_MAX) return ERROR(srcSize_wrong);
@@ -1369,13 +1427,9 @@ static size_t ZSTD_decompressBlock_internal(ZSTD_DCtx* dctx,
ip += litCSize;
srcSize -= litCSize;
}
- if (sizeof(size_t) > 4) /* do not enable prefetching on 32-bits x86, as it's performance detrimental */
- /* likely because of register pressure */
- /* if that's the correct cause, then 32-bits ARM should be affected differently */
- /* it would be good to test this on ARM real hardware, to see if prefetch version improves speed */
- if (dctx->fParams.windowSize > (1<<23))
- return ZSTD_decompressSequencesLong(dctx, dst, dstCapacity, ip, srcSize);
- return ZSTD_decompressSequences(dctx, dst, dstCapacity, ip, srcSize);
+ if (frame && dctx->fParams.windowSize > (1<<23))
+ return ZSTD_decompressSequencesLong(dctx, dst, dstCapacity, ip, srcSize, isLongOffset);
+ return ZSTD_decompressSequences(dctx, dst, dstCapacity, ip, srcSize, isLongOffset);
}
@@ -1395,7 +1449,7 @@ size_t ZSTD_decompressBlock(ZSTD_DCtx* dctx,
{
size_t dSize;
ZSTD_checkContinuity(dctx, dst);
- dSize = ZSTD_decompressBlock_internal(dctx, dst, dstCapacity, src, srcSize);
+ dSize = ZSTD_decompressBlock_internal(dctx, dst, dstCapacity, src, srcSize, /* frame */ 0);
dctx->previousDstEnd = (char*)dst + dSize;
return dSize;
}
@@ -1411,7 +1465,7 @@ ZSTDLIB_API size_t ZSTD_insertBlock(ZSTD_DCtx* dctx, const void* blockStart, siz
}
-size_t ZSTD_generateNxBytes(void* dst, size_t dstCapacity, BYTE byte, size_t length)
+static size_t ZSTD_generateNxBytes(void* dst, size_t dstCapacity, BYTE byte, size_t length)
{
if (length > dstCapacity) return ERROR(dstSize_tooSmall);
memset(dst, byte, length);
@@ -1431,7 +1485,7 @@ size_t ZSTD_findFrameCompressedSize(const void *src, size_t srcSize)
#endif
if ( (srcSize >= ZSTD_skippableHeaderSize)
&& (MEM_readLE32(src) & 0xFFFFFFF0U) == ZSTD_MAGIC_SKIPPABLE_START ) {
- return ZSTD_skippableHeaderSize + MEM_readLE32((const BYTE*)src + 4);
+ return ZSTD_skippableHeaderSize + MEM_readLE32((const BYTE*)src + ZSTD_frameIdSize);
} else {
const BYTE* ip = (const BYTE*)src;
const BYTE* const ipstart = ip;
@@ -1511,7 +1565,7 @@ static size_t ZSTD_decompressFrame(ZSTD_DCtx* dctx,
switch(blockProperties.blockType)
{
case bt_compressed:
- decodedSize = ZSTD_decompressBlock_internal(dctx, op, oend-op, ip, cBlockSize);
+ decodedSize = ZSTD_decompressBlock_internal(dctx, op, oend-op, ip, cBlockSize, /* frame */ 1);
break;
case bt_raw :
decodedSize = ZSTD_copyRawBlock(op, oend-op, ip, cBlockSize);
@@ -1533,6 +1587,10 @@ static size_t ZSTD_decompressFrame(ZSTD_DCtx* dctx,
if (blockProperties.lastBlock) break;
}
+ if (dctx->fParams.frameContentSize != ZSTD_CONTENTSIZE_UNKNOWN) {
+ if ((U64)(op-ostart) != dctx->fParams.frameContentSize) {
+ return ERROR(corruption_detected);
+ } }
if (dctx->fParams.checksumFlag) { /* Frame content checksum verification */
U32 const checkCalc = (U32)XXH64_digest(&dctx->xxhState);
U32 checkRead;
@@ -1590,13 +1648,15 @@ static size_t ZSTD_decompressMultiFrame(ZSTD_DCtx* dctx,
#endif
magicNumber = MEM_readLE32(src);
+ DEBUGLOG(4, "reading magic number %08X (expecting %08X)",
+ (U32)magicNumber, (U32)ZSTD_MAGICNUMBER);
if (magicNumber != ZSTD_MAGICNUMBER) {
if ((magicNumber & 0xFFFFFFF0U) == ZSTD_MAGIC_SKIPPABLE_START) {
size_t skippableSize;
if (srcSize < ZSTD_skippableHeaderSize)
return ERROR(srcSize_wrong);
- skippableSize = MEM_readLE32((const BYTE *)src + 4) +
- ZSTD_skippableHeaderSize;
+ skippableSize = MEM_readLE32((const BYTE*)src + ZSTD_frameIdSize)
+ + ZSTD_skippableHeaderSize;
if (srcSize < skippableSize) return ERROR(srcSize_wrong);
src = (const BYTE *)src + skippableSize;
@@ -1699,33 +1759,31 @@ size_t ZSTD_decompressContinue(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, c
{
DEBUGLOG(5, "ZSTD_decompressContinue");
/* Sanity check */
- if (srcSize != dctx->expected) return ERROR(srcSize_wrong); /* unauthorized */
+ if (srcSize != dctx->expected) return ERROR(srcSize_wrong); /* not allowed */
if (dstCapacity) ZSTD_checkContinuity(dctx, dst);
switch (dctx->stage)
{
case ZSTDds_getFrameHeaderSize :
- if (srcSize != ZSTD_frameHeaderSize_prefix) return ERROR(srcSize_wrong); /* unauthorized */
assert(src != NULL);
- if ((MEM_readLE32(src) & 0xFFFFFFF0U) == ZSTD_MAGIC_SKIPPABLE_START) { /* skippable frame */
- memcpy(dctx->headerBuffer, src, ZSTD_frameHeaderSize_prefix);
- dctx->expected = ZSTD_skippableHeaderSize - ZSTD_frameHeaderSize_prefix; /* magic number + skippable frame length */
- dctx->stage = ZSTDds_decodeSkippableHeader;
- return 0;
- }
- dctx->headerSize = ZSTD_frameHeaderSize(src, ZSTD_frameHeaderSize_prefix);
+ if (dctx->format == ZSTD_f_zstd1) { /* allows header */
+ assert(srcSize >= ZSTD_frameIdSize); /* to read skippable magic number */
+ if ((MEM_readLE32(src) & 0xFFFFFFF0U) == ZSTD_MAGIC_SKIPPABLE_START) { /* skippable frame */
+ memcpy(dctx->headerBuffer, src, srcSize);
+ dctx->expected = ZSTD_skippableHeaderSize - srcSize; /* remaining to load to get full skippable frame header */
+ dctx->stage = ZSTDds_decodeSkippableHeader;
+ return 0;
+ } }
+ dctx->headerSize = ZSTD_frameHeaderSize_internal(src, srcSize, dctx->format);
if (ZSTD_isError(dctx->headerSize)) return dctx->headerSize;
- memcpy(dctx->headerBuffer, src, ZSTD_frameHeaderSize_prefix);
- if (dctx->headerSize > ZSTD_frameHeaderSize_prefix) {
- dctx->expected = dctx->headerSize - ZSTD_frameHeaderSize_prefix;
- dctx->stage = ZSTDds_decodeFrameHeader;
- return 0;
- }
- dctx->expected = 0; /* not necessary to copy more */
- /* fall-through */
+ memcpy(dctx->headerBuffer, src, srcSize);
+ dctx->expected = dctx->headerSize - srcSize;
+ dctx->stage = ZSTDds_decodeFrameHeader;
+ return 0;
+
case ZSTDds_decodeFrameHeader:
assert(src != NULL);
- memcpy(dctx->headerBuffer + ZSTD_frameHeaderSize_prefix, src, dctx->expected);
+ memcpy(dctx->headerBuffer + (dctx->headerSize - srcSize), src, srcSize);
CHECK_F(ZSTD_decodeFrameHeader(dctx, dctx->headerBuffer, dctx->headerSize));
dctx->expected = ZSTD_blockHeaderSize;
dctx->stage = ZSTDds_decodeBlockHeader;
@@ -1757,6 +1815,7 @@ size_t ZSTD_decompressContinue(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, c
}
return 0;
}
+
case ZSTDds_decompressLastBlock:
case ZSTDds_decompressBlock:
DEBUGLOG(5, "case ZSTDds_decompressBlock");
@@ -1765,7 +1824,7 @@ size_t ZSTD_decompressContinue(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, c
{
case bt_compressed:
DEBUGLOG(5, "case bt_compressed");
- rSize = ZSTD_decompressBlock_internal(dctx, dst, dstCapacity, src, srcSize);
+ rSize = ZSTD_decompressBlock_internal(dctx, dst, dstCapacity, src, srcSize, /* frame */ 1);
break;
case bt_raw :
rSize = ZSTD_copyRawBlock(dst, dstCapacity, src, srcSize);
@@ -1778,9 +1837,16 @@ size_t ZSTD_decompressContinue(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, c
return ERROR(corruption_detected);
}
if (ZSTD_isError(rSize)) return rSize;
+ DEBUGLOG(5, "decoded size from block : %u", (U32)rSize);
+ dctx->decodedSize += rSize;
if (dctx->fParams.checksumFlag) XXH64_update(&dctx->xxhState, dst, rSize);
if (dctx->stage == ZSTDds_decompressLastBlock) { /* end of frame */
+ DEBUGLOG(4, "decoded size from frame : %u", (U32)dctx->decodedSize);
+ if (dctx->fParams.frameContentSize != ZSTD_CONTENTSIZE_UNKNOWN) {
+ if (dctx->decodedSize != dctx->fParams.frameContentSize) {
+ return ERROR(corruption_detected);
+ } }
if (dctx->fParams.checksumFlag) { /* another round for frame checksum */
dctx->expected = 4;
dctx->stage = ZSTDds_checkChecksum;
@@ -1795,26 +1861,31 @@ size_t ZSTD_decompressContinue(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, c
}
return rSize;
}
+
case ZSTDds_checkChecksum:
+ assert(srcSize == 4); /* guaranteed by dctx->expected */
{ U32 const h32 = (U32)XXH64_digest(&dctx->xxhState);
- U32 const check32 = MEM_readLE32(src); /* srcSize == 4, guaranteed by dctx->expected */
+ U32 const check32 = MEM_readLE32(src);
+ DEBUGLOG(4, "checksum : calculated %08X :: %08X read", h32, check32);
if (check32 != h32) return ERROR(checksum_wrong);
dctx->expected = 0;
dctx->stage = ZSTDds_getFrameHeaderSize;
return 0;
}
+
case ZSTDds_decodeSkippableHeader:
- { assert(src != NULL);
- memcpy(dctx->headerBuffer + ZSTD_frameHeaderSize_prefix, src, dctx->expected);
- dctx->expected = MEM_readLE32(dctx->headerBuffer + 4);
- dctx->stage = ZSTDds_skipFrame;
- return 0;
- }
+ assert(src != NULL);
+ assert(srcSize <= ZSTD_skippableHeaderSize);
+ memcpy(dctx->headerBuffer + (ZSTD_skippableHeaderSize - srcSize), src, srcSize); /* complete skippable header */
+ dctx->expected = MEM_readLE32(dctx->headerBuffer + ZSTD_frameIdSize); /* note : dctx->expected can grow seriously large, beyond local buffer size */
+ dctx->stage = ZSTDds_skipFrame;
+ return 0;
+
case ZSTDds_skipFrame:
- { dctx->expected = 0;
- dctx->stage = ZSTDds_getFrameHeaderSize;
- return 0;
- }
+ dctx->expected = 0;
+ dctx->stage = ZSTDds_getFrameHeaderSize;
+ return 0;
+
default:
return ERROR(GENERIC); /* impossible */
}
@@ -1895,7 +1966,7 @@ static size_t ZSTD_decompress_insertDictionary(ZSTD_DCtx* dctx, const void* dict
if (magic != ZSTD_MAGIC_DICTIONARY) {
return ZSTD_refDictContent(dctx, dict, dictSize); /* pure content mode */
} }
- dctx->dictID = MEM_readLE32((const char*)dict + 4);
+ dctx->dictID = MEM_readLE32((const char*)dict + ZSTD_frameIdSize);
/* load entropy tables */
{ size_t const eSize = ZSTD_loadEntropy(&dctx->entropy, dict, dictSize);
@@ -1909,6 +1980,29 @@ static size_t ZSTD_decompress_insertDictionary(ZSTD_DCtx* dctx, const void* dict
return ZSTD_refDictContent(dctx, dict, dictSize);
}
+/* Note : this function cannot fail */
+size_t ZSTD_decompressBegin(ZSTD_DCtx* dctx)
+{
+ assert(dctx != NULL);
+ dctx->expected = ZSTD_startingInputLength(dctx->format); /* dctx->format must be properly set */
+ dctx->stage = ZSTDds_getFrameHeaderSize;
+ dctx->decodedSize = 0;
+ dctx->previousDstEnd = NULL;
+ dctx->base = NULL;
+ dctx->vBase = NULL;
+ dctx->dictEnd = NULL;
+ dctx->entropy.hufTable[0] = (HUF_DTable)((HufLog)*0x1000001); /* cover both little and big endian */
+ dctx->litEntropy = dctx->fseEntropy = 0;
+ dctx->dictID = 0;
+ ZSTD_STATIC_ASSERT(sizeof(dctx->entropy.rep) == sizeof(repStartValue));
+ memcpy(dctx->entropy.rep, repStartValue, sizeof(repStartValue)); /* initial repcodes */
+ dctx->LLTptr = dctx->entropy.LLTable;
+ dctx->MLTptr = dctx->entropy.MLTable;
+ dctx->OFTptr = dctx->entropy.OFTable;
+ dctx->HUFptr = dctx->entropy.hufTable;
+ return 0;
+}
+
size_t ZSTD_decompressBegin_usingDict(ZSTD_DCtx* dctx, const void* dict, size_t dictSize)
{
CHECK_F( ZSTD_decompressBegin(dctx) );
@@ -1975,7 +2069,7 @@ static size_t ZSTD_loadEntropy_inDDict(ZSTD_DDict* ddict)
{ U32 const magic = MEM_readLE32(ddict->dictContent);
if (magic != ZSTD_MAGIC_DICTIONARY) return 0; /* pure content mode */
}
- ddict->dictID = MEM_readLE32((const char*)ddict->dictContent + 4);
+ ddict->dictID = MEM_readLE32((const char*)ddict->dictContent + ZSTD_frameIdSize);
/* load entropy tables */
CHECK_E( ZSTD_loadEntropy(&ddict->entropy, ddict->dictContent, ddict->dictSize), dictionary_corrupted );
@@ -1984,9 +2078,9 @@ static size_t ZSTD_loadEntropy_inDDict(ZSTD_DDict* ddict)
}
-static size_t ZSTD_initDDict_internal(ZSTD_DDict* ddict, const void* dict, size_t dictSize, unsigned byReference)
+static size_t ZSTD_initDDict_internal(ZSTD_DDict* ddict, const void* dict, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod)
{
- if ((byReference) || (!dict) || (!dictSize)) {
+ if ((dictLoadMethod == ZSTD_dlm_byRef) || (!dict) || (!dictSize)) {
ddict->dictBuffer = NULL;
ddict->dictContent = dict;
} else {
@@ -2005,7 +2099,7 @@ static size_t ZSTD_initDDict_internal(ZSTD_DDict* ddict, const void* dict, size_
return 0;
}
-ZSTD_DDict* ZSTD_createDDict_advanced(const void* dict, size_t dictSize, unsigned byReference, ZSTD_customMem customMem)
+ZSTD_DDict* ZSTD_createDDict_advanced(const void* dict, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_customMem customMem)
{
if (!customMem.customAlloc ^ !customMem.customFree) return NULL;
@@ -2013,7 +2107,7 @@ ZSTD_DDict* ZSTD_createDDict_advanced(const void* dict, size_t dictSize, unsigne
if (!ddict) return NULL;
ddict->cMem = customMem;
- if (ZSTD_isError( ZSTD_initDDict_internal(ddict, dict, dictSize, byReference) )) {
+ if (ZSTD_isError( ZSTD_initDDict_internal(ddict, dict, dictSize, dictLoadMethod) )) {
ZSTD_freeDDict(ddict);
return NULL;
}
@@ -2029,7 +2123,7 @@ ZSTD_DDict* ZSTD_createDDict_advanced(const void* dict, size_t dictSize, unsigne
ZSTD_DDict* ZSTD_createDDict(const void* dict, size_t dictSize)
{
ZSTD_customMem const allocator = { NULL, NULL, NULL };
- return ZSTD_createDDict_advanced(dict, dictSize, 0, allocator);
+ return ZSTD_createDDict_advanced(dict, dictSize, ZSTD_dlm_byCopy, allocator);
}
/*! ZSTD_createDDict_byReference() :
@@ -2039,25 +2133,26 @@ ZSTD_DDict* ZSTD_createDDict(const void* dict, size_t dictSize)
ZSTD_DDict* ZSTD_createDDict_byReference(const void* dictBuffer, size_t dictSize)
{
ZSTD_customMem const allocator = { NULL, NULL, NULL };
- return ZSTD_createDDict_advanced(dictBuffer, dictSize, 1, allocator);
+ return ZSTD_createDDict_advanced(dictBuffer, dictSize, ZSTD_dlm_byRef, allocator);
}
ZSTD_DDict* ZSTD_initStaticDDict(void* workspace, size_t workspaceSize,
const void* dict, size_t dictSize,
- unsigned byReference)
+ ZSTD_dictLoadMethod_e dictLoadMethod)
{
- size_t const neededSpace = sizeof(ZSTD_DDict) + (byReference ? 0 : dictSize);
+ size_t const neededSpace =
+ sizeof(ZSTD_DDict) + (dictLoadMethod == ZSTD_dlm_byRef ? 0 : dictSize);
ZSTD_DDict* const ddict = (ZSTD_DDict*)workspace;
assert(workspace != NULL);
assert(dict != NULL);
if ((size_t)workspace & 7) return NULL; /* 8-aligned */
if (workspaceSize < neededSpace) return NULL;
- if (!byReference) {
+ if (dictLoadMethod == ZSTD_dlm_byCopy) {
memcpy(ddict+1, dict, dictSize); /* local copy */
dict = ddict+1;
}
- if (ZSTD_isError( ZSTD_initDDict_internal(ddict, dict, dictSize, 1 /* byRef */) ))
+ if (ZSTD_isError( ZSTD_initDDict_internal(ddict, dict, dictSize, ZSTD_dlm_byRef) ))
return NULL;
return ddict;
}
@@ -2075,10 +2170,10 @@ size_t ZSTD_freeDDict(ZSTD_DDict* ddict)
/*! ZSTD_estimateDDictSize() :
* Estimate amount of memory that will be needed to create a dictionary for decompression.
- * Note : dictionary created "byReference" are smaller */
-size_t ZSTD_estimateDDictSize(size_t dictSize, unsigned byReference)
+ * Note : dictionary created by reference using ZSTD_dlm_byRef are smaller */
+size_t ZSTD_estimateDDictSize(size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod)
{
- return sizeof(ZSTD_DDict) + (byReference ? 0 : dictSize);
+ return sizeof(ZSTD_DDict) + (dictLoadMethod == ZSTD_dlm_byRef ? 0 : dictSize);
}
size_t ZSTD_sizeof_DDict(const ZSTD_DDict* ddict)
@@ -2095,7 +2190,7 @@ unsigned ZSTD_getDictID_fromDict(const void* dict, size_t dictSize)
{
if (dictSize < 8) return 0;
if (MEM_readLE32(dict) != ZSTD_MAGIC_DICTIONARY) return 0;
- return MEM_readLE32((const char*)dict + 4);
+ return MEM_readLE32((const char*)dict + ZSTD_frameIdSize);
}
/*! ZSTD_getDictID_fromDDict() :
@@ -2123,7 +2218,7 @@ unsigned ZSTD_getDictID_fromDDict(const ZSTD_DDict* ddict)
* ZSTD_getFrameHeader(), which will provide a more precise error code. */
unsigned ZSTD_getDictID_fromFrame(const void* src, size_t srcSize)
{
- ZSTD_frameHeader zfp = { 0, 0, ZSTD_frame, 0, 0, 0 };
+ ZSTD_frameHeader zfp = { 0, 0, 0, ZSTD_frame, 0, 0, 0 };
size_t const hError = ZSTD_getFrameHeader(&zfp, src, srcSize);
if (ZSTD_isError(hError)) return 0;
return zfp.dictID;
@@ -2190,13 +2285,15 @@ size_t ZSTD_initDStream_usingDict(ZSTD_DStream* zds, const void* dict, size_t di
return ZSTD_frameHeaderSize_prefix;
}
+/* note : this variant can't fail */
size_t ZSTD_initDStream(ZSTD_DStream* zds)
{
return ZSTD_initDStream_usingDict(zds, NULL, 0);
}
/* ZSTD_initDStream_usingDDict() :
- * ddict will just be referenced, and must outlive decompression session */
+ * ddict will just be referenced, and must outlive decompression session
+ * this function cannot fail */
size_t ZSTD_initDStream_usingDDict(ZSTD_DStream* zds, const ZSTD_DDict* ddict)
{
size_t const initResult = ZSTD_initDStream(zds);
@@ -2216,31 +2313,66 @@ size_t ZSTD_resetDStream(ZSTD_DStream* zds)
size_t ZSTD_setDStreamParameter(ZSTD_DStream* zds,
ZSTD_DStreamParameter_e paramType, unsigned paramValue)
{
+ ZSTD_STATIC_ASSERT((unsigned)zdss_loadHeader >= (unsigned)zdss_init);
+ if ((unsigned)zds->streamStage > (unsigned)zdss_loadHeader)
+ return ERROR(stage_wrong);
switch(paramType)
{
default : return ERROR(parameter_unsupported);
- case DStream_p_maxWindowSize : zds->maxWindowSize = paramValue ? paramValue : (U32)(-1); break;
+ case DStream_p_maxWindowSize :
+ DEBUGLOG(4, "setting maxWindowSize = %u KB", paramValue >> 10);
+ zds->maxWindowSize = paramValue ? paramValue : (U32)(-1);
+ break;
}
return 0;
}
+size_t ZSTD_DCtx_setMaxWindowSize(ZSTD_DCtx* dctx, size_t maxWindowSize)
+{
+ ZSTD_STATIC_ASSERT((unsigned)zdss_loadHeader >= (unsigned)zdss_init);
+ if ((unsigned)dctx->streamStage > (unsigned)zdss_loadHeader)
+ return ERROR(stage_wrong);
+ dctx->maxWindowSize = maxWindowSize;
+ return 0;
+}
+
+size_t ZSTD_DCtx_setFormat(ZSTD_DCtx* dctx, ZSTD_format_e format)
+{
+ DEBUGLOG(4, "ZSTD_DCtx_setFormat : %u", (unsigned)format);
+ ZSTD_STATIC_ASSERT((unsigned)zdss_loadHeader >= (unsigned)zdss_init);
+ if ((unsigned)dctx->streamStage > (unsigned)zdss_loadHeader)
+ return ERROR(stage_wrong);
+ dctx->format = format;
+ return 0;
+}
+
size_t ZSTD_sizeof_DStream(const ZSTD_DStream* zds)
{
return ZSTD_sizeof_DCtx(zds);
}
+size_t ZSTD_decodingBufferSize_min(unsigned long long windowSize, unsigned long long frameContentSize)
+{
+ size_t const blockSize = (size_t) MIN(windowSize, ZSTD_BLOCKSIZE_MAX);
+ unsigned long long const neededRBSize = windowSize + blockSize + (WILDCOPY_OVERLENGTH * 2);
+ unsigned long long const neededSize = MIN(frameContentSize, neededRBSize);
+ size_t const minRBSize = (size_t) neededSize;
+ if ((unsigned long long)minRBSize != neededSize) return ERROR(frameParameter_windowTooLarge);
+ return minRBSize;
+}
+
size_t ZSTD_estimateDStreamSize(size_t windowSize)
{
size_t const blockSize = MIN(windowSize, ZSTD_BLOCKSIZE_MAX);
size_t const inBuffSize = blockSize; /* no block can be larger */
- size_t const outBuffSize = windowSize + blockSize + (WILDCOPY_OVERLENGTH * 2);
+ size_t const outBuffSize = ZSTD_decodingBufferSize_min(windowSize, ZSTD_CONTENTSIZE_UNKNOWN);
return ZSTD_estimateDCtxSize() + inBuffSize + outBuffSize;
}
-ZSTDLIB_API size_t ZSTD_estimateDStreamSize_fromFrame(const void* src, size_t srcSize)
+size_t ZSTD_estimateDStreamSize_fromFrame(const void* src, size_t srcSize)
{
- U32 const windowSizeMax = 1U << ZSTD_WINDOWLOG_MAX;
+ U32 const windowSizeMax = 1U << ZSTD_WINDOWLOG_MAX; /* note : should be user-selectable */
ZSTD_frameHeader zfh;
size_t const err = ZSTD_getFrameHeader(&zfh, src, srcSize);
if (ZSTD_isError(err)) return err;
@@ -2272,7 +2404,18 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB
U32 someMoreWork = 1;
DEBUGLOG(5, "ZSTD_decompressStream");
+ if (input->pos > input->size) { /* forbidden */
+ DEBUGLOG(5, "in: pos: %u vs size: %u",
+ (U32)input->pos, (U32)input->size);
+ return ERROR(srcSize_wrong);
+ }
+ if (output->pos > output->size) { /* forbidden */
+ DEBUGLOG(5, "out: pos: %u vs size: %u",
+ (U32)output->pos, (U32)output->size);
+ return ERROR(dstSize_tooSmall);
+ }
DEBUGLOG(5, "input size : %u", (U32)(input->size - input->pos));
+
#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT>=1)
if (zds->legacyVersion) {
/* legacy support is incompatible with static dctx */
@@ -2289,7 +2432,9 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB
/* fall-through */
case zdss_loadHeader :
- { size_t const hSize = ZSTD_getFrameHeader(&zds->fParams, zds->headerBuffer, zds->lhSize);
+ DEBUGLOG(5, "stage zdss_loadHeader (srcSize : %u)", (U32)(iend - ip));
+ { size_t const hSize = ZSTD_getFrameHeader_internal(&zds->fParams, zds->headerBuffer, zds->lhSize, zds->format);
+ DEBUGLOG(5, "header size : %u", (U32)hSize);
if (ZSTD_isError(hSize)) {
#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT>=1)
U32 const legacyVersion = ZSTD_isLegacy(istart, iend-istart);
@@ -2342,7 +2487,7 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB
CHECK_F(ZSTD_decompressBegin_usingDDict(zds, zds->ddict));
if ((MEM_readLE32(zds->headerBuffer) & 0xFFFFFFF0U) == ZSTD_MAGIC_SKIPPABLE_START) { /* skippable frame */
- zds->expected = MEM_readLE32(zds->headerBuffer + 4);
+ zds->expected = MEM_readLE32(zds->headerBuffer + ZSTD_frameIdSize);
zds->stage = ZSTDds_skipFrame;
} else {
CHECK_F(ZSTD_decodeFrameHeader(zds, zds->headerBuffer, zds->lhSize));
@@ -2351,20 +2496,20 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB
}
/* control buffer memory usage */
- DEBUGLOG(4, "Control max buffer memory usage");
+ DEBUGLOG(4, "Control max buffer memory usage (max %u KB)",
+ (U32)(zds->maxWindowSize >> 10));
zds->fParams.windowSize = MAX(zds->fParams.windowSize, 1U << ZSTD_WINDOWLOG_ABSOLUTEMIN);
if (zds->fParams.windowSize > zds->maxWindowSize) return ERROR(frameParameter_windowTooLarge);
/* Adapt buffer sizes to frame header instructions */
- { size_t const blockSize = (size_t)(MIN(zds->fParams.windowSize, ZSTD_BLOCKSIZE_MAX));
- size_t const neededOutSize = (size_t)(zds->fParams.windowSize + blockSize + WILDCOPY_OVERLENGTH * 2);
- zds->blockSize = blockSize;
- if ((zds->inBuffSize < blockSize) || (zds->outBuffSize < neededOutSize)) {
- size_t const bufferSize = blockSize + neededOutSize;
+ { size_t const neededInBuffSize = MAX(zds->fParams.blockSizeMax, 4 /* frame checksum */);
+ size_t const neededOutBuffSize = ZSTD_decodingBufferSize_min(zds->fParams.windowSize, zds->fParams.frameContentSize);
+ if ((zds->inBuffSize < neededInBuffSize) || (zds->outBuffSize < neededOutBuffSize)) {
+ size_t const bufferSize = neededInBuffSize + neededOutBuffSize;
DEBUGLOG(4, "inBuff : from %u to %u",
- (U32)zds->inBuffSize, (U32)blockSize);
+ (U32)zds->inBuffSize, (U32)neededInBuffSize);
DEBUGLOG(4, "outBuff : from %u to %u",
- (U32)zds->outBuffSize, (U32)neededOutSize);
+ (U32)zds->outBuffSize, (U32)neededOutBuffSize);
if (zds->staticSize) { /* static DCtx */
DEBUGLOG(4, "staticSize : %u", (U32)zds->staticSize);
assert(zds->staticSize >= sizeof(ZSTD_DCtx)); /* controlled at init */
@@ -2377,9 +2522,9 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB
zds->inBuff = (char*)ZSTD_malloc(bufferSize, zds->customMem);
if (zds->inBuff == NULL) return ERROR(memory_allocation);
}
- zds->inBuffSize = blockSize;
+ zds->inBuffSize = neededInBuffSize;
zds->outBuff = zds->inBuff + zds->inBuffSize;
- zds->outBuffSize = neededOutSize;
+ zds->outBuffSize = neededOutBuffSize;
} }
zds->streamStage = zdss_read;
/* fall-through */
@@ -2437,8 +2582,13 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB
zds->outStart += flushedSize;
if (flushedSize == toFlushSize) { /* flush completed */
zds->streamStage = zdss_read;
- if (zds->outStart + zds->blockSize > zds->outBuffSize)
+ if ( (zds->outBuffSize < zds->fParams.frameContentSize)
+ && (zds->outStart + zds->fParams.blockSizeMax > zds->outBuffSize) ) {
+ DEBUGLOG(5, "restart filling outBuff from beginning (left:%i, needed:%u)",
+ (int)(zds->outBuffSize - zds->outStart),
+ (U32)zds->fParams.blockSizeMax);
zds->outStart = zds->outEnd = 0;
+ }
break;
} }
/* cannot complete flush */
@@ -2476,3 +2626,30 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB
return nextSrcSizeHint;
}
}
+
+
+size_t ZSTD_decompress_generic(ZSTD_DCtx* dctx, ZSTD_outBuffer* output, ZSTD_inBuffer* input)
+{
+ return ZSTD_decompressStream(dctx, output, input);
+}
+
+size_t ZSTD_decompress_generic_simpleArgs (
+ ZSTD_DCtx* dctx,
+ void* dst, size_t dstCapacity, size_t* dstPos,
+ const void* src, size_t srcSize, size_t* srcPos)
+{
+ ZSTD_outBuffer output = { dst, dstCapacity, *dstPos };
+ ZSTD_inBuffer input = { src, srcSize, *srcPos };
+ /* ZSTD_compress_generic() will check validity of dstPos and srcPos */
+ size_t const cErr = ZSTD_decompress_generic(dctx, &output, &input);
+ *dstPos = output.pos;
+ *srcPos = input.pos;
+ return cErr;
+}
+
+void ZSTD_DCtx_reset(ZSTD_DCtx* dctx)
+{
+ (void)ZSTD_initDStream(dctx);
+ dctx->format = ZSTD_f_zstd1;
+ dctx->maxWindowSize = ZSTD_MAXWINDOWSIZE_DEFAULT;
+}
diff --git a/thirdparty/zstd/zstd.h b/thirdparty/zstd/zstd.h
index 13b4563fd6..2194a3b23d 100644
--- a/thirdparty/zstd/zstd.h
+++ b/thirdparty/zstd/zstd.h
@@ -5,6 +5,7 @@
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
*/
#if defined (__cplusplus)
extern "C" {
@@ -58,7 +59,7 @@ extern "C" {
/*------ Version ------*/
#define ZSTD_VERSION_MAJOR 1
#define ZSTD_VERSION_MINOR 3
-#define ZSTD_VERSION_RELEASE 1
+#define ZSTD_VERSION_RELEASE 2
#define ZSTD_VERSION_NUMBER (ZSTD_VERSION_MAJOR *100*100 + ZSTD_VERSION_MINOR *100 + ZSTD_VERSION_RELEASE)
ZSTDLIB_API unsigned ZSTD_versionNumber(void); /**< useful to check dll version */
@@ -130,10 +131,11 @@ ZSTDLIB_API unsigned long long ZSTD_getDecompressedSize(const void* src, size_t
/*====== Helper functions ======*/
-ZSTDLIB_API int ZSTD_maxCLevel(void); /*!< maximum compression level available */
+#define ZSTD_COMPRESSBOUND(srcSize) ((srcSize) + ((srcSize)>>8) + (((srcSize) < 128 KB) ? ((128 KB - (srcSize)) >> 11) /* margin, from 64 to 0 */ : 0)) /* this formula ensures that bound(A) + bound(B) <= bound(A+B) as long as A and B >= 128 KB */
ZSTDLIB_API size_t ZSTD_compressBound(size_t srcSize); /*!< maximum compressed size in worst case scenario */
ZSTDLIB_API unsigned ZSTD_isError(size_t code); /*!< tells if a `size_t` function result is an error code */
ZSTDLIB_API const char* ZSTD_getErrorName(size_t code); /*!< provides readable string from an error code */
+ZSTDLIB_API int ZSTD_maxCLevel(void); /*!< maximum compression level available */
/***************************************
@@ -375,27 +377,31 @@ ZSTDLIB_API size_t ZSTD_DStreamOutSize(void); /*!< recommended size for output
#define ZSTD_MAGIC_SKIPPABLE_START 0x184D2A50U
#define ZSTD_MAGIC_DICTIONARY 0xEC30A437 /* v0.7+ */
-#define ZSTD_WINDOWLOG_MAX_32 27
-#define ZSTD_WINDOWLOG_MAX_64 27
+#define ZSTD_WINDOWLOG_MAX_32 30
+#define ZSTD_WINDOWLOG_MAX_64 31
#define ZSTD_WINDOWLOG_MAX ((unsigned)(sizeof(size_t) == 4 ? ZSTD_WINDOWLOG_MAX_32 : ZSTD_WINDOWLOG_MAX_64))
-#define ZSTD_WINDOWLOG_MIN 10
-#define ZSTD_HASHLOG_MAX ZSTD_WINDOWLOG_MAX
-#define ZSTD_HASHLOG_MIN 6
-#define ZSTD_CHAINLOG_MAX (ZSTD_WINDOWLOG_MAX+1)
-#define ZSTD_CHAINLOG_MIN ZSTD_HASHLOG_MIN
-#define ZSTD_HASHLOG3_MAX 17
-#define ZSTD_SEARCHLOG_MAX (ZSTD_WINDOWLOG_MAX-1)
-#define ZSTD_SEARCHLOG_MIN 1
-#define ZSTD_SEARCHLENGTH_MAX 7 /* only for ZSTD_fast, other strategies are limited to 6 */
-#define ZSTD_SEARCHLENGTH_MIN 3 /* only for ZSTD_btopt, other strategies are limited to 4 */
-#define ZSTD_TARGETLENGTH_MIN 4
-#define ZSTD_TARGETLENGTH_MAX 999
-
-#define ZSTD_FRAMEHEADERSIZE_MAX 18 /* for static allocation */
-#define ZSTD_FRAMEHEADERSIZE_MIN 6
-static const size_t ZSTD_frameHeaderSize_prefix = 5; /* minimum input size to know frame header size */
-static const size_t ZSTD_frameHeaderSize_max = ZSTD_FRAMEHEADERSIZE_MAX;
+#define ZSTD_WINDOWLOG_MIN 10
+#define ZSTD_HASHLOG_MAX MIN(ZSTD_WINDOWLOG_MAX, 30)
+#define ZSTD_HASHLOG_MIN 6
+#define ZSTD_CHAINLOG_MAX MIN(ZSTD_WINDOWLOG_MAX+1, 30)
+#define ZSTD_CHAINLOG_MIN ZSTD_HASHLOG_MIN
+#define ZSTD_HASHLOG3_MAX 17
+#define ZSTD_SEARCHLOG_MAX (ZSTD_WINDOWLOG_MAX-1)
+#define ZSTD_SEARCHLOG_MIN 1
+#define ZSTD_SEARCHLENGTH_MAX 7 /* only for ZSTD_fast, other strategies are limited to 6 */
+#define ZSTD_SEARCHLENGTH_MIN 3 /* only for ZSTD_btopt, other strategies are limited to 4 */
+#define ZSTD_TARGETLENGTH_MIN 4 /* only useful for btopt */
+#define ZSTD_TARGETLENGTH_MAX 999 /* only useful for btopt */
+#define ZSTD_LDM_MINMATCH_MIN 4
+#define ZSTD_LDM_MINMATCH_MAX 4096
+#define ZSTD_LDM_BUCKETSIZELOG_MAX 8
+
+#define ZSTD_FRAMEHEADERSIZE_PREFIX 5 /* minimum input size to know frame header size */
+#define ZSTD_FRAMEHEADERSIZE_MIN 6
+#define ZSTD_FRAMEHEADERSIZE_MAX 18 /* for static allocation */
+static const size_t ZSTD_frameHeaderSize_prefix = ZSTD_FRAMEHEADERSIZE_PREFIX;
static const size_t ZSTD_frameHeaderSize_min = ZSTD_FRAMEHEADERSIZE_MIN;
+static const size_t ZSTD_frameHeaderSize_max = ZSTD_FRAMEHEADERSIZE_MAX;
static const size_t ZSTD_skippableHeaderSize = 8; /* magic number + skippable frame length */
@@ -424,6 +430,8 @@ typedef struct {
ZSTD_frameParameters fParams;
} ZSTD_parameters;
+typedef struct ZSTD_CCtx_params_s ZSTD_CCtx_params;
+
/*= Custom memory allocation functions */
typedef void* (*ZSTD_allocFunction) (void* opaque, size_t size);
typedef void (*ZSTD_freeFunction) (void* opaque, void* address);
@@ -480,7 +488,7 @@ ZSTDLIB_API size_t ZSTD_frameHeaderSize(const void* src, size_t srcSize);
/*! ZSTD_sizeof_*() :
* These functions give the current memory usage of selected object.
- * Object memory usage can evolve if it's re-used multiple times. */
+ * Object memory usage can evolve when re-used multiple times. */
ZSTDLIB_API size_t ZSTD_sizeof_CCtx(const ZSTD_CCtx* cctx);
ZSTDLIB_API size_t ZSTD_sizeof_DCtx(const ZSTD_DCtx* dctx);
ZSTDLIB_API size_t ZSTD_sizeof_CStream(const ZSTD_CStream* zcs);
@@ -493,18 +501,21 @@ ZSTDLIB_API size_t ZSTD_sizeof_DDict(const ZSTD_DDict* ddict);
* of a future {D,C}Ctx, before its creation.
* ZSTD_estimateCCtxSize() will provide a budget large enough for any compression level up to selected one.
* It will also consider src size to be arbitrarily "large", which is worst case.
- * If srcSize is known to always be small, ZSTD_estimateCCtxSize_advanced() can provide a tighter estimation.
- * ZSTD_estimateCCtxSize_advanced() can be used in tandem with ZSTD_getCParams() to create cParams from compressionLevel.
+ * If srcSize is known to always be small, ZSTD_estimateCCtxSize_usingCParams() can provide a tighter estimation.
+ * ZSTD_estimateCCtxSize_usingCParams() can be used in tandem with ZSTD_getCParams() to create cParams from compressionLevel.
+ * ZSTD_estimateCCtxSize_usingCCtxParams() can be used in tandem with ZSTD_CCtxParam_setParameter(). Only single-threaded compression is supported. This function will return an error code if ZSTD_p_nbThreads is > 1.
* Note : CCtx estimation is only correct for single-threaded compression */
ZSTDLIB_API size_t ZSTD_estimateCCtxSize(int compressionLevel);
-ZSTDLIB_API size_t ZSTD_estimateCCtxSize_advanced(ZSTD_compressionParameters cParams);
+ZSTDLIB_API size_t ZSTD_estimateCCtxSize_usingCParams(ZSTD_compressionParameters cParams);
+ZSTDLIB_API size_t ZSTD_estimateCCtxSize_usingCCtxParams(const ZSTD_CCtx_params* params);
ZSTDLIB_API size_t ZSTD_estimateDCtxSize(void);
-/*! ZSTD_estimate?StreamSize() :
+/*! ZSTD_estimateCStreamSize() :
* ZSTD_estimateCStreamSize() will provide a budget large enough for any compression level up to selected one.
* It will also consider src size to be arbitrarily "large", which is worst case.
- * If srcSize is known to always be small, ZSTD_estimateCStreamSize_advanced() can provide a tighter estimation.
- * ZSTD_estimateCStreamSize_advanced() can be used in tandem with ZSTD_getCParams() to create cParams from compressionLevel.
+ * If srcSize is known to always be small, ZSTD_estimateCStreamSize_usingCParams() can provide a tighter estimation.
+ * ZSTD_estimateCStreamSize_usingCParams() can be used in tandem with ZSTD_getCParams() to create cParams from compressionLevel.
+ * ZSTD_estimateCStreamSize_usingCCtxParams() can be used in tandem with ZSTD_CCtxParam_setParameter(). Only single-threaded compression is supported. This function will return an error code if ZSTD_p_nbThreads is set to a value > 1.
* Note : CStream estimation is only correct for single-threaded compression.
* ZSTD_DStream memory budget depends on window Size.
* This information can be passed manually, using ZSTD_estimateDStreamSize,
@@ -513,17 +524,24 @@ ZSTDLIB_API size_t ZSTD_estimateDCtxSize(void);
* an internal ?Dict will be created, which additional size is not estimated here.
* In this case, get total size by adding ZSTD_estimate?DictSize */
ZSTDLIB_API size_t ZSTD_estimateCStreamSize(int compressionLevel);
-ZSTDLIB_API size_t ZSTD_estimateCStreamSize_advanced(ZSTD_compressionParameters cParams);
+ZSTDLIB_API size_t ZSTD_estimateCStreamSize_usingCParams(ZSTD_compressionParameters cParams);
+ZSTDLIB_API size_t ZSTD_estimateCStreamSize_usingCCtxParams(const ZSTD_CCtx_params* params);
ZSTDLIB_API size_t ZSTD_estimateDStreamSize(size_t windowSize);
ZSTDLIB_API size_t ZSTD_estimateDStreamSize_fromFrame(const void* src, size_t srcSize);
+typedef enum {
+ ZSTD_dlm_byCopy = 0, /**< Copy dictionary content internally */
+ ZSTD_dlm_byRef, /**< Reference dictionary content -- the dictionary buffer must outlive its users. */
+} ZSTD_dictLoadMethod_e;
+
/*! ZSTD_estimate?DictSize() :
* ZSTD_estimateCDictSize() will bet that src size is relatively "small", and content is copied, like ZSTD_createCDict().
- * ZSTD_estimateCStreamSize_advanced() makes it possible to control precisely compression parameters, like ZSTD_createCDict_advanced().
- * Note : dictionary created "byReference" are smaller */
+ * ZSTD_estimateCStreamSize_advanced_usingCParams() makes it possible to control precisely compression parameters, like ZSTD_createCDict_advanced().
+ * Note : dictionary created by reference using ZSTD_dlm_byRef are smaller
+ */
ZSTDLIB_API size_t ZSTD_estimateCDictSize(size_t dictSize, int compressionLevel);
-ZSTDLIB_API size_t ZSTD_estimateCDictSize_advanced(size_t dictSize, ZSTD_compressionParameters cParams, unsigned byReference);
-ZSTDLIB_API size_t ZSTD_estimateDDictSize(size_t dictSize, unsigned byReference);
+ZSTDLIB_API size_t ZSTD_estimateCDictSize_advanced(size_t dictSize, ZSTD_compressionParameters cParams, ZSTD_dictLoadMethod_e dictLoadMethod);
+ZSTDLIB_API size_t ZSTD_estimateDDictSize(size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod);
/***************************************
@@ -551,24 +569,12 @@ ZSTDLIB_API ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem);
ZSTDLIB_API ZSTD_CCtx* ZSTD_initStaticCCtx(void* workspace, size_t workspaceSize);
-/* !!! To be deprecated !!! */
-typedef enum {
- ZSTD_p_forceWindow, /* Force back-references to remain < windowSize, even when referencing Dictionary content (default:0) */
- ZSTD_p_forceRawDict /* Force loading dictionary in "content-only" mode (no header analysis) */
-} ZSTD_CCtxParameter;
-/*! ZSTD_setCCtxParameter() :
- * Set advanced parameters, selected through enum ZSTD_CCtxParameter
- * @result : 0, or an error code (which can be tested with ZSTD_isError()) */
-ZSTDLIB_API size_t ZSTD_setCCtxParameter(ZSTD_CCtx* cctx, ZSTD_CCtxParameter param, unsigned value);
-
-
/*! ZSTD_createCDict_byReference() :
* Create a digested dictionary for compression
* Dictionary content is simply referenced, and therefore stays in dictBuffer.
* It is important that dictBuffer outlives CDict, it must remain read accessible throughout the lifetime of CDict */
ZSTDLIB_API ZSTD_CDict* ZSTD_createCDict_byReference(const void* dictBuffer, size_t dictSize, int compressionLevel);
-
typedef enum { ZSTD_dm_auto=0, /* dictionary is "full" if it starts with ZSTD_MAGIC_DICTIONARY, otherwise it is "rawContent" */
ZSTD_dm_rawContent, /* ensures dictionary is always loaded as rawContent, even if it starts with ZSTD_MAGIC_DICTIONARY */
ZSTD_dm_fullDict /* refuses to load a dictionary if it does not respect Zstandard's specification */
@@ -576,7 +582,8 @@ typedef enum { ZSTD_dm_auto=0, /* dictionary is "full" if it starts with
/*! ZSTD_createCDict_advanced() :
* Create a ZSTD_CDict using external alloc and free, and customized compression parameters */
ZSTDLIB_API ZSTD_CDict* ZSTD_createCDict_advanced(const void* dict, size_t dictSize,
- unsigned byReference, ZSTD_dictMode_e dictMode,
+ ZSTD_dictLoadMethod_e dictLoadMethod,
+ ZSTD_dictMode_e dictMode,
ZSTD_compressionParameters cParams,
ZSTD_customMem customMem);
@@ -596,7 +603,7 @@ ZSTDLIB_API ZSTD_CDict* ZSTD_createCDict_advanced(const void* dict, size_t dictS
ZSTDLIB_API ZSTD_CDict* ZSTD_initStaticCDict(
void* workspace, size_t workspaceSize,
const void* dict, size_t dictSize,
- unsigned byReference, ZSTD_dictMode_e dictMode,
+ ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictMode_e dictMode,
ZSTD_compressionParameters cParams);
/*! ZSTD_getCParams() :
@@ -674,7 +681,8 @@ ZSTDLIB_API ZSTD_DDict* ZSTD_createDDict_byReference(const void* dictBuffer, siz
/*! ZSTD_createDDict_advanced() :
* Create a ZSTD_DDict using external alloc and free, optionally by reference */
ZSTDLIB_API ZSTD_DDict* ZSTD_createDDict_advanced(const void* dict, size_t dictSize,
- unsigned byReference, ZSTD_customMem customMem);
+ ZSTD_dictLoadMethod_e dictLoadMethod,
+ ZSTD_customMem customMem);
/*! ZSTD_initStaticDDict() :
* Generate a digested dictionary in provided memory area.
@@ -689,7 +697,7 @@ ZSTDLIB_API ZSTD_DDict* ZSTD_createDDict_advanced(const void* dict, size_t dictS
*/
ZSTDLIB_API ZSTD_DDict* ZSTD_initStaticDDict(void* workspace, size_t workspaceSize,
const void* dict, size_t dictSize,
- unsigned byReference);
+ ZSTD_dictLoadMethod_e dictLoadMethod);
/*! ZSTD_getDictID_fromDict() :
* Provides the dictID stored within dictionary.
@@ -724,9 +732,9 @@ ZSTDLIB_API unsigned ZSTD_getDictID_fromFrame(const void* src, size_t srcSize);
ZSTDLIB_API ZSTD_CStream* ZSTD_createCStream_advanced(ZSTD_customMem customMem);
ZSTDLIB_API ZSTD_CStream* ZSTD_initStaticCStream(void* workspace, size_t workspaceSize); /**< same as ZSTD_initStaticCCtx() */
ZSTDLIB_API size_t ZSTD_initCStream_srcSize(ZSTD_CStream* zcs, int compressionLevel, unsigned long long pledgedSrcSize); /**< pledgedSrcSize must be correct, a size of 0 means unknown. for a frame size of 0 use initCStream_advanced */
-ZSTDLIB_API size_t ZSTD_initCStream_usingDict(ZSTD_CStream* zcs, const void* dict, size_t dictSize, int compressionLevel); /**< creates of an internal CDict (incompatible with static CCtx), except if dict == NULL or dictSize < 8, in which case no dict is used. */
+ZSTDLIB_API size_t ZSTD_initCStream_usingDict(ZSTD_CStream* zcs, const void* dict, size_t dictSize, int compressionLevel); /**< creates of an internal CDict (incompatible with static CCtx), except if dict == NULL or dictSize < 8, in which case no dict is used. Note: dict is loaded with ZSTD_dm_auto (treated as a full zstd dictionary if it begins with ZSTD_MAGIC_DICTIONARY, else as raw content) and ZSTD_dlm_byCopy.*/
ZSTDLIB_API size_t ZSTD_initCStream_advanced(ZSTD_CStream* zcs, const void* dict, size_t dictSize,
- ZSTD_parameters params, unsigned long long pledgedSrcSize); /**< pledgedSrcSize is optional and can be 0 (meaning unknown). note: if the contentSizeFlag is set, pledgedSrcSize == 0 means the source size is actually 0 */
+ ZSTD_parameters params, unsigned long long pledgedSrcSize); /**< pledgedSrcSize is optional and can be 0 (meaning unknown). note: if the contentSizeFlag is set, pledgedSrcSize == 0 means the source size is actually 0. dict is loaded with ZSTD_dm_auto and ZSTD_dlm_byCopy. */
ZSTDLIB_API size_t ZSTD_initCStream_usingCDict(ZSTD_CStream* zcs, const ZSTD_CDict* cdict); /**< note : cdict will just be referenced, and must outlive compression session */
ZSTDLIB_API size_t ZSTD_initCStream_usingCDict_advanced(ZSTD_CStream* zcs, const ZSTD_CDict* cdict, ZSTD_frameParameters fParams, unsigned long long pledgedSrcSize); /**< same as ZSTD_initCStream_usingCDict(), with control over frame parameters */
@@ -741,12 +749,12 @@ ZSTDLIB_API size_t ZSTD_resetCStream(ZSTD_CStream* zcs, unsigned long long pledg
/*===== Advanced Streaming decompression functions =====*/
-typedef enum { DStream_p_maxWindowSize } ZSTD_DStreamParameter_e;
ZSTDLIB_API ZSTD_DStream* ZSTD_createDStream_advanced(ZSTD_customMem customMem);
ZSTDLIB_API ZSTD_DStream* ZSTD_initStaticDStream(void* workspace, size_t workspaceSize); /**< same as ZSTD_initStaticDCtx() */
-ZSTDLIB_API size_t ZSTD_setDStreamParameter(ZSTD_DStream* zds, ZSTD_DStreamParameter_e paramType, unsigned paramValue);
-ZSTDLIB_API size_t ZSTD_initDStream_usingDict(ZSTD_DStream* zds, const void* dict, size_t dictSize); /**< note: a dict will not be used if dict == NULL or dictSize < 8 */
-ZSTDLIB_API size_t ZSTD_initDStream_usingDDict(ZSTD_DStream* zds, const ZSTD_DDict* ddict); /**< note : ddict will just be referenced, and must outlive decompression session */
+typedef enum { DStream_p_maxWindowSize } ZSTD_DStreamParameter_e;
+ZSTDLIB_API size_t ZSTD_setDStreamParameter(ZSTD_DStream* zds, ZSTD_DStreamParameter_e paramType, unsigned paramValue); /* obsolete : this API will be removed in a future version */
+ZSTDLIB_API size_t ZSTD_initDStream_usingDict(ZSTD_DStream* zds, const void* dict, size_t dictSize); /**< note: no dictionary will be used if dict == NULL or dictSize < 8 */
+ZSTDLIB_API size_t ZSTD_initDStream_usingDDict(ZSTD_DStream* zds, const ZSTD_DDict* ddict); /**< note : ddict is referenced, it must outlive decompression session */
ZSTDLIB_API size_t ZSTD_resetDStream(ZSTD_DStream* zds); /**< re-use decompression parameters from previous init; saves dictionary loading */
@@ -754,8 +762,8 @@ ZSTDLIB_API size_t ZSTD_resetDStream(ZSTD_DStream* zds); /**< re-use decompress
* Buffer-less and synchronous inner streaming functions
*
* This is an advanced API, giving full control over buffer management, for users which need direct control over memory.
-* But it's also a complex one, with many restrictions (documented below).
-* Prefer using normal streaming API for an easier experience
+* But it's also a complex one, with several restrictions, documented below.
+* Prefer normal streaming API for an easier experience.
********************************************************************* */
/**
@@ -772,8 +780,8 @@ ZSTDLIB_API size_t ZSTD_resetDStream(ZSTD_DStream* zds); /**< re-use decompress
Then, consume your input using ZSTD_compressContinue().
There are some important considerations to keep in mind when using this advanced function :
- - ZSTD_compressContinue() has no internal buffer. It uses externally provided buffer only.
- - Interface is synchronous : input is consumed entirely and produce 1+ (or more) compressed blocks.
+ - ZSTD_compressContinue() has no internal buffer. It uses externally provided buffers only.
+ - Interface is synchronous : input is consumed entirely and produces 1+ compressed blocks.
- Caller must ensure there is enough space in `dst` to store compressed data under worst case scenario.
Worst case evaluation is provided by ZSTD_compressBound().
ZSTD_compressContinue() doesn't guarantee recover after a failed compression.
@@ -784,9 +792,9 @@ ZSTDLIB_API size_t ZSTD_resetDStream(ZSTD_DStream* zds); /**< re-use decompress
Finish a frame with ZSTD_compressEnd(), which will write the last block(s) and optional checksum.
It's possible to use srcSize==0, in which case, it will write a final empty block to end the frame.
- Without last block mark, frames will be considered unfinished (corrupted) by decoders.
+ Without last block mark, frames are considered unfinished (hence corrupted) by compliant decoders.
- `ZSTD_CCtx` object can be re-used (ZSTD_compressBegin()) to compress some new frame.
+ `ZSTD_CCtx` object can be re-used (ZSTD_compressBegin()) to compress again.
*/
/*===== Buffer-less streaming compression functions =====*/
@@ -809,40 +817,53 @@ ZSTDLIB_API size_t ZSTD_compressEnd(ZSTD_CCtx* cctx, void* dst, size_t dstCapaci
A ZSTD_DCtx object can be re-used multiple times.
First typical operation is to retrieve frame parameters, using ZSTD_getFrameHeader().
- It fills a ZSTD_frameHeader structure with important information to correctly decode the frame,
- such as minimum rolling buffer size to allocate to decompress data (`windowSize`),
- and the dictionary ID in use.
- (Note : content size is optional, it may not be present. 0 means : content size unknown).
- Note that these values could be wrong, either because of data malformation, or because an attacker is spoofing deliberate false information.
- As a consequence, check that values remain within valid application range, especially `windowSize`, before allocation.
- Each application can set its own limit, depending on local restrictions.
- For extended interoperability, it is recommended to support windowSize of at least 8 MB.
Frame header is extracted from the beginning of compressed frame, so providing only the frame's beginning is enough.
Data fragment must be large enough to ensure successful decoding.
- `ZSTD_frameHeaderSize_max` bytes is guaranteed to always be large enough.
+ `ZSTD_frameHeaderSize_max` bytes is guaranteed to always be large enough.
@result : 0 : successful decoding, the `ZSTD_frameHeader` structure is correctly filled.
>0 : `srcSize` is too small, please provide at least @result bytes on next attempt.
errorCode, which can be tested using ZSTD_isError().
- Start decompression, with ZSTD_decompressBegin().
+ It fills a ZSTD_frameHeader structure with important information to correctly decode the frame,
+ such as the dictionary ID, content size, or maximum back-reference distance (`windowSize`).
+ Note that these values could be wrong, either because of data corruption, or because a 3rd party deliberately spoofs false information.
+ As a consequence, check that values remain within valid application range.
+ For example, do not allocate memory blindly, check that `windowSize` is within expectation.
+ Each application can set its own limits, depending on local restrictions.
+ For extended interoperability, it is recommended to support `windowSize` of at least 8 MB.
+
+ ZSTD_decompressContinue() needs previous data blocks during decompression, up to `windowSize` bytes.
+ ZSTD_decompressContinue() is very sensitive to contiguity,
+ if 2 blocks don't follow each other, make sure that either the compressor breaks contiguity at the same place,
+ or that previous contiguous segment is large enough to properly handle maximum back-reference distance.
+ There are multiple ways to guarantee this condition.
+
+ The most memory efficient way is to use a round buffer of sufficient size.
+ Sufficient size is determined by invoking ZSTD_decodingBufferSize_min(),
+ which can @return an error code if required value is too large for current system (in 32-bits mode).
+ In a round buffer methodology, ZSTD_decompressContinue() decompresses each block next to previous one,
+ up to the moment there is not enough room left in the buffer to guarantee decoding another full block,
+ which maximum size is provided in `ZSTD_frameHeader` structure, field `blockSizeMax`.
+ At which point, decoding can resume from the beginning of the buffer.
+ Note that already decoded data stored in the buffer should be flushed before being overwritten.
+
+ There are alternatives possible, for example using two or more buffers of size `windowSize` each, though they consume more memory.
+
+ Finally, if you control the compression process, you can also ignore all buffer size rules,
+ as long as the encoder and decoder progress in "lock-step",
+ aka use exactly the same buffer sizes, break contiguity at the same place, etc.
+
+ Once buffers are setup, start decompression, with ZSTD_decompressBegin().
If decompression requires a dictionary, use ZSTD_decompressBegin_usingDict() or ZSTD_decompressBegin_usingDDict().
- Alternatively, you can copy a prepared context, using ZSTD_copyDCtx().
Then use ZSTD_nextSrcSizeToDecompress() and ZSTD_decompressContinue() alternatively.
ZSTD_nextSrcSizeToDecompress() tells how many bytes to provide as 'srcSize' to ZSTD_decompressContinue().
ZSTD_decompressContinue() requires this _exact_ amount of bytes, or it will fail.
- @result of ZSTD_decompressContinue() is the number of bytes regenerated within 'dst' (necessarily <= dstCapacity).
- It can be zero, which is not an error; it just means ZSTD_decompressContinue() has decoded some metadata item.
+ @result of ZSTD_decompressContinue() is the number of bytes regenerated within 'dst' (necessarily <= dstCapacity).
+ It can be zero : it just means ZSTD_decompressContinue() has decoded some metadata item.
It can also be an error code, which can be tested with ZSTD_isError().
- ZSTD_decompressContinue() needs previous data blocks during decompression, up to `windowSize`.
- They should preferably be located contiguously, prior to current block.
- Alternatively, a round buffer of sufficient size is also possible. Sufficient size is determined by frame parameters.
- ZSTD_decompressContinue() is very sensitive to contiguity,
- if 2 blocks don't follow each other, make sure that either the compressor breaks contiguity at the same place,
- or that previous contiguous segment is large enough to properly handle maximum back-reference.
-
A frame is fully decoded when ZSTD_nextSrcSizeToDecompress() returns zero.
Context can then be reset to start a new decompression.
@@ -852,75 +873,101 @@ ZSTDLIB_API size_t ZSTD_compressEnd(ZSTD_CCtx* cctx, void* dst, size_t dstCapaci
== Special case : skippable frames ==
Skippable frames allow integration of user-defined data into a flow of concatenated frames.
- Skippable frames will be ignored (skipped) by a decompressor. The format of skippable frames is as follows :
+ Skippable frames will be ignored (skipped) by decompressor.
+ The format of skippable frames is as follows :
a) Skippable frame ID - 4 Bytes, Little endian format, any value from 0x184D2A50 to 0x184D2A5F
b) Frame Size - 4 Bytes, Little endian format, unsigned 32-bits
c) Frame Content - any content (User Data) of length equal to Frame Size
- For skippable frames ZSTD_decompressContinue() always returns 0.
- For skippable frames ZSTD_getFrameHeader() returns fparamsPtr->windowLog==0 what means that a frame is skippable.
- Note : If fparamsPtr->frameContentSize==0, it is ambiguous: the frame might actually be a Zstd encoded frame with no content.
- For purposes of decompression, it is valid in both cases to skip the frame using
- ZSTD_findFrameCompressedSize to find its size in bytes.
- It also returns Frame Size as fparamsPtr->frameContentSize.
+ For skippable frames ZSTD_getFrameHeader() returns zfhPtr->frameType==ZSTD_skippableFrame.
+ For skippable frames ZSTD_decompressContinue() always returns 0 : it only skips the content.
*/
/*===== Buffer-less streaming decompression functions =====*/
typedef enum { ZSTD_frame, ZSTD_skippableFrame } ZSTD_frameType_e;
typedef struct {
- unsigned long long frameContentSize; /* ZSTD_CONTENTSIZE_UNKNOWN means this field is not available. 0 means "empty" */
+ unsigned long long frameContentSize; /* if == ZSTD_CONTENTSIZE_UNKNOWN, it means this field is not available. 0 means "empty" */
unsigned long long windowSize; /* can be very large, up to <= frameContentSize */
+ unsigned blockSizeMax;
ZSTD_frameType_e frameType; /* if == ZSTD_skippableFrame, frameContentSize is the size of skippable content */
unsigned headerSize;
unsigned dictID;
unsigned checksumFlag;
} ZSTD_frameHeader;
ZSTDLIB_API size_t ZSTD_getFrameHeader(ZSTD_frameHeader* zfhPtr, const void* src, size_t srcSize); /**< doesn't consume input */
+ZSTDLIB_API size_t ZSTD_decodingBufferSize_min(unsigned long long windowSize, unsigned long long frameContentSize); /**< when frame content size is not known, pass in frameContentSize == ZSTD_CONTENTSIZE_UNKNOWN */
+
ZSTDLIB_API size_t ZSTD_decompressBegin(ZSTD_DCtx* dctx);
ZSTDLIB_API size_t ZSTD_decompressBegin_usingDict(ZSTD_DCtx* dctx, const void* dict, size_t dictSize);
ZSTDLIB_API size_t ZSTD_decompressBegin_usingDDict(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict);
-ZSTDLIB_API void ZSTD_copyDCtx(ZSTD_DCtx* dctx, const ZSTD_DCtx* preparedDCtx);
ZSTDLIB_API size_t ZSTD_nextSrcSizeToDecompress(ZSTD_DCtx* dctx);
ZSTDLIB_API size_t ZSTD_decompressContinue(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize);
+
+/* misc */
+ZSTDLIB_API void ZSTD_copyDCtx(ZSTD_DCtx* dctx, const ZSTD_DCtx* preparedDCtx);
typedef enum { ZSTDnit_frameHeader, ZSTDnit_blockHeader, ZSTDnit_block, ZSTDnit_lastBlock, ZSTDnit_checksum, ZSTDnit_skippableFrame } ZSTD_nextInputType_e;
ZSTDLIB_API ZSTD_nextInputType_e ZSTD_nextInputType(ZSTD_DCtx* dctx);
-/*=== New advanced API (experimental, and compression only) ===*/
+/* ============================================ */
+/** New advanced API (experimental) */
+/* ============================================ */
/* notes on API design :
- * In this proposal, parameters are pushed one by one into an existing CCtx,
+ * In this proposal, parameters are pushed one by one into an existing context,
* and then applied on all subsequent compression jobs.
* When no parameter is ever provided, CCtx is created with compression level ZSTD_CLEVEL_DEFAULT.
*
* This API is intended to replace all others experimental API.
* It can basically do all other use cases, and even new ones.
- * It stands a good chance to become "stable",
- * after a reasonable testing period.
+ * In constrast with _advanced() variants, it stands a reasonable chance to become "stable",
+ * after a good testing period.
*/
/* note on naming convention :
* Initially, the API favored names like ZSTD_setCCtxParameter() .
* In this proposal, convention is changed towards ZSTD_CCtx_setParameter() .
* The main driver is that it identifies more clearly the target object type.
- * It feels clearer in light of potential variants :
+ * It feels clearer when considering multiple targets :
* ZSTD_CDict_setParameter() (rather than ZSTD_setCDictParameter())
- * ZSTD_DCtx_setParameter() (rather than ZSTD_setDCtxParameter() )
- * Left variant feels easier to distinguish.
+ * ZSTD_CCtxParams_setParameter() (rather than ZSTD_setCCtxParamsParameter() )
+ * etc...
*/
/* note on enum design :
- * All enum will be manually set to explicit values before reaching "stable API" status */
+ * All enum will be pinned to explicit values before reaching "stable API" status */
typedef enum {
+ /* Question : should we have a format ZSTD_f_auto ?
+ * For the time being, it would mean exactly the same as ZSTD_f_zstd1.
+ * But, in the future, should several formats be supported,
+ * on the compression side, it would mean "default format".
+ * On the decompression side, it would mean "multi format",
+ * and ZSTD_f_zstd1 could be reserved to mean "accept *only* zstd frames".
+ * Since meaning is a little different, another option could be to define different enums for compression and decompression.
+ * This question could be kept for later, when there are actually multiple formats to support,
+ * but there is also the question of pinning enum values, and pinning value `0` is especially important */
+ ZSTD_f_zstd1 = 0, /* zstd frame format, specified in zstd_compression_format.md (default) */
+ ZSTD_f_zstd1_magicless, /* Variant of zstd frame format, without initial 4-bytes magic number.
+ * Useful to save 4 bytes per generated frame.
+ * Decoder cannot recognise automatically this format, requiring instructions. */
+} ZSTD_format_e;
+
+typedef enum {
+ /* compression format */
+ ZSTD_p_format = 10, /* See ZSTD_format_e enum definition.
+ * Cast selected format as unsigned for ZSTD_CCtx_setParameter() compatibility. */
+
/* compression parameters */
ZSTD_p_compressionLevel=100, /* Update all compression parameters according to pre-defined cLevel table
* Default level is ZSTD_CLEVEL_DEFAULT==3.
* Special: value 0 means "do not change cLevel". */
ZSTD_p_windowLog, /* Maximum allowed back-reference distance, expressed as power of 2.
* Must be clamped between ZSTD_WINDOWLOG_MIN and ZSTD_WINDOWLOG_MAX.
- * Special: value 0 means "do not change windowLog". */
+ * Special: value 0 means "do not change windowLog".
+ * Note: Using a window size greater than ZSTD_MAXWINDOWSIZE_DEFAULT (default: 2^27)
+ * requires setting the maximum window size at least as large during decompression. */
ZSTD_p_hashLog, /* Size of the probe table, as a power of 2.
* Resulting table size is (1 << (hashLog+2)).
* Must be clamped between ZSTD_HASHLOG_MIN and ZSTD_HASHLOG_MAX.
@@ -959,12 +1006,6 @@ typedef enum {
ZSTD_p_checksumFlag, /* A 32-bits checksum of content is written at end of frame (default:0) */
ZSTD_p_dictIDFlag, /* When applicable, dictID of dictionary is provided in frame header (default:1) */
- /* dictionary parameters (must be set before ZSTD_CCtx_loadDictionary) */
- ZSTD_p_dictMode=300, /* Select how dictionary content must be interpreted. Value must be from type ZSTD_dictMode_e.
- * default : 0==auto : dictionary will be "full" if it respects specification, otherwise it will be "rawContent" */
- ZSTD_p_refDictContent, /* Dictionary content will be referenced, instead of copied (default:0==byCopy).
- * It requires that dictionary buffer outlives its users */
-
/* multi-threading parameters */
ZSTD_p_nbThreads=400, /* Select how many threads a compression job can spawn (default:1)
* More threads improve speed, but also increase memory usage.
@@ -980,6 +1021,35 @@ typedef enum {
/* advanced parameters - may not remain available after API update */
ZSTD_p_forceMaxWindow=1100, /* Force back-reference distances to remain < windowSize,
* even when referencing into Dictionary content (default:0) */
+ ZSTD_p_enableLongDistanceMatching=1200, /* Enable long distance matching.
+ * This parameter is designed to improve the compression
+ * ratio for large inputs with long distance matches.
+ * This increases the memory usage as well as window size.
+ * Note: setting this parameter sets all the LDM parameters
+ * as well as ZSTD_p_windowLog. It should be set after
+ * ZSTD_p_compressionLevel and before ZSTD_p_windowLog and
+ * other LDM parameters. Setting the compression level
+ * after this parameter overrides the window log, though LDM
+ * will remain enabled until explicitly disabled. */
+ ZSTD_p_ldmHashLog, /* Size of the table for long distance matching, as a power of 2.
+ * Larger values increase memory usage and compression ratio, but decrease
+ * compression speed.
+ * Must be clamped between ZSTD_HASHLOG_MIN and ZSTD_HASHLOG_MAX
+ * (default: windowlog - 7). */
+ ZSTD_p_ldmMinMatch, /* Minimum size of searched matches for long distance matcher.
+ * Larger/too small values usually decrease compression ratio.
+ * Must be clamped between ZSTD_LDM_MINMATCH_MIN
+ * and ZSTD_LDM_MINMATCH_MAX (default: 64). */
+ ZSTD_p_ldmBucketSizeLog, /* Log size of each bucket in the LDM hash table for collision resolution.
+ * Larger values usually improve collision resolution but may decrease
+ * compression speed.
+ * The maximum value is ZSTD_LDM_BUCKETSIZELOG_MAX (default: 3). */
+ ZSTD_p_ldmHashEveryLog, /* Frequency of inserting/looking up entries in the LDM hash table.
+ * The default is MAX(0, (windowLog - ldmHashLog)) to
+ * optimize hash table usage.
+ * Larger values improve compression speed. Deviating far from the
+ * default value will likely result in a decrease in compression ratio.
+ * Must be clamped between 0 and ZSTD_WINDOWLOG_MAX - ZSTD_HASHLOG_MIN. */
} ZSTD_cParameter;
@@ -1007,14 +1077,22 @@ ZSTDLIB_API size_t ZSTD_CCtx_setPledgedSrcSize(ZSTD_CCtx* cctx, unsigned long lo
* @result : 0, or an error code (which can be tested with ZSTD_isError()).
* Special : Adding a NULL (or 0-size) dictionary invalidates any previous dictionary,
* meaning "return to no-dictionary mode".
- * Note 1 : `dict` content will be copied internally,
- * except if ZSTD_p_refDictContent is set before loading.
+ * Note 1 : `dict` content will be copied internally. Use
+ * ZSTD_CCtx_loadDictionary_byReference() to reference dictionary
+ * content instead. The dictionary buffer must then outlive its
+ * users.
* Note 2 : Loading a dictionary involves building tables, which are dependent on compression parameters.
* For this reason, compression parameters cannot be changed anymore after loading a dictionary.
* It's also a CPU-heavy operation, with non-negligible impact on latency.
* Note 3 : Dictionary will be used for all future compression jobs.
- * To return to "no-dictionary" situation, load a NULL dictionary */
+ * To return to "no-dictionary" situation, load a NULL dictionary
+ * Note 5 : Use ZSTD_CCtx_loadDictionary_advanced() to select how dictionary
+ * content will be interpreted.
+ */
ZSTDLIB_API size_t ZSTD_CCtx_loadDictionary(ZSTD_CCtx* cctx, const void* dict, size_t dictSize);
+ZSTDLIB_API size_t ZSTD_CCtx_loadDictionary_byReference(ZSTD_CCtx* cctx, const void* dict, size_t dictSize);
+ZSTDLIB_API size_t ZSTD_CCtx_loadDictionary_advanced(ZSTD_CCtx* cctx, const void* dict, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictMode_e dictMode);
+
/*! ZSTD_CCtx_refCDict() :
* Reference a prepared dictionary, to be used for all next compression jobs.
@@ -1040,23 +1118,26 @@ ZSTDLIB_API size_t ZSTD_CCtx_refCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict);
* Note 1 : Prefix buffer is referenced. It must outlive compression job.
* Note 2 : Referencing a prefix involves building tables, which are dependent on compression parameters.
* It's a CPU-heavy operation, with non-negligible impact on latency.
- * Note 3 : it's possible to alter ZSTD_p_dictMode using ZSTD_CCtx_setParameter() */
+ * Note 3 : By default, the prefix is treated as raw content
+ * (ZSTD_dm_rawContent). Use ZSTD_CCtx_refPrefix_advanced() to alter
+ * dictMode. */
ZSTDLIB_API size_t ZSTD_CCtx_refPrefix(ZSTD_CCtx* cctx, const void* prefix, size_t prefixSize);
+ZSTDLIB_API size_t ZSTD_CCtx_refPrefix_advanced(ZSTD_CCtx* cctx, const void* prefix, size_t prefixSize, ZSTD_dictMode_e dictMode);
typedef enum {
ZSTD_e_continue=0, /* collect more data, encoder transparently decides when to output result, for optimal conditions */
ZSTD_e_flush, /* flush any data provided so far - frame will continue, future data can still reference previous data for better compression */
- ZSTD_e_end /* flush any remaining data and ends current frame. Any future compression starts a new frame. */
+ ZSTD_e_end /* flush any remaining data and close current frame. Any additional data starts a new frame. */
} ZSTD_EndDirective;
/*! ZSTD_compress_generic() :
* Behave about the same as ZSTD_compressStream. To note :
* - Compression parameters are pushed into CCtx before starting compression, using ZSTD_CCtx_setParameter()
* - Compression parameters cannot be changed once compression is started.
- * - *dstPos must be <= dstCapacity, *srcPos must be <= srcSize
- * - *dspPos and *srcPos will be updated. They are guaranteed to remain below their respective limit.
+ * - outpot->pos must be <= dstCapacity, input->pos must be <= srcSize
+ * - outpot->pos and input->pos will be updated. They are guaranteed to remain below their respective limit.
* - @return provides the minimum amount of data still to flush from internal buffers
* or an error code, which can be tested using ZSTD_isError().
* if @return != 0, flush is not fully completed, there is some data left within internal buffers.
@@ -1075,6 +1156,7 @@ ZSTDLIB_API size_t ZSTD_compress_generic (ZSTD_CCtx* cctx,
* Useful after an error, or to interrupt an ongoing compression job and start a new one.
* Any internal data not yet flushed is cancelled.
* Dictionary (if any) is dropped.
+ * All parameters are back to default values.
* It's possible to modify compression parameters after a reset.
*/
ZSTDLIB_API void ZSTD_CCtx_reset(ZSTD_CCtx* cctx); /* Not ready yet ! */
@@ -1083,21 +1165,187 @@ ZSTDLIB_API void ZSTD_CCtx_reset(ZSTD_CCtx* cctx); /* Not ready yet ! */
/*! ZSTD_compress_generic_simpleArgs() :
* Same as ZSTD_compress_generic(),
* but using only integral types as arguments.
- * Argument list is larger and less expressive than ZSTD_{in,out}Buffer,
+ * Argument list is larger than ZSTD_{in,out}Buffer,
* but can be helpful for binders from dynamic languages
* which have troubles handling structures containing memory pointers.
*/
-size_t ZSTD_compress_generic_simpleArgs (
+ZSTDLIB_API size_t ZSTD_compress_generic_simpleArgs (
ZSTD_CCtx* cctx,
void* dst, size_t dstCapacity, size_t* dstPos,
const void* src, size_t srcSize, size_t* srcPos,
ZSTD_EndDirective endOp);
+/*! ZSTD_CCtx_params :
+ * Quick howto :
+ * - ZSTD_createCCtxParams() : Create a ZSTD_CCtx_params structure
+ * - ZSTD_CCtxParam_setParameter() : Push parameters one by one into
+ * an existing ZSTD_CCtx_params structure.
+ * This is similar to
+ * ZSTD_CCtx_setParameter().
+ * - ZSTD_CCtx_setParametersUsingCCtxParams() : Apply parameters to
+ * an existing CCtx.
+ * These parameters will be applied to
+ * all subsequent compression jobs.
+ * - ZSTD_compress_generic() : Do compression using the CCtx.
+ * - ZSTD_freeCCtxParams() : Free the memory.
+ *
+ * This can be used with ZSTD_estimateCCtxSize_advanced_usingCCtxParams()
+ * for static allocation for single-threaded compression.
+ */
+ZSTDLIB_API ZSTD_CCtx_params* ZSTD_createCCtxParams(void);
-/**
- Block functions
+/*! ZSTD_resetCCtxParams() :
+ * Reset params to default, with the default compression level.
+ */
+ZSTDLIB_API size_t ZSTD_resetCCtxParams(ZSTD_CCtx_params* params);
+
+/*! ZSTD_initCCtxParams() :
+ * Initializes the compression parameters of cctxParams according to
+ * compression level. All other parameters are reset to their default values.
+ */
+ZSTDLIB_API size_t ZSTD_initCCtxParams(ZSTD_CCtx_params* cctxParams, int compressionLevel);
+
+/*! ZSTD_initCCtxParams_advanced() :
+ * Initializes the compression and frame parameters of cctxParams according to
+ * params. All other parameters are reset to their default values.
+ */
+ZSTDLIB_API size_t ZSTD_initCCtxParams_advanced(ZSTD_CCtx_params* cctxParams, ZSTD_parameters params);
+
+ZSTDLIB_API size_t ZSTD_freeCCtxParams(ZSTD_CCtx_params* params);
+
+/*! ZSTD_CCtxParam_setParameter() :
+ * Similar to ZSTD_CCtx_setParameter.
+ * Set one compression parameter, selected by enum ZSTD_cParameter.
+ * Parameters must be applied to a ZSTD_CCtx using ZSTD_CCtx_setParametersUsingCCtxParams().
+ * Note : when `value` is an enum, cast it to unsigned for proper type checking.
+ * @result : 0, or an error code (which can be tested with ZSTD_isError()).
+ */
+ZSTDLIB_API size_t ZSTD_CCtxParam_setParameter(ZSTD_CCtx_params* params, ZSTD_cParameter param, unsigned value);
+
+/*! ZSTD_CCtx_setParametersUsingCCtxParams() :
+ * Apply a set of ZSTD_CCtx_params to the compression context.
+ * This must be done before the dictionary is loaded.
+ * The pledgedSrcSize is treated as unknown.
+ * Multithreading parameters are applied only if nbThreads > 1.
+ */
+ZSTDLIB_API size_t ZSTD_CCtx_setParametersUsingCCtxParams(
+ ZSTD_CCtx* cctx, const ZSTD_CCtx_params* params);
+
+
+/*=== Advanced parameters for decompression API ===*/
+
+/* The following parameters must be set after creating a ZSTD_DCtx* (or ZSTD_DStream*) object,
+ * but before starting decompression of a frame.
+ */
+
+/*! ZSTD_DCtx_loadDictionary() :
+ * Create an internal DDict from dict buffer,
+ * to be used to decompress next frames.
+ * @result : 0, or an error code (which can be tested with ZSTD_isError()).
+ * Special : Adding a NULL (or 0-size) dictionary invalidates any previous dictionary,
+ * meaning "return to no-dictionary mode".
+ * Note 1 : `dict` content will be copied internally.
+ * Use ZSTD_DCtx_loadDictionary_byReference()
+ * to reference dictionary content instead.
+ * In which case, the dictionary buffer must outlive its users.
+ * Note 2 : Loading a dictionary involves building tables,
+ * which has a non-negligible impact on CPU usage and latency.
+ * Note 3 : Use ZSTD_DCtx_loadDictionary_advanced() to select
+ * how dictionary content will be interpreted and loaded.
+ */
+ZSTDLIB_API size_t ZSTD_DCtx_loadDictionary(ZSTD_DCtx* dctx, const void* dict, size_t dictSize); /* not implemented */
+ZSTDLIB_API size_t ZSTD_DCtx_loadDictionary_byReference(ZSTD_DCtx* dctx, const void* dict, size_t dictSize); /* not implemented */
+ZSTDLIB_API size_t ZSTD_DCtx_loadDictionary_advanced(ZSTD_DCtx* dctx, const void* dict, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictMode_e dictMode); /* not implemented */
+
+
+/*! ZSTD_DCtx_refDDict() :
+ * Reference a prepared dictionary, to be used to decompress next frames.
+ * The dictionary remains active for decompression of future frames using same DCtx.
+ * @result : 0, or an error code (which can be tested with ZSTD_isError()).
+ * Note 1 : Currently, only one dictionary can be managed.
+ * Referencing a new dictionary effectively "discards" any previous one.
+ * Special : adding a NULL DDict means "return to no-dictionary mode".
+ * Note 2 : DDict is just referenced, its lifetime must outlive its usage from DCtx.
+ */
+ZSTDLIB_API size_t ZSTD_DCtx_refDDict(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict); /* not implemented */
+
+
+/*! ZSTD_DCtx_refPrefix() :
+ * Reference a prefix (single-usage dictionary) for next compression job.
+ * Prefix is **only used once**. It must be explicitly referenced before each frame.
+ * If there is a need to use same prefix multiple times, consider embedding it into a ZSTD_DDict instead.
+ * @result : 0, or an error code (which can be tested with ZSTD_isError()).
+ * Note 1 : Adding any prefix (including NULL) invalidates any previously set prefix or dictionary
+ * Note 2 : Prefix buffer is referenced. It must outlive compression job.
+ * Note 3 : By default, the prefix is treated as raw content (ZSTD_dm_rawContent).
+ * Use ZSTD_CCtx_refPrefix_advanced() to alter dictMode.
+ * Note 4 : Referencing a raw content prefix has almost no cpu nor memory cost.
+ */
+ZSTDLIB_API size_t ZSTD_DCtx_refPrefix(ZSTD_DCtx* dctx, const void* prefix, size_t prefixSize); /* not implemented */
+ZSTDLIB_API size_t ZSTD_DCtx_refPrefix_advanced(ZSTD_DCtx* dctx, const void* prefix, size_t prefixSize, ZSTD_dictMode_e dictMode); /* not implemented */
+
+
+/*! ZSTD_DCtx_setMaxWindowSize() :
+ * Refuses allocating internal buffers for frames requiring a window size larger than provided limit.
+ * This is useful to prevent a decoder context from reserving too much memory for itself (potential attack scenario).
+ * This parameter is only useful in streaming mode, since no internal buffer is allocated in direct mode.
+ * By default, a decompression context accepts all window sizes <= (1 << ZSTD_WINDOWLOG_MAX)
+ * @return : 0, or an error code (which can be tested using ZSTD_isError()).
+ */
+ZSTDLIB_API size_t ZSTD_DCtx_setMaxWindowSize(ZSTD_DCtx* dctx, size_t maxWindowSize);
+
+
+/*! ZSTD_DCtx_setFormat() :
+ * Instruct the decoder context about what kind of data to decode next.
+ * This instruction is mandatory to decode data without a fully-formed header,
+ * such ZSTD_f_zstd1_magicless for example.
+ * @return : 0, or an error code (which can be tested using ZSTD_isError()).
+ */
+ZSTDLIB_API size_t ZSTD_DCtx_setFormat(ZSTD_DCtx* dctx, ZSTD_format_e format);
+
+
+/*! ZSTD_decompress_generic() :
+ * Behave the same as ZSTD_decompressStream.
+ * Decompression parameters cannot be changed once decompression is started.
+ * @return : an error code, which can be tested using ZSTD_isError()
+ * if >0, a hint, nb of expected input bytes for next invocation.
+ * `0` means : a frame has just been fully decoded and flushed.
+ */
+ZSTDLIB_API size_t ZSTD_decompress_generic(ZSTD_DCtx* dctx,
+ ZSTD_outBuffer* output,
+ ZSTD_inBuffer* input);
+
+
+/*! ZSTD_decompress_generic_simpleArgs() :
+ * Same as ZSTD_decompress_generic(),
+ * but using only integral types as arguments.
+ * Argument list is larger than ZSTD_{in,out}Buffer,
+ * but can be helpful for binders from dynamic languages
+ * which have troubles handling structures containing memory pointers.
+ */
+ZSTDLIB_API size_t ZSTD_decompress_generic_simpleArgs (
+ ZSTD_DCtx* dctx,
+ void* dst, size_t dstCapacity, size_t* dstPos,
+ const void* src, size_t srcSize, size_t* srcPos);
+
+
+/*! ZSTD_DCtx_reset() :
+ * Return a DCtx to clean state.
+ * If a decompression was ongoing, any internal data not yet flushed is cancelled.
+ * All parameters are back to default values, including sticky ones.
+ * Dictionary (if any) is dropped.
+ * Parameters can be modified again after a reset.
+ */
+ZSTDLIB_API void ZSTD_DCtx_reset(ZSTD_DCtx* dctx);
+
+
+
+/* ============================ */
+/** Block level API */
+/* ============================ */
+/*!
Block functions produce and decode raw zstd blocks, without frame metadata.
Frame metadata cost is typically ~18 bytes, which can be non-negligible for very small blocks (< 100 bytes).
User will have to take in charge required information to regenerate data, such as compressed and content sizes.
@@ -1109,7 +1357,7 @@ size_t ZSTD_compress_generic_simpleArgs (
+ compression : any ZSTD_compressBegin*() variant, including with dictionary
+ decompression : any ZSTD_decompressBegin*() variant, including with dictionary
+ copyCCtx() and copyDCtx() can be used too
- - Block size is limited, it must be <= ZSTD_getBlockSize() <= ZSTD_BLOCKSIZE_MAX
+ - Block size is limited, it must be <= ZSTD_getBlockSize() <= ZSTD_BLOCKSIZE_MAX == 128 KB
+ If input is larger than a block size, it's necessary to split input data into multiple blocks
+ For inputs larger than a single block size, consider using the regular ZSTD_compress() instead.
Frame metadata is not that costly, and quickly becomes negligible as source size grows larger.
@@ -1128,7 +1376,7 @@ size_t ZSTD_compress_generic_simpleArgs (
ZSTDLIB_API size_t ZSTD_getBlockSize (const ZSTD_CCtx* cctx);
ZSTDLIB_API size_t ZSTD_compressBlock (ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize);
ZSTDLIB_API size_t ZSTD_decompressBlock(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize);
-ZSTDLIB_API size_t ZSTD_insertBlock(ZSTD_DCtx* dctx, const void* blockStart, size_t blockSize); /**< insert block into `dctx` history. Useful for uncompressed blocks */
+ZSTDLIB_API size_t ZSTD_insertBlock(ZSTD_DCtx* dctx, const void* blockStart, size_t blockSize); /**< insert uncompressed block into `dctx` history. Useful for multi-blocks decompression */
#endif /* ZSTD_H_ZSTD_STATIC_LINKING_ONLY */